[crux-commits] ports/core (3.6): start-stop-daemon: fix build with glibc 2.32

crux at crux.nu crux at crux.nu
Tue Aug 11 09:27:18 UTC 2020


commit 295c95f4913d70ca6824ec9605f13ea1cf13f58b
Author: Juergen Daubert <jue at jue.li>
Date:   Tue Aug 11 09:27:10 2020 +0000

    start-stop-daemon: fix build with glibc 2.32

diff --git a/start-stop-daemon/.signature b/start-stop-daemon/.signature
index 01a8a2e0..dd560e8e 100644
--- a/start-stop-daemon/.signature
+++ b/start-stop-daemon/.signature
@@ -1,8 +1,8 @@
 untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVeqqT8ZK2unrzpcBH6tHda+R7lSBENNq66Rz4EaTQhBuf007cCu6TyDmaWgR2wV0msP25SayUGXgZeabXUhvtKsw8=
-SHA256 (Pkgfile) = a339a6dfaf8a132ab53efc9a589a17f846bd899f073b08ead19f79a44005f224
+RWRJc1FUaeVeqojKcxHezTRN2pg696qEuLdrzcK6jg+RHdOphMR4SD6iO2YLgU+yDev3JJ75i6gfJwDGR6XtCmDUm2s4CMqBiQ0=
+SHA256 (Pkgfile) = d797de1ea9510f18a9e967d0327773de95b0ca79833c5f1bfb35f0b46786c20f
 SHA256 (.footprint) = a24924dba386364cd2326ad6abefd3be01927f37f8f2175b3f56845fc88bfb79
 SHA256 (start-stop-daemon.c) = 1edfa71d4b8d579d5db72edaa803ef1854d7e3dd9b58ac000df6bc6c4e7c6320
 SHA256 (start-stop-daemon.8) = 6920da66e820b7d210514660756b566f4a36c791178ed26e67fbdaf7315408fa
-SHA256 (crux-patch.diff) = 148c75cf86b7ba7b59a3625aa9b60c782bcb6ee378f2418ce00311600dec6fa6
+SHA256 (crux-patch.diff) = d5fd19777861182f00d0471ce2122c603bb2ebdf014a4f1b422878883c53dd49
 SHA256 (makefile) = 7ce6e34d7473e965a55ccabf195468cf53f0c49a6d344bc41cd545b2ff8a5485
diff --git a/start-stop-daemon/Pkgfile b/start-stop-daemon/Pkgfile
index 4ebf6a39..e6254e31 100644
--- a/start-stop-daemon/Pkgfile
+++ b/start-stop-daemon/Pkgfile
@@ -4,15 +4,13 @@
 
 name=start-stop-daemon
 version=20190310
-release=1
+release=2
 source=(start-stop-daemon.c start-stop-daemon.8 crux-patch.diff makefile)
 
 build () {
-    patch -p1 -i crux-patch.diff
-
-    make
-
-    install -d $PKG/{sbin,usr/share/man/man8}
-    install -m 755 $name $PKG/sbin/
-    install -m 644 $name.8 $PKG/usr/share/man/man8/
+	patch -p0 -i crux-patch.diff
+	make
+	install -d $PKG/{sbin,usr/share/man/man8}
+	install -m 755 $name $PKG/sbin/
+	install -m 644 $name.8 $PKG/usr/share/man/man8/
 }
diff --git a/start-stop-daemon/crux-patch.diff b/start-stop-daemon/crux-patch.diff
index 7d401db8..a6bc4293 100644
--- a/start-stop-daemon/crux-patch.diff
+++ b/start-stop-daemon/crux-patch.diff
@@ -1,7 +1,5 @@
-diff --git a/start-stop-daemon.8 b/start-stop-daemon.8
-index 2a083f3..5daeab2 100644
---- a/start-stop-daemon.8
-+++ b/start-stop-daemon.8
+--- start-stop-daemon.8.orig	2020-08-11 09:18:30.855173650 +0000
++++ start-stop-daemon.8	2020-08-11 09:18:59.687682548 +0000
 @@ -20,7 +20,7 @@
  .\" You should have received a copy of the GNU General Public License
  .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
@@ -11,7 +9,7 @@ index 2a083f3..5daeab2 100644
  .nh
  .SH NAME
  start\-stop\-daemon \- start and stop system daemon programs
-@@ -269,33 +269,6 @@ reason. This is a last resort, and is only meant for programs that either
+@@ -269,33 +269,6 @@
  make no sense forking on their own, or where it's not feasible to add the
  code for them to do this themselves.
  .TP
@@ -45,11 +43,9 @@ index 2a083f3..5daeab2 100644
  .BR \-C ", " \-\-no\-close
  Do not close any file descriptor when forcing the daemon into the background
  (since version 1.16.5).
-diff --git a/start-stop-daemon.c b/start-stop-daemon.c
-index 88c9726..bcdce53 100644
---- a/start-stop-daemon.c
-+++ b/start-stop-daemon.c
-@@ -20,10 +20,37 @@
+--- start-stop-daemon.c.orig	2020-08-11 09:18:38.031635113 +0000
++++ start-stop-daemon.c	2020-08-11 09:20:15.932117049 +0000
+@@ -20,10 +20,36 @@
   * Changes by Ian Jackson: added --retry (and associated rearrangements).
   */
  
@@ -66,7 +62,6 @@ index 88c9726..bcdce53 100644
 +
 +# define HAVE_SYS_PARAM_H
 +# define HAVE_SYS_SYSCALL_H
-+# define HAVE_SYS_SYSCTL_H
 +# define HAVE_SYS_USER_H
 +# define HAVE_STDDEF_H
 +# define HAVE_ERROR_H
@@ -87,7 +82,7 @@ index 88c9726..bcdce53 100644
  
  #if defined(__linux__)
  #  define OS_Linux
-@@ -160,6 +187,10 @@
+@@ -160,6 +186,10 @@
  #define HAVE_IOPRIO_SET
  #endif
  
@@ -98,7 +93,7 @@ index 88c9726..bcdce53 100644
  #define IOPRIO_CLASS_SHIFT 13
  #define IOPRIO_PRIO_VALUE(class, prio) (((class) << IOPRIO_CLASS_SHIFT) | (prio))
  #define IO_SCHED_PRIO_MIN 0
-@@ -212,10 +243,12 @@ static int quietmode = 0;
+@@ -212,10 +242,12 @@
  static int exitnodo = 1;
  static bool background = false;
  static bool close_io = true;
@@ -111,7 +106,7 @@ index 88c9726..bcdce53 100644
  static bool mpidfile = false;
  static bool rpidfile = false;
  static int signal_nr = SIGTERM;
-@@ -405,8 +438,7 @@ xstrndup(const char *str, size_t n)
+@@ -405,8 +437,7 @@
  static void
  timespec_gettime(struct timespec *ts)
  {
@@ -121,7 +116,7 @@ index 88c9726..bcdce53 100644
  	if (clock_gettime(CLOCK_MONOTONIC, ts) < 0)
  		fatale("clock_gettime failed");
  #else
-@@ -548,6 +580,7 @@ wait_for_child(pid_t pid)
+@@ -548,6 +579,7 @@
  	}
  }
  
@@ -129,7 +124,7 @@ index 88c9726..bcdce53 100644
  static void
  cleanup_socket_dir(void)
  {
-@@ -737,6 +770,7 @@ wait_for_notify(int fd)
+@@ -737,6 +769,7 @@
  		}
  	}
  }
@@ -137,7 +132,7 @@ index 88c9726..bcdce53 100644
  
  static void
  write_pidfile(const char *filename, pid_t pid)
-@@ -769,7 +803,9 @@ remove_pidfile(const char *filename)
+@@ -769,7 +802,9 @@
  static void
  daemonize(void)
  {
@@ -147,7 +142,7 @@ index 88c9726..bcdce53 100644
  	pid_t pid;
  	sigset_t mask;
  	sigset_t oldmask;
-@@ -783,8 +819,10 @@ daemonize(void)
+@@ -783,8 +818,10 @@
  	if (sigprocmask(SIG_BLOCK, &mask, &oldmask) == -1)
  		fatale("cannot block SIGCHLD");
  
@@ -158,7 +153,7 @@ index 88c9726..bcdce53 100644
  
  	pid = fork();
  	if (pid < 0)
-@@ -795,6 +833,7 @@ daemonize(void)
+@@ -795,6 +832,7 @@
  		 * not suffer from race conditions on return. */
  		wait_for_child(pid);
  
@@ -166,7 +161,7 @@ index 88c9726..bcdce53 100644
  		if (notify_await) {
  			/* Wait for a readiness notification from the second
  			 * child, so that we can safely exit when the service
-@@ -803,6 +842,7 @@ daemonize(void)
+@@ -803,6 +841,7 @@
  			close(notify_fd);
  			cleanup_socket_dir();
  		}
@@ -174,7 +169,7 @@ index 88c9726..bcdce53 100644
  
  		_exit(0);
  	}
-@@ -901,8 +941,10 @@ usage(void)
+@@ -901,8 +940,10 @@
  "                                  scheduler (default prio is 4)\n"
  "  -k, --umask <mask>            change the umask to <mask> before starting\n"
  "  -b, --background              force the process to detach\n"
@@ -185,7 +180,7 @@ index 88c9726..bcdce53 100644
  "  -C, --no-close                do not close any file descriptor\n"
  "  -m, --make-pidfile            create the pidfile before starting\n"
  "      --remove-pidfile          delete the pidfile after stopping\n"
-@@ -947,9 +989,9 @@ usage(void)
+@@ -947,9 +988,9 @@
  static void
  do_version(void)
  {
@@ -198,7 +193,7 @@ index 88c9726..bcdce53 100644
  }
  
  static void DPKG_ATTR_NORET
-@@ -1274,8 +1316,10 @@ parse_options(int argc, char * const *argv)
+@@ -1274,8 +1315,10 @@
  		{ "iosched",	  1, NULL, 'I'},
  		{ "umask",	  1, NULL, 'k'},
  		{ "background",	  0, NULL, 'b'},
@@ -209,7 +204,7 @@ index 88c9726..bcdce53 100644
  		{ "no-close",	  0, NULL, 'C'},
  		{ "make-pidfile", 0, NULL, 'm'},
  		{ "remove-pidfile", 0, NULL, OPT_RM_PIDFILE},
-@@ -1290,7 +1334,9 @@ parse_options(int argc, char * const *argv)
+@@ -1290,7 +1333,9 @@
  	const char *schedule_str = NULL;
  	const char *proc_schedule_str = NULL;
  	const char *io_schedule_str = NULL;
@@ -219,7 +214,7 @@ index 88c9726..bcdce53 100644
  	size_t changeuser_len;
  	int c;
  
-@@ -1390,12 +1436,14 @@ parse_options(int argc, char * const *argv)
+@@ -1390,12 +1435,14 @@
  		case 'b':  /* --background */
  			background = true;
  			break;
@@ -234,7 +229,7 @@ index 88c9726..bcdce53 100644
  		case 'C': /* --no-close */
  			close_io = false;
  			break;
-@@ -1448,9 +1496,11 @@ parse_options(int argc, char * const *argv)
+@@ -1448,9 +1495,11 @@
  			badusage("umask value must be a positive number");
  	}
  
@@ -246,7 +241,7 @@ index 88c9726..bcdce53 100644
  
  	if (action == ACTION_NONE)
  		badusage("need one of --start or --stop or --status");
-@@ -2298,7 +2348,8 @@ do_pidfile(const char *name)
+@@ -2298,7 +2347,8 @@
  
  			if (match_mode == MATCH_PIDFILE &&
  			    ((st.st_uid != getuid() && st.st_uid != 0) ||


More information about the crux-commits mailing list