Message ID | 2d51ddd4e6865a40a15b8f7948d2479952571a4e.1685379443.git.felix.lechner@lease-up.com |
---|---|
State | New |
Headers | show |
Series | [bug#63508,v4,1/2] gnu: eudev: Use new project URL for Git repo and home page. | expand |
Hi Lechner, On 2023-05-29 17:57, Felix Lechner via Guix-patches via wrote: > #: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")))) Perhaps instead of substituting, can you check if #:configure-flags or #:make-flags could be used instead?
Hi Bruno, On Mon, May 29, 2023 at 1:28 PM Bruno Victal <mirai@makinata.eu> wrote: > > Perhaps instead of substituting, can you check if > #:configure-flags or #:make-flags could be used instead? Thank you for that suggestion! I did, and I do not believe it is possible to specify a separate runtime path for udevadm via ./configure at this time. It would be possible to add a second variable in configure.ac [1] and use that in the relevant Makefile.am. [2] The change would get picked up for the runtime search path throughout [3] and for the inotify watch in udevd. [4] In that scenario, it would be crucial not to modify the installation directory that was specified via the variable prefix "udevrules_" in several Makefiles.am, [5][6][7] which use Automake's "uniform" naming scheme that leaves off 'dir'. [8] Unfortunately, for most distros the distinctions are meaningless, and perhaps even incomprehensible. I estimated the chance of upstream acceptance as low. After some reflection, it was easier to patch the runtime path directly in the lone place that matters to Guix. [2, again] I also do not see how the second variable needed can be introduced by invoking 'make' in a different way. Please let me know if you find a way. Thanks! Kind regards Felix [1] https://github.com/eudev-project/eudev/blob/0a4dae19c1a191c8054fc2b9c2d592e797715a69/configure.ac#L180 [2] https://github.com/eudev-project/eudev/blob/0a4dae19c1a191c8054fc2b9c2d592e797715a69/src/udev/Makefile.am#L10 [3] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/src/udev/udev-rules.c#L53 [4] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/src/udev/udevd.c#L1306 [5] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/rules/Makefile.am#L9 [6] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/rules/Makefile.am#L35 [7] https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/rule_generator/Makefile.am#L12 [8] https://www.gnu.org/software/automake/manual/html_node/Uniform.html
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7a365e2e22..55255e576e 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"