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

From: Liliana Marie Prikler <[email-masked]>
Date: Mon, 29 May 2023 09:38:51 +0200

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