diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/modutils |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/modutils')
-rw-r--r-- | sys-apps/modutils/Manifest | 9 | ||||
-rw-r--r-- | sys-apps/modutils/files/modutils-2.4.27-alias.patch | 86 | ||||
-rw-r--r-- | sys-apps/modutils/files/modutils-2.4.27-flex.patch | 37 | ||||
-rw-r--r-- | sys-apps/modutils/files/modutils-2.4.27-gcc.patch | 280 | ||||
-rw-r--r-- | sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch | 43 | ||||
-rw-r--r-- | sys-apps/modutils/metadata.xml | 8 | ||||
-rw-r--r-- | sys-apps/modutils/modutils-2.4.27-r1.ebuild | 39 |
7 files changed, 502 insertions, 0 deletions
diff --git a/sys-apps/modutils/Manifest b/sys-apps/modutils/Manifest new file mode 100644 index 000000000000..63cf8379f93c --- /dev/null +++ b/sys-apps/modutils/Manifest @@ -0,0 +1,9 @@ +AUX modutils-2.4.27-alias.patch 2246 SHA256 453e3ab982088e2e85164e63b4944af58cd01c2b2d45d75fdcda6649a339878f SHA512 e843cdcdca309646d8cb9db148db61bb6d9605068fbfc006be7c392d3349856c101899f26d39e3778a674bc9b64830bdc273484d1ccf37994eaca1cff594edc6 WHIRLPOOL 16e4d475030f0e8b85a3e810d4281422b7a13c186f24058c602bafa6dda9565d33fb799767cc75a935de7b2f73f7d939306feb7f62b411c7ed0eb9b007dcdce9 +AUX modutils-2.4.27-flex.patch 805 SHA256 dbe0c3207751157e7b104d66bdfeea280343ceabe856dc5d51849c206fdccad9 SHA512 2d427b2c9b5d45866a704caa3b564c986106aeb1c60898efa54c7272bcb536fa13a46df6970a8a0b6020bdbe4c86903503a2ec0e15092d0c254f9b5a940c2374 WHIRLPOOL 9710819b491b015cfa4aaad506298d0da9a2559805ec447da6481ddd6d0ed5379407db4444a58d99919b0a58223670a0cdea4451149b1c0e75da8a4870518999 +AUX modutils-2.4.27-gcc.patch 6963 SHA256 48af5c56a1e6e616278b8ee16dd6e5a5df42fdfc852acf6bc76287f1dc33f2d4 SHA512 1d2f0f2118ab40310cbd90d73da5300530c8b41bd5fc3832f8cc09914bfe9efba7161b80c1d29b216ba92bceb8b4f066eea1bf9bb2c6affdc9b35e12235a1008 WHIRLPOOL e5570af6becf448a7a87e145fb25fe4746d811871d988e4aa47dd39e684d388bb98f827818c29418acfcb67337483ee9e7fc0108754722922cdd5d7acacc8548 +AUX modutils-2.4.27-no-nested-function.patch 1422 SHA256 3e9961a7c9411e8c01eb48d9053d7901ec7a90ee0e070e85bd766385f36d563d SHA512 0a01f28f9d3f803b1e148af382b396ad793354363c36e690ed5a731c31482bc8b909fcf77902b62f50967e1ed782ec9e53412c906117dc3d7d12b1f21ecf075a WHIRLPOOL 5999f108eb31a12be9fb1dab005d30f536f790b70a0d6d05bf31c6bbcb583076d3285824a9c84f8ffee15a68d0d0beae7866b451c4372d8b3c7ce69c9e324fb2 +DIST modutils-2.4.27.tar.bz2 234963 SHA256 ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0 SHA512 5a638ea757f9d2cd7e91a8711eadfc6c723ca3b75757363620c8128772b9c00ddeb46af853711ce4c845096ad322a1dd2e8429be3d2e0a371ca93b1c81aa089d WHIRLPOOL baf623c4e5fe2c92139c27caa317694d8e3e9c60b875c8470218d6ed450e8bb52f8c11c34a1dc855aa3399648b06b77578d08966ec177b1ad7169fb622aef590 +EBUILD modutils-2.4.27-r1.ebuild 926 SHA256 51b0f3736b7d39f4879b307588ebd80b065c63868ff865cd2a456889fd351d52 SHA512 5a3362edf1afb5d6a0c5f168ae20aa0b618300ded0662eff0df199c31e6072ab98501ac9cbb371b01ea8901afd278acd7d43de0966511b610411a63e420fae41 WHIRLPOOL 4494ed5bda66b26bf511ebf64b63d0e718920e97a453738312358f4f3a0e9ec23594e585e7d2c586d450f1cbcba145f33cada530d82444d8f00e8fa0f1ce37f5 +MISC ChangeLog 3264 SHA256 396d7e7ce3f5fee9e1e21e18897e3ff45e77b09a6027847fcc0ada00fcb09701 SHA512 4164085d2d2a2e4a999be1a7c775b651f77b1a839e608af01669fc32c211c985435f21a2b7a476565408cf1d442d212e0dadfc5422ab2dc506cd407d63a4dcb2 WHIRLPOOL 80a48a870a6b075471f40263f10b295014f54173d31ee1a00a7589f4347422a730c0b54318b0a0c25778373cee09edce54789ac193305dd3803e805125ea147f +MISC ChangeLog-2015 8576 SHA256 0789ccd592771256729cd61b07f5c97a231652adca7943db35c87bb1441f7771 SHA512 1afc2129fd030295ca61870429e5c635a529a12e7fee602fbd81af6511e90e585199e9d7fded67b2f16701febd0e49b62cc1d0ebbdc19f041d4874b8b6ba3206 WHIRLPOOL 0a6dbfeb94a30f7c81c1c3b0e4a0aa622bef008f9d6074e86885646076bc39f4974044c7542696f311c8ce923adb74ff7a68bf12d727e8c7af9e1587c90d3daa +MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8 diff --git a/sys-apps/modutils/files/modutils-2.4.27-alias.patch b/sys-apps/modutils/files/modutils-2.4.27-alias.patch new file mode 100644 index 000000000000..1fefffb62f85 --- /dev/null +++ b/sys-apps/modutils/files/modutils-2.4.27-alias.patch @@ -0,0 +1,86 @@ +Taken from Debian. + +Update misc alias cruft. + +--- util/alias.h ++++ util/alias.h +@@ -52,7 +52,11 @@ + "binfmt--310 binfmt_java", + + "block-major-1 rd", ++#if defined(__s390__) || defined(__s390x__) || defined(__ia64__) || defined(__powerpc__) ++ "block-major-2 off", ++#else + "block-major-2 floppy", ++#endif + "block-major-3 ide-probe-mod", + "block-major-7 loop", + "block-major-8 sd_mod", +@@ -107,6 +111,7 @@ + /* /dev/sunmouse Sun mouse */ + /* /dev/beep Fancy beep device */ + /* /dev/modreq Kernel module load request */ ++ "char-major-10-116 snd", + "char-major-10-130 wdt", /* /dev/watchdog Watchdog timer port */ + "char-major-10-131 wdt", /* /dev/temperature Machine internal temperature */ + /* /dev/hwtrap Hardware fault trap */ +@@ -116,7 +121,11 @@ + "char-major-10-144 nvram", /* from Tigran Aivazian <tigran@sco.COM> */ + "char-major-10-157 applicom", /* from David Woodhouse <dwmw2@infradead.org> */ + "char-major-10-175 agpgart", /* /dev/agpgart GART AGP mapping access */ ++ "char-major-10-181 toshiba", ++ "char-major-10-183 hw_random", + "char-major-10-184 microcode", /* Tigran Aivazian <tigran@veritas.com> */ ++ "char-major-10-187 irnet", ++ "char-major-10-189 ussp", + "char-major-10-200 tun", /* Universal TUN/TAP device driver */ + "char-major-10-250 hci_vhci", + +@@ -179,6 +203,11 @@ + /* next two from <dairiki@matthews.dairiki.org> Thanks! */ + "net-pf-17 af_packet", + "net-pf-19 off", /* acorn econet */ ++ "net-pf-20 atm", ++ "net-pf-23 irda", ++ "net-pf-24 pppoe", ++ "net-pf-25 wanrouter", ++ "net-pf-26 llc", + + "net-pf-31 bluez", + +@@ -199,6 +228,10 @@ + "bt-proto-2 sco", + "bt-proto-3 rfcomm", + "bt-proto-4 bnep", ++ "bt-proto-5 cmtp", ++ "bt-proto-6 hidp", ++ "bt-proto-7 avdtp", ++ + + "plip0 plip", + "plip1 plip", +@@ -228,6 +261,7 @@ + "ppp-compress-21 bsd_comp", + "ppp-compress-24 ppp_deflate", + "ppp-compress-26 ppp_deflate", ++ "ppp ppp_async", /* for 2.4 */ + + #ifndef __sparc__ + "parport_lowlevel parport_pc", +@@ -271,9 +305,6 @@ + */ + char *above[] = + { +- "hid keybdev mousedev", +- "usbmouse hid", +- "wacom evdev", + NULL /* marks the end of the list! */ + }; + +@@ -284,7 +315,6 @@ + */ + char *below[] = + { +- "ov518_decomp ov511", + NULL /* marks the end of the list! */ + }; diff --git a/sys-apps/modutils/files/modutils-2.4.27-flex.patch b/sys-apps/modutils/files/modutils-2.4.27-flex.patch new file mode 100644 index 000000000000..c07e929b8b42 --- /dev/null +++ b/sys-apps/modutils/files/modutils-2.4.27-flex.patch @@ -0,0 +1,37 @@ +Taken from Debian. + +Build with newer flex versions. + +--- modutils-2.4.27.0.orig/genksyms/lex.l ++++ modutils-2.4.27.0/genksyms/lex.l +@@ -130,6 +130,7 @@ + + static int suppress_type_lookup, dont_want_brace_phrase; + static struct string_list *next_node; ++ static int next_token = 0; + + int token, count = 0; + struct string_list *cur_node; +@@ -144,7 +145,12 @@ + } + + repeat: +- token = yylex1(); ++ if (next_token != 0) { ++ token = next_token; ++ next_token = 0; ++ } ++ else ++ token = yylex1(); + + if (token == 0) + return 0; +@@ -425,7 +431,7 @@ + { + /* Put back the token we just read so's we can find it again + after registering the expression. */ +- unput(token); ++ next_token = token; + + lexstate = ST_NORMAL; + token = EXPRESSION_PHRASE; diff --git a/sys-apps/modutils/files/modutils-2.4.27-gcc.patch b/sys-apps/modutils/files/modutils-2.4.27-gcc.patch new file mode 100644 index 000000000000..3f90a9b2b2de --- /dev/null +++ b/sys-apps/modutils/files/modutils-2.4.27-gcc.patch @@ -0,0 +1,280 @@ +Fix building with newer gcc versions. + +Most changes taken from Debian. + +--- obj/obj_ia64.c ++++ obj/obj_ia64.c +@@ -127,6 +127,7 @@ + return (*(bundle + 1) >> 23) & 0x1ffffffffff; + + default: ++ ; + } + return (-1); + } +--- depmod/depmod.c ++++ depmod/depmod.c +@@ -1133,7 +1133,7 @@ + + for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) { + if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0) +- ((char *)ksym->name) += 8; ++ ksym->name = ((char *)ksym->name) + 8; + assert(n_syms < MAX_MAP_SYM); + symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0); + } +@@ -1265,7 +1265,7 @@ + * error. Use the error() routine but do not count + * any errors. Remove in 2.5. + */ +- int save_errors = errors; ++ int save_errors = error_count; + if (!quiet && nberr == 0) + error("*** Unresolved symbols in %s", + ptmod->name); +@@ -1274,7 +1274,7 @@ + nberr++; + if (flag_unresolved_error) + ret = 1; +- errors = save_errors; ++ error_count = save_errors; + } + } + verbose("%s\n", ptmod->name + skipchars); +@@ -1675,6 +1675,6 @@ + #else + int main(int argc, char **argv) + { +- return depmod_main(argc, argv) || errors; ++ return depmod_main(argc, argv) || error_count; + } + #endif /* defined(COMMON_3264) && defined(ONLY_32) */ +--- genksyms/genksyms.c ++++ genksyms/genksyms.c +@@ -45,7 +45,7 @@ + int flag_debug, flag_dump_defs, flag_warnings; + int checksum_version = 1, kernel_version = version(2,0,0); + +-static int errors; ++static int num_errors; + static int nsyms; + + static struct symbol *expansion_trail; +@@ -458,7 +458,7 @@ + va_end(args); + putc('\n', stderr); + +- errors++; ++ num_errors++; + } + } + +@@ -476,7 +476,7 @@ + va_end(args); + putc('\n', stderr); + +- errors++; ++ num_errors++; + } + } + +@@ -597,5 +597,5 @@ + nsyms, HASH_BUCKETS, (double)nsyms / (double)HASH_BUCKETS); + } + +- return errors != 0; ++ return num_errors != 0; + } +--- include/util.h ++++ include/util.h +@@ -39,8 +39,8 @@ + extern int xftw(const char *directory, xftw_func_t); + + /* Error logging */ +-extern int log; +-extern int errors; ++extern int logging; ++extern int error_count; + extern const char *error_file; + + extern int flag_verbose; +--- insmod/insmod.c ++++ insmod/insmod.c +@@ -275,7 +275,7 @@ + if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) { + gplonly_seen = 1; + if (gpl) +- ((char *)s->name) += 8; ++ s->name = ((char *)s->name) + 8; + else + continue; + } +@@ -1679,7 +1679,7 @@ + error_file = "insmod"; + + /* To handle repeated calls from combined modprobe */ +- errors = optind = 0; ++ error_count = optind = 0; + + /* Process the command line. */ + while ((o = getopt_long(argc, argv, "fhkLmnpqrsSvVxXyYNe:o:O:P:R:", +@@ -2064,7 +2064,7 @@ + goto out; + /**** No symbols or sections to be changed after kallsyms above ***/ + +- if (errors) ++ if (error_count) + goto out; + + /* If we were just checking, we made it. */ +@@ -2123,10 +2123,10 @@ + test_read.m.read_start = m_addr + sizeof(struct module); + test_read.m.read_end = test_read.m.read_start + sizeof(test_read.data); + if (sys_init_module(m_name, (struct module *) &test_read)) { +- int old_errors = errors; ++ int old_errors = error_count; + error("has persistent data but the kernel is too old to support it." + " Expect errors during rmmod as well"); +- errors = old_errors; ++ error_count = old_errors; + } + } + +@@ -2152,7 +2152,7 @@ + #else + init_module(m_name, f, m_size, blob_name, noload, flag_load_map); + #endif +- if (errors) { ++ if (error_count) { + if (!noload) + delete_module(m_name); + goto out; +--- insmod/kallsyms.c ++++ insmod/kallsyms.c +@@ -80,7 +80,7 @@ + error_file = "kallsyms"; + + /* To handle repeated calls from combined modprobe */ +- errors = optind = 0; ++ error_count = optind = 0; + + /* Process the command line. */ + while ((c = getopt_long(argc, argv, "Vh", +--- insmod/modprobe.c ++++ insmod/modprobe.c +@@ -1023,7 +1023,7 @@ + if (quiet) + my_argv[my_argc++] = "-q"; + +- if (log) ++ if (logging) + my_argv[my_argc++] = "-s"; + + if (insmod_opt) { +--- insmod/rmmod.c ++++ insmod/rmmod.c +@@ -261,9 +261,9 @@ + read_parm.m.read_start = mp->sym->value; + read_parm.m.read_end = read_parm.m.read_start + datasize; + if (sys_init_module(module, (struct module *) &read_parm)) { +- int old_errors = errors; ++ int old_errors = error_count; + error("has persistent data but the kernel is too old to support it."); +- errors = old_errors; ++ error_count = old_errors; + return(0); + } + +--- util/logger.c ++++ util/logger.c +@@ -31,10 +31,10 @@ + + /*======================================================================*/ + +-int log; ++int logging; + static int silent; + +-int errors; ++int error_count; + const char *error_file; + const char *program_name; + +@@ -75,7 +75,7 @@ + + if (silent) + ; +- else if (log) { ++ else if (logging) { + char buf[2*PATH_MAX]; + int n; + +@@ -100,7 +100,7 @@ + putc('\n', stderr); + } + +- errors++; ++ error_count++; + } + + void lprintf(const char *fmt,...) +@@ -108,7 +108,7 @@ + va_list args; + + if (silent); +- else if (log) { ++ else if (logging) { + char buf[2*PATH_MAX]; + va_start(args, fmt); + vsnprintf(buf, sizeof(buf), fmt, args); +@@ -132,5 +132,5 @@ + #ifdef STOREMSG + atexit(dumpmsg); + #endif +- log = 1; ++ logging = 1; + } +--- obj/obj_kallsyms.c ++++ obj/obj_kallsyms.c +@@ -200,8 +200,8 @@ + + /* Initial contents, header + one entry per input section. No strings. */ + osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec); +- a_hdr = (struct kallsyms_header *) osec->contents = +- xmalloc(osec->header.sh_size); ++ osec->contents = xmalloc(osec->header.sh_size); ++ a_hdr = (struct kallsyms_header *) osec->contents; + memset(osec->contents, 0, osec->header.sh_size); + a_hdr->size = sizeof(*a_hdr); + a_hdr->sections = loaded; +@@ -275,8 +275,8 @@ + a_hdr->symbol_off + + a_hdr->symbols*a_hdr->symbol_size + + strings_size - strings_left; +- a_hdr = (struct kallsyms_header *) osec->contents = +- xrealloc(a_hdr, a_hdr->total_size); ++ osec->contents = xrealloc(a_hdr, a_hdr->total_size); ++ a_hdr = (struct kallsyms_header *) osec->contents; + p = (char *)a_hdr + a_hdr->symbol_off; + memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size); + free(symbols); +--- obj/obj_ppc.c ++++ obj/obj_ppc.c +@@ -25,6 +25,7 @@ + #include <obj.h> + #include <util.h> + #include <assert.h> ++#include <stdlib.h> + + + /*======================================================================*/ +@@ -255,7 +256,8 @@ + archdata_sec->header.sh_size = 0; + sec = obj_find_section(f, "__ftr_fixup"); + if (sec) { +- ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad)); ++ archdata_sec->contents = xmalloc(sizeof(*ad)); ++ ad = (struct archdata *) (archdata_sec->contents); + memset(ad, 0, sizeof(*ad)); + archdata_sec->header.sh_size = sizeof(*ad); + ad->__start___ftr_fixup = sec->header.sh_addr; diff --git a/sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch b/sys-apps/modutils/files/modutils-2.4.27-no-nested-function.patch new file mode 100644 index 000000000000..7af4599c7154 --- /dev/null +++ b/sys-apps/modutils/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/modutils/metadata.xml b/sys-apps/modutils/metadata.xml new file mode 100644 index 000000000000..56c124413057 --- /dev/null +++ b/sys-apps/modutils/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +</pkgmetadata> diff --git a/sys-apps/modutils/modutils-2.4.27-r1.ebuild b/sys-apps/modutils/modutils-2.4.27-r1.ebuild new file mode 100644 index 000000000000..9123212c0c53 --- /dev/null +++ b/sys-apps/modutils/modutils-2.4.27-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit eutils + +DESCRIPTION="Standard kernel module utilities for linux-2.4 and older" +HOMEPAGE="https://www.kernel.org/pub/linux/utils/kernel/modutils/" +SRC_URI="mirror://kernel/linux/utils/kernel/${PN}/v2.4/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" +IUSE="" + +RDEPEND="!sys-apps/module-init-tools + !sys-apps/kmod" + +src_prepare() { + epatch "${FILESDIR}"/${P}-alias.patch + epatch "${FILESDIR}"/${P}-gcc.patch + epatch "${FILESDIR}"/${P}-flex.patch + epatch "${FILESDIR}"/${P}-no-nested-function.patch +} + +src_configure() { + econf \ + --prefix=/ \ + --disable-strip \ + --enable-insmod-static \ + --disable-zlib +} + +src_install() { + einstall prefix="${D}" + rm -r "${ED}"/usr/share/man/man2 || die + dodoc CREDITS ChangeLog NEWS README TODO +} |