From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCH] services: base: Add file->udev-rule function. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Sep 2017 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 28647@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.15067007565314 (code B ref -1); Fri, 29 Sep 2017 16:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Sep 2017 15:59:16 +0000 Received: from localhost ([127.0.0.1]:39426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxxh5-0001Nd-OM for submit@debbugs.gnu.org; Fri, 29 Sep 2017 11:59:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxxh3-0001NM-To for submit@debbugs.gnu.org; Fri, 29 Sep 2017 11:59:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxxgx-0003ck-9D for submit@debbugs.gnu.org; Fri, 29 Sep 2017 11:59:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM, PERCENT_RANDOM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:32970) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxxgx-0003cc-5L for submit@debbugs.gnu.org; Fri, 29 Sep 2017 11:59:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxxgv-000771-He for guix-patches@gnu.org; Fri, 29 Sep 2017 11:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxxgr-0003a0-Kj for guix-patches@gnu.org; Fri, 29 Sep 2017 11:59:05 -0400 Received: from mail-it0-x22c.google.com ([2607:f8b0:4001:c0b::22c]:50247) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxxgr-0003ZX-B3 for guix-patches@gnu.org; Fri, 29 Sep 2017 11:59:01 -0400 Received: by mail-it0-x22c.google.com with SMTP id y138so259358itc.5 for ; Fri, 29 Sep 2017 08:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=ajlqMsN6wRJ2/nyo2Z0p4X8e9bF3VnL0QhvqjcwHN4Y=; b=H6C5pcHOI26Ag5Hu7HubFzuGDVvSm1zPKiJ1rnnBdt08T1fGfaCc3EhreivaHTaJyh iGmTm0+0ikxNG320YWntOESJ9RmUp4GoK1RoDrWDqL1HOU8/y1AdsMq0EhvGctiYutia QkmTOc1a++f03NmuscrxjfG5iOqRVVrvaaBnDFi3v+NFTT0RaXrD/a1oqouPU/DuPL5Y nDQ7xOKFIf79dfPPY6ouNgiPZ3/bt8279SCwwjAibpFYNo32IWlxLt61H+7cwyXOQjzx Hl/zji07Kx3C9Ez/8sH7BvXmFq78USW0Tqy7ti/4HKpqyyHd3D5HsrVKawT/blWI0sbD i5bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=ajlqMsN6wRJ2/nyo2Z0p4X8e9bF3VnL0QhvqjcwHN4Y=; b=IjSD5QnXOBePDOgGuwWh4gZiAEuQYaowPdYqllwZV+5+DOofo6/0FXq4R3ntC0Yp6M /PESPuq4j6df+OVhmGYKF+XHYjbtKjH5+8rZIwfElKSxNY12oFF2RYz6QMAYaOjtquGS KfGlIqryhFmioV90ze/pEFRuFzoVM1tSUMejUzL9Zy5FakF4Fr/aJ39eSlPs6DHu/vMF BcjD9E509RIVy9ylKLBXOfSPOSLMVw7T2TPdkjNgz7tZyO00cOl2knR62AbIlAyHGzZE Lmf8tUmmoZyVoM7z6dvjQmZ0xz26ei0yIa/Kswp9BPfHx1dsX2k2VWrqjRSBNl9w7hnR bI6A== X-Gm-Message-State: AMCzsaU6VASXmiSvRU4BpOxn30LnIIcyWSUDfd1GOiMnywT3Rnj6o0ly WUHZH0MFb90ZxW7joxv1AY6pKJVE X-Google-Smtp-Source: AOwi7QDe6iIJ88tKEzQebG8k/qbYeA4BL1HXj2guJjFD2IgFx2OrKCUfVPUPKqaKt+EqqDE9DMdgIQ== X-Received: by 10.36.250.10 with SMTP id v10mr7406928ith.135.1506700740181; Fri, 29 Sep 2017 08:59:00 -0700 (PDT) Received: from apteryx (104-222-112-128.cpe.teksavvy.com. [104.222.112.128]) by smtp.gmail.com with ESMTPSA id i131sm1477658itf.18.2017.09.29.08.58.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2017 08:58:59 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 29 Sep 2017 11:58:58 -0400 Message-ID: <87lgkxxzr1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.2 (-) --=-=-= Content-Type: text/plain Hello, 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-services-base-Add-file-udev-rule-function.patch >From 050e96b3325f851f3118de0c881d25796d76049b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer 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. --- doc/guix.texi | 15 ++++++++++++--- gnu/services/base.scm | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index fff3fbd5f..a073dccb5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9707,11 +9707,20 @@ Return a service that runs the Guix build daemon according to @var{config}. @end deffn -@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. + @end deffn -@deffn {Scheme Procedure} urandom-seed-service @var{#f} +@deffn {Scheme Procedure} urandom-seed-service Save some entropy in @var{%random-seed-file} to seed @file{/dev/urandom} when rebooting. @end deffn @@ -9823,7 +9832,7 @@ to add @var{device} to the kernel's entropy pool. The service will fail if @cindex session limits @cindex ulimit @cindex priority -@deffn {Scheme Procedure} pam-limits-service [#:limits @var{limits}] +@deffn {Scheme Procedure} pam-limits-service [#:limits @code{'()}] Return a service that installs a configuration file for the @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 64620a9b0..711167a2f 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -71,6 +71,7 @@ udev-service-type udev-service udev-rule + file->udev-rule login-configuration login-configuration? @@ -1628,6 +1629,22 @@ item of @var{packages}." (lambda (port) (display #$contents port))))))) +(define (file->udev-rule file-name file) + "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." + (computed-file file-name + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (define rules.d + (string-append #$output "/lib/udev/rules.d")) + + (define file-copy-dest + (string-append rules.d "/" #$file-name)) + + (mkdir-p rules.d) + (copy-file #$file file-copy-dest))))) + (define kvm-udev-rule ;; Return a directory with a udev rule that changes the group of /dev/kvm to ;; "kvm" and makes it #o660. Apparently QEMU-KVM used to ship this rule, -- 2.14.1 --=-=-= Content-Type: text/plain Below is an operating-system declaration that makes use of it. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=config.scm Content-Description: Sample config using the new method. ;; This is an operating system configuration template ;; for a "desktop" setup without full-blown desktop ;; environments. (use-modules (gnu) (gnu system nss) (gnu services) (gnu system shadow) ;for user-group (guix download) ;for url-fetch (guix gexp) ;for file-append (guix packages) ;for origin (guix store) ;for %default-substitute-urls (srfi srfi-1)) ;for the remove function (use-service-modules base ;for nscd-service-type desktop networking ;for wicd-service-type ssh) ;for lsh-service (use-package-modules admin ;for wpa-supplicant ratpoison certs) (define 51-android-udev.rules (let ((version "20170910")) (origin (method url-fetch) (uri (string-append "https://raw.githubusercontent.com/M0Rf30/" "android-udev-rules/" version "/51-android.rules")) (sha256 (base32 "0lmmagpyb6xsq6zcr2w1cyx9qmjqmajkvrdbhjx32gqf1d9is003"))))) (operating-system (host-name "apteryx") (timezone "America/Montreal") ;America/Los_Angeles, Asia/Tokyo (locale "en_US.UTF-8") ;; Assuming /dev/sdX is the target hard disk, and "my-root" ;; is the label of the target root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) (file-systems (cons (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4")) %base-file-systems)) (users (cons (user-account (name "maxim") (comment "Maxim Cournoyer") (group "users") (supplementary-groups '("lp" ;for bluetooth "adbusers" ;for adb "wheel" "netdev" "audio" "video")) (home-directory "/home/maxim")) %base-user-accounts)) ;; Add plugdev to %base-groups (groups (cons (user-group (system? #t) (name "adbusers")) %base-groups)) ;; Add a bunch of window managers; we can choose one at ;; the log-in screen with F1. (packages (cons* ratpoison nss-certs ;for HTTPS access %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service and more. (services (cons* (bluetooth-service #:auto-enable? #t) (modify-services %desktop-services ;; Add a couple extra substitute servers. (guix-service-type config => (guix-configuration (inherit config) (substitute-urls (cons* "https://bayfront.guixsd.org" "https://berlin.guixsd.org" %default-substitute-urls)))) ;; Enable using adb as a simple user with a multitude of devices. (udev-service-type config => (udev-configuration (inherit config) (rules (cons* (file->udev-rule "51-android-udev.rules" 51-android-udev.rules) (udev-configuration-rules config)))))))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) --=-=-= Content-Type: text/plain Thanks, Maxim --=-=-=-- From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCH] services: base: Add file->udev-rule function. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Oct 2017 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 28647@debbugs.gnu.org Received: via spool by 28647-submit@debbugs.gnu.org id=B28647.15070367453609 (code B ref 28647); Tue, 03 Oct 2017 13:20:01 +0000 Received: (at 28647) by debbugs.gnu.org; 3 Oct 2017 13:19:05 +0000 Received: from localhost ([127.0.0.1]:45447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzN6H-0000w9-Bs for submit@debbugs.gnu.org; Tue, 03 Oct 2017 09:19:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzN6E-0000vf-VE for 28647@debbugs.gnu.org; Tue, 03 Oct 2017 09:19:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzN64-0004b9-2N for 28647@debbugs.gnu.org; Tue, 03 Oct 2017 09:18:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzN63-0004b5-UO; Tue, 03 Oct 2017 09:18:51 -0400 Received: from [193.50.110.164] (port=37812 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzN63-0006uo-Bm; Tue, 03 Oct 2017 09:18:51 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgkxxzr1.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 =?UTF-8?Q?Vend=C3=A9miaire?= an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 03 Oct 2017 15:18:49 +0200 In-Reply-To: <87lgkxxzr1.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 29 Sep 2017 11:58:58 -0400") Message-ID: <87bmlo74jq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Maxim, Maxim Cournoyer 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 > 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} =E2=80=A6 @end deffn @deffn {Scheme Procedure} file->udev-rules @var{files} Similar to @code{udev-rules}, but=E2=80=A6 @end deffn TIA! Ludo=E2=80=99. From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCH] services: base: Add file->udev-rule function. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Oct 2017 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 28647@debbugs.gnu.org Received: via spool by 28647-submit@debbugs.gnu.org id=B28647.15070368503807 (code B ref 28647); Tue, 03 Oct 2017 13:21:02 +0000 Received: (at 28647) by debbugs.gnu.org; 3 Oct 2017 13:20:50 +0000 Received: from localhost ([127.0.0.1]:45455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzN7x-0000zL-V4 for submit@debbugs.gnu.org; Tue, 03 Oct 2017 09:20:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzN7w-0000z6-PY for 28647@debbugs.gnu.org; Tue, 03 Oct 2017 09:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzN7n-0005p8-Dr for 28647@debbugs.gnu.org; Tue, 03 Oct 2017 09:20:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzN7n-0005op-9s; Tue, 03 Oct 2017 09:20:39 -0400 Received: from [193.50.110.164] (port=37854 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzN7k-00073J-NY; Tue, 03 Oct 2017 09:20:37 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgkxxzr1.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 =?UTF-8?Q?Vend=C3=A9miaire?= an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 03 Oct 2017 15:20:35 +0200 In-Reply-To: <87lgkxxzr1.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 29 Sep 2017 11:58:58 -0400") Message-ID: <87377074gs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Also, could you add an example in guix.texi that shows the use of the Android udev rules that you submitted separately? Thanks, Ludo=E2=80=99. From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCH] services: base: Add file->udev-rule function. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Oct 2017 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 28647@debbugs.gnu.org Received: via spool by 28647-submit@debbugs.gnu.org id=B28647.150871059426819 (code B ref 28647); Sun, 22 Oct 2017 22:17:01 +0000 Received: (at 28647) by debbugs.gnu.org; 22 Oct 2017 22:16:34 +0000 Received: from localhost ([127.0.0.1]:56339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6OXp-0006yV-Ub for submit@debbugs.gnu.org; Sun, 22 Oct 2017 18:16:34 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:45139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6OXp-0006yN-0b for 28647@debbugs.gnu.org; Sun, 22 Oct 2017 18:16:33 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id CEDE4F41E; Mon, 23 Oct 2017 00:16:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zRir35TirU5k; Mon, 23 Oct 2017 00:16:33 +0200 (CEST) Received: from ribbon (node-1w7jr9qobvji5c0ihz5evfepf.ipv6.telus.net [IPv6:2001:569:7790:ff00:462c:3ad:a691:7f33]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 39465F41C; Mon, 23 Oct 2017 00:16:32 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgkxxzr1.fsf@gmail.com> <87bmlo74jq.fsf@gnu.org> Date: Sun, 22 Oct 2017 15:16:28 -0700 In-Reply-To: <87bmlo74jq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 03 Oct 2017 15:18:49 +0200") Message-ID: <87wp3mygjn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hey Maxim, Just a friendly reminder. :-) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Hi Maxim, > > Maxim Cournoyer 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 >> 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 @cod= e{'()}] >> 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} > =E2=80=A6 > @end deffn > > @deffn {Scheme Procedure} file->udev-rules @var{files} > Similar to @code{udev-rules}, but=E2=80=A6 > @end deffn > > TIA! > > Ludo=E2=80=99. ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Also, could you add an example in guix.texi that shows the use of the > Android udev rules that you submitted separately? > > Thanks, > Ludo=E2=80=99. From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCHv2] services: base: Add file->udev-rule function. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Oct 2017 01:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Cc: 28647@debbugs.gnu.org Received: via spool by 28647-submit@debbugs.gnu.org id=B28647.150872361922184 (code B ref 28647); Mon, 23 Oct 2017 01:54:02 +0000 Received: (at 28647) by debbugs.gnu.org; 23 Oct 2017 01:53:39 +0000 Received: from localhost ([127.0.0.1]:56427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6Rvu-0005lk-Pv for submit@debbugs.gnu.org; Sun, 22 Oct 2017 21:53:39 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:49786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6Rvs-0005lX-7u for 28647@debbugs.gnu.org; Sun, 22 Oct 2017 21:53:36 -0400 Received: by mail-io0-f181.google.com with SMTP id n137so18576727iod.6 for <28647@debbugs.gnu.org>; Sun, 22 Oct 2017 18:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/Spn5pEsfZjx1Lh3CsZ/78oCR2JCKFlQdbBpf83703E=; b=hccpWOs7UPhGd6fNFG/r9tA95KIaHl2nyl++8hnCaiYSSqEoadVhSKEyR/Y/ELb9ly ONsAAjFVykTXzEi9zvGvciMJbCLhWcmKaUguFOA3fbbmaDni3U9paywUDTP9oQh+IiYY z4izSn/dshxHrO50RpW83cmUDAoimeHf93n843EhqB3ckvW/VE9eKKJOvFEWioDd0qA7 +3jiyvUYA3HJmQ5C14IHgcrNfwBDbNaDa5gynXH9uoAXHWja2FciuhwDHjOw/9i88LRc JUv1aybgFJ7+Cg1NARls1Gt/aeLUxtKrH68d9SeHgoJtxI9ixGd5frBbl27SGZLljL53 2Fuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=/Spn5pEsfZjx1Lh3CsZ/78oCR2JCKFlQdbBpf83703E=; b=e8xErSnuvPr9cFQ+KQDWYS9BA7pqSB5b1OT7kOvpQbbyk59CTUOOl3bQoyVd8Ktjw7 ZETGBr/as98sR+oVVbD1jDYj0EyniWYTN91d7TG4cg10dD1RLEKiP5DA+R8FJA7fIxXM mFZRWv2dsHHTwBeJ8sgC7l+eYH5iyMnv+XYkn6sgbrAu6sJeqZXoNx/MvXEmW8xDekzl eVAH+1W5hQmeGUphoOK1LUpki0yfv9G+Y4JY62wq6LjGNRIPfWyX1otBUf6x3fCulg7k 5rPn1Y24XbDIMR/JWc2+NvqkXZijBbRXPXwapBcjDUykccowhkNXVdWwSk768us5wzCU CxKA== X-Gm-Message-State: AMCzsaUYm/wIP7e9OIM+mqW2pKJ3pZ0QHiiakbnrQ64WR0PsDb0KAwkT D3YCOrfX6tMn59FO2/OPqAHgi1BX X-Google-Smtp-Source: ABhQp+TXipc7ZG/ZzlDfuAhyjr1ZMoJ4xyAHphBG+pHsMV+9SbZpfwbPK5vpCGNdjpOo/Gry5CpnBA== X-Received: by 10.107.53.42 with SMTP id c42mr16120479ioa.254.1508723610126; Sun, 22 Oct 2017 18:53:30 -0700 (PDT) Received: from apteryx ([24.140.229.228]) by smtp.gmail.com with ESMTPSA id f12sm1925562itc.1.2017.10.22.18.53.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Oct 2017 18:53:29 -0700 (PDT) From: Maxim Cournoyer References: <87lgkxxzr1.fsf@gmail.com> <87bmlo74jq.fsf@gnu.org> Date: Sun, 22 Oct 2017 21:53:28 -0400 In-Reply-To: <87bmlo74jq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 03 Oct 2017 15:18:49 +0200") Message-ID: <87mv4i3a07.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic, and sorry for the delayed reply! ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi Maxim, > > Maxim Cournoyer 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 >> 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 @cod= e{'()}] >> 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} > =E2=80=A6 > @end deffn > > @deffn {Scheme Procedure} file->udev-rules @var{files} > Similar to @code{udev-rules}, but=E2=80=A6 > @end deffn > I'm hoping the attached patch addresses the requested additions. Thanks for the review and comments. Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-services-base-Add-file-udev-rule-function.patch >From d2da854ad8d9d0d588c646e439ebfb7ef1c21f7c Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer 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. --- doc/guix.texi | 113 ++++++++++++++++++++++++++++++++++++++++++-------- gnu/services/base.scm | 17 ++++++++ 2 files changed, 112 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index b7f4f88f9..832ce8ac0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9790,35 +9790,112 @@ Return a service that runs the Guix build daemon according to @var{config}. @end deffn -@cindex udev-service -@cindex udev-rule -@deffn {Scheme Procedure} udev-service [#:udev @var{udev}] [#:rules @var{'()}] +@deffn {Scheme Procedure} udev-service [#:udev @var{eudev} #:rules @code{'()}] Run @var{udev}, which populates the @file{/dev} directory dynamically. -Additional udev rules can be provided as a list of files through the -@var{rules} variable. The procedure @var{udev-rule} simplifies the -creation of these rule files. +udev rules can be provided as a list of files through the @var{rules} +variable. The procedures @var{udev-rule} and @var{file->udev-rule} from +@code{(gnu services base)} simplify the creation of such rule files. + +@deffn {Scheme Procedure} udev-rule [@var{file-name} @var{contents}] +Return a udev-rule file named @var{file-name} containing the rules +defined by the @var{contents} literal. In the following example, a rule for a USB device is defined to be -stored in the file @file{90-usb-thing.rules}, and the default -@var{udev-service} is extended with it. The rule runs a script upon -detecting a USB device with a given product identifier. +stored in the file @file{90-usb-thing.rules}. The rule runs a script +upon detecting a USB device with a given product identifier. @example (define %example-udev-rule - (udev-rule "90-usb-thing.rules" - "ACTION==\"add\", SUBSYSTEM==\"usb\", ATTR@{product@}==\"Example\", RUN+=\"/path/to/script\"")) + (udev-rule + "90-usb-thing.rules" + (string-append "ACTION==\"add\", SUBSYSTEM==\"usb\", " + "ATTR@{product@}==\"Example\", " + "RUN+=\"/path/to/script\""))) +@end example +@end deffn + +Here we show how the default @var{udev-service} can be extended with it. + +@example +(operating-system + ;; @dots{} + (services + (modify-services %desktop-services + (udev-service-type config => + (udev-configuration (inherit config) + (rules (append (udev-configuration-rules config) + (list %example-udev-rule)))))))) +@end example + +@deffn {Scheme Procedure} file->udev-rule [@var{file-name} @var{file}] +Return a udev file named @var{file-name} containing the rules defined +within @var{file}, a file-like object. + +The following example showcases how we can use an existing rule file. + +@example +(use-modules (guix download) ;for url-fetch + (guix packages) ;for origin + ;; @dots{}) + +(define %android-udev-rules + (file->udev-rule + "51-android-udev.rules" + (let ((version "20170910")) + (origin + (method url-fetch) + (uri (string-append "https://raw.githubusercontent.com/M0Rf30/" + "android-udev-rules/" version "/51-android.rules")) + (sha256 + (base32 "0lmmagpyb6xsq6zcr2w1cyx9qmjqmajkvrdbhjx32gqf1d9is003")))))) +@end example +@end deffn + +Additionally, Guix package definitions can be included in @var{rules} in +order to extend the udev rules with the definitions found under their +@file{lib/udev/rules.d} sub-directory. In lieu of the previous +@var{file->udev-rule} example, we could have used the +@var{android-udev-rules} package which exists in Guix in the @code{(gnu +packages android)} module. + +The following example shows how to use the @var{android-udev-rules} +package so that the Android tool @command{adb} can detect devices +without root privileges. It also details how to create the +@code{adbusers} group, which is required for the proper functioning of +the rules defined within the @var{android-udev-rules} package. To +create such a group, we must define it both as part of the +@var{supplementary-groups} of our @var{user-account} declaration, as +well as in the @var{groups} field of the @var{operating-system} record. + +@example +(use-modules (gnu packages android) ;for android-udev-rules + (gnu system shadow) ;for user-group + ;; @dots{}) (operating-system ;; @dots{} - (services (modify-services %desktop-services - (udev-service-type config => - (udev-configuration (inherit config) - (rules (append (udev-configuration-rules config) - (list %example-udev-rule)))))))) + (users (cons (user-acount + ;; @dots{} + (supplementary-groups + '("adbusers" ;for adb + "wheel" "netdev" "audio" "video")) + ;; @dots{}))) + + (groups (cons (user-group (system? #t) (name "adbusers")) + %base-groups)) + + ;; @dots{} + + (services + (modify-services %desktop-services + (udev-service-type config => + (udev-configuration (inherit config) + (rules (cons* android-udev-rules + (udev-configuration-rules config)))))))) @end example @end deffn -@deffn {Scheme Procedure} urandom-seed-service @var{#f} +@deffn {Scheme Procedure} urandom-seed-service Save some entropy in @var{%random-seed-file} to seed @file{/dev/urandom} when rebooting. @end deffn @@ -9930,7 +10007,7 @@ to add @var{device} to the kernel's entropy pool. The service will fail if @cindex session limits @cindex ulimit @cindex priority -@deffn {Scheme Procedure} pam-limits-service [#:limits @var{limits}] +@deffn {Scheme Procedure} pam-limits-service [#:limits @code{'()}] Return a service that installs a configuration file for the @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html, diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 541ca76f1..b605614ab 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -71,6 +71,7 @@ udev-service-type udev-service udev-rule + file->udev-rule login-configuration login-configuration? @@ -1630,6 +1631,22 @@ item of @var{packages}." (lambda (port) (display #$contents port))))))) +(define (file->udev-rule file-name file) + "Return a directory with a udev rule file FILE-NAME which is a copy of FILE." + (computed-file file-name + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (define rules.d + (string-append #$output "/lib/udev/rules.d")) + + (define file-copy-dest + (string-append rules.d "/" #$file-name)) + + (mkdir-p rules.d) + (copy-file #$file file-copy-dest))))) + (define kvm-udev-rule ;; Return a directory with a udev rule that changes the group of /dev/kvm to ;; "kvm" and makes it #o660. Apparently QEMU-KVM used to ship this rule, -- 2.14.1 --=-=-=-- From unknown Thu Sep 11 19:19:53 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28647] [PATCHv2] services: base: Add file->udev-rule function. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Oct 2017 02:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 28647@debbugs.gnu.org Received: via spool by 28647-submit@debbugs.gnu.org id=B28647.150872637526540 (code B ref 28647); Mon, 23 Oct 2017 02:40:01 +0000 Received: (at 28647) by debbugs.gnu.org; 23 Oct 2017 02:39:35 +0000 Received: from localhost ([127.0.0.1]:56446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6SeN-0006u0-3B for submit@debbugs.gnu.org; Sun, 22 Oct 2017 22:39:35 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:45389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6SeL-0006ts-8J for 28647@debbugs.gnu.org; Sun, 22 Oct 2017 22:39:33 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 195DBF429; Mon, 23 Oct 2017 04:39:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id brtY0iwCV0QM; Mon, 23 Oct 2017 04:39:32 +0200 (CEST) Received: from ribbon (unknown [184.67.248.70]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8011BDB19; Mon, 23 Oct 2017 04:39:29 +0200 (CEST) From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgkxxzr1.fsf@gmail.com> <87bmlo74jq.fsf@gnu.org> <87mv4i3a07.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Brumaire an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 22 Oct 2017 19:39:24 -0700 In-Reply-To: <87mv4i3a07.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Sun, 22 Oct 2017 21:53:28 -0400") Message-ID: <8760b6wpsz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Maxim, Maxim Cournoyer skribis: > I'm hoping the attached patch addresses the requested additions. Thanks > for the review and comments. It does! > From d2da854ad8d9d0d588c646e439ebfb7ef1c21f7c Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > 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. Applied, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 22:39:56 2017 Received: (at control) by debbugs.gnu.org; 23 Oct 2017 02:39:56 +0000 Received: from localhost ([127.0.0.1]:56449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6Sei-0006uY-Ap for submit@debbugs.gnu.org; Sun, 22 Oct 2017 22:39:56 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:45392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6Seg-0006uQ-Kk for control@debbugs.gnu.org; Sun, 22 Oct 2017 22:39:54 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 65DC0F429 for ; Mon, 23 Oct 2017 04:39:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7y31iUmw-rfP for ; Mon, 23 Oct 2017 04:39:55 +0200 (CEST) Received: from ribbon (unknown [184.67.248.70]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 09235DB19 for ; Mon, 23 Oct 2017 04:39:53 +0200 (CEST) Date: Sun, 22 Oct 2017 19:39:47 -0700 Message-Id: <874lqqwpsc.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #28647 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 28647 fixed close 28647