Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430412 - sys-fs/udev-187 needs patch to add path /lib/udev (not only /usr/lib/udev) to search executable
Summary: sys-fs/udev-187 needs patch to add path /lib/udev (not only /usr/lib/udev) to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 07:32 UTC by Egor Y. Egorov
Modified: 2012-08-15 17:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
udev-187-add-lib_udev-path-to-executable.patch (udev-187-add-lib_udev-path-to-executable.patch,647 bytes, text/plain)
2012-08-08 08:30 UTC, Egor Y. Egorov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2012-08-08 07:32:07 UTC
in udev-evenc.c we can see:
        /* allow programs in /usr/lib/udev/ to be called without the path */
        if (argv[0][0] != '/') {
                util_strscpyl(program, sizeof(program), UDEVLIBEXECDIR "/", argv[0], NULL);
                argv[0] = program;
        }

        pid = fork();

This leads to the fact that udev can not run utilities installed in /lib/udev. For example /lib/udev/usb_modeswitch from the package sys-apps/usb_modeswitch and other

Reproducible: Always
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-08-08 07:45:29 UTC
(In reply to comment #0)
> in udev-evenc.c we can see:
>         /* allow programs in /usr/lib/udev/ to be called without the path */
>         if (argv[0][0] != '/') {
>                 util_strscpyl(program, sizeof(program), UDEVLIBEXECDIR "/",
> argv[0], NULL);
>                 argv[0] = program;
>         }
> 
>         pid = fork();
> 

I suppose this could be done, but please file individual bugs for packages still installing into /lib/udev since everything should respect the udevdir= from udev.pc pkg-config file:

pkg-config --variable=udevdir udev

See how usb_modeswitch is fixed in -r2.

> This leads to the fact that udev can not run utilities installed in
> /lib/udev. For example /lib/udev/usb_modeswitch from the package
> sys-apps/usb_modeswitch and other

I've already fixed usb_modeswitch in ~ərch to install into correct udevdir. Do you know others?
Comment 2 Egor Y. Egorov 2012-08-08 08:30:31 UTC
Created attachment 320670 [details]
udev-187-add-lib_udev-path-to-executable.patch
Comment 3 Egor Y. Egorov 2012-08-08 08:30:42 UTC
Now this packages on my system:
app-emulation/virtualbox-bin
app-emulation/qemu-kvm
app-misc/media-player-info
media-libs/libgphoto2
media-sound/alsa-utils
net-misc/networkmanager
net-wireless/crda
net-wireless/bluez
sys-apps/usb_modeswitch
sys-fs/fuse
sys-fs/mdadm
sys-fs/ntfs3g
sys-fs/lvm2
sys-fs/vhba
sys-fs/udisks

I'll check the latest versions of these packages and manages related tasks as necessary later.
However, I think this may be just a patch to solve this problem for a period of migration. (tested by me)
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-08-08 10:32:14 UTC
(In reply to comment #3)

Half of the packages in your list has been fixed in tree day or so now, so propably just use --sync.

Trying to get most of these today'ish.
Comment 5 Egor Y. Egorov 2012-08-08 10:37:11 UTC
Yes, this list is redundant. I made ​​a number of separate tasks
Comment 6 William Hubbs gentoo-dev 2012-08-08 20:32:00 UTC
Systemd may not need a patch pending the outcome of bug #430470.
Comment 7 William Hubbs gentoo-dev 2012-08-15 12:39:01 UTC
This is fixed in udev-188.
For now we do not need to do anything with systemd-188* but if we
virtualize udev we will need to possibly apply the patch to both.
Comment 8 William Hubbs gentoo-dev 2012-08-15 17:30:19 UTC
I am closing this since the issue only applies to udev now and not
systemd. It is fixed in udev-188.