[Initscripts-ng-commits] r799 - in /trunk/src/insserv/debian: ./ patches/

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Wed Jul 23 12:01:11 UTC 2008


Author: kelmo-guest
Date: Wed Jul 23 12:01:10 2008
New Revision: 799

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=799
Log:
* Discard patches applied to or no longer relevant to new upstream:
  - 11_more_warnings.dpatch
  - 32_debug_option.dpatch
  - 33_nosuse_scripts.dpatch
  - 40_segfault_virtprov.dpatch
  - 41_cleansystem.dpatch
  - 42_loopnochangemsg.dpatch
  - 50_sign_warning.dpatch
  - 51_overwrite_output.dpatch
  - 52_shutdown_links.dpatch
  - 60_disable_cfgfilter_stat.dpatch
  - 62_warn_on_missing_required_fields.dpatch
  - 63_warn_on_missing_default_fields.dpatch
  - 64_missing_default_fields_fallback.dpatch
* Discard patches not applied in series:
  - 32_debug_option.dpatch
  - 34_debian_fixedscripts.dpatch
* Refresh patches that still apply to new upstream:
  - 10_nosuse.dpatch
  - 31_debian_conf.dpatch
* Add 81_debian_default_start_stop_warnings.dpatch to generate warnings when
  empty start|stop runlevel configuration is attempted to be changed.
  Preserve the empty runlevl configuration. (Closes: #477415)
* Make test_adding_start() and test_adding_stop() run-testsuite
  functions unconditionally fatal on failure.
* Mark tests that are currently failing with a comment in run-testsuite.
* Add test_removing_start() and test_removing_stop() to run-testsuite,
  showing that insserv will preserve existing links when script header is
  unproperly replaced with empty Default-Start or Default-Stop.
* Make test_adding_start() case a more realistic example.
* Make test_incorrect_stopscripts() a fatal test, insserv should not
  add shutdown links when none are present.
* Make test_newbug_keepoldorder() test case non-fatal, the fact that it
  passed before was not by design but by luck, as per upstream analysis
  which is included with test code.
* Add 90_fix_bashism_in_makefile.dpatch to correct bashism used (echo -e)

Added:
    trunk/src/insserv/debian/patches/81_debian_default_start_stop_warnings.dpatch
    trunk/src/insserv/debian/patches/90_fix_bashism_in_makefile.dpatch
Removed:
    trunk/src/insserv/debian/patches/11_more_warnings.dpatch
    trunk/src/insserv/debian/patches/32_debug_option.dpatch
    trunk/src/insserv/debian/patches/33_nosuse_scripts.dpatch
    trunk/src/insserv/debian/patches/34_debian_fixedscripts.dpatch
    trunk/src/insserv/debian/patches/40_segfault_virtprov.dpatch
    trunk/src/insserv/debian/patches/41_cleansystem.dpatch
    trunk/src/insserv/debian/patches/42_loopnochangemsg.dpatch
    trunk/src/insserv/debian/patches/50_sign_warning.dpatch
    trunk/src/insserv/debian/patches/51_overwrite_output.dpatch
    trunk/src/insserv/debian/patches/52_shutdown_links.dpatch
    trunk/src/insserv/debian/patches/53_debugoutput.dpatch
    trunk/src/insserv/debian/patches/60_disable_cfgfilter_stat.dpatch
    trunk/src/insserv/debian/patches/62_warn_on_missing_required_fields.dpatch
    trunk/src/insserv/debian/patches/63_warn_on_missing_default_fields.dpatch
    trunk/src/insserv/debian/patches/64_missing_default_fields_fallback.dpatch
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/31_debian_conf.dpatch
    trunk/src/insserv/debian/run-testsuite

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=799&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Wed Jul 23 12:01:10 2008
@@ -1,19 +1,50 @@
-insserv (1.11.0-10) UNRELEASED; urgency=low
+insserv (1.11.10-1) unstable; urgency=low
 
   [ Petter Reinholdtsen ]
   * 
 
   [ Kel Modderman ]
-  * Add Status field to description of each dpatch, to describe how each
-    patch stands with respect to upstream inclusion.
-  * Cleanup 64_missing_default_fields_fallback.dpatch to avoid touching
-    SUSE codepath.
+  * Discard patches applied to or no longer relevant to new upstream:
+    - 11_more_warnings.dpatch
+    - 32_debug_option.dpatch
+    - 33_nosuse_scripts.dpatch
+    - 40_segfault_virtprov.dpatch
+    - 41_cleansystem.dpatch
+    - 42_loopnochangemsg.dpatch
+    - 50_sign_warning.dpatch
+    - 51_overwrite_output.dpatch
+    - 52_shutdown_links.dpatch
+    - 60_disable_cfgfilter_stat.dpatch
+    - 62_warn_on_missing_required_fields.dpatch
+    - 63_warn_on_missing_default_fields.dpatch
+    - 64_missing_default_fields_fallback.dpatch
+  * Discard patches not applied in series:
+    - 32_debug_option.dpatch
+    - 34_debian_fixedscripts.dpatch
+  * Refresh patches that still apply to new upstream:
+    - 10_nosuse.dpatch
+    - 31_debian_conf.dpatch
+  * Add 81_debian_default_start_stop_warnings.dpatch to generate warnings when
+    empty start|stop runlevel configuration is attempted to be changed.
+    Preserve the empty runlevl configuration. (Closes: #477415)
   * 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.
   * Make test_bogus_facility() run-testsuite function non-fatal.
-  * Make test_adding_stop() more realistic in run-testsuite.
-
- -- Kel Modderman <kel at otaku42.de>  Sat, 19 Jul 2008 02:41:17 +1000
+  * Mark tests that are currently failing with a comment in run-testsuite.
+  * Add test_removing_start() and test_removing_stop() to run-testsuite,
+    showing that insserv will preserve existing links when script header is
+    unproperly replaced with empty Default-Start or Default-Stop.
+  * Make test_adding_start() case a more realistic example.
+  * Make test_incorrect_stopscripts() a fatal test, insserv should not
+    add shutdown links when none are present.
+  * Make test_newbug_keepoldorder() test case non-fatal, the fact that it
+    passed before was not by design but by luck, as per upstream analysis
+    which is included with test code.
+  * Add 90_fix_bashism_in_makefile.dpatch to correct bashism used (echo -e)
+
+ -- Kel Modderman <kel at otaku42.de>  Wed, 23 Jul 2008 21:50:22 +1000
 
 insserv (1.11.0-9) unstable; urgency=low
 

Modified: trunk/src/insserv/debian/patches/00list
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/00list?rev=799&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/00list (original)
+++ trunk/src/insserv/debian/patches/00list Wed Jul 23 12:01:10 2008
@@ -1,15 +1,4 @@
 10_nosuse
-11_more_warnings
 31_debian_conf
-32_debug_option
-33_nosuse_scripts
-40_segfault_virtprov
-41_cleansystem
-42_loopnochangemsg
-50_sign_warning
-51_overwrite_output
-52_shutdown_links
-60_disable_cfgfilter_stat
-62_warn_on_missing_required_fields
-63_warn_on_missing_default_fields
-64_missing_default_fields_fallback
+81_debian_default_start_stop_warnings
+90_fix_bashism_in_makefile

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=799&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/10_nosuse.dpatch (original)
+++ trunk/src/insserv/debian/patches/10_nosuse.dpatch Wed Jul 23 12:01:10 2008
@@ -1,31 +1,19 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
 ## 10_nosuse.dpatch by Petter Reinholdtsen
-## Updated for insserv v1.10 by Petter Reinholdtsen
-
-Goal:                Disable the SUSE specific parts and make sure to build with debugging.
-Fixes:               none, made as part of Debian porting.nb
-Status wrt upstream: Debian specific, showed to upstream.
-Notes:               The debug symbol change might make sense to get included upstream.
+##
+## DP: Purpose: Disable the SUSE flag.
+## DP: Fixes:   None, made as part of Debian porting.
+## DP: Status:  Debian specific, showed to upstream.
 
 @DPATCH@
-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
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@
+ #DESTDIR =	/tmp/root
+ #DEBUG	 =	-DDEBUG=1 -Wpacked
  DEBUG	 =
 -ISSUSE	 =	-DSUSE
 +#ISSUSE	 =	-DSUSE
  DESTDIR	 =
- VERSION	 =	1.10.0
+ VERSION	 =	1.11.10
  DATE	 =	$(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
-@@ -25,7 +25,7 @@
- ifeq ($(ARCH),i386)
- 	  COPTS = -O2 -mcpu=i586 -mtune=i686
- else
--	  COPTS = -O2
-+	  COPTS = -O2 -g
- endif
- endif
- 	 CFLAGS = -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \

Modified: trunk/src/insserv/debian/patches/31_debian_conf.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/31_debian_conf.dpatch?rev=799&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/31_debian_conf.dpatch (original)
+++ trunk/src/insserv/debian/patches/31_debian_conf.dpatch Wed Jul 23 12:01:10 2008
@@ -1,15 +1,13 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 31_debian_conf_doc.dpatch
-## by Petter Reinholdtsen <pere at hungry.com>
+## 31_debian_conf_doc.dpatch by Petter Reinholdtsen <pere at hungry.com>
 ##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Adjust the insserv configuration to match the debian init.d
-## DP: script names.
+## DP: Purpose: Adjust the insserv configuration for Debian init.d script names.
+## DP: Fixes:   None, made as part of Debian porting.
+## DP: Status:  Debian specific, showed to upstream.
 
 @DPATCH@
-diff -urNad insserv~/insserv.conf insserv/insserv.conf
---- insserv~/insserv.conf	2008-01-04 11:19:42.000000000 +0100
-+++ insserv/insserv.conf	2008-01-04 11:21:59.000000000 +0100
+--- a/insserv.conf
++++ b/insserv.conf
 @@ -1,29 +1,29 @@
  #
  # All local filesystems are mounted (done during boot phase)

Added: trunk/src/insserv/debian/patches/81_debian_default_start_stop_warnings.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/81_debian_default_start_stop_warnings.dpatch?rev=799&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/81_debian_default_start_stop_warnings.dpatch (added)
+++ trunk/src/insserv/debian/patches/81_debian_default_start_stop_warnings.dpatch Wed Jul 23 12:01:10 2008
@@ -1,0 +1,78 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 81_debian_default_start_stop_warnings.dpatch by Kel Modderman <kel at otaku42.de>
+##
+## DP: Purpose: On Debian, print a warning when new link scheme intends to add
+## DP:          start or stop links when runlevel configuration is empty for
+## DP:          current script.
+## DP: Fixes:   http://bugs.debian.org/477415
+## DP: Status:  Submitted upstream.
+
+ at DPATCH@
+--- a/insserv.c
++++ b/insserv.c
+@@ -2775,6 +2775,7 @@
+ 			     */
+ 			    service->start->lvl = deflvls;
+ 
++#ifdef SUSE
+ 		    } else if (!script_inf.default_start) {
+ 			/*
+ 			 * Could be a none LSB script, use info from current link scheme.
+@@ -2782,10 +2783,22 @@
+ 			 */
+ 			if (service->attr.flags & SERV_ENABLED)
+ 			    script_inf.default_start = lvl2str(service->start->lvl);
+-#ifdef SUSE
+ 			else
+ 			    script_inf.default_start = xstrdup(DEFAULT_START_LVL);
+-#endif /* SUSE */
++#else /* not SUSE, but Debian */
++		    } 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 /* not SUSE, but Debian */
+ 		    }
+ #ifdef SUSE
+ 		    /*
+@@ -2823,6 +2836,7 @@
+ 			     */
+ 			    service->stopp->lvl = deflvlk;
+ 
++#ifdef SUSE
+ 		    } else if (!script_inf.default_stop) {
+ 			/*
+ 			 * Could be a none LSB script, use info from current link scheme.
+@@ -2830,10 +2844,22 @@
+ 			 */
+ 			if (service->attr.flags & SERV_ENABLED)
+ 			    script_inf.default_stop = lvl2str(service->stopp->lvl);
+-#ifdef SUSE
+ 			else
+ 			    script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
+-#endif /* SUSE */
++#else /* not SUSE, but Debian */
++		    } 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 /* not SUSE, but Debian */
+ 		    }
+ 		}
+ 	    }

Added: trunk/src/insserv/debian/patches/90_fix_bashism_in_makefile.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/90_fix_bashism_in_makefile.dpatch?rev=799&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/90_fix_bashism_in_makefile.dpatch (added)
+++ trunk/src/insserv/debian/patches/90_fix_bashism_in_makefile.dpatch Wed Jul 23 12:01:10 2008
@@ -1,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 90_fix_bashism_in_makefile.dpatch by Kel Modderman <kel at otaku42.de>
+##
+## DP: Purpose: When making insserv on system with dash as /bin/sh; the usage
+## DP:          of `echo -e` always causes the syscall support test to fail.
+## DP: Status:  Submitted upstream.
+
+ at DPATCH@
+--- a/Makefile
++++ b/Makefile
+@@ -62,7 +62,7 @@
+ #
+       FUNCTIONS = fstatat openat readlinkat symlinkat unlinkat
+ 	  CTEST = $(CC) -nostdinc -fno-builtin -o /dev/null -xc
+-    cc-function = $(shell echo -e 'void *$(1)();\nint main(){return($(1)(0)?0:1);}'|$(CTEST) - -l$(2:lib%=%) > /dev/null 2>&1 && echo $(1))
++    cc-function = $(shell printf 'void *$(1)();\nint main(){return($(1)(0)?0:1);}'|$(CTEST) - -l$(2:lib%=%) > /dev/null 2>&1 && echo $(1))
+ #
+ #
+ #

Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=799&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Wed Jul 23 12:01:10 2008
@@ -806,8 +806,8 @@
 check_script_present 2 script
 check_script_present 5 script
 check_script_not_present S script
-${severity}_script_not_present 0 script
-${severity}_script_not_present 1 script
+check_script_not_present 0 script
+check_script_not_present 1 script
 check_script_not_present 1 nostopscript
 }
 ##########################################################################
@@ -888,12 +888,31 @@
 
 list_rclinks
 
-check_order S mountall needlocal
-check_order S mountall needremote
-check_order S mountall needboth
-check_order S needlocal needremote
-check_order S needlocal needboth
-check_order S needremote needboth
+# The severity of this test should be fatal, below is explanation about how
+# new (1.11.10) and old (1.11.0) insserv version behaviour changed in this
+# test.
+#
+# Hmm ... with this I've found out that the old insserv will
+# run on a loop and therefore exit.  This loop was caused
+# by the system facility $local_fs make the old insserv
+# to do an exit ... now the problem is that the new insserv
+# expands all system facility to their real requirements.
+# This leads to the new behaviour as there is no node during
+# the sorting algorithm which would cause such a loop.
+#
+# In other words: that the old insserv hasn't changed the
+# order was simply a side effect of having a ghost node
+# whereas the new insserv does not use such nodes anymore.
+#
+# If you would remove the `X-Start-Before: $local_fs' the
+# old insserv will also change the boot order.
+
+${severity}_order S mountall needlocal
+${severity}_order S mountall needremote
+${severity}_order S mountall needboth
+${severity}_order S needlocal needremote
+${severity}_order S needlocal needboth
+${severity}_order S needremote needboth
 }
 ##########################################################################
 test_start_before() {
@@ -1013,12 +1032,62 @@
 check_script_present 1 addstartscript
 
 check_script_not_present S addstartscript
-${severity}_script_not_present 0 addstartscript
-${severity}_script_not_present 2 addstartscript
-${severity}_script_not_present 3 addstartscript
-${severity}_script_not_present 4 addstartscript
-${severity}_script_not_present 5 addstartscript
-${severity}_script_not_present 6 addstartscript
+check_script_not_present 0 addstartscript
+check_script_not_present 2 addstartscript
+check_script_not_present 3 addstartscript
+check_script_not_present 4 addstartscript
+check_script_not_present 5 addstartscript
+check_script_not_present 6 addstartscript
+}
+##########################################################################
+test_removing_start() {
+echo
+echo "info: Make sure that removing start levels do not change an existing installation."
+echo
+
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript remstartscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          remstartscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+EOF
+
+check_script_present 0 remstartscript
+check_script_present 1 remstartscript
+check_script_present 2 remstartscript
+check_script_present 3 remstartscript
+check_script_present 4 remstartscript
+check_script_present 5 remstartscript
+check_script_present 6 remstartscript
+
+# Then change runlevel in existing script
+set +C
+addscript remstartscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          remstartscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:      0 1 6
+### END INIT INFO
+EOF
+set -C
+
+# Update script after changing the header
+insserv_reg remstartscript || true
+
+list_rclinks
+
+check_script_present 2 remstartscript
+check_script_present 3 remstartscript
+check_script_present 4 remstartscript
+check_script_present 5 remstartscript
 }
 ##########################################################################
 test_adding_stop() {
@@ -1067,13 +1136,63 @@
 list_rclinks
 
 check_script_present S addstopscript
-${severity}_script_not_present 0 addstopscript
+check_script_not_present 0 addstopscript
 check_script_not_present 1 addstopscript
 check_script_not_present 2 addstopscript
 check_script_not_present 3 addstopscript
 check_script_not_present 4 addstopscript
 check_script_not_present 5 addstopscript
 check_script_not_present 6 addstopscript
+}
+##########################################################################
+test_removing_stop() {
+echo
+echo "info: Make sure that removing stop levels do not change an existing installation."
+echo
+
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript remstopscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          remstopscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:      0 6
+### END INIT INFO
+EOF
+
+check_script_present S remstopscript
+check_script_present 0 remstopscript
+check_script_present 6 remstopscript
+
+check_script_not_present 1 remstopscript
+check_script_not_present 2 remstopscript
+check_script_not_present 3 remstopscript
+check_script_not_present 4 remstopscript
+check_script_not_present 5 remstopscript
+
+# Then change runlevel in existing script
+set +C
+addscript remstopscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          remstopscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+set -C
+
+# Update script after changing the header
+insserv_reg remstopscript || true
+
+list_rclinks
+
+check_script_present 0 remstopscript
+check_script_present 6 remstopscript
 }
 ##########################################################################
 test_duplicate_provides() {
@@ -1324,7 +1443,7 @@
 test_override_files
 test_override_loop
 test_long_loop
-test_combined_loop
+test_combined_loop		# 1 non-fatal test failing
 test_fake_loop
 test_fake_loop_reverse
 test_badscript
@@ -1333,13 +1452,15 @@
 test_removal
 test_segfault_virtfac
 test_incorrect_stopscripts
-test_newbug_keepoldorder
+test_newbug_keepoldorder	# 3 non-fatal tests failing
 test_start_before
 test_stop_after
 test_adding_start
+test_removing_start
 test_adding_stop
+test_removing_stop
 test_duplicate_provides
-test_bogus_facility
+test_bogus_facility		# 1 non-fatal test failing
 test_insserv_conf_d
 test_broken_header
 test_noprovides_header




More information about the Initscripts-ng-commits mailing list