diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-08-18 22:36:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-08-18 22:36:28 +0000 |
commit | c0438b182cf78bc8971572898f9dd273ce77cce5 (patch) | |
tree | a107587ad0262de8d3787605fdd4b881e5060f82 | |
parent | Fix by the PaX guys to remove executable stack markings. (diff) | |
download | gentoo-2-c0438b182cf78bc8971572898f9dd273ce77cce5.tar.gz gentoo-2-c0438b182cf78bc8971572898f9dd273ce77cce5.tar.bz2 gentoo-2-c0438b182cf78bc8971572898f9dd273ce77cce5.zip |
remove executable stack markings (fix by PaX guys), touchup cross-compile support, remove gnuconfig since econf handles it properly now, make sure we run || die with automake, add some m68k/sh love, and stabilize 3.1 for arm/m68k/s390/sh
(Portage version: 2.0.51.22-r2)
5 files changed, 72 insertions, 47 deletions
diff --git a/sys-apps/module-init-tools/ChangeLog b/sys-apps/module-init-tools/ChangeLog index c470983759d5..e4053b1c34ff 100644 --- a/sys-apps/module-init-tools/ChangeLog +++ b/sys-apps/module-init-tools/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/module-init-tools # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.86 2005/07/26 05:17:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.87 2005/08/18 22:36:28 vapier Exp $ + + 18 Aug 2005; Mike Frysinger <vapier@gentoo.org> + +files/modutils-2.4.27-no-nested-function.patch: + Fix by the PaX guys to remove executable stack markings. 26 Jul 2005; Mike Frysinger <vapier@gentoo.org> module-init-tools-3.2_pre7-r1.ebuild: diff --git a/sys-apps/module-init-tools/files/modutils-2.4.27-no-nested-function.patch b/sys-apps/module-init-tools/files/modutils-2.4.27-no-nested-function.patch new file mode 100644 index 000000000000..7af4599c7154 --- /dev/null +++ b/sys-apps/module-init-tools/files/modutils-2.4.27-no-nested-function.patch @@ -0,0 +1,43 @@ +Patch by the PaX team to get rid of executable stacks. + +--- modutils/insmod/insmod.c ++++ modutils/insmod/insmod.c +@@ -366,18 +366,21 @@ static void hide_special_symbols(struct + sym->info = ELFW(ST_INFO) (STB_LOCAL, ELFW(ST_TYPE) (sym->info)); + } + ++static struct obj_file *load_map_file; ++ ++static int load_map_cmp(const void *a, const void *b) { ++ struct obj_symbol **as = (struct obj_symbol **) a; ++ struct obj_symbol **bs = (struct obj_symbol **) b; ++ unsigned long aa = obj_symbol_final_value(load_map_file, *as); ++ unsigned long ba = obj_symbol_final_value(load_map_file, *bs); ++ return aa < ba ? -1 : aa > ba ? 1 : 0; ++} ++ + static void print_load_map(struct obj_file *f) + { + struct obj_symbol *sym; + struct obj_symbol **all, **p; + struct obj_section *sec; +- int load_map_cmp(const void *a, const void *b) { +- struct obj_symbol **as = (struct obj_symbol **) a; +- struct obj_symbol **bs = (struct obj_symbol **) b; +- unsigned long aa = obj_symbol_final_value(f, *as); +- unsigned long ba = obj_symbol_final_value(f, *bs); +- return aa < ba ? -1 : aa > ba ? 1 : 0; +- } + int i, nsyms, *loaded; + + /* Report on the section layout. */ +@@ -425,7 +428,9 @@ static void print_load_map(struct obj_fi + *p++ = sym; + + /* Sort them by final value. */ ++ load_map_file = f; + qsort(all, nsyms, sizeof(struct obj_file *), load_map_cmp); ++ load_map_file = NULL; + + /* And list them. */ + lprintf("\nSymbols:"); diff --git a/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild b/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild index fff17bba018a..63a348f7be1c 100644 --- a/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild +++ b/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild,v 1.3 2005/07/15 09:42:17 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.1-r1.ebuild,v 1.4 2005/08/18 22:36:28 vapier Exp $ -inherit flag-o-matic eutils gnuconfig toolchain-funcs +inherit flag-o-matic eutils toolchain-funcs MYP="${P/_pre/-pre}" S="${WORKDIR}/${MYP}" @@ -16,7 +16,7 @@ SRC_URI="mirror://kernel/linux/kernel/people/rusty/modules/${MYP}.tar.bz2 LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc ~x86" IUSE="" #IUSE="no-old-linux" @@ -27,19 +27,12 @@ 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) # if ! use no-old-linux ; then cd "${WORKDIR}"/modutils-${MODUTILS_PV} epatch "${FILESDIR}"/modutils-2.4.27-alias.patch epatch "${FILESDIR}"/modutils-2.4.27-gcc.patch epatch "${FILESDIR}"/modutils-2.4.27-flex.patch + epatch "${FILESDIR}"/modutils-2.4.27-no-nested-function.patch # fi # Support legacy .o modules @@ -62,16 +55,13 @@ src_unpack() { rm -f missing export WANT_AUTOMAKE=1.6 - automake --add-missing - - cd ${S} - gnuconfig_update -# if ! use no-old-linux ; then - cp config.{guess,sub} ${WORKDIR}/modutils-${MODUTILS_PV}/ -# fi + automake --add-missing || die } src_compile() { + # Configure script uses BUILDCFLAGS for cross-compiles but this + # defaults to CFLAGS which can be bad mojo + export BUILDCFLAGS=-pipe export BUILDCC="$(tc-getBUILD_CC)" # if ! use no-old-linux ; then diff --git a/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild b/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild index 1c7acb44c13e..b1beb6f13e7e 100644 --- a/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild +++ b/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild,v 1.5 2005/07/27 13:31:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2_pre7-r1.ebuild,v 1.6 2005/08/18 22:36:28 vapier Exp $ -inherit flag-o-matic eutils gnuconfig toolchain-funcs fixheadtails +inherit flag-o-matic eutils toolchain-funcs fixheadtails MYP="${P/_pre/-pre}" S="${WORKDIR}/${MYP}" @@ -16,7 +16,7 @@ SRC_URI="mirror://kernel/linux/kernel/people/rusty/modules/${MYP}.tar.bz2 LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="" #IUSE="no-old-linux" # The test code runs `make clean && configure` and screws up src_compile() @@ -35,6 +35,7 @@ src_unpack() { epatch "${FILESDIR}"/modutils-2.4.27-alias.patch epatch "${FILESDIR}"/modutils-2.4.27-gcc.patch epatch "${FILESDIR}"/modutils-2.4.27-flex.patch + epatch "${FILESDIR}"/modutils-2.4.27-no-nested-function.patch # fi ht_fix_file "${S}"/tests/test-depmod/10badcommand.sh @@ -60,16 +61,13 @@ src_unpack() { touch *.5 rm -f missing - automake --add-missing - - cd ${S} - gnuconfig_update -# if ! use no-old-linux ; then - cp config.{guess,sub} ${WORKDIR}/modutils-${MODUTILS_PV}/ -# fi + automake --add-missing || die } src_compile() { + # Configure script uses BUILDCFLAGS for cross-compiles but this + # defaults to CFLAGS which can be bad mojo + export BUILDCFLAGS=-pipe export BUILDCC="$(tc-getBUILD_CC)" # if ! use no-old-linux ; then diff --git a/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild b/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild index 564da7a00ac4..e16131d10641 100644 --- a/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild +++ b/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild,v 1.2 2005/07/14 03:11:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2_pre7.ebuild,v 1.3 2005/08/18 22:36:28 vapier Exp $ -inherit flag-o-matic eutils gnuconfig toolchain-funcs +inherit flag-o-matic eutils toolchain-funcs MYP="${P/_pre/-pre}" S="${WORKDIR}/${MYP}" @@ -16,7 +16,7 @@ SRC_URI="mirror://kernel/linux/kernel/people/rusty/modules/${MYP}.tar.bz2 LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="" #IUSE="no-old-linux" @@ -27,19 +27,12 @@ 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) # if ! use no-old-linux ; then cd "${WORKDIR}"/modutils-${MODUTILS_PV} epatch "${FILESDIR}"/modutils-2.4.27-alias.patch epatch "${FILESDIR}"/modutils-2.4.27-gcc.patch epatch "${FILESDIR}"/modutils-2.4.27-flex.patch + epatch "${FILESDIR}"/modutils-2.4.27-no-nested-function.patch # fi # Support legacy .o modules @@ -59,16 +52,13 @@ src_unpack() { rm -f missing export WANT_AUTOMAKE=1.6 - automake --add-missing - - cd ${S} - gnuconfig_update -# if ! use no-old-linux ; then - cp config.{guess,sub} ${WORKDIR}/modutils-${MODUTILS_PV}/ -# fi + automake --add-missing || die } src_compile() { + # Configure script uses BUILDCFLAGS for cross-compiles but this + # defaults to CFLAGS which can be bad mojo + export BUILDCFLAGS=-pipe export BUILDCC="$(tc-getBUILD_CC)" # if ! use no-old-linux ; then |