siderolabs / pkgs

Mozilla Public License 2.0
35 stars 118 forks source link

Change location of system extensions' udev rules #1053

Closed dsseng closed 1 month ago

dsseng commented 1 month ago

Revert https://github.com/siderolabs/pkgs/commit/ba0341e39dafb3fe39b5efbc8a8e8d04df96a0e7 and move /use/etc configs for udev to either /usr/lib or /etc.

systemd developers replied stuff as I did with /usr/etc is not officially supported by them, yet it works well, so we could keep things as is and carry a patch downstream to lookup rules at our locations.

We already store system rules in /usr/lib and user-provided ones (generated on boot) in /etc.

Probably the only system extension installing udev rules should be mdadm, and a notice should be added to the release notes to make sure third-party extensions transition in advance before 1.9.

I believe it's the best to just add system extensions' rules into the same directory our base rules are in. Let extension developers make sure they don't override the rules by accident.

Ref: https://github.com/systemd/systemd/pull/34632

frezbo commented 1 month ago

:+1: on using /usr/lib

smira commented 1 month ago

We need to ensure we update this as well: https://github.com/siderolabs/talos/blob/39fe285e69691059f91d8c7c5506e156356263d9/pkg/machinery/extensions/extensions.go#L19-L20

dsseng commented 1 month ago

/etc/udev/iocost.conf is still hardcoded. We either have to add it in runtime or patch systemd code to search for it in /usr. udev.conf should be fine in /usr

smira commented 1 month ago

/etc/udev/iocost.conf is still hardcoded. We either have to add it in runtime or patch systemd code to search for it in /usr. udev.conf should be fine in /usr

We can do a copy/bind mount it if that makes less patches on udevd.

frezbo commented 1 month ago

/etc/udev/iocost.conf

https://www.freedesktop.org/software/systemd/man/latest/iocost.conf.html#Configuration%20Directories%20and%20Precedence I guess the default config should work for us

dsseng commented 1 month ago

/etc/udev/iocost.conf

https://www.freedesktop.org/software/systemd/man/latest/iocost.conf.html#Configuration%20Directories%20and%20Precedence I guess the default config should work for us

Yeah, looks like in case of ENOENT iocost will still work (I was a bit confused by its error handling). udev.conf is not needed as well, we set needed flags in args.