SANE backends v1.0.14 was released. the ebuild can basically stay the same, however, there's now support for hotplug included in the tarball: in sane-backends-1.0.14/tools/hotplug there are three files: o REAMDE -> /usr/share/sane-backends-1.0.14/README.hotplug o libusbscanner -> /etc/hotplug/usb either add group scanner, or edit root:scanner to something existing in this file o libsane.usermap -> /etc/hotplug/usb remove empty lines from this file, because usb.agent cannot parse them furthermore, "scanner" should be added to /etc/hotplug/blacklist Reproducible: Always Steps to Reproduce: 1. 2. 3.
1.0.14 is in portage since yesterday - about the hotplug support, I will have some trouble testing this since I don't have a scanner. Can you help me testing if I manage to make some ebuild from the README and your hints? (summary line adjusted)
Sure. In my local ebuild, I have added this to src_compile: cd tools/hotplug cat libsane.usermap | grep -v '^$' > libsane.usermap.new mv libsane.usermap.new libsane.usermap and this to src_install: cd tools/hotplug insinto /etc/hotplug/usb doins libsane.usermap libusbscanner newdoc README README.hotplug cd ../.. both times right after the make invocation
Did like you said, seems to do everything necessary in -r1. Please give it a try, re-open if there's a problem. Thanks!
the ebuild works nice, however there is a small detail missing: the file /etc/hotplug/usb/libusbscanner should be executable
There is another issue with libusbscanner: The script does not work with the latest versions of hotplug (20040401) and 2.6.x kernels. Hotplug uses the information in /sys/bus/usb/devices/* and leaves the $DEVICE variable (which should identify the device in /proc/bus/usb/*) empty. A workaround for this problem: if [ -z "$DEVICE" ] ; then IF=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\2/'` DEV=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\3/'` DEV=`expr $DEV + 1` DEVICE=`printf '/proc/bus/usb/%.03d/%.03d' $IF $DEV` fi
oh, cool thanks for the tip, I fixed it in SANE's cvs there's another problem: gentoo doesn't have group scanner, so either you add group scanner or change root:scanner to root:whatever in libusbscanner
-r2 should fix these issues. Thanks for your help.