See "equery f sys-fs/udev-init-scripts-26" correction please: --- /etc/init.d/udev~ 2013-12-19 17:07:32.000000000 +0100 +++ /etc/init.d/udev 2013-12-23 08:27:21.000000000 +0100 @@ -97,7 +97,7 @@ { if yesno ${rc_dev_root_symlink:-yes}; then ebegin "Generating a rule to create a /dev/root symlink" - /lib/udev/dev-root-link.sh + /usr/lib/udev/dev-root-link.sh eend $? fi Reproducible: Always
No. udev scripts belong to /lib/udev/ and that's already correct in the ebuild: # equery f sys-fs/udev-init-scripts-26 | grep dev-root-link.sh /lib/udev/dev-root-link.sh
Question: My *.sh script is in # equery f sys-fs/udev-init-scripts-26 | grep dev-root-link.sh /usr/lib/udev/dev-root-link.sh And in my /etc/init.d/udev - file: # grep -n dev-root-link.sh /etc/init.d/udev 100: /lib/udev/dev-root-link.sh
Seems like you forgot to etc-update the udev init script after installation of sys-fs/udev-init-scripts-26. Re-install the package, etc-update udev init script and you should have the script pointing to the correct location of dev-root-link.sh.
No, because: # tar jxf /usr/portage/distfiles/udev-init-scripts-26.tar.bz2 # grep -n dev-root-link.sh udev-init-scripts-26/init.d/udev 100: /lib/udev/dev-root-link.sh emerge --info | grep 'Timestamp of tree' Timestamp of tree: Mon, 23 Dec 2013 06:15:01 +0000
Fair enough. Sorry that I misread comment 2 (it's still a bit early in the morning here). I suppose you got the udev-init-scripts as dependency of sys-apps/systemd. In that case /lib/udev/ directory is correct and this might be a valid bug. I apologize for the circumstances. Please be a bit more verbose in your bug description next time or else something like this might happen again.
(In reply to Lars Wendler (Polynomial-C) from comment #5) > In that case /lib/udev/ directory is correct and this might be a valid bug. > I mean /usr/lib/udev is correct (*sigh*)
(In reply to Lars Wendler (Polynomial-C) from comment #5) > Please be a bit more verbose in your bug description next time or else > something like this might happen again. My english verry bad. Sorry.
right, something like this should be applied and udev-init-scripts-27 released: --- udev-init-scripts-26/init.d/udev +++ udev-init-scripts-26/init.d/udev @@ -97,7 +97,12 @@ { if yesno ${rc_dev_root_symlink:-yes}; then ebegin "Generating a rule to create a /dev/root symlink" - /lib/udev/dev-root-link.sh + scripts="/lib/udev/dev-root-link.sh /usr/lib/udev/dev-root-link.sh" + for f in ${scripts}; do + if [ -x "${f}" ]; then + "${f}" + fi + fi eend $? fi WilliamH, can you handle it?
(In reply to Lars Wendler (Polynomial-C) from comment #6) > (In reply to Lars Wendler (Polynomial-C) from comment #5) > > In that case /lib/udev/ directory is correct and this might be a valid bug. > > > I mean /usr/lib/udev is correct (*sigh*) Most Gentoo systemd systems have /lib/udev as udevdir. The exceptions would be systems that had systemd before we changed the systemd ebuild to use the get_udevdir function from udev.eclass. Anyway, Samuli's change looks ok; alternatively, we could sed in udevdir from the Makefile or the ebuild.
(In reply to Mike Gilbert from comment #9) > (In reply to Lars Wendler (Polynomial-C) from comment #6) > > (In reply to Lars Wendler (Polynomial-C) from comment #5) > > > In that case /lib/udev/ directory is correct and this might be a valid bug. > > > > > I mean /usr/lib/udev is correct (*sigh*) > > Most Gentoo systemd systems have /lib/udev as udevdir. The exceptions would > be systems that had systemd before we changed the systemd ebuild to use the > get_udevdir function from udev.eclass. I'm not aware of such an change. I believe udevdir= value in udev.pc on systemd bases systems points to /usr/lib/udev because systemd is installed into /usr on Gentoo > Anyway, Samuli's change looks ok; alternatively, we could sed in udevdir > from the Makefile or the ebuild. My patch follows the existing format used for udevd binary location in the same init script.
(In reply to Mike Gilbert from comment #9) > alternatively, we could sed in udevdir from the Makefile or the ebuild. plus it's a bad idea anyway, it would make re-emerging udev-init-scripts on the sys-fs/udev <-> sys-apps/systemd change mandatory making pkg-config a RDEPEND of udev-init-scripts and calling pkg-config --variable=udevdir from it would be a possibility, but considering pkg-config pulls in glib-2 by default, lets just use my patch...
(In reply to Samuli Suominen from comment #10) > I'm not aware of such an change. I believe udevdir= value in udev.pc on > systemd bases systems points to /usr/lib/udev because systemd is installed > into /usr on Gentoo We do this in the ebuild: # Keep using the one where the rules were installed. MY_UDEVDIR=$(get_udevdir) ... local mymakeopts=( udevlibexecdir="${MY_UDEVDIR}" ) This has the following effects depending on the system state when building systemd: If neither udev nor systemd is installed, get_udevdir returns "/lib/udev" and this gets copied into udev.pc. If either udev or systemd is installed, get_udevdir returns whatever is in /usr/share/pkgconfig/udev.pc. In most cases this is "/lib/udev". If systemd was previously installed from a long time ago, /usr/share/pkgconfig/udev.pc will contain "/usr/lib/udev".
This is also related to bug #472792. If systemd were installed as suggested in that bug, this would not be an issue.
From where I am sitting, this is not a bug in the udev init scripts, but it is one more reason for systemd to fix their installation.
(In reply to William Hubbs from comment #13) > This is also related to bug #472792. If systemd were installed as suggested > in that bug, this would not be an issue. The udev-init-scripts Makefile installs dev-root-link.sh based on pkg-config, yet hard-codes the path as "/lib/udev" in the init script. That is plainly broken.
Thomas: I would recommend you do the following while we argue about this. 1. rm /usr/share/pkgconfig/udev.pc 2. emerge --oneshot sys-apps/systemd 3. emerge --oneshot /usr/lib/udev The third step will re-install any packages that have installed udev rules/scripts in /usr/lib/udev, moving them to /lib/udev.
The makefile installs the script in the directory where udev helpers are to be installed. I hard code the path in the init script because the helpers directory is not in PATH and it shouldn't be. I may be able to accomodate this by moving the helper code into the init script itself. However, speaking as a systemd team member, this is just another bug that has ben caused by our non-standard systemd installation. Since this is the root cause, and since we don't really knowhow many more bugs like this will turn up, I strongly prefer that we reconsider our systemd installation in /usr and fix it as suggested in the bug I referred to.
Where did I say anything about touching PATH? I'm saying that installing the script based on pkg-config, and then hard-coding the path elsewhere is inconsistent and broken by design. Either hard-code it in both places, or use pkg-config (via sed) in both places. Stop trying to turn this into some proof that the systemd ebuild is broken. It's not.
Also, as I stated in comment 9 and comment 11, the majority of system users already have udev helpers in /lib/udev; only a small minority of long-time system users will have it in /usr/lib/udev. There is absolutely no need to move all of systemd to solve this stupid little problem.
(In reply to Mike Gilbert from comment #16) > Thomas: I would recommend you do the following while we argue about this. > > 1. rm /usr/share/pkgconfig/udev.pc > 2. emerge --oneshot sys-apps/systemd > 3. emerge --oneshot /usr/lib/udev > > The third step will re-install any packages that have installed udev > rules/scripts in /usr/lib/udev, moving them to /lib/udev. "emerge -1 sys-apps/systemd" change nothing on /usr/share/pkgconfig/udev.pc. before: udevdir=/usr/lib/udev after: udevdir=/usr/lib/udev But i remove /usr/share/pkgconfig/udev.pc and then "emerge -1 sys-apps/systemd": before: udevdir=/usr/lib/udev after: udevdir=/lib/udev Step 3 builds 25 packages.
Created attachment 366398 [details, diff] sed in udevdir in the Makefile Here is a patch that hopefully clarifies what I am trying to express here. Samuli indicated that he doesn't like this approach, but it is an improvement over than the current situation where some users must manually remove udev.pc and reinstall everything with files in /usr/lib/udev. Again, I'm fine with either Samuli's patch or mine, since either will resolve the problem without forcing manual intervention by end users.
Created attachment 366404 [details, diff] 0001-Move-code-from-dev-root-link-helper-to-udev-init-scr.patch I would prefer this fix. It deletes the helper script and makes it a function inside the udev init script since that is the only place it is run.
That's an ok idea. It does mean that we would have to duplicate code if we ever wanted to implement that for people booting with systemd, but I don't think that is likely to ever happen.
Technically, software should not rely on the presence of /dev/root, see bug #438380 for comments on this. The code is still there because some things haven't been fixed the last time I checked.
In other words, I am agreeing with comment #23, and actually recommending that you not duplicate this code for systemd. We need to find out what is still not fixed and get that taken care of, either by fixing it or removing it if it is deprecated.
This is fixed in commit d2e712f, and will be included in udev-init-scripts 27.