[Initscripts-ng-commits] r465 - in /trunk/src/insserv/debian: changelog patches/00list patches/10_nosuse.dpatch patches/20_path_at_runtime.dpatch patches/21_overrides.dpatch patches/43_shutdown.dpatch
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Mon Jan 7 17:12:08 UTC 2008
Author: pere
Date: Mon Jan 7 17:12:07 2008
New Revision: 465
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=465
Log:
New upstream version. Adjust patches for version 1.10.
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/patches/00list
trunk/src/insserv/debian/patches/10_nosuse.dpatch
trunk/src/insserv/debian/patches/20_path_at_runtime.dpatch
trunk/src/insserv/debian/patches/21_overrides.dpatch
trunk/src/insserv/debian/patches/43_shutdown.dpatch
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Mon Jan 7 17:12:07 2008
@@ -1,3 +1,12 @@
+insserv (1.10.0-1) UNRELEASED; urgency=low
+
+ * New upstream version
+ - Updated patches 10_nosuse, 20_path_at_runtime, 21_overrides and
+ 43_shutdown to apply on the new version.
+ - Disabled 11_revdepend as it is included upstream.
+
+ -- Petter Reinholdtsen <pere at debian.org> Wed, 21 Nov 2007 17:16:14 +0100
+
insserv (1.09.0-15) unstable; urgency=low
* UNRELEASED
Modified: trunk/src/insserv/debian/patches/00list
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/00list?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/00list (original)
+++ trunk/src/insserv/debian/patches/00list Mon Jan 7 17:12:07 2008
@@ -1,5 +1,4 @@
10_nosuse
-11_revdepend
20_path_at_runtime
21_overrides
31_debian_conf
Modified: trunk/src/insserv/debian/patches/10_nosuse.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/10_nosuse.dpatch?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/10_nosuse.dpatch (original)
+++ trunk/src/insserv/debian/patches/10_nosuse.dpatch Mon Jan 7 17:12:07 2008
@@ -1,13 +1,13 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_overrides.dpatch by Petter Reinholdtsen <pere at hungry.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Implement support for reading LSB init.d header info from override
-## DP: files.
+## 10_nosuse.dpatch by Petter Reinholdtsen
+## Updated for insserv v1.10 by PEtter Reinholdtsen
+
+Disable the SUSE specific parts.
@DPATCH@
---- insserv-1.09.0/Makefile 2007-12-25 13:39:46.000000000 +0100
-+++ insserv-1.09.0/Makefile 2007-12-25 13:39:42.000000000 +0100
+diff -urNad insserv-1.10.0~/Makefile insserv-1.10.0/Makefile
+--- insserv-1.10.0~/Makefile 2008-01-07 17:21:15.000000000 +0100
++++ insserv-1.10.0/Makefile 2008-01-07 17:21:18.000000000 +0100
@@ -11,7 +11,7 @@
#DEBUG = -DDEBUG=1
#LOOPS = -DIGNORE_LOOPS=1
@@ -15,5 +15,5 @@
-ISSUSE = -DSUSE
+#ISSUSE = -DSUSE
DESTDIR =
- VERSION = 1.09.0
+ VERSION = 1.10.0
DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
Modified: trunk/src/insserv/debian/patches/20_path_at_runtime.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/20_path_at_runtime.dpatch?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/20_path_at_runtime.dpatch (original)
+++ trunk/src/insserv/debian/patches/20_path_at_runtime.dpatch Mon Jan 7 17:12:07 2008
@@ -1,13 +1,14 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 44_path_at_runtime.dpatch by Petter Reinholdtsen
+## 20_path_at_runtime.dpatch by Petter Reinholdtsen
+## Updated for insserv v1.10 by PEtter Reinholdtsen
Make it possible to set the path at runtime, to make it easier to
write test suites.
@DPATCH@
-diff -urNad insserv~/insserv.8 insserv/insserv.8
---- insserv~/insserv.8 2008-01-04 11:19:42.000000000 +0100
-+++ insserv/insserv.8 2008-01-04 11:21:56.000000000 +0100
+diff -urNad insserv-1.10.0~/insserv.8 insserv-1.10.0/insserv.8
+--- insserv-1.10.0~/insserv.8 2008-01-07 17:21:15.000000000 +0100
++++ insserv-1.10.0/insserv.8 2008-01-07 17:21:36.000000000 +0100
@@ -15,16 +15,22 @@
.\"
.B insserv
@@ -52,45 +53,46 @@
.BR \-n ,\ \-\-dryrun
Do not update symlinks.
.TP
-diff -urNad insserv~/insserv.c insserv/insserv.c
---- insserv~/insserv.c 2008-01-04 11:21:56.000000000 +0100
-+++ insserv/insserv.c 2008-01-04 11:21:56.000000000 +0100
-@@ -1467,14 +1467,18 @@
+diff -urNad insserv-1.10.0~/insserv.c insserv-1.10.0/insserv.c
+--- insserv-1.10.0~/insserv.c 2008-01-07 17:21:15.000000000 +0100
++++ insserv-1.10.0/insserv.c 2008-01-07 17:24:45.000000000 +0100
+@@ -1582,19 +1582,19 @@
return 1;
}
-static void scan_conf()
+static void scan_conf(const char *file)
{
- struct dirent** namelist = NULL;
-- const char dir[] = INSCONF ".d";
-+ char *dir;
- char buf[PATH_MAX];
+ struct dirent** namelist = (struct dirent**)0;
+ char path[PATH_MAX+1];
int n;
-- scan_conf_file(INSCONF);
-+ scan_conf_file(file);
-+
-+ dir = malloc(strlen(file) + 3);
-+ strcpy(dir, file);
-+ strcat(dir, ".d");
+- n = snprintf(&path[0], sizeof(path), "%s%s", root ? root : "", INSCONF);
++ n = snprintf(&path[0], sizeof(path), "%s%s", root ? root : "", file);
+ if (n >= sizeof(path) || n < 0)
+ error("snprintf(): %s\n", strerror(errno));
- n = scandir(dir, &namelist, cfgfile_filter, alphasort);
- if(n > 0)
-@@ -1551,10 +1555,12 @@
+ scan_conf_file(path);
+
+- n = snprintf(&path[0], sizeof(path), "%s%s.d", root ? root : "", INSCONF);
++ n = snprintf(&path[0], sizeof(path), "%s%s.d", root ? root : "", file);
+ if (n >= sizeof(path) || n < 0)
+ error("snprintf(): %s\n", strerror(errno));
+
+@@ -1666,10 +1666,12 @@
static struct option long_options[] =
{
- {"verbose", 0, NULL, 'v'},
-+ {"config", 1, NULL, 'c'},
- {"dryrun", 0, NULL, 'n'},
- {"default", 0, NULL, 'd'},
- {"remove", 0, NULL, 'r'},
- {"force", 0, NULL, 'f'},
-+ {"path", 1, NULL, 'p'},
- {"help", 0, NULL, 'h'},
- { 0, 0, NULL, 0 },
+ {"verbose", 0, (int*)0, 'v'},
++ {"config", 1, (int*)0, 'c'},
+ {"dryrun", 0, (int*)0, 'n'},
+ {"default", 0, (int*)0, 'd'},
+ {"remove", 0, (int*)0, 'r'},
+ {"force", 0, (int*)0, 'f'},
++ {"path", 1, (int*)0, 'p'},
+ {"help", 0, (int*)0, 'h'},
+ { 0, 0, (int*)0, 0 },
};
-@@ -1567,6 +1573,8 @@
+@@ -1682,6 +1684,8 @@
printf(" -r, --remove Remove the listed scripts from all runlevels.\n");
printf(" -f, --force Ignore if a required service is missed.\n");
printf(" -v, --verbose Provide information on what is being done.\n");
@@ -99,7 +101,7 @@
printf(" -n, --dryrun Do not change the system, only talk about it.\n");
printf(" -d, --default Use default runlevels a defined in the scripts\n");
}
-@@ -1582,6 +1590,7 @@
+@@ -1697,6 +1701,7 @@
struct stat st_script;
char * argr[argc];
char * path = INITDIR;
@@ -107,12 +109,12 @@
int runlevel, c;
boolean del = false;
boolean defaults = false;
-@@ -1592,8 +1601,11 @@
+@@ -1707,8 +1712,11 @@
for (c = 0; c < argc; c++)
- argr[c] = NULL;
+ argr[c] = (char*)0;
-- while ((c = getopt_long(argc, argv, "dfrhvn", long_options, NULL)) != -1) {
-+ while ((c = getopt_long(argc, argv, "c:dfrhvnp:", long_options, NULL)) != -1) {
+- while ((c = getopt_long(argc, argv, "dfrhvn", long_options, (int *)0)) != -1) {
++ while ((c = getopt_long(argc, argv, "c:dfrhvnp:", long_options, (int *)0)) != -1) {
switch (c) {
+ case 'c':
+ insconf = optarg;
@@ -120,7 +122,7 @@
case 'd':
defaults = true;
break;
-@@ -1610,6 +1622,9 @@
+@@ -1725,6 +1733,9 @@
verbose = true;
dryrun = true;
break;
@@ -130,7 +132,7 @@
case '?':
error("For help use: %s -h\n", myname);
case 'h':
-@@ -1707,7 +1722,7 @@
+@@ -1833,7 +1844,7 @@
/*
* Scan and set our configuration for virtual services.
*/
Modified: trunk/src/insserv/debian/patches/21_overrides.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/21_overrides.dpatch?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/21_overrides.dpatch (original)
+++ trunk/src/insserv/debian/patches/21_overrides.dpatch Mon Jan 7 17:12:07 2008
@@ -1,15 +1,16 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_overrides.dpatch by Petter Reinholdtsen <pere at hungry.com>
+## 21_overrides.dpatch by Petter Reinholdtsen <pere at hungry.com>
+## Updated for insserv v1.10 by PEtter Reinholdtsen
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Implement support for reading LSB init.d header info from override
## DP: files.
@DPATCH@
-diff -urNad insserv~/insserv.c insserv/insserv.c
---- insserv~/insserv.c 2008-01-05 00:29:39.000000000 +0100
-+++ insserv/insserv.c 2008-01-05 00:30:56.000000000 +0100
-@@ -23,6 +23,7 @@
+diff -urNad insserv-1.10.0~/insserv.c insserv-1.10.0/insserv.c
+--- insserv-1.10.0~/insserv.c 2008-01-07 17:37:09.000000000 +0100
++++ insserv-1.10.0/insserv.c 2008-01-07 17:40:25.000000000 +0100
+@@ -25,6 +25,7 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -17,7 +18,7 @@
#include <dirent.h>
#include <regex.h>
#include <errno.h>
-@@ -39,6 +40,9 @@
+@@ -41,6 +42,9 @@
#ifndef INITDIR
# define INITDIR "/etc/init.d"
#endif
@@ -27,7 +28,7 @@
#ifndef INSCONF
# define INSCONF "/etc/insserv.conf"
#endif
-@@ -998,7 +1004,21 @@
+@@ -1047,7 +1051,21 @@
regcompiler(®.desc, DESCRIPTION, REG_EXTENDED|REG_ICASE|REG_NEWLINE);
}
@@ -50,7 +51,7 @@
{
regmatch_t subloc[SUBNUM_SHD+1], *val = &subloc[SUBNUM-1], *shl = &subloc[SUBNUM_SHD-1];
FILE *script;
-@@ -1022,25 +1042,18 @@
+@@ -1071,25 +1089,18 @@
if (!script)
error("fopen(%s): %s\n", path, strerror(errno));
@@ -82,7 +83,7 @@
if (!provides && regexecutor(®.prov, COMMON_ARGS) == true) {
if (val->rm_so < val->rm_eo) {
-@@ -1169,7 +1180,96 @@
+@@ -1218,7 +1229,96 @@
#undef default_start
#undef default_stop
#undef description
@@ -179,16 +180,16 @@
return ret;
}
-@@ -1237,7 +1337,7 @@
+@@ -1286,7 +1386,7 @@
/*
* Scan current service structure
*/
--static void scan_script_locations(const char *const path)
-+static void scan_script_locations(const char *const path, const char *const override_path)
+-static void scan_script_locations(const char *const path, char ** const iargv, const int icnt)
++static void scan_script_locations(const char *const path, const char *const override_path, char ** const iargv, const int icnt)
{
int runlevel;
-@@ -1274,10 +1374,12 @@
+@@ -1330,10 +1430,12 @@
continue;
}
@@ -200,13 +201,12 @@
+
begin = script_inf.provides;
- while ((token = strsep(&script_inf.provides, delimeter)) && *token) {
- serv_t * service = NULL;
-@@ -1293,6 +1401,15 @@
-
+ while ((token = strsep(&begin, delimeter)) && *token) {
+ serv_t * service = (serv_t*)0;
+@@ -1349,6 +1451,15 @@
if (!lsb)
service->opts |= SERV_NOTLSB;
-+
+
+ if (! (lsb & FOUND_LSB_HEADER) ) {
+ if (! (lsb & (FOUND_LSB_DEFAULT | FOUND_LSB_OVERRIDE) ))
+ warn("warning: script '%s' missing LSB tags and overrides\n",
@@ -215,12 +215,13 @@
+ warn("warning: script '%s' missing LSB tags\n",
+ d->d_name);
+ }
++
if (script_inf.required_start && script_inf.required_start != empty) {
rememberreq(service, REQ_MUST, script_inf.required_start);
requiresv(token, script_inf.required_start);
-@@ -1325,16 +1442,7 @@
+@@ -1433,16 +1544,7 @@
}
- script_inf.provides = begin;
+ #endif /* not SUSE */
- xreset(script_inf.provides);
- xreset(script_inf.required_start);
@@ -236,15 +237,15 @@
}
popd();
closedir(rcdir);
-@@ -1561,6 +1669,7 @@
- {"remove", 0, NULL, 'r'},
- {"force", 0, NULL, 'f'},
- {"path", 1, NULL, 'p'},
-+ {"override",1, NULL, 'o'},
- {"help", 0, NULL, 'h'},
- { 0, 0, NULL, 0 },
+@@ -1672,6 +1774,7 @@
+ {"remove", 0, (int*)0, 'r'},
+ {"force", 0, (int*)0, 'f'},
+ {"path", 1, (int*)0, 'p'},
++ {"override",1, (int*)0, 'o'},
+ {"help", 0, (int*)0, 'h'},
+ { 0, 0, (int*)0, 0 },
};
-@@ -1574,6 +1683,7 @@
+@@ -1685,6 +1788,7 @@
printf(" -f, --force Ignore if a required service is missed.\n");
printf(" -v, --verbose Provide information on what is being done.\n");
printf(" -p <path>, --path <path> Path to replace " INITDIR ".\n");
@@ -252,7 +253,7 @@
printf(" -c <config>, --config <config> Path to config file.\n");
printf(" -n, --dryrun Do not change the system, only talk about it.\n");
printf(" -d, --default Use default runlevels a defined in the scripts\n");
-@@ -1590,6 +1700,7 @@
+@@ -1701,6 +1805,7 @@
struct stat st_script;
char * argr[argc];
char * path = INITDIR;
@@ -260,16 +261,16 @@
char * insconf = INSCONF;
int runlevel, c;
boolean del = false;
-@@ -1601,7 +1712,7 @@
+@@ -1712,7 +1817,7 @@
for (c = 0; c < argc; c++)
- argr[c] = NULL;
-
-- while ((c = getopt_long(argc, argv, "c:dfrhvnp:", long_options, NULL)) != -1) {
-+ while ((c = getopt_long(argc, argv, "c:dfrhvnp:o:", long_options, NULL)) != -1) {
+ argr[c] = (char*)0;
+
+- while ((c = getopt_long(argc, argv, "c:dfrhvnp:", long_options, (int *)0)) != -1) {
++ while ((c = getopt_long(argc, argv, "c:dfrhvno:p:", long_options, (int *)0)) != -1) {
switch (c) {
case 'c':
insconf = optarg;
-@@ -1625,6 +1736,9 @@
+@@ -1736,6 +1841,9 @@
case 'p':
path = optarg;
break;
@@ -279,16 +280,16 @@
case '?':
error("For help use: %s -h\n", myname);
case 'h':
-@@ -1736,7 +1850,7 @@
+@@ -1858,7 +1966,7 @@
#if 0
if (!defaults)
#endif
-- scan_script_locations(path);
-+ scan_script_locations(path, override_path);
-
- if ((initdir = opendir(path)) == NULL)
+- scan_script_locations(path, (del ? argv : (char**)0), argc);
++ scan_script_locations(path, override_path, (del ? argv : (char**)0), argc);
+
+ if ((initdir = opendir(path)) == (DIR*)0)
error("can not opendir(%s): %s\n", path, strerror(errno));
-@@ -1823,7 +1937,16 @@
+@@ -1945,7 +2053,16 @@
}
/* main scanner for LSB comment in current script */
@@ -306,7 +307,7 @@
/* Common script ... */
if (!strcmp(d->d_name, "halt")) {
-@@ -2175,16 +2305,7 @@
+@@ -2297,16 +2414,7 @@
service->opts |= SERV_NOTLSB;
}
/* Reset remaining pointers */
Modified: trunk/src/insserv/debian/patches/43_shutdown.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/43_shutdown.dpatch?rev=465&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/43_shutdown.dpatch (original)
+++ trunk/src/insserv/debian/patches/43_shutdown.dpatch Mon Jan 7 17:12:07 2008
@@ -1,13 +1,14 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 43_shutdown.dpatch by Otavio Salvador and Petter Reinholdtsen
+## Updated for insserv v1.10 by PEtter Reinholdtsen
Fix the handling of stop scripts and the shutdown sequence.
@DPATCH@
-diff -urNad insserv~/insserv.c insserv/insserv.c
---- insserv~/insserv.c 2008-01-04 11:22:10.000000000 +0100
-+++ insserv/insserv.c 2008-01-04 11:22:11.000000000 +0100
-@@ -464,14 +464,19 @@
+diff -urNad insserv-1.10.0~/insserv.c insserv-1.10.0/insserv.c
+--- insserv-1.10.0~/insserv.c 2008-01-07 17:51:13.000000000 +0100
++++ insserv-1.10.0/insserv.c 2008-01-07 17:55:55.000000000 +0100
+@@ -468,14 +468,19 @@
/*
* This helps us to work out the current symbolic link structure
*/
@@ -29,26 +30,29 @@
return serv;
}
-@@ -1392,11 +1397,17 @@
- while ((d = readdir(rcdir)) != NULL) {
+@@ -1437,15 +1442,17 @@
+ while ((d = readdir(rcdir)) != (struct dirent*)0) {
char * ptr = d->d_name;
char order = 0;
-+ char type;
- char* begin = (char*)NULL; /* Remember address of ptr handled by strsep() */
++ char type;
+ char* begin = (char*)0; /* Remember address of ptr handled by strsep() */
boolean lsb;
+-#ifdef SUSE
- if (*ptr != 'S')
+-#else
+- if (*ptr != 'S' && *ptr != 'K')
+ if (*ptr != 'S'
+#ifndef SUSE
-+ && *ptr != 'K'
-+#endif /* SUSE */
-+ )
++ && *ptr != 'K'
+ #endif
++ )
continue;
-+ type = *ptr;
++ type = *ptr;
ptr++;
if (strspn(ptr, "0123456789") < 2)
-@@ -1420,7 +1431,7 @@
+@@ -1480,7 +1487,7 @@
warn("script %s provides system facility %s, skipped!\n", d->d_name, token);
continue;
}
@@ -57,7 +61,34 @@
if (service->opts & SERV_KNOWN)
continue;
-@@ -2294,7 +2305,10 @@
+@@ -1522,7 +1529,7 @@
+ warn("script %s provides system facility %s, skipped!\n", d->d_name, token);
+ continue;
+ }
+- service = current_structure(token, order, runlevel);
++ service = current_structure(token, order, runlevel, type);
+
+ if (service->opts & SERV_KNOWN)
+ continue;
+@@ -1544,7 +1551,7 @@
+ warn("script %s provides system facility %s, skipped!\n", d->d_name, token);
+ continue;
+ }
+- service = current_structure(token, order, runlevel);
++ service = current_structure(token, order, runlevel, type);
+
+ if (service->opts & SERV_KNOWN)
+ continue;
+@@ -1566,7 +1573,7 @@
+ warn("script %s provides system facility %s, skipped!\n", d->d_name, token);
+ continue;
+ }
+- service = current_structure(token, order, runlevel);
++ service = current_structure(token, order, runlevel, type);
+
+ if (service->opts & SERV_KNOWN)
+ continue;
+@@ -2445,7 +2452,10 @@
*/
if (script_inf.default_stop && script_inf.default_stop != empty) {
if (service && !del)
@@ -68,22 +99,24 @@
}
#endif /* not SUSE */
}
-@@ -2571,9 +2585,13 @@
+@@ -2726,10 +2736,14 @@
}
while (listscripts(&script, seek)) {
- const boolean stop = notincluded(script, runlevel);
const boolean this = chkfor(script, argv, argc);
- const serv_t *serv = findserv(getprovides(script));
+- const char mode = (stop ? 'K' : 'S');
+ serv_t *serv = findserv(getprovides(script));
+ const boolean stop = (notincluded(script, runlevel)
+#ifndef SUSE
+ || (serv->lvlk & lvl))
+#endif /* not SUSE */
+ ;
- const char mode = (stop ? 'K' : 'S');
++ const char mode = (stop ? 'K' : 'S');
int order = getorder(script);
boolean found;
-@@ -2597,6 +2615,10 @@
+ char * clink;
+@@ -2752,6 +2766,10 @@
order = (maxorder + 1) - order;
}
@@ -94,9 +127,9 @@
sprintf(olink, "../init.d/%s", script);
sprintf(nlink, "%c%.2d%s", mode, order, script);
-diff -urNad insserv~/listing.c insserv/listing.c
---- insserv~/listing.c 2008-01-04 11:22:10.000000000 +0100
-+++ insserv/listing.c 2008-01-04 11:22:11.000000000 +0100
+diff -urNad insserv-1.10.0~/listing.c insserv-1.10.0/listing.c
+--- insserv-1.10.0~/listing.c 2008-01-07 17:51:13.000000000 +0100
++++ insserv-1.10.0/listing.c 2008-01-07 17:51:21.000000000 +0100
@@ -536,7 +536,7 @@
{
dir_t * dir = providedir(this);
More information about the Initscripts-ng-commits
mailing list