
On 10-11-17 17:06, Juergen Daubert wrote:
On Tue, Nov 16, 2010 at 09:47:27PM +0100, Michal Soltys wrote:
- is "fixing" libudev.so placement really necessary ? It forces you to keep track of libudev version and it sometimes get out of sync
if we keep the *.so link in /lib we have to adjust libudev.pc, which is the same/more effort. Having the *.so library links in /usr/lib is reasonable furthermore.
In such case, to not hunt lib version, maybe something like: ln -sf ../../lib/$(/bin/readlink $PKG/lib/libudev.so) $PKG/usr/lib/libudev.so rm -f $PKG/lib/libudev.so or more roboust: LIBUDEV=$(/bin/readlink $PKG/lib/libudev.so) if [[ -f "$PKG/lib/$LIBUDEV" ]]; then ln -sf ../../lib/$LIBUDEV $PKG/usr/lib/libudev.so rm -f $PKG/lib/libudev.so else echo "/lib/libudev.so is no longer present, please inspect the Pkgfile" exit 1 fi
- pkg-config also scans (under default configuration) /usr/share/pkgconfig, so /usr/lib/pkgconfig is potentially not necessary
Sure, but the correct place for libudev.pc is /usr/lib/pkgconfig.
Gah, I mixed 2 things. Current Pkgfile adjusts /lib/pkgconfig to /usr/lib/pkgconfig, and I was looking at udev.pc (which ends in /usr/share/pkgconfig).
if ! /bin/mountpoint -q /dev ; then if ! /bin/sed -n '/devtmpfs/q1' /proc/filesystems ; then UDEVFS=devtmpfs else UDEVFS=tmpfs fi /bin/mount -n -t $UDEVFS udev /dev -o exec,nosuid,mode=0755,size=8M fi
/bin/mountpoint seems to be fine. Alternatively sed could be used in similar fashion, e.g. sed -n '/ \/ \/dev /q1' /proc/self/mountinfo or more simply: sed -n '/ \/dev /q1' /proc/self/mounts
# coldplug devices and wait for the queue to be processed -/sbin/udevadm trigger +/sbin/udevadm trigger --type=subsystems --action=add +/sbin/udevadm settle +/sbin/udevadm trigger --type=devices --action=add +/sbin/udevadm settle + +# retry any failures +/sbin/udevadm trigger --type=failed --action=add /sbin/udevadm settle
'settle' between 'subsystems' and 'devices' is probably unnecessary (e.g. opensuse doesn't have one). I think I'll ask on udev list about reference way to coldplug these days. Lots of distros still don't bother with --type, or even --action. Looking at libudev/libudev-enumerate.c it seems both 'subsystems' and 'devices' should be done, but I'm not completely sure.