[Initscripts-ng-commits] r1106 - in /trunk/src/insserv/debian: changelog patches/220_no_MAXSYMLINKS.patch patches/series

pere at users.alioth.debian.org pere at users.alioth.debian.org
Tue Feb 18 21:03:12 UTC 2014


Author: pere
Date: Tue Feb 18 21:03:12 2014
New Revision: 1106

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=1106
Log:
Added patch 220_no_MAXSYMLINKS.patch to get source building on Hurd.

Added:
    trunk/src/insserv/debian/patches/220_no_MAXSYMLINKS.patch
Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/patches/series

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=1106&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog	(original)
+++ trunk/src/insserv/debian/changelog	Tue Feb 18 21:03:12 2014
@@ -1,3 +1,9 @@
+insserv (1.16.0-3) UNRELEASED; urgency=low
+
+  * Added patch 220_no_MAXSYMLINKS.patch to get source building on Hurd.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Tue, 18 Feb 2014 22:02:18 +0100
+
 insserv (1.16.0-2) experimental; urgency=low
 
   * Added new patch 200_upstream-fixes.patch fetched upstream to fix buffer

Added: trunk/src/insserv/debian/patches/220_no_MAXSYMLINKS.patch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/220_no_MAXSYMLINKS.patch?rev=1106&op=file
==============================================================================
--- trunk/src/insserv/debian/patches/220_no_MAXSYMLINKS.patch	(added)
+++ trunk/src/insserv/debian/patches/220_no_MAXSYMLINKS.patch	Tue Feb 18 21:03:12 2014
@@ -0,0 +1,50 @@
+Description: Port to Hurd without MAXSYMLINKS
+ Copy maxsymlinks() function from sysvinit to get source
+ building on Hurd.
+Author: Petter Reinholdtsen <pere at debian.org>
+
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere at debian.org>
+Last-Update: 2014-02-18
+
+--- insserv-1.16.0.orig/insserv.c
++++ insserv-1.16.0/insserv.c
+@@ -86,6 +86,20 @@
+ # endif
+ #endif
+ 
++/*
++ * Get the maximal number of symlinks to follow.  Use sysconf() on
++ * Hurd where the hardcoded value MAXSYMLINKS is not available.
++ */
++static unsigned int maxsymlinks(void)
++{
++        int v = sysconf(_SC_SYMLOOP_MAX);
++#ifdef MAXSYMLINKS
++        if (v == -1)
++                return MAXSYMLINKS;
++#endif
++        return (unsigned int)v;
++}
++
+ #ifdef SUSE
+ # define DEFAULT_START_LVL	"3 5"
+ # define DEFAULT_STOP_LVL	"3 5"
+@@ -1309,7 +1323,7 @@ static char *is_upstart_job(const char *
+ 	struct stat statbuf;
+ 	int len;
+ 
+-	if (deep++ > MAXSYMLINKS) {
++	if (deep++ > maxsymlinks()) {
+ 	    errno = ELOOP;
+ 	    warn("Can not determine upstart job name for %s: %s\n", path, strerror(errno));
+ 	    break;
+@@ -1599,7 +1613,7 @@ static char * scriptname(int dfd, const
+ 	struct stat st;
+ 	int linklen;
+ 
+-	if (deep++ > MAXSYMLINKS) {
++	if (deep++ > maxsymlinks()) {
+ 	    errno = ELOOP;
+ 	    warn("Can not determine script name for %s: %s\n", path, strerror(errno));
+ 	    break;

Modified: trunk/src/insserv/debian/patches/series
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/series?rev=1106&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/series	(original)
+++ trunk/src/insserv/debian/patches/series	Tue Feb 18 21:03:12 2014
@@ -12,3 +12,4 @@
 180_default_runlevels.patch
 200_upstream-fixes.patch
 210_systemd_path_option.patch
+220_no_MAXSYMLINKS.patch




More information about the Initscripts-ng-commits mailing list