[Initscripts-ng-commits] r787 - in /branches/insserv-1.11.9/debian: ./ patches/

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sat Jul 19 06:37:43 UTC 2008


Author: kelmo-guest
Date: Sat Jul 19 06:37:42 2008
New Revision: 787

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=787
Log:
Merge 64_missing_default_fields_fallback.patch, 81_empty_stop_start_defaults_no_override.patch and 82_improve_runlevel_override_output.patch into a single patch: 81_debian_default_start_stop_warnings.patch

Added:
    branches/insserv-1.11.9/debian/patches/81_debian_default_start_stop_warnings.patch
Removed:
    branches/insserv-1.11.9/debian/patches/64_missing_default_fields_fallback.patch
    branches/insserv-1.11.9/debian/patches/81_empty_stop_start_defaults_no_override.patch
    branches/insserv-1.11.9/debian/patches/82_improve_runlevel_override_output.patch
Modified:
    branches/insserv-1.11.9/debian/changelog
    branches/insserv-1.11.9/debian/patches/series

Modified: branches/insserv-1.11.9/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/changelog?rev=787&op=diff
==============================================================================
--- branches/insserv-1.11.9/debian/changelog (original)
+++ branches/insserv-1.11.9/debian/changelog Sat Jul 19 06:37:42 2008
@@ -17,6 +17,7 @@
     - 51_overwrite_output.dpatch
     - 52_shutdown_links.dpatch
     - 60_disable_cfgfilter_stat.dpatch
+    - 64_missing_default_fields_fallback.dpatch
   * Discard patches not applied in series:
     - 32_debug_option.dpatch
     - 34_debian_fixedscripts.dpatch
@@ -26,7 +27,6 @@
     - 42_loopnochangemsg.dpatch
     - 62_warn_on_missing_required_fields.dpatch
     - 63_warn_on_missing_default_fields.dpatch
-    - 64_missing_default_fields_fallback.dpatch
   * Convert patches to a quilt series, adjust debian/{rules,control}
     accordingly. Build-Depend on quilt.
   * Add 70_test_suite_failed_count.patch to close delta between SUSE and
@@ -34,17 +34,15 @@
   * Add 80_do_not_mangle_argv_pointer.patch to revert optimisation that
     modifies argv pointer and causes chkfor() function to be impotent
     thereafter, completely wrecking the test suite.
-  * Add 81_empty_stop_start_defaults_no_override.patch to avoid treating
-    script with empty Default-{Start,Stop} LSB keywords as non-LSB scripts.
-    Additionally, warn and override when links exist but defaults are empty.
+  * Add 81_debian_default_start_stop_warnings.patch to harden Default-Start
+    and Default-Stop handling for Debian. Improve warnings when defaults are
+    overriden by on disk link due to unhandled change in script LSB header.
+    Don't provide default fallbacks to scripts without LSB header information.
   * Refresh 31_debian_conf.patch.
   * Add an extra call to list_rclinks() in test_newbug_keepoldorder()
     function of run-testsuite, after introducing the bug.
   * Make test_adding_start() and test_adding_stop() run-testsuite
     functions unconditionally fatal on failure.
-  * Add 82_improve_runlevel_override_output.patch to improve output when
-    overriding defaults with existing start|stop runlevel link
-    configuration.
   * Make test_bogus_facility() run-testsuite function non-fatal.
   * Mark tests that are currently failing with a comment in run-
     testsuite.
@@ -53,7 +51,7 @@
     unproperly replaced with empty Default-Start or Default-Stop.
   * Make test_adding_start() case a more realistic example.
 
- -- Kel Modderman <kel at otaku42.de>  Sat, 19 Jul 2008 03:31:13 +1000
+ -- Kel Modderman <kel at otaku42.de>  Sat, 19 Jul 2008 16:36:06 +1000
 
 insserv (1.11.0-9) unstable; urgency=low
 

Added: branches/insserv-1.11.9/debian/patches/81_debian_default_start_stop_warnings.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/patches/81_debian_default_start_stop_warnings.patch?rev=787&op=file
==============================================================================
--- branches/insserv-1.11.9/debian/patches/81_debian_default_start_stop_warnings.patch (added)
+++ branches/insserv-1.11.9/debian/patches/81_debian_default_start_stop_warnings.patch Sat Jul 19 06:37:42 2008
@@ -1,0 +1,120 @@
+Improve warnings when overriding defaults with existing runlevel link scheme.
+
+In Debian, if Default-Start or Default-Stop fields are empty, warn and override
+defaults if runlevel links exist. Do not fallback to defaults when defaults are
+missing (broken LSB info), instead print a warning and create no links at all.
+
+This should not happen, as /usr/sbin/update-rc.d and lintian should be able to
+print enough warnings so that a Debian package maintainer notices the problems
+during his/her package quality control tests.
+---
+--- a/insserv.c
++++ b/insserv.c
+@@ -2779,8 +2779,9 @@
+ 			     */
+ 			    if (!defaults && (deflvls != service->start->lvl)) {
+ 				if (!del && chkfor(d->d_name, argv, argc) && !(argr[curr_argc]))
+-				    warn("Warning, current start runlevel(s) %s of script `%s' overwrites defaults %s.\n",
+-					 lvl2str(service->start->lvl), d->d_name, lvl2str(deflvls));
++				    warn("Warning, current start runlevel(s) (%s) of script `%s' overwrites defaults (%s).\n",
++					 service->start->lvl ? lvl2str(service->start->lvl) : "empty", d->d_name,
++					 lvl2str(deflvls));
+ 			    }
+ 			} else
+ 			    /*
+@@ -2788,7 +2789,7 @@
+ 			     * needed for enabling interactive services at first time.
+ 			     */
+ 			    service->start->lvl = deflvls;
+-
++#ifdef SUSE
+ 		    } else {
+ 			/*
+ 			 * Could be a none LSB script, use info from current link scheme.
+@@ -2798,6 +2799,20 @@
+ 			    script_inf.default_start = lvl2str(service->start->lvl);
+ 			else
+ 			    script_inf.default_start = xstrdup(DEFAULT_START_LVL);
++#else
++		    } else if (script_inf.default_start && script_inf.default_start == empty) {
++			if ((service->attr.flags & SERV_ENABLED) && service->start->lvl) {
++			    /*
++			     * Currently linked into service runlevel scheme,
++			     * but defaults are empty. Override defaults.
++			     */
++			    if (!defaults && !del && chkfor(d->d_name, argv, argc) && !(argr[curr_argc])) {
++				warn("Warning, current start runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n",
++				     lvl2str(service->start->lvl), d->d_name);
++				script_inf.default_start = lvl2str(service->start->lvl);
++			    }
++			}
++#endif
+ 		    }
+ #ifdef SUSE
+ 		    /*
+@@ -2822,8 +2837,9 @@
+ 			     */
+ 			    if (!defaults && (deflvlk != service->stopp->lvl)) {
+ 				if (!del && chkfor(d->d_name, argv, argc) && !(argr[curr_argc]))
+-				    warn("Warning, current stop runlevel(s) %s of script `%s' overwrites defaults %s.\n",
+-					 lvl2str(service->stopp->lvl), d->d_name, lvl2str(deflvlk));
++				    warn("Warning, current stop runlevel(s) (%s) of script `%s' overwrites defaults (%s).\n",
++					 service->stopp->lvl ? lvl2str(service->stopp->lvl) : "empty", d->d_name,
++					 lvl2str(deflvlk));
+ 			    }
+ 			} else
+ 			    /*
+@@ -2831,7 +2847,7 @@
+ 			     * needed for enabling interactive services at first time.
+ 			     */
+ 			    service->stopp->lvl = deflvlk;
+-
++#ifdef SUSE
+ 		    } else {
+ 			/*
+ 			 * Could be a none LSB script, use info from current link scheme.
+@@ -2841,17 +2857,44 @@
+ 			    script_inf.default_stop = lvl2str(service->stopp->lvl);
+ 			else
+ 			    script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
++#else
++		    } else if (script_inf.default_stop && script_inf.default_stop == empty) {
++			if ((service->attr.flags & SERV_ENABLED) && service->stopp->lvl) {
++			    /*
++			     * Currently linked into service runlevel scheme,
++			     * but defaults are empty. Override defaults.
++			     */
++			    if (!defaults && !del && chkfor(d->d_name, argv, argc) && !(argr[curr_argc])) {
++				warn("Warning, current stop runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n",
++				     lvl2str(service->stopp->lvl), d->d_name);
++				script_inf.default_stop = lvl2str(service->stopp->lvl);
++			    }
++			}
++#endif
+ 		    }
+ 		}
+ 	    }
+ 	    free(provides);
+ 	}
+ 
++#ifdef SUSE
+ 	/* Ahh ... set default multiuser with network */
+ 	if (!script_inf.default_start || script_inf.default_start == empty)
+ 	    script_inf.default_start = xstrdup(DEFAULT_START_LVL);
+ 	if (!script_inf.default_stop  || script_inf.default_start == empty)
+ 	    script_inf.default_stop  = xstrdup(DEFAULT_STOP_LVL);
++#else
++	if (!script_inf.default_start) {
++	    warn("Default-Start undefined, assuming empty start runlevel(s) for script `%s'\n",
++		 d->d_name);
++	    script_inf.default_start = empty;
++	}
++	if (!script_inf.default_stop) {
++	    warn("Default-Stop undefined, assuming empty stop runlevel(s) for script `%s'\n",
++		 d->d_name);
++	    script_inf.default_stop = empty;
++	}
++#endif
+ 
+ 	if (chkfor(d->d_name, argv, argc) && !defaults && !del) {
+ 	    if (argr[curr_argc]) {

Modified: branches/insserv-1.11.9/debian/patches/series
URL: http://svn.debian.org/wsvn/initscripts-ng/branches/insserv-1.11.9/debian/patches/series?rev=787&op=diff
==============================================================================
--- branches/insserv-1.11.9/debian/patches/series (original)
+++ branches/insserv-1.11.9/debian/patches/series Sat Jul 19 06:37:42 2008
@@ -4,8 +4,6 @@
 42_loopnochangemsg.patch
 62_warn_on_missing_required_fields.patch
 63_warn_on_missing_default_fields.patch
-64_missing_default_fields_fallback.patch
 70_test_suite_failed_count.patch
 80_do_not_mangle_argv_pointer.patch
-81_empty_stop_start_defaults_no_override.patch
-82_improve_runlevel_override_output.patch
+81_debian_default_start_stop_warnings.patch




More information about the Initscripts-ng-commits mailing list