From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- source/a/module-init-tools/doinst.sh | 22 ------- .../modprobe.favor.etc.modprobe.d.diff | 27 -------- .../modprobe.ignore_some_suffixes.diff | 54 ++++++++-------- .../a/module-init-tools/modprobe.no_sys_check.diff | 51 ---------------- .../modprobe.quit.whining.about.modprobe.conf.diff | 15 +++++ .../module-init-tools/module-init-tools.SlackBuild | 71 ++++++++++------------ source/a/module-init-tools/slack-desc | 2 +- 7 files changed, 73 insertions(+), 169 deletions(-) delete mode 100644 source/a/module-init-tools/doinst.sh delete mode 100644 source/a/module-init-tools/modprobe.favor.etc.modprobe.d.diff delete mode 100644 source/a/module-init-tools/modprobe.no_sys_check.diff create mode 100644 source/a/module-init-tools/modprobe.quit.whining.about.modprobe.conf.diff (limited to 'source/a/module-init-tools') diff --git a/source/a/module-init-tools/doinst.sh b/source/a/module-init-tools/doinst.sh deleted file mode 100644 index 41ff1d753..000000000 --- a/source/a/module-init-tools/doinst.sh +++ /dev/null @@ -1,22 +0,0 @@ -config() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy - rm $NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... -} -config etc/modprobe.conf.new - -# Retain legacy behavior by tossing a symlink in /etc/modprobe.d/: -# Note that the plan is to eliminate /etc/modprobe.conf and -# /etc/modules.conf in the long run, so you may wish to remove the -# link and move your actual file into /etc/modprobe.d/ if you want -# to keep it instead of going with smaller chunks in there... -if [ -r etc/modprobe.conf ]; then - ( cd etc/modprobe.d ; ln -s ../modprobe.conf . 2> /dev/null ) -fi - diff --git a/source/a/module-init-tools/modprobe.favor.etc.modprobe.d.diff b/source/a/module-init-tools/modprobe.favor.etc.modprobe.d.diff deleted file mode 100644 index 1565d93a6..000000000 --- a/source/a/module-init-tools/modprobe.favor.etc.modprobe.d.diff +++ /dev/null @@ -1,27 +0,0 @@ -diff -Nur module-init-tools-3.6.old/doc/modprobe.conf.sgml module-init-tools-3.6.new/doc/modprobe.conf.sgml ---- module-init-tools-3.6.old/doc/modprobe.conf.sgml 2009-02-04 01:45:24.000000000 -0600 -+++ module-init-tools-3.6.new/doc/modprobe.conf.sgml 2009-02-08 01:42:05.097637263 -0600 -@@ -35,7 +35,9 @@ - Because the modprobe command can add or - remove extra more than one module, due to module dependencies, - we need a method of specifying what options are to be used with -- those modules. /etc/modprobe.conf (or, if that does not exist, all files under the /etc/modprobe.d directory) specifies -+ those modules. All of the files under the /etc/modprobe.d/ -+ directory are used, or if that directory does not exist, the -+ /etc/modprobe.conf file specifies - those options, as required. It can also be used to create - convenient aliases: alternate names for a module. Finally, it - can override the normal modprobe behavior -diff -Nur module-init-tools-3.6.old/modprobe.c module-init-tools-3.6.new/modprobe.c ---- module-init-tools-3.6.old/modprobe.c 2009-02-04 01:45:24.000000000 -0600 -+++ module-init-tools-3.6.new/modprobe.c 2009-02-08 01:42:05.099636402 -0600 -@@ -1366,8 +1366,8 @@ - - static const char *default_configs[] = - { -- "/etc/modprobe.conf", - "/etc/modprobe.d", -+ "/etc/modprobe.conf", - }; - - static void read_toplevel_config(const char *filename, diff --git a/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff b/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff index 24967f0b2..a65fba0ad 100644 --- a/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff +++ b/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff @@ -1,43 +1,41 @@ -diff -Nur module-init-tools-3.6.old/modprobe.c module-init-tools-3.6.new/modprobe.c ---- module-init-tools-3.6.old/modprobe.c 2009-02-04 01:45:24.000000000 -0600 -+++ module-init-tools-3.6.new/modprobe.c 2009-02-08 01:40:24.143637295 -0600 +diff -Nur module-init-tools-3.11.orig/modprobe.c module-init-tools-3.11.new/modprobe.c +--- module-init-tools-3.11.orig/modprobe.c 2009-10-15 04:59:28.000000000 -0500 ++++ module-init-tools-3.11.new/modprobe.c 2009-10-15 08:14:12.108359199 -0500 @@ -38,6 +38,7 @@ #include #include #include +#include - #define streq(a,b) (strcmp((a),(b)) == 0) - #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -@@ -1275,6 +1276,20 @@ - return 1; + #include "util.h" + #include "elfops.h" +@@ -861,6 +862,20 @@ + options, commands, aliases, blacklist); } +/* Let's exclude a few file extensions */ +static int valid_file_name(const char *filename) +{ -+ static regex_t *re = NULL; ++ static regex_t *re = NULL; + -+ if (!re) { -+ re = NOFAIL(malloc(sizeof(regex_t))); -+ if (regcomp(re, "(^(\\.|\\.\\.)|\\.(new|orig|bak)$)", -+ REG_EXTENDED|REG_NOSUB) != 0) -+ fatal("regcomp failed: %s\n", strerror(errno)); -+ } -+ return regexec(re, filename, 0, NULL, 0); ++ if (!re) { ++ re = NOFAIL(malloc(sizeof(regex_t))); ++ if (regcomp(re, "(^(\\.|\\.\\.)|\\.(new|orig|bak)$)", ++ REG_EXTENDED|REG_NOSUB) != 0) ++ fatal("regcomp failed: %s\n", strerror(errno)); ++ } ++ return regexec(re, filename, 0, NULL, 0); +} + - /* Simple format, ignore lines starting with #, one command per line. - Returns true or false. */ - static int read_config(const char *filename, -@@ -1294,7 +1309,10 @@ - if (dir) { - struct dirent *i; + static int parse_config_scan(const char *filename, + const char *name, + int dump_only, +@@ -887,6 +902,8 @@ while ((i = readdir(dir)) != NULL) { -+ /* Removed this line: - if (!streq(i->d_name,".") && !streq(i->d_name,"..") -+ and replaced with this one: */ -+ if (valid_file_name(i->d_name) - && config_filter(i->d_name)) { - char sub[strlen(filename) + 1 - + strlen(i->d_name) + 1]; + size_t len; + ++ if (!valid_file_name(i->d_name)) ++ continue; + if (i->d_name[0] == '.') + continue; + if (!config_filter(i->d_name)) diff --git a/source/a/module-init-tools/modprobe.no_sys_check.diff b/source/a/module-init-tools/modprobe.no_sys_check.diff deleted file mode 100644 index 90e9a7d19..000000000 --- a/source/a/module-init-tools/modprobe.no_sys_check.diff +++ /dev/null @@ -1,51 +0,0 @@ -http://bugs.gentoo.org/258442 - -From 1a55ee5297b883ea4b43cdf74ad890873ebe966c Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Fri, 13 Feb 2009 02:21:10 -0500 -Subject: [PATCH] modprobe: remove pointless /sys requirement - -When modprobe was converted from parsing /proc to parsing /sys, it was not -a straight conversion. Instead, a "sanity" check was added early on where -modprobe would simply abort doing anything useful if /sys isn't mounted. -Unfortunately, this makes modprobe fairly unusable. Considering the -kernel itself can invoke modprobe before userspace gets a chance to start -the init process (and actually mount /sys), we end up with a chicken and -egg issue. Which gets even worse when the kernel keeps running modprobe -over and over and the boot output fills up with: -modprobe: FATAL: /sys is not mounted. -modprobe: FATAL: /sys is not mounted. -modprobe: FATAL: /sys is not mounted. -modprobe: FATAL: /sys is not mounted. -modprobe: FATAL: /sys is not mounted. -modprobe: FATAL: /sys is not mounted. - -Since modprobe itself is already written to handle the case where it -cannot figure out whether a given module is loaded (and so was able to run -perfectly fine without /proc being mounted), the check is wholly useless. - -Signed-off-by: Mike Frysinger ---- - modprobe.c | 5 ----- - 1 files changed, 0 insertions(+), 5 deletions(-) - -diff --git a/modprobe.c b/modprobe.c -index 022004c..110204b 100644 ---- a/modprobe.c -+++ b/modprobe.c -@@ -1522,11 +1522,6 @@ static void handle_module(const char *modname, - const char *cmdline_opts, - int flags) - { -- struct stat finfo; -- -- if (stat("/sys/module", &finfo) < 0) -- fatal("/sys is not mounted.\n"); -- - if (list_empty(todo_list)) { - const char *command; - --- -1.6.1.3 - - diff --git a/source/a/module-init-tools/modprobe.quit.whining.about.modprobe.conf.diff b/source/a/module-init-tools/modprobe.quit.whining.about.modprobe.conf.diff new file mode 100644 index 000000000..640ab3086 --- /dev/null +++ b/source/a/module-init-tools/modprobe.quit.whining.about.modprobe.conf.diff @@ -0,0 +1,15 @@ +--- ./modprobe.c.orig 2010-02-06 13:56:19.000000000 -0600 ++++ ./modprobe.c 2010-02-06 14:00:49.000000000 -0600 +@@ -971,10 +971,8 @@ + } + + /* deprecated config file */ +- if (parse_config_file("/etc/modprobe.conf", name, dump_only, removing, +- options, commands, aliases, blacklist) > 0) +- warn("Deprecated config file /etc/modprobe.conf, " +- "all config files belong into /etc/modprobe.d/.\n"); ++ parse_config_file("/etc/modprobe.conf", name, dump_only, removing, ++ options, commands, aliases, blacklist); + + /* default config */ + parse_config_scan("/etc/modprobe.d", name, dump_only, removing, diff --git a/source/a/module-init-tools/module-init-tools.SlackBuild b/source/a/module-init-tools/module-init-tools.SlackBuild index d69b43bc2..9b390d11a 100755 --- a/source/a/module-init-tools/module-init-tools.SlackBuild +++ b/source/a/module-init-tools/module-init-tools.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,12 +21,21 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=3.6 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +VERSION=${VERSION:-$(echo module-init-tools-*.tar.?z* | cut -d - -f 4 | rev | cut -f 3- -d . | rev)} +BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-module-init-tools @@ -36,7 +45,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf module-init-tools-$VERSION -tar xvf $CWD/module-init-tools-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/module-init-tools-$VERSION.tar.?z* || exit 1 cd module-init-tools-$VERSION || exit 1 chown -R root:root . find . \ @@ -45,20 +54,14 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Look for /etc/modprobe.d/ first rather than bailing on the idea if -# /etc/modprobe.conf exists. IMHO, this is a better default behavior -# because it allows /etc/modprobe.conf to remain behind if something -# still looks there, and allows a smoother transition towards using -# /etc/modprobe.d/ instead. -zcat $CWD/modprobe.favor.etc.modprobe.d.diff.gz | patch -p1 --verbose || exit 1 - # Exclude *.{old,new,bak} files (and a few others that obviously aren't # valid for this... Thanks to Marco d'Itri for the patch that it's based on -zcat $CWD/modprobe.ignore_some_suffixes.diff.gz | patch -p1 --verbose || exit 1 +zcat $CWD/modprobe.ignore_some_suffixes.diff.gz | patch -p1 || exit 1 -# We get (pointless) errors in early stages of the boot if modprobe checks for -# a mounted /sys before it actually gets mounted: -zcat $CWD/modprobe.no_sys_check.diff.gz | patch -p1 --verbose || exit 1 +# Using modprobe.conf still works, so don't whine about it, +# especially since there's nothing in /etc/modprobe.conf +# except for comments explaining not to use it. +zcat $CWD/modprobe.quit.whining.about.modprobe.conf.diff.gz | patch -p1 || exit 1 # Using --bindir=/sbin to make lsmod go there too CFLAGS= \ @@ -73,49 +76,37 @@ CFLAGS= \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -# We don't need this -rm -f $PKG/sbin/generate-modprobe.conf +# Create the config directory just in case +mkdir -p $PKG/etc/modprobe.d/ -# Links lsmod into /bin +# Link lsmod into /bin mkdir -p $PKG/bin ( cd $PKG/bin ; ln -sf /sbin/lsmod . ) -# Add manpage symlink for modprobe.d -( cd $PKG/usr/man/man5 - if [ -f modprobe.conf.5 -a ! -e modprobe.d.5 ]; then - ln -sf modprobe.conf.5 modprobe.d.5 - fi -) - # Compress manpages ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) -mkdir -p $PKG/etc/modprobe.d/ -cat << EOF > $PKG/etc/modprobe.conf.new -# /etc/modprobe.conf (old location for Linux 2.6+ config) -# -# The use of this config file is deprecated. -# Instead, create files in the /etc/modprobe.d/ directory -# containing modprobe options. -# -# For more information, see "man modprobe.conf". -EOF - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null mkdir -p $PKG/usr/doc/module-init-tools-$VERSION -# Most of these are out of date cp -a \ - AUTHORS CODING COPYING FAQ HACKING INSTALL NEWS README TODO \ + AUTHORS CODING COPYING FAQ README TODO \ $PKG/usr/doc/module-init-tools-$VERSION +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $TMP/module-init-tools-$VERSION-$ARCH-$BUILD.txz diff --git a/source/a/module-init-tools/slack-desc b/source/a/module-init-tools/slack-desc index 2f0ca3316..99d071b0e 100644 --- a/source/a/module-init-tools/slack-desc +++ b/source/a/module-init-tools/slack-desc @@ -5,7 +5,7 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| module-init-tools: module-init-tools (kernel module utilities) module-init-tools: module-init-tools: Utilities to load and unload kernel modules. These are used on Linux -- cgit v1.2.3-65-gdbad