diff mbox series

[bug#63508,v3,3/3] gnu: eudev: Have udevadm look in /etc/udev/rules.d. (Closes: #63508)

Message ID b68c9fa5ca46052aaf1d888a6eaf704614f96dec.1685316502.git.felix.lechner@lease-up.com
State New
Headers show
Series [bug#63508,v3,1/3] gnu: eudev: Convert native-inputs to new style, and build arguments to Gexps. | expand

Commit Message

Felix Lechner May 28, 2023, 11:28 p.m. UTC
This substitution ensures that udevadm sees the rules that are actually in
effect for the declared operating system. It allows administrators to use the
udev-rules-service for network interfaces.

Some of Guix's customizations for udev rules appear to work as it is [1] but
that is not true for network interfaces (which invoke udevadm for naming
purposes). [2]

Without this commit, udevadm will consult the rules that were present at build
time and were installed in the store).

[1] https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00195.html
[2] https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00192.html

* gnu/packages/linux.scm (eudev): Have udevadm look in
/etc/udev/rules.d. (Closes: #63508)
---
 gnu/packages/linux.scm | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Liliana Marie Prikler May 29, 2023, 7:38 a.m. UTC | #1
Am Sonntag, dem 28.05.2023 um 16:28 -0700 schrieb Felix Lechner:
> This substitution ensures that udevadm sees the rules that are
> actually in effect for the declared operating system. It allows
> administrators to use the udev-rules-service for network interfaces.
> 
> Some of Guix's customizations for udev rules appear to work as it is
> [1] but that is not true for network interfaces (which invoke udevadm
> for naming purposes). [2]
> 
> Without this commit, udevadm will consult the rules that were present
> at build time and were installed in the store).
> 
> [1]
> https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00195.html
> [2]
> https://lists.gnu.org/archive/html/guix-devel/2023-05/msg00192.html
> 
> * gnu/packages/linux.scm (eudev): Have udevadm look in
> /etc/udev/rules.d. (Closes: #63508)
> ---
>  gnu/packages/linux.scm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 90a44a518d..57b722d97d 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -4192,6 +4192,11 @@ (define-public eudev
>       (list
>        #:phases
>        #~(modify-phases %standard-phases
> +          (add-before 'bootstrap 'hardcode-runtime-rules-dir
> +            (lambda _
> +              (use-modules (ice-9 regex))
> +              (substitute* "src/udev/Makefile.am"
> +                (((regexp-quote "$(udevrulesdir)"))
> "/etc/udev/rules.d"))))
>            (add-before 'bootstrap 'patch-file-names
>              (lambda* (#:key inputs native-inputs #:allow-other-keys)
>                (substitute* "man/make.sh"
I still think the proper fix is to consult $EUDEV_RULES_DIRECTORY first
as per <https://issues.guix.gnu.org/63508#6>.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 90a44a518d..57b722d97d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4192,6 +4192,11 @@  (define-public eudev
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-before 'bootstrap 'hardcode-runtime-rules-dir
+            (lambda _
+              (use-modules (ice-9 regex))
+              (substitute* "src/udev/Makefile.am"
+                (((regexp-quote "$(udevrulesdir)")) "/etc/udev/rules.d"))))
           (add-before 'bootstrap 'patch-file-names
             (lambda* (#:key inputs native-inputs #:allow-other-keys)
               (substitute* "man/make.sh"