diff options
-rw-r--r-- | sys-apps/hotplug/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/hotplug/Manifest | 5 | ||||
-rw-r--r-- | sys-apps/hotplug/files/digest-hotplug-20030805-r2 | 2 | ||||
-rw-r--r-- | sys-apps/hotplug/files/firmware.agent | 61 | ||||
-rw-r--r-- | sys-apps/hotplug/files/usb.agent.diff | 23 | ||||
-rw-r--r-- | sys-apps/hotplug/hotplug-20030805-r2.ebuild | 65 |
6 files changed, 164 insertions, 3 deletions
diff --git a/sys-apps/hotplug/ChangeLog b/sys-apps/hotplug/ChangeLog index 660a69c18a5d..6674639a1a3a 100644 --- a/sys-apps/hotplug/ChangeLog +++ b/sys-apps/hotplug/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-apps/hotplug # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/ChangeLog,v 1.24 2003/09/24 20:07:15 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/ChangeLog,v 1.25 2003/11/13 04:30:20 drobbins Exp $ + +*hotplug-20030805-r2 (12 Nov 2003) + + 12 Nov 2003; Daniel Robbins <drobbins@gentoo.org> hotplug-20030805-r2.ebuild: + close bug #32864 (add firmware.agent.) And also remove hotplug code that adds + incredibly long timeout on /etc/init.d/hotplug start. I'm unmasking this on + x86 since these two fixes are needed by users (firmware.agent for prism54 + module users and to avoid the long hotplug startup delay that nearly every + Gentoo user is experiencing.) *hotplug-20030805-r1 (24 Sep 2003) diff --git a/sys-apps/hotplug/Manifest b/sys-apps/hotplug/Manifest index 6c784ca8cbd7..6458f9dac6c7 100644 --- a/sys-apps/hotplug/Manifest +++ b/sys-apps/hotplug/Manifest @@ -1,15 +1,16 @@ MD5 5ab9b61479b8fafefcaca30dbdbb314d hotplug-20020826-r2.ebuild 1563 MD5 95eed4ffc6aac22db5d1030f2d528e2e hotplug-20030805.ebuild 1530 -MD5 0d836a0a60f5baddbb698c6555c524c8 hotplug-20030805-r2.ebuild 1833 +MD5 ef8f8c6d145b6836e22e3297f29a7f02 hotplug-20030805-r2.ebuild 1890 MD5 8adbe30df2fad3fcdc443742156ddce5 hotplug-20030501-r2.ebuild 1517 MD5 b2727f7bdfca2e4987d2d65063533e98 hotplug-20030805-r1.ebuild 1753 -MD5 befbbb024c8ea6b802f3cb3be44fc72d ChangeLog 4044 +MD5 5b482b4a6f8d5430296b2b326f2b8741 ChangeLog 4505 MD5 0e5a1a005fcfa0e242be02e9ef99de7a files/digest-hotplug-20020826-r2 224 MD5 a3281f5b866be688f79d9a46d060180a files/digest-hotplug-20030805 151 MD5 1bd9ddb0959318fe56dec239c8265fb1 files/usb.confd 291 MD5 40927deb2fb37aa51529d46a9b55e051 files/digest-hotplug-20030501-r2 154 MD5 a3281f5b866be688f79d9a46d060180a files/digest-hotplug-20030805-r1 151 MD5 a3281f5b866be688f79d9a46d060180a files/digest-hotplug-20030805-r2 151 +MD5 d8a0d8878d8904a779bda401d86268b1 files/firmware.agent 1188 MD5 7c4681458effb34f299cbc4b9245098c files/hotplug.functions.patch 522 MD5 d9a8d760dd153d10eb3e74fb1c4d8ad2 files/hotplug.rc 810 MD5 92547b2263d5423d874565504d2324f7 files/usb.agent.diff 886 diff --git a/sys-apps/hotplug/files/digest-hotplug-20030805-r2 b/sys-apps/hotplug/files/digest-hotplug-20030805-r2 new file mode 100644 index 000000000000..faa1d90068fa --- /dev/null +++ b/sys-apps/hotplug/files/digest-hotplug-20030805-r2 @@ -0,0 +1,2 @@ +MD5 200eef33ddfcee9c023a3a7797ac6919 hotplug-2003_08_05.tar.gz 42537 +MD5 a0db235527f911f91473e04f752fbffe hotplug-20030805-gentoo-patches.tar.bz2 1991 diff --git a/sys-apps/hotplug/files/firmware.agent b/sys-apps/hotplug/files/firmware.agent new file mode 100644 index 000000000000..129009fab179 --- /dev/null +++ b/sys-apps/hotplug/files/firmware.agent @@ -0,0 +1,61 @@ + #!/bin/sh + # + # Firmware-specific hotplug policy agent. + # + # Kernel firmware hotplug params include: + # + # ACTION=%s [add or remove] + # DEVPATH=%s [in 2.5 kernels, /sys/$DEVPATH] + # FIRMWARE=%s + # + # HISTORY: + # + # 24-Jul-2003 Initial version of "new" hotplug agent. + # + # $Id: firmware.agent,v 1.1 2003/11/13 04:30:20 drobbins Exp $ + # + + cd /etc/hotplug + . hotplug.functions + # DEBUG=yes export DEBUG + + # directory of the firmware files + FIRMWARE_DIR=/usr/lib/hotplug/firmware + + # mountpoint of sysfs + SYSFS=$(sed -n 's/^.* \([^ ]*\) sysfs .*$/\1/p' /proc/mounts) + + # use /proc for 2.4 kernels + if [ "$SYSFS" = "" ]; then + SYSFS=/proc + fi + + # + # What to do with this firmware hotplug event? + # + case "$ACTION" in + + add) + if [ ! -e $SYSFS/$DEVPATH/loading ]; then + sleep 1 + fi + + if [ -f $FIRMWARE_DIR/$FIRMWARE ]; then + echo 1 > $SYSFS/$DEVPATH/loading + cp $FIRMWARE_DIR/$FIRMWARE $SYSFS/$DEVPATH/data + echo 0 > $SYSFS/$DEVPATH/loading + else + echo -1 > $SYSFS/$DEVPATH/loading + fi + + ;; + + remove) + ;; + + *) + mesg "Firmware '$ACTION' event not supported" + exit 1 + ;; + + esac diff --git a/sys-apps/hotplug/files/usb.agent.diff b/sys-apps/hotplug/files/usb.agent.diff new file mode 100644 index 000000000000..f6000140adf6 --- /dev/null +++ b/sys-apps/hotplug/files/usb.agent.diff @@ -0,0 +1,23 @@ +--- usb.agent.orig 2003-11-12 21:13:56.827829096 -0700 ++++ usb.agent 2003-11-12 21:13:12.968496728 -0700 +@@ -361,14 +361,12 @@ + case $ACTION in + + add) +- # partial workaround for 2.4 uhci/usb-uhci driver problem: they don't +- # queue control requests, so device drivers can confuse each other if +- # they happen to issue requests at the same time ... it happens easily +- # with slow HID devices and "usbmodules". +- # starting with 2.5 (DEVPATH set), all hcds must queue control traffic. +- if [ "$DEVPATH" = "" ]; then +- sleep 3 +- fi ++# Gentoo patch: this gets commented out, since 3 seconds may not even be enough ++# for UHCI or slowish devices, and it makes /etc/init.d/hotplug startup outrageously ++# long. A fix for this needs to be (may already be) in the UCHI code in the kernel. ++# if [ "$DEVPATH" = "" ]; then ++# sleep 3 ++# fi + + usb_convert_vars + diff --git a/sys-apps/hotplug/hotplug-20030805-r2.ebuild b/sys-apps/hotplug/hotplug-20030805-r2.ebuild new file mode 100644 index 000000000000..6ccba2dfa5f4 --- /dev/null +++ b/sys-apps/hotplug/hotplug-20030805-r2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20030805-r2.ebuild,v 1.1 2003/11/13 04:30:20 drobbins Exp $ + +inherit eutils + +# source maintainers named it hotplug-YYYY_MM_DD instead of hotplug-YYYYMMDD +MY_P=${PN}-${PV:0:4}_${PV:4:2}_${PV:6:2} +S=${WORKDIR}/${MY_P} +DESCRIPTION="USB and PCI hotplug scripts" +HOMEPAGE="http://linux-hotplug.sourceforge.net" +SRC_URI="mirror://sourceforge/linux-hotplug/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patches.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 amd64 ~ppc ~hppa ~sparc ~alpha ~mips ~arm" + +# hotplug needs pcimodules utility provided by pcitutils-2.1.9-r1 +DEPEND=">=sys-apps/pciutils-2.1.9 >=sys-apps/usbutils-0.9" + +src_unpack() { + unpack ${A} + cd ${S} + EPATCH_SUFFIX="patch" epatch ${WORKDIR}/hotplug-patches + + # The following patch prevents bogus messages of the flavor + # "missing kernel or user mode driver prism2_usb". It has been + # mentioned on the linux-hotplug mailing list. + epatch ${FILESDIR}/hotplug.functions.patch + + cd ${S}/etc/hotplug/ + cat ${FILESDIR}/usb.agent.diff | patch usb.agent || die +} + +src_install() { + into / + dosbin sbin/hotplug + doman *.8 + dodoc README ChangeLog + + cd ${S}/etc/hotplug + insinto /etc/hotplug + doins blacklist hotplug.functions usb.distmap usb.handmap usb.usermap + exeinto /etc/hotplug + doexe *.agent *.rc ${FILESDIR}/firmware.agent + dodir /usr/lib/hotplug/firmware + dodir /etc/hotplug/usb /etc/hotplug/pci + cd ${S}/etc/hotplug.d/default + exeinto /etc/hotplug.d/default + doexe default.hotplug + + exeinto /etc/init.d + newexe ${FILESDIR}/hotplug.rc hotplug + + insinto /etc/conf.d + newins ${FILESDIR}/usb.confd usb + dodir /var/run/usb +} + +pkg_postinst() { + ewarn "WARNING: The fxload program was spliced off this package" + ewarn "WARNING: emerge fxload if you need it" +} + |