GNU bug report logs - #28647
[PATCH] services: base: Add file->udev-rule function.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 29 Sep 2017 16:00:02 UTC

Severity: normal

Tags: fixed, patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28647 <at> debbugs.gnu.org
Subject: [bug#28647] [PATCHv2] services: base: Add file->udev-rule function.
Date: Sun, 22 Oct 2017 21:53:28 -0400
[Message part 1 (text/plain, inline)]
Hi Ludovic, and sorry for the delayed reply!

ludo <at> gnu.org (Ludovic Courtès) writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> While experimenting with udev rules, I found a need to be able to pass
>> file-like objects containing udev rules to the udev-service. This patch
>> implements a `file->udev-rule' method that does just that.
>
> Looks useful!
>
>> From 050e96b3325f851f3118de0c881d25796d76049b Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>> Date: Wed, 27 Sep 2017 21:33:25 -0400
>> Subject: [PATCH] services: base: Add file->udev-rule function.
>>
>> This function allows passing a file-like object to the udev service.
>>
>> * gnu/services/base.scm (file->udev-rule): New function.
>> * doc/guix.texi (Base Services): Document it.
>
> [...]
>
>> -@deffn {Scheme Procedure} udev-service [#:udev udev]
>> +@deffn {Scheme Procedure} udev-service [#:udev @var{eudev} #:rules @code{'()}]
>>  Run @var{udev}, which populates the @file{/dev} directory dynamically.
>> +Packages can be included in the @var{rules} list in order to extend the
>> +udev rules with the definitions found under their
>> +@file{lib/udev/rules.d} sub-directory.
>> +
>> +The functions @code{udev-rules} and @code{file->udev-rules} from
>> +@code{(gnu services base)} can be used to create rule objects based on a
>> +string or a file-like object, respectively. Those rule objects can be
>> +passed to udev-service just like packages.
>
> Could you document the procedures with @deffn so that they have an entry
> in the index?
>
>   @deffn {Scheme Procedure} udev-rules @var{rules}
>   …
>   @end deffn
>
>   @deffn {Scheme Procedure} file->udev-rules @var{files}
>   Similar to @code{udev-rules}, but…
>   @end deffn
>

I'm hoping the attached patch addresses the requested additions. Thanks
for the review and comments.

Maxim

[0001-services-base-Add-file-udev-rule-function.patch (text/x-patch, attachment)]

This bug report was last modified 7 years and 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.