summaryrefslogtreecommitdiffstats
path: root/meta/packages/module-init-tools
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/module-init-tools
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/module-init-tools')
-rw-r--r--meta/packages/module-init-tools/files/ignore_arch_directory24
-rw-r--r--meta/packages/module-init-tools/files/manpagesopt41
-rw-r--r--meta/packages/module-init-tools/files/modutils_extension55
-rw-r--r--meta/packages/module-init-tools/files/no_man_rebuild12
-rw-r--r--meta/packages/module-init-tools/module-init-tools-cross_3.2.2.bb16
-rw-r--r--meta/packages/module-init-tools/module-init-tools_3.2.2.bb63
6 files changed, 211 insertions, 0 deletions
diff --git a/meta/packages/module-init-tools/files/ignore_arch_directory b/meta/packages/module-init-tools/files/ignore_arch_directory
new file mode 100644
index 0000000000..185ea7a3a5
--- /dev/null
+++ b/meta/packages/module-init-tools/files/ignore_arch_directory
@@ -0,0 +1,24 @@
1diff -ruN module-init-tools-3.1-pre6.orig/modprobe.8 module-init-tools-3.1-pre6/modprobe.8
2--- module-init-tools-3.2-pre7/modprobe.8.orig 2005-07-05 13:52:32.000000000 +0200
3+++ module-init-tools-3.2-pre7/modprobe.8 2005-07-05 13:52:42.000000000 +0200
4@@ -31,6 +31,7 @@
5 \fI/etc/modprobe.conf\fR configuration file and
6 \fI/etc/modprobe.d\fR directory
7 (see \fBmodprobe.conf\fR(5)).
8+All files in the \fI/etc/modprobe.d/arch/\fR directory are ignored.
9 .PP
10 Note that this version of \fBmodprobe\fR does not
11 do anything to the module itself: the work of resolving symbols
12--- module-init-tools-3.2-pre7/modprobe.c.orig 2005-07-05 13:50:00.000000000 +0200
13+++ module-init-tools-3.2-pre7/modprobe.c 2005-07-05 13:50:15.000000000 +0200
14@@ -1158,6 +1158,10 @@
15 DIR *dir;
16 int ret = 0;
17
18+ /* ignore everything in this directory */
19+ if (streq(filename, "/etc/modprobe.d/arch"))
20+ return 1;
21+
22 /* Reiser4 has file/directory duality: treat it as both. */
23 dir = opendir(filename);
24 if (dir) {
diff --git a/meta/packages/module-init-tools/files/manpagesopt b/meta/packages/module-init-tools/files/manpagesopt
new file mode 100644
index 0000000000..5d5cac609e
--- /dev/null
+++ b/meta/packages/module-init-tools/files/manpagesopt
@@ -0,0 +1,41 @@
1Index: module-init-tools-3.2-pre9/configure.in
2===================================================================
3--- module-init-tools-3.2-pre9.orig/configure.in 2005-08-09 04:31:26.000000000 +0000
4+++ module-init-tools-3.2-pre9/configure.in 2005-09-20 22:06:10.000000000 +0000
5@@ -41,5 +41,14 @@
6 fi])
7 AC_SUBST(MODULE_DIR)
8
9-AC_OUTPUT([Makefile])
10+AC_ARG_ENABLE(manpages,
11+[ --disable-manpages Disable man page generation.],
12+[if test x"$enableval" != x"no"; then
13+ enable_manpages=yes
14+else
15+ enable_manpages=no
16+fi],
17+[enable_manpages=yes])
18+AM_CONDITIONAL([MANPAGES], test x"$enable_manpages" = x"yes")
19
20+AC_OUTPUT([Makefile])
21Index: module-init-tools-3.2-pre9/Makefile.am
22===================================================================
23--- module-init-tools-3.2-pre9.orig/Makefile.am 2005-08-09 04:54:28.000000000 +0000
24+++ module-init-tools-3.2-pre9/Makefile.am 2005-09-20 22:09:03.000000000 +0000
25@@ -21,13 +21,14 @@
26 MAN5 = modprobe.conf.5 modules.dep.5
27 MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
28 SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
29-man_MANS = $(MAN5) $(MAN8)
30 # If they haven't overridden mandir, fix it (never /man!)
31 mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi)
32
33 TESTSUITE := $(shell find tests -type f ! -name '*~') tests/vg-suppressions
34
35-EXTRA_DIST = generate-modprobe.conf modprobe.devfs FAQ CODING stress_modules.sh install-with-care $(SGML) $(man_MANS) $(TESTSUITE)
36+if MANPAGES
37+man_MANS = $(MAN5) $(MAN8)
38+endif
39
40 sbin_PROGRAMS = insmod modprobe rmmod depmod modinfo insmod.static
41 bin_PROGRAMS = lsmod
diff --git a/meta/packages/module-init-tools/files/modutils_extension b/meta/packages/module-init-tools/files/modutils_extension
new file mode 100644
index 0000000000..fd84ca2550
--- /dev/null
+++ b/meta/packages/module-init-tools/files/modutils_extension
@@ -0,0 +1,55 @@
1--- module-init-tools-3.0-pre10.orig/depmod.c
2+++ module-init-tools-3.0-pre10/depmod.c
3@@ -217,13 +217,13 @@
4 {
5 char *sep;
6 char pathname[strlen(argv[0])+1];
7- char oldname[strlen("depmod") + strlen(argv[0]) + sizeof(".old")];
8+ char oldname[strlen("depmod") + strlen(argv[0]) + sizeof(".24")];
9
10 memset(pathname, 0, strlen(argv[0])+1);
11 sep = strrchr(argv[0], '/');
12 if (sep)
13 memcpy(pathname, argv[0], sep - argv[0]+1);
14- sprintf(oldname, "%s%s.old", pathname, "depmod");
15+ sprintf(oldname, "%s%s.24", pathname, "depmod");
16
17 /* Recursion detection: we need an env var since we can't
18 change argv[0] (as older modutils uses it to determine
19--- module-init-tools-3.0-pre10.orig/backwards_compat.c
20+++ module-init-tools-3.0-pre10/backwards_compat.c
21@@ -21,13 +21,13 @@
22 pid_t pid;
23 char ascii_pid[32];
24 char pathname[strlen(argv[0])+1];
25- char oldname[strlen(progname) + strlen(argv[0]) + sizeof(".old")];
26+ char oldname[strlen(progname) + strlen(argv[0]) + sizeof(".24")];
27
28 memset(pathname, 0, strlen(argv[0])+1);
29 sep = strrchr(argv[0], '/');
30 if (sep)
31 memcpy(pathname, argv[0], sep - argv[0]+1);
32- sprintf(oldname, "%s%s.old", pathname, progname);
33+ sprintf(oldname, "%s%s.24", pathname, progname);
34
35 /* Recursion detection: we need an env var since we can't
36 change argv[0] (as older modutils uses it to determine
37--- module-init-tools-3.0-pre10.orig/generate-modprobe.conf
38+++ module-init-tools-3.0-pre10/generate-modprobe.conf
39@@ -26,12 +26,12 @@
40 cp $TESTING_MODPROBE_CONF $MODPROBECONF
41 elif [ "$STDIN" = "1" ]; then
42 cat > $MODPROBECONF
43-elif [ -x /sbin/modprobe.old ]; then
44+elif [ -x /sbin/modprobe.24 ]; then
45 # In sbin.
46- /sbin/modprobe.old -c > $MODPROBECONF
47-elif modprobe.old -c >/dev/null 2>&1; then
48+ /sbin/modprobe.24 -c > $MODPROBECONF
49+elif modprobe.24 -c >/dev/null 2>&1; then
50 # Somewhere in path.
51- modprobe.old -c > $MODPROBECONF
52+ modprobe.24 -c > $MODPROBECONF
53 elif /sbin/modprobe -V 2>/dev/null | grep -q 'modprobe version'; then
54 # Running /sbin/modprobe gives old version.
55 /sbin/modprobe -c > $MODPROBECONF
diff --git a/meta/packages/module-init-tools/files/no_man_rebuild b/meta/packages/module-init-tools/files/no_man_rebuild
new file mode 100644
index 0000000000..d38866aece
--- /dev/null
+++ b/meta/packages/module-init-tools/files/no_man_rebuild
@@ -0,0 +1,12 @@
1diff -ruN module-init-tools-3.1.orig/Makefile.in module-init-tools-3.1/Makefile.in
2--- module-init-tools-3.1.orig/Makefile.in 2004-11-15 01:59:48.000000000 +0100
3+++ module-init-tools-3.1/Makefile.in 2004-11-21 02:18:58.000000000 +0100
4@@ -613,7 +613,7 @@
5 check-am: all-am
6 $(MAKE) $(AM_MAKEFLAGS) check-TESTS
7 check: check-am
8-all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
9+all-am: Makefile $(PROGRAMS) $(SCRIPTS) #$(MANS)
10
11 installdirs:
12 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
diff --git a/meta/packages/module-init-tools/module-init-tools-cross_3.2.2.bb b/meta/packages/module-init-tools/module-init-tools-cross_3.2.2.bb
new file mode 100644
index 0000000000..fc8b461945
--- /dev/null
+++ b/meta/packages/module-init-tools/module-init-tools-cross_3.2.2.bb
@@ -0,0 +1,16 @@
1LICENSE = "GPL"
2include module-init-tools_${PV}.bb
3inherit cross
4DEFAULT_PREFERENCE = "0"
5PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.6"
6
7EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
8
9do_stage () {
10 oe_runmake install
11 mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.6
12}
13
14do_install () {
15 :
16}
diff --git a/meta/packages/module-init-tools/module-init-tools_3.2.2.bb b/meta/packages/module-init-tools/module-init-tools_3.2.2.bb
new file mode 100644
index 0000000000..727bfaac1b
--- /dev/null
+++ b/meta/packages/module-init-tools/module-init-tools_3.2.2.bb
@@ -0,0 +1,63 @@
1DESCRIPTION = "This package contains a set of programs for loading, inserting, and \
2removing kernel modules for Linux (versions 2.5.48 and above). It serves \
3the same function that the modutils package serves for Linux 2.4."
4LICENSE = "GPL"
5SECTION = "base"
6PR = "r2"
7
8PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
9RDEPENDS_${PN} += "module-init-tools-depmod"
10
11FILES_module-init-tools-depmod = "${sbindir}/depmod.26"
12FILES_module-init-tools-insmod-static = "${sbindir}/insmod.static"
13
14SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-${PV}.tar.bz2 \
15 file://ignore_arch_directory;patch=1 \
16 file://modutils_extension;patch=1 \
17 file://no_man_rebuild;patch=1 \
18 file://manpagesopt;patch=1 "
19S = "${WORKDIR}/module-init-tools-${PV}"
20
21EXTRA_OECONF = "--disable-manpages"
22
23bindir = "/bin"
24sbindir = "/sbin"
25
26inherit autotools
27
28do_install() {
29 autotools_do_install
30 for f in bin/lsmod sbin/insmod sbin/rmmod sbin/modprobe sbin/modinfo sbin/depmod; do
31 mv ${D}/$f ${D}/$f.26
32 done
33}
34
35pkg_postinst_module-init-tools() {
36#!/bin/sh
37for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
38bn=`basename $f`
39 update-alternatives --install /$f $bn /$f.26 60
40done
41update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.26 60
42update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.26 60
43}
44
45pkg_prerm_module-init-tools() {
46#!/bin/sh
47for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
48bn=`basename $f`
49 update-alternatives --remove $bn /$f.26
50done
51update-alternatives --remove bin-lsmod /bin/lsmod.26
52update-alternatives --remove lsmod /bin/lsmod.26
53}
54
55pkg_postinst_module-init-tools-depmod() {
56#!/bin/sh
57update-alternatives --install /sbin/depmod depmod /sbin/depmod.26 60
58}
59
60pkg_prerm_module-init-tools-depmod() {
61#!/bin/sh
62update-alternatives --remove depmod /sbin/depmod.26
63}