Message ID | 89b635e974a7d570cbd19b847fc3eb8ac903103b.1684100044.git.felix.lechner@lease-up.com |
---|---|
State | New |
Headers | show |
Series | Use MAC-based names for network interfaces | expand |
Am Sonntag, dem 14.05.2023 um 14:42 -0700 schrieb Felix Lechner: > The change here resulted in the recompilation of several seemingly > unrelated packages such as Emacs and GTK. Perhaps those dependency > relationships should be examined. What? GUI libraries and packages that depend on them need to be rebuilt when we change the way we handle our (input, media) devices?! Can't have that! > gnu/packages/linux.scm | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index 98e683bdb0..724c621fed 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -4173,6 +4173,12 @@ (define-public eudev > (substitute* (string-append #$output > "/lib/libudev.la") > (("old_library=.*") > "old_library=''\n"))))) > + (add-before 'install 'net-name-mac > + (lambda _ > + (use-modules (ice-9 regex)) > + (substitute* "rules/80-net-name-slot.rules" > + (((regexp-quote "ID_NET_NAME_ONBOARD")) Wherefore the regexp-quote? There is no regexp to be found here, is there? > + "ID_NET_NAME_MAC")))) I don't see how this change allows users *or upstream package maintainers* to continue using onboard names as they have done for ages and as they would want to continue to do. I think you should a) File a patch upstream to add ID_NET_NAME_MAC into net-name- slot.rules b) Add that patch to our eudev package with a reference to the upstream bug report. Cheers
Hi Liliana, Thank you for your review! On Sun, May 14, 2023 at 9:31 PM Liliana Marie Prikler <liliana.prikler@gmail.com> wrote: > > Wherefore the regexp-quote? Whoops! That was left over from the attempt to get udevadm to use /etc/udev/rules.d as it should. Thanks for the pointer! > I don't see how this change allows users *or upstream package > maintainers* to continue using onboard names as they have done for ages > and as they would want to continue to do. I have one of those cards. While the interface name did not change when I fiddled with the PCI configuration, I am not sure that prioritizing ID_NET_NAME_ONBOARD over ID_NET_NAME_MAC is a reasonable default for Guix. To rank ID_NET_NAME_ONBOARD below ID_NET_NAME_MAC would not address the shortcoming you perceived because the latter always exists. Instead, I think people wishing to use ID_NET_NAME_ONBOARD should install a custom udev script (and those should be recognized by the udevadm we ship). > a) File a patch upstream to add ID_NET_NAME_MAC into net-name- > slot.rules If upstream accepts such a patch, I believe they would give ID_NET_NAME_MAC the lowest possible priority, but that does nothing for Guix. Common relative priorities are outlined here. [1] For Guix, I think we would like to see ID_NET_NAME_MAC at the top. Kind regards Felix [1] https://wiki.debian.org/NetworkInterfaceNames#How_to_migrate_to_this_scheme_on_upgraded_systems
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 98e683bdb0..724c621fed 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4173,6 +4173,12 @@ (define-public eudev (substitute* (string-append #$output "/lib/libudev.la") (("old_library=.*") "old_library=''\n"))))) + (add-before 'install 'net-name-mac + (lambda _ + (use-modules (ice-9 regex)) + (substitute* "rules/80-net-name-slot.rules" + (((regexp-quote "ID_NET_NAME_ONBOARD")) + "ID_NET_NAME_MAC")))) (add-after 'install 'build-hwdb (lambda _ ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and