[Initscripts-ng-commits] r872 - in /trunk/src/insserv/debian: ./ patches/
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Sat Mar 14 15:34:56 UTC 2009
Author: kelmo-guest
Date: Sat Mar 14 15:34:56 2009
New Revision: 872
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=872
Log:
Convert dpatches to quilt series and adjust debian/rules and
debian/control.
Added:
trunk/src/insserv/debian/patches/10_nosuse.patch
trunk/src/insserv/debian/patches/11_debian_conf.patch
trunk/src/insserv/debian/patches/30_deterministic_order.patch
trunk/src/insserv/debian/patches/40_badboy_segfault.patch
trunk/src/insserv/debian/patches/50_symlink_in_initddir.patch
trunk/src/insserv/debian/patches/60_all_keyword_start_only.patch
trunk/src/insserv/debian/patches/series
Removed:
trunk/src/insserv/debian/patches/00list
trunk/src/insserv/debian/patches/10_nosuse.dpatch
trunk/src/insserv/debian/patches/11_debian_conf.dpatch
trunk/src/insserv/debian/patches/30_deterministic_order.dpatch
trunk/src/insserv/debian/patches/40_badboy_segfault.dpatch
trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch
trunk/src/insserv/debian/patches/60_all_keyword_start_only.dpatch
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/control
trunk/src/insserv/debian/rules
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=872&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sat Mar 14 15:34:56 2009
@@ -1,3 +1,10 @@
+insserv (1.12.0-5) unstable; urgency=low
+
+ * Convert dpatches to quilt series and adjust debian/rules and
+ debian/control.
+
+ -- Kel Modderman <kel at otaku42.de> Sun, 15 Mar 2009 01:29:07 +1000
+
insserv (1.12.0-4) unstable; urgency=low
[ Petter Reinholdtsen ]
Modified: trunk/src/insserv/debian/control
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/control?rev=872&op=diff
==============================================================================
--- trunk/src/insserv/debian/control (original)
+++ trunk/src/insserv/debian/control Sat Mar 14 15:34:56 2009
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Petter Reinholdtsen <pere at debian.org>
Uploaders: Kel Modderman <kel at otaku42.de>
-Build-Depends: debhelper (>= 4.0.0), po-debconf, dpatch
+Build-Depends: debhelper (>= 4.0.0), po-debconf, quilt
Standards-Version: 3.8.0
Vcs-Svn: svn://svn.debian.org/initscripts-ng/trunk/src/insserv
Vcs-Browser: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv
Added: trunk/src/insserv/debian/patches/10_nosuse.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/10_nosuse.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/10_nosuse.patch (added)
+++ trunk/src/insserv/debian/patches/10_nosuse.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,15 @@
+Purpose: Disable the SUSE flag.
+Fixes: None, made as part of Debian porting.
+Status: Debian specific, showed to upstream.
+---
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@
+ #DESTDIR = /tmp/root
+ #DEBUG = -DDEBUG=1 -Wpacked
+ DEBUG =
+-ISSUSE = -DSUSE
++ISSUSE = -DNOTSUSE
+ DESTDIR =
+ VERSION = 1.11.10
+ DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
Added: trunk/src/insserv/debian/patches/11_debian_conf.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/11_debian_conf.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/11_debian_conf.patch (added)
+++ trunk/src/insserv/debian/patches/11_debian_conf.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,53 @@
+Purpose: Adjust the insserv configuration for Debian init.d script names.
+Fixes: None, made as part of Debian porting.
+Status: Debian specific, showed to upstream.
+---
+--- a/insserv.conf
++++ b/insserv.conf
+@@ -1,29 +1,29 @@
+ #
+ # All local filesystems are mounted (done during boot phase)
+ #
+-$local_fs boot.localfs
++$local_fs +mountall +mountoverflowtmp +umountfs
+
+ #
+ # Low level networking (ethernet card)
+ #
+-$network network +pcmcia +hotplug
++$network +networking +ifupdown
+
+ #
+ # Named is operational
+ #
+-$named +named +dnsmasq +lwresd $network
++$named +named +dnsmasq +lwresd +bind9 $network
+
+ #
+ # All remote filesystems are mounted (note in some cases /usr may
+ # be remote. Most applications that care will probably require
+ # both $local_fs and $remote_fs)
+ #
+-$remote_fs $local_fs +nfs
++$remote_fs $local_fs +mountnfs +mountnfs-bootclean +umountnfs +sendsigs
+
+ #
+ # System logger is operational
+ #
+-$syslog syslog
++$syslog +syslog +sysklogd +rsyslog +syslog-ng
+
+ #
+ # SunRPC portmapper available
+@@ -33,9 +33,9 @@
+ #
+ # The system time has been set correctly
+ #
+-$time boot.clock +xntpd
++$time hwclock
+
+ #
+ # Services which need to be interactive
+ #
+-<interactive> boot.crypto boot.localfs boot.rootfsck apache apache2 kdump
++<interactive> glibc hostname mountkernfs udev mountdevsubfs checkroot checkfs console-screen keymap
Added: trunk/src/insserv/debian/patches/30_deterministic_order.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/30_deterministic_order.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/30_deterministic_order.patch (added)
+++ trunk/src/insserv/debian/patches/30_deterministic_order.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,75 @@
+Purpose: Defend against undeterministic directory stream sequence
+ returned by readdir(3). Make sure script which is being
+ registered is processed before all others.
+Fixes: #494514
+Status: Applied upstream.
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -2238,6 +2238,7 @@
+ boolean del = false;
+ boolean defaults = false;
+ boolean ignore = false;
++ boolean loadarg = false;
+
+ myname = basename(*argv);
+
+@@ -2305,7 +2306,9 @@
+ argv += optind;
+ argc -= optind;
+
+- if (!argc && del)
++ if (argc)
++ loadarg = true;
++ else if (del)
+ error("usage: %s [[-r] init_script|init_directory]\n", myname);
+
+ if (*argv) {
+@@ -2490,17 +2493,45 @@
+ /*
+ * Scan now all scripts found in the init.d/ directory
+ */
+- while ((d = readdir(initdir)) != (struct dirent*)0) {
+- const boolean isarg = chkfor(d->d_name, argv, argc);
++ for (;;) {
+ service_t * service = (service_t*)0;
+ char * token;
+ char * begin = (char*)0; /* hold start pointer of strings handled by strsep() */
+ boolean hard = false;
++ boolean isarg = false;
+ uchar lsb = 0;
+ #if defined(DEBUG) && (DEBUG > 0)
+ int nobug = 0;
+ #endif
+
++ if ((d = readdir(initdir)) == (struct dirent*)0) {
++ /*
++ * If first script in argument list was loaded in advance, then
++ * rewind the init.d/ directory stream and attempt to load all
++ * other scripts.
++ */
++ if (loadarg) {
++ loadarg = false;
++ rewinddir(initdir);
++ continue;
++ }
++ break;
++ }
++
++ isarg = chkfor(d->d_name, argv, argc);
++
++ /*
++ * Load first script in argument list before all other scripts. This
++ * avoids problems with loading scripts in underterministic sequence
++ * returned by readdir(3).
++ */
++ if (loadarg && !isarg)
++ continue;
++ if (loadarg && isarg && (curr_argc != 0))
++ continue;
++ if (!loadarg && isarg && (curr_argc == 0))
++ continue;
++
+ if (*d->d_name == '.')
+ continue;
+ errno = 0;
Added: trunk/src/insserv/debian/patches/40_badboy_segfault.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/40_badboy_segfault.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/40_badboy_segfault.patch (added)
+++ trunk/src/insserv/debian/patches/40_badboy_segfault.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,19 @@
+Purpose: Defend against corrupt or invalid scripts living in
+ /etc/rc[S0-6].d/
+Fixes: #493202
+Status: Acked by upstream.
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -1696,6 +1696,11 @@
+ }
+
+ lsb = scan_script_defaults(dfd, d->d_name, override_path, &name, true, ignore);
++ if (!name) {
++ warn("warning: script is corrupt or invalid: %s/%s%s\n", path, rcd, d->d_name);
++ continue;
++ }
++
+ if (!script_inf.provides || script_inf.provides == empty)
+ script_inf.provides = xstrdup(ptr);
+
Added: trunk/src/insserv/debian/patches/50_symlink_in_initddir.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/50_symlink_in_initddir.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/50_symlink_in_initddir.patch (added)
+++ trunk/src/insserv/debian/patches/50_symlink_in_initddir.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,65 @@
+Purpose: Defend against symlinks in init.d/ to other scripts in init.d/
+Fixes: #485045
+Status: Work in progress.
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -2542,11 +2542,12 @@
+ errno = 0;
+
+ /* d_type seems not to work, therefore use (l)stat(2) */
+- if (xstat(dfd, d->d_name, &st_script) < 0) {
++ if (xlstat(dfd, d->d_name, &st_script) < 0) {
+ warn("can not stat(%s)\n", d->d_name);
+ continue;
+ }
+- if (!S_ISREG(st_script.st_mode) || !(S_IXUSR & st_script.st_mode))
++ if ((!S_ISLNK(st_script.st_mode) && !S_ISREG(st_script.st_mode)) ||
++ !(S_IXUSR & st_script.st_mode))
+ {
+ if (S_ISDIR(st_script.st_mode))
+ continue;
+@@ -2555,6 +2556,43 @@
+ continue;
+ }
+
++ /*
++ * Do extra sanity checking of symlinks in init.d/ dir, except if it
++ * is named reboot, as that is a special case on SUSE
++ */
++ if (S_ISLNK(st_script.st_mode) && ((strcmp(d->d_name, "reboot") != 0)))
++ {
++ char * base;
++ char linkbuf[PATH_MAX+1];
++ int linklen;
++
++ linklen = xreadlink(dfd, d->d_name, linkbuf, sizeof(linkbuf)-1);
++ if (linklen < 0)
++ continue;
++ linkbuf[linklen] = '\0';
++
++ /* skip symbolic links to other scripts in this relative path */
++ if (!(base = strrchr(linkbuf, '/'))) {
++ if (isarg)
++ warn("script %s is a symlink to another script, skipped!\n",
++ d->d_name);
++ continue;
++ }
++
++ /* stat the symlink target and make sure it is a valid script */
++ if (xstat(dfd, d->d_name, &st_script) < 0)
++ continue;
++
++ if (!S_ISREG(st_script.st_mode) || !(S_IXUSR & st_script.st_mode)) {
++ if (S_ISDIR(st_script.st_mode))
++ continue;
++ if (isarg)
++ warn("script %s is not an executable regular file, skipped!\n",
++ d->d_name);
++ continue;
++ }
++ }
++
+ if (!strncmp(d->d_name, "README", strlen("README"))) {
+ if (isarg)
+ warn("script name %s is not valid, skipped!\n", d->d_name);
Added: trunk/src/insserv/debian/patches/60_all_keyword_start_only.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/60_all_keyword_start_only.patch?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/60_all_keyword_start_only.patch (added)
+++ trunk/src/insserv/debian/patches/60_all_keyword_start_only.patch Sat Mar 14 15:34:56 2009
@@ -1,0 +1,22 @@
+Purpose: Prevent Required-Stop: $all from modifying start links
+Fixes: #485307
+Status: Work in progress.
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -291,8 +291,13 @@
+ break;
+ case '$':
+ if (strcasecmp(token, "$all") == 0) {
+- serv->attr.flags |= SERV_ALL;
+- break;
++ if (bit & REQ_KILL) {
++ /* $all has no effect on stop sort order */
++ break;
++ } else {
++ serv->attr.flags |= SERV_ALL;
++ break;
++ }
+ }
+ /* Expand the `$' token recursively down */
+ list_for_each(ptr, sysfaci_start) {
Added: trunk/src/insserv/debian/patches/series
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/series?rev=872&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/series (added)
+++ trunk/src/insserv/debian/patches/series Sat Mar 14 15:34:56 2009
@@ -1,0 +1,6 @@
+10_nosuse.patch
+11_debian_conf.patch
+30_deterministic_order.patch
+40_badboy_segfault.patch
+50_symlink_in_initddir.patch
+60_all_keyword_start_only.patch
Modified: trunk/src/insserv/debian/rules
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/rules?rev=872&op=diff
==============================================================================
--- trunk/src/insserv/debian/rules (original)
+++ trunk/src/insserv/debian/rules Sat Mar 14 15:34:56 2009
@@ -21,11 +21,11 @@
pkgdatadir = /usr/share/$(PACKAGE)
sbindir = /usr/sbin
-include /usr/share/dpatch/dpatch.make
+include /usr/share/quilt/quilt.make
build: build-stamp
-build-stamp: patch-stamp
+build-stamp: $(QUILT_STAMPFN)
dh_testdir
# Add here commands to compile the package.
More information about the Initscripts-ng-commits
mailing list