Hello community, here is the log from the commit of package insserv checked in at Fri Aug 31 16:51:09 CEST 2007. -------- --- insserv/insserv.changes 2007-07-13 17:22:23.000000000 +0200 +++ /mounts/work_src_done/STABLE/insserv/insserv.changes 2007-08-31 16:23:20.157401000 +0200 @@ -1,0 +2,6 @@ +Fri Aug 31 16:08:47 CEST 2007 - werner@suse.de + +- Scan all scripts for Start-Before even if already known (#297214) +- Do not add disabled scripts to the depend files + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ insserv.spec ++++++ --- /var/tmp/diff_new_pack.fb3413/_old 2007-08-31 16:50:38.000000000 +0200 +++ /var/tmp/diff_new_pack.fb3413/_new 2007-08-31 16:50:38.000000000 +0200 @@ -16,7 +16,7 @@ Provides: aaa_base:/sbin/insserv Autoreqprov: on Version: 1.09.0 -Release: 31 +Release: 42 Summary: A Program to Arrange Initialization Scripts Source0: insserv-%{version}.tar.bz2 Source1: insserv.conf @@ -54,6 +54,9 @@ %{_mandir}/man8/insserv.8.gz %changelog +* Fri Aug 31 2007 - werner@suse.de +- Scan all scripts for Start-Before even if already known (#297214) +- Do not add disabled scripts to the depend files * Fri Jul 13 2007 - werner@suse.de - Remove hotplug and pcmcia from insserv.conf because they are dropped (bug #291417) ++++++ insserv-1.09.0.dif ++++++ --- /var/tmp/diff_new_pack.fb3413/_old 2007-08-31 16:50:38.000000000 +0200 +++ /var/tmp/diff_new_pack.fb3413/_new 2007-08-31 16:50:39.000000000 +0200 @@ -1,6 +1,15 @@ --- insserv.c -+++ insserv.c 2007-06-19 19:04:29.486363129 +0200 -@@ -57,12 +57,16 @@ static const int map_runlevel_to_seek(co ++++ insserv.c 2007-08-31 16:21:55.212290749 +0200 +@@ -13,6 +13,8 @@ + * (at your option) any later version. + */ + ++#define MINIMAL_MAKE 1 /* Remove disabled scripts from .depend.boot, ++ * .depend.start and .depend.stop */ + #include <pwd.h> + #include <string.h> + #include <unistd.h> +@@ -57,12 +59,16 @@ static const int map_runlevel_to_seek(co /* The main regular search expressions */ #define PROVIDES COMM "provides" VALUE #define REQUIRED COMM "required" @@ -18,7 +27,7 @@ #define DEFAULT_START DEFAULT START VALUE #define DEFAULT_STOP DEFAULT STOP VALUE #define DESCRIPTION COMM "description" VALUE -@@ -74,6 +78,9 @@ static const int map_runlevel_to_seek(co +@@ -74,6 +80,9 @@ static const int map_runlevel_to_seek(co #define SUBCONF 2 #define SUBCONFNUM 4 @@ -28,7 +37,7 @@ /* The main line buffer if unique */ static char buf[LINE_MAX]; -@@ -90,6 +97,8 @@ typedef struct lsb_struct { +@@ -90,6 +99,8 @@ typedef struct lsb_struct { char *required_stop; char *should_start; char *should_stop; @@ -37,7 +46,7 @@ char *default_start; char *default_stop; char *description; -@@ -102,6 +111,8 @@ typedef struct reg_struct { +@@ -102,6 +113,8 @@ typedef struct reg_struct { regex_t req_stop; regex_t shl_start; regex_t shl_stop; @@ -46,7 +55,7 @@ regex_t def_start; regex_t def_stop; regex_t desc; -@@ -283,7 +294,7 @@ out: +@@ -283,7 +296,7 @@ out: /* * Remember requests for required or should services and expand `$' token */ @@ -55,7 +64,7 @@ { char * token, * tmp = strdupa(required); list_t * ptr; -@@ -297,8 +308,12 @@ static void rememberreq(serv_t *serv, un +@@ -297,8 +310,12 @@ static void rememberreq(serv_t *serv, un continue; bit = old; @@ -69,7 +78,7 @@ default: list_for_each(ptr, &(serv->sort.req)) { if (!strcmp(getreq(ptr)->serv, token)) { -@@ -332,12 +347,6 @@ again: +@@ -332,12 +349,6 @@ again: } } break; @@ -82,7 +91,7 @@ } } -@@ -349,6 +358,39 @@ again: +@@ -349,6 +360,39 @@ again: } } @@ -122,7 +131,53 @@ /* * Check required services for name */ -@@ -675,7 +717,7 @@ static inline void makedep(void) +@@ -652,14 +696,26 @@ static inline void makedep(void) + + name = NULL; + fprintf(boot, "TARGETS ="); +- while (listscripts(&name, LVL_BOOT)) ++ while (listscripts(&name, LVL_BOOT)) { ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ const serv_t *serv = findserv(getprovides(name)); ++ if (!serv || !(serv->opts & SERV_ENABLED)) ++ continue; ++#endif + fprintf(boot, " %s", name); ++ } + putc('\n', boot); + + name = NULL; + fprintf(start, "TARGETS ="); +- while (listscripts(&name, LVL_ALL)) /* LVL_ALL: nearly all but not BOOT */ ++ while (listscripts(&name, LVL_ALL)) { /* LVL_ALL: nearly all but not BOOT */ ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ const serv_t *serv = findserv(getprovides(name)); ++ if (!serv || !(serv->opts & SERV_ENABLED)) ++ continue; ++#endif + fprintf(start, " %s", name); ++ } + putc('\n', start); + + fprintf(boot, "INTERACTIVE ="); +@@ -667,7 +723,15 @@ static inline void makedep(void) + list_for_each(srv, serv_start) { + serv_t * cur = getserv(srv); + +- if (!cur || list_empty(&(cur->sort.req))) ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ if (!cur || !(cur->opts & SERV_ENABLED)) ++ continue; ++#else ++ if (!cur) ++ continue; ++#endif ++ ++ if (list_empty(&(cur->sort.req))) + continue; + + if (cur->lvls & LVL_BOOT) +@@ -675,7 +739,7 @@ static inline void makedep(void) else out = start; @@ -131,7 +186,24 @@ name = cur->name; if (cur->opts & SERV_DUPLET) -@@ -699,7 +741,7 @@ static inline void makedep(void) +@@ -691,7 +755,15 @@ static inline void makedep(void) + serv_t * cur = getserv(srv); + list_t * pos; + +- if (!cur || list_empty(&(cur->sort.req))) ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ if (!cur || !(cur->opts & SERV_ENABLED)) ++ continue; ++#else ++ if (!cur) ++ continue; ++#endif ++ ++ if (list_empty(&(cur->sort.req))) + continue; + + if (cur->lvls & LVL_BOOT) +@@ -699,7 +771,7 @@ static inline void makedep(void) else out = start; @@ -140,7 +212,53 @@ name = cur->name; if (cur->opts & SERV_DUPLET) -@@ -950,6 +992,8 @@ static inline void scan_script_regalloc( +@@ -721,7 +793,13 @@ static inline void makedep(void) + * Skip not existing services even if they are used + * otherwise the make call will skip all dependencies + */ +- if (!dep) continue; ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ if (!dep || !(dep->opts & SERV_ENABLED)) ++ continue; ++#else ++ if (!dep) ++ continue; ++#endif + + if ((dep->opts & SERV_DUPLET) && dep->main) + dep = dep->main; /* Duplet */ +@@ -749,7 +827,13 @@ static inline void makedep(void) + * Skip not existing services even if they are used + * otherwise the make call will skip all dependencies + */ +- if (!dep) continue; ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ if (!dep || !(dep->opts & SERV_ENABLED)) ++ continue; ++#else ++ if (!dep) ++ continue; ++#endif + + if ((dep->opts & SERV_DUPLET) && dep->main) + dep = dep->main; /* Duplet */ +@@ -775,8 +859,14 @@ static inline void makedep(void) + + name = NULL; + fprintf(stop, "TARGETS ="); +- while (listscripts(&name, LVL_NORM)) /* LVL_NORM: nearly all but not BOOT and not SINGLE */ ++ while (listscripts(&name, LVL_NORM)) { /* LVL_NORM: nearly all but not BOOT and not SINGLE */ ++#if defined(MINIMAL_MAKE) && (MINIMAL_MAKE != 0) ++ const serv_t *serv = findserv(getprovides(name)); ++ if (!serv || !(serv->opts & SERV_ENABLED)) ++ continue; ++#endif + fprintf(stop, " %s", name); ++ } + putc('\n', stop); + + list_for_each(srv, serv_start) { +@@ -950,6 +1040,8 @@ static inline void scan_script_regalloc( regcompiler(®.req_stop, REQUIRED_STOP, REG_EXTENDED|REG_ICASE|REG_NEWLINE); regcompiler(®.shl_start, SHOULD_START, REG_EXTENDED|REG_ICASE|REG_NEWLINE); regcompiler(®.shl_stop, SHOULD_STOP, REG_EXTENDED|REG_ICASE|REG_NEWLINE); @@ -149,7 +267,7 @@ regcompiler(®.def_start, DEFAULT_START, REG_EXTENDED|REG_ICASE|REG_NEWLINE); regcompiler(®.def_stop, DEFAULT_STOP, REG_EXTENDED|REG_ICASE|REG_NEWLINE); regcompiler(®.desc, DESCRIPTION, REG_EXTENDED|REG_ICASE|REG_NEWLINE); -@@ -968,6 +1012,8 @@ static boolean scan_script_defaults(cons +@@ -968,6 +1060,8 @@ static boolean scan_script_defaults(cons #define required_stop script_inf.required_stop #define should_start script_inf.should_start #define should_stop script_inf.should_stop @@ -158,7 +276,7 @@ #define default_start script_inf.default_start #define default_stop script_inf.default_stop #define description script_inf.description -@@ -983,6 +1029,8 @@ static boolean scan_script_defaults(cons +@@ -983,6 +1077,8 @@ static boolean scan_script_defaults(cons xreset(required_stop); xreset(should_start); xreset(should_stop); @@ -167,7 +285,7 @@ xreset(default_start); xreset(default_stop); xreset(description); -@@ -1034,6 +1082,22 @@ static boolean scan_script_defaults(cons +@@ -1034,6 +1130,22 @@ static boolean scan_script_defaults(cons should_stop = empty; } #endif /* not SUSE */ @@ -190,7 +308,7 @@ if (!default_start && regexecutor(®.def_start, COMMON_ARGS) == true) { if (val->rm_so < val->rm_eo) { *(pbuf+val->rm_eo) = '\0'; -@@ -1101,6 +1165,8 @@ static boolean scan_script_defaults(cons +@@ -1101,6 +1213,8 @@ static boolean scan_script_defaults(cons #undef required_stop #undef should_start #undef should_stop @@ -199,7 +317,7 @@ #undef default_start #undef default_stop #undef description -@@ -1115,6 +1181,8 @@ static inline void scan_script_regfree() +@@ -1115,6 +1229,8 @@ static inline void scan_script_regfree() regfree(®.req_stop); regfree(®.shl_start); regfree(®.shl_stop); @@ -208,7 +326,7 @@ regfree(®.def_start); regfree(®.def_stop); regfree(®.desc); -@@ -1234,6 +1302,9 @@ static void scan_script_locations(const +@@ -1234,6 +1350,9 @@ static void scan_script_locations(const rememberreq(service, REQ_SHLD, script_inf.should_start); requiresv(token, script_inf.should_start); } @@ -218,7 +336,7 @@ #ifndef SUSE /* * required_stop and should_stop arn't used in SuSE Linux. -@@ -1248,6 +1319,9 @@ static void scan_script_locations(const +@@ -1248,6 +1367,9 @@ static void scan_script_locations(const rememberreq(service, REQ_SHLD, script_inf.should_stop); requiresv(token, script_inf.should_stop); } @@ -228,7 +346,7 @@ #endif /* not SUSE */ } script_inf.provides = begin; -@@ -1257,6 +1331,8 @@ static void scan_script_locations(const +@@ -1257,6 +1379,8 @@ static void scan_script_locations(const xreset(script_inf.required_stop); xreset(script_inf.should_start); xreset(script_inf.should_stop); @@ -237,7 +355,7 @@ xreset(script_inf.default_start); xreset(script_inf.default_stop); xreset(script_inf.description); -@@ -1389,29 +1465,56 @@ static int cfgfile_filter(const struct d +@@ -1389,29 +1513,56 @@ static int cfgfile_filter(const struct d return 0; } } @@ -263,10 +381,10 @@ + n = snprintf(&path[0], sizeof(path), "%s%s", root ? root : "", INSCONF); + if (n >= sizeof(path) || n < 0) + error("snprintf(): %s\n", strerror(errno)); ++ ++ scan_conf_file(path); - n = scandir(dir, &namelist, cfgfile_filter, alphasort); -+ scan_conf_file(path); -+ + n = snprintf(&path[0], sizeof(path), "%s%s.d", root ? root : "", INSCONF); + if (n >= sizeof(path) || n < 0) + error("snprintf(): %s\n", strerror(errno)); @@ -301,7 +419,7 @@ } /* -@@ -1596,6 +1699,17 @@ int main (int argc, char *argv[]) +@@ -1596,6 +1747,17 @@ int main (int argc, char *argv[]) } } @@ -319,27 +437,22 @@ c = argc; while (c--) { char * base; -@@ -1897,6 +2011,9 @@ int main (int argc, char *argv[]) - rememberreq(service, REQ_SHLD, script_inf.should_start); - requiresv(token, script_inf.should_start); +@@ -1913,6 +2075,14 @@ int main (int argc, char *argv[]) } -+ if (script_inf.start_before && script_inf.start_before != empty) { -+ reversereq(service, token, script_inf.start_before); -+ } - #ifndef SUSE - /* - * required_stop and should_stop arn't used in SuSE Linux. -@@ -1911,6 +2028,9 @@ int main (int argc, char *argv[]) - rememberreq(service, REQ_SHLD, script_inf.should_stop); - requiresv(token, script_inf.should_stop); - } -+ if (script_inf.stop_after && script_inf.stop_after != empty) { -+ reversereq(service, token, script_inf.stop_after); -+ } #endif /* not SUSE */ } ++ if (script_inf.start_before && script_inf.start_before != empty) { ++ reversereq(service, token, script_inf.start_before); ++ } ++#ifndef SUSE ++ if (script_inf.stop_after && script_inf.stop_after != empty) { ++ reversereq(service, token, script_inf.stop_after); ++ } ++#endif /* not SUSE */ /* -@@ -2082,6 +2202,8 @@ int main (int argc, char *argv[]) + * Use information from symbolic link structure to + * check if all services are around for this script. +@@ -2082,6 +2252,8 @@ int main (int argc, char *argv[]) xreset(script_inf.required_stop); xreset(script_inf.should_start); xreset(script_inf.should_stop); @@ -348,3 +461,61 @@ xreset(script_inf.default_start); xreset(script_inf.default_stop); xreset(script_inf.description); +@@ -2202,6 +2374,7 @@ int main (int argc, char *argv[]) + + while (foreach(&script, &order, runlevel)) { + const boolean this = chkfor(script, argv, argc); ++ serv_t *serv = findserv(getprovides(script)); + boolean found, slink; + char * clink; + +@@ -2222,8 +2395,10 @@ int main (int argc, char *argv[]) + if (this && !del) + xsymlink(olink, nlink); /* Restore, with correct order */ + } else { +- if (del && this) ++ if (del && this) { + xremove(clink); /* Found it, remove link */ ++ if (serv) serv->opts &= ~SERV_ENABLED; ++ } + } + } + +@@ -2234,6 +2409,7 @@ int main (int argc, char *argv[]) + */ + if (!del && !found) { + xsymlink(olink, nlink); ++ if (serv) serv->opts |= SERV_ENABLED; + found = true; + } + } +@@ -2350,8 +2526,8 @@ int main (int argc, char *argv[]) + 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)); + int order = getorder(script); + boolean found; + char * clink; +@@ -2388,8 +2564,10 @@ int main (int argc, char *argv[]) + if (this && !del) + xsymlink(olink, nlink); /* Restore, with correct order */ + } else { +- if (del && this) ++ if (del && this) { + xremove(clink); /* Found it, remove link */ ++ if (serv) serv->opts &= ~SERV_ENABLED; ++ } + } + } + +@@ -2400,6 +2578,7 @@ int main (int argc, char *argv[]) + */ + if (!del && !found) { + xsymlink(olink, nlink); ++ if (serv) serv->opts |= SERV_ENABLED; + found = true; + } + } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org