diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-09-15 21:35:19 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-09-15 21:35:19 +0000 |
commit | 9f46426b5c4de5bede256261e92625b86ec33c57 (patch) | |
tree | 9498c33e54969fe544353584c3c469f6f42c55c8 /sys-apps | |
parent | New version. Update patch to quiet output when called from devfsd (diff) | |
download | gentoo-2-9f46426b5c4de5bede256261e92625b86ec33c57.tar.gz gentoo-2-9f46426b5c4de5bede256261e92625b86ec33c57.tar.bz2 gentoo-2-9f46426b5c4de5bede256261e92625b86ec33c57.zip |
New version. Update patch to quiet output when called from devfsd
Diffstat (limited to 'sys-apps')
5 files changed, 236 insertions, 3 deletions
diff --git a/sys-apps/module-init-tools/ChangeLog b/sys-apps/module-init-tools/ChangeLog index eb87d10c7eb1..f42759f8abe4 100644 --- a/sys-apps/module-init-tools/ChangeLog +++ b/sys-apps/module-init-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/module-init-tools # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.31 2003/09/06 14:55:40 pappy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.32 2003/09/15 21:35:05 azarah Exp $ + +*module-init-tools-0.9.14 (15 Sep 2003) + + 15 Sep 2003; Martin Schlemmer <azarah@gentoo.org> + module-init-tools-0.9.14.ebuild, + files/module-init-tools-0.9.14-be-quiet-for-devfsd.patch: + New version. Update patch to quiet output when called from devfsd 06 Sep 2003; Alexander Gabert <pappy@gentoo.org> module-init-tools-0.9.12-r1.ebuild, module-init-tools-0.9.13_pre2.ebuild: diff --git a/sys-apps/module-init-tools/Manifest b/sys-apps/module-init-tools/Manifest index fe9b76554de8..686187a6679c 100644 --- a/sys-apps/module-init-tools/Manifest +++ b/sys-apps/module-init-tools/Manifest @@ -1,7 +1,7 @@ MD5 31f07c9e84f376f092c397d67ab76a40 module-init-tools-0.9.13_pre2.ebuild 4783 -MD5 8c80ffa46e9086e4864d916cfecc8c03 ChangeLog 7763 +MD5 f02156f662ecf97335489ce4caa4ac7e ChangeLog 8022 MD5 47cb67d84db45b1b445ae858ebb3ce55 module-init-tools-0.9.11-r3.ebuild 4486 -MD5 85d345ff88938dcc8b2421b8e0bf3d61 module-init-tools-0.9.14.ebuild 4674 +MD5 4ec80fa310511e8c58ccae31f4a77032 module-init-tools-0.9.14.ebuild 4550 MD5 27920bbc87dda8233d709713d08a4812 module-init-tools-0.9.11a.ebuild 4492 MD5 65c2f68b7db9e9ea73049a092f5a801a module-init-tools-0.9.12-r1.ebuild 4875 MD5 491ef3d4f67206c4403231be9767e1e0 module-init-tools-0.9.10-r5.ebuild 4698 @@ -19,6 +19,7 @@ MD5 86e20b45d2b65159d422d225468ef960 files/module-init-tools-0.9.13-quiet-on-dev MD5 060ce311606657915548168939e965b4 files/modutils-2.4.22-no-above-below.patch 382 MD5 28295a2b93ba19ae91062a0078c078f6 files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch 3327 MD5 71d2757ca730209482fea3cb89648a27 files/digest-module-init-tools-0.9.11a 407 +MD5 ca8384a14b3fd5fbba4c3649cbac0a0e files/module-init-tools-0.9.14-be-quiet-for-devfsd.patch 1986 MD5 d35ab1ebe300cc5521be75eff43f9649 files/digest-module-init-tools-0.9.13_pre2 150 MD5 37092cae20ec7562f89aea0205bda5c0 files/module-init-tools-0.9.10-use-modprobe_conf.patch 431 MD5 840e77089ccac7492ceb215d14b95fb7 files/digest-module-init-tools-0.9.14 145 diff --git a/sys-apps/module-init-tools/files/digest-module-init-tools-0.9.14 b/sys-apps/module-init-tools/files/digest-module-init-tools-0.9.14 new file mode 100644 index 000000000000..8bf829852565 --- /dev/null +++ b/sys-apps/module-init-tools/files/digest-module-init-tools-0.9.14 @@ -0,0 +1,2 @@ +MD5 b97a2c6226934fade702bd79c5211cab module-init-tools-0.9.14.tar.bz2 115751 +MD5 2c0cca3ef6330a187c6ef4fe41ecaa4d modutils-2.4.25.tar.bz2 220530 diff --git a/sys-apps/module-init-tools/files/module-init-tools-0.9.14-be-quiet-for-devfsd.patch b/sys-apps/module-init-tools/files/module-init-tools-0.9.14-be-quiet-for-devfsd.patch new file mode 100644 index 000000000000..93d0aae9a30d --- /dev/null +++ b/sys-apps/module-init-tools/files/module-init-tools-0.9.14-be-quiet-for-devfsd.patch @@ -0,0 +1,57 @@ +--- module-init-tools-0.9.14/modprobe.c.orig 2003-09-15 22:41:32.252740832 +0200 ++++ module-init-tools-0.9.14/modprobe.c 2003-09-15 23:10:44.895298664 +0200 +@@ -1148,6 +1148,7 @@ int main(int argc, char *argv[]) + int strip_vermagic = 0; + int strip_modversion = 0; + int ignore_proc = 0; ++ int set_config_file = 0; + enum noexists_response noexists = NOEXISTS_ERROR; + enum exists_response exists = EXISTS_ERROR; + unsigned int i, num_modules; +@@ -1184,8 +1185,12 @@ int main(int argc, char *argv[]) + buf.release[sizeof(buf.release)-1] = '\0'; + break; + case 'C': ++ /* We should not add this to the environment if we might ++ * still change it below (hack for old modutils compatibility) + add_to_env_var("-C"); + add_to_env_var(optarg); ++ */ ++ set_config_file = 1; + config = optarg; + break; + case 'D': +@@ -1294,16 +1299,27 @@ int main(int argc, char *argv[]) + modprobe with -C /etc/modules.conf or /etc/modules.devfs, + to work. FIXME. */ + /* Modern devfsd or variants should use -Q explicitly in 2.6. */ +- if (config && !dump_only && strncmp(argv[optind], "/dev/", 5) == 0) { +- if (strcmp("/etc/modules.conf", config) == 0) { +- quiet = 1; +- config = NULL; +- } else if (strcmp("/etc/modules.devfs", config) == 0) { +- config = MODPROBE_DEVFSD_CONF; ++ if (!quiet && config && !dump_only && strncmp(argv[optind], "/dev/", 5) == 0) { ++ if (strcmp("/etc/modules.conf", config) == 0 ++ || strcmp("/etc/modules.devfs", config) == 0 ++ || strcmp(MODPROBE_DEVFSD_CONF, config) == 0) { ++ add_to_env_var("-Q"); + quiet = 1; ++ ++ if (strcmp("/etc/modules.conf", config) == 0) ++ config = NULL; ++ else ++ config = MODPROBE_DEVFSD_CONF; + } + } + ++ if (set_config_file && !dump_only) { ++ /* Ok, now add the config file to the MODPROBE_OPTIONS ++ * environment variable */ ++ add_to_env_var("-C"); ++ add_to_env_var(config); ++ } ++ + if (dump_only) { + struct module_command *commands = NULL; + struct module_options *modoptions = NULL; diff --git a/sys-apps/module-init-tools/module-init-tools-0.9.14.ebuild b/sys-apps/module-init-tools/module-init-tools-0.9.14.ebuild new file mode 100644 index 000000000000..c701c1db2a3b --- /dev/null +++ b/sys-apps/module-init-tools/module-init-tools-0.9.14.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-0.9.14.ebuild,v 1.1 2003/09/15 21:35:05 azarah Exp $ + +# This ebuild includes backwards compatability for stable 2.4 kernels +IUSE="" + +inherit flag-o-matic +inherit eutils + +MYP="${P/_pre/-pre}" +S="${WORKDIR}/${MYP}" +MODUTILS_PV="2.4.25" +DESCRIPTION="Kernel module tools for the development kernel >=2.5.48" +SRC_URI="mirror://kernel/linux/kernel/people/rusty/modules/${MYP}.tar.bz2 + mirror://kernel/linux/utils/kernel/modutils/v2.4/modutils-${MODUTILS_PV}.tar.bz2" +HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/rusty/modules" + +KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha mips ~arm" +LICENSE="GPL-2" +SLOT="0" + +DEPEND="virtual/glibc" +PROVIDE="virtual/modutils" + +src_unpack() { + unpack ${A} + + # With the b0rked modutils, "modprobe hid" does work. But if something + # (like hotplug) tries to auto-load hid (because another module needs it, + # via the kernel module auto-loader) and keybdev.o or mousedev.o don't + # exist, then the "above" clause fails and the hid module never gets + # loaded, and then things like USB will fail. Thus we remove it all + # together. + # + # <drobbins@gentoo.org> (26 Mar 2003) + cd ${WORKDIR}/modutils-${MODUTILS_PV} + epatch ${FILESDIR}/modutils-2.4.22-no-above-below.patch + + # A hack to have absolutely no output if: + # + # 1) our config file is /etc/modprobe.devfs or /etc/modules.devfs + # + # 2) the module name starting with '/dev/' + # + # 3) we are trying to probe an existing alias. + # + # Rasionale: This is what modprobe from modutils does. + # + # <azarah@gentoo.org> (17 Mar 2003) + cd ${S}; epatch ${FILESDIR}/${PN}-0.9.14-be-quiet-for-devfsd.patch + + cd ${S} + rm -f missing + automake --add-missing +} + +src_compile() { + local myconf= + + filter-flags -fPIC + + einfo "Building modutils..." + cd ${WORKDIR}/modutils-${MODUTILS_PV} + + econf \ + --disable-strip \ + --prefix=/ \ + --disable-insmod-static \ + --disable-zlib \ + ${myconf} + + emake || die "emake modutils failed" + einfo "Building module-init-tools..." + cd ${S} + + econf \ + --prefix=/ \ + ${myconf} + + emake || die "emake module-init-tools failed" +} + +src_install () { + + cd ${WORKDIR}/modutils-${MODUTILS_PV} + einstall prefix="${D}" + + docinto modutils-${MODUTILS_PV} + dodoc COPYING CREDITS ChangeLog NEWS README TODO + + cd ${S} + # This copies the old version of modutils to *.old so it still works + # with kernels <= 2.4; new versions will execve() the .old version if + # a 2.4 kernel is running... + # This code was borrowed from the module-init-tools Makefile + local runme= + local f= + for f in lsmod modprobe rmmod depmod insmod modinfo + do + if [ -L ${D}/sbin/${f} ] + then + einfo "Moving symlink $f to ${f}.old" + #runme = the target of the symlink with a .old tagged on. + runme=`ls -l ${D}/sbin/${f} | sed 's/.* -> //'`.old + [ ! -e ${D}/sbin/${runme} ] || einfo "${D}/sbin/${runme} not found" + ln -snf $runme ${D}/sbin/${f} || die + elif [ -e ${D}/sbin/${f} ] + then + einfo "Moving executable $f to ${f}.old" + fi + mv -f ${D}/sbin/${f} ${D}/sbin/${f}.old; + done + # Move the man pages as well. We only do this for the man pages of the + # tools that module-init-tools will replace. + for f in ${D}/usr/share/man/man8/{lsmod,modprobe,rmmod,depmod,insmod}.8 + do + mv -f ${f} ${f%\.*}.old.${f##*\.} + done + + einstall prefix=${D} + + # Install compat symlink + dosym ../bin/lsmod /sbin/lsmod + dosym ../sbin/insmod.old /bin/lsmod.old + # Install the modules.conf2modprobe.conf tool, so we can update + # modprobe.conf. + into / + dosbin ${S}/generate-modprobe.conf + # Create the new modprobe.conf + dodir /etc + rm -f ${D}/etc/modprobe.conf + if [ ! -f ${ROOT}/etc/modprobe.devfs ] + then + # Support file for the devfs hack .. needed else modprobe borks. + # Baselayout-1.8.6.3 or there abouts will have a modules-update that + # will correctly generate /etc/modprobe.devfs .... + echo "### This file is automatically generated by modules-update" \ + > ${D}/etc/modprobe.devfs + else + # This is dynamic, so we do not want this in the package ... + rm -f ${D}/etc/modprobe.devfs + fi + + doman *.[1-8] + docinto / + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ] + then + einfo "Updating config files..." + if [ -x /sbin/modules-update ] + then + /sbin/modules-update + elif [ -x /sbin/update-modules ] + then + /sbin/update-modules + elif [ -x /usr/sbin/update-modules ] + then + /usr/sbin/update-modules + fi + fi +} + |