diff --git a/rpcbind-0.2.4-systemd-rundir.patch b/rpcbind-0.2.4-systemd-rundir.patch index da08d7a1f294174f5e3dd5cc3c9a5ed9bc2c9a2d..b31cf6c2c732cd2ea7146cc1995c8558553a331b 100644 --- a/rpcbind-0.2.4-systemd-rundir.patch +++ b/rpcbind-0.2.4-systemd-rundir.patch @@ -1,33 +1,40 @@ -diff -up rpcbind-0.2.4/src/rpcbind.c.orig rpcbind-0.2.4/src/rpcbind.c ---- rpcbind-0.2.4/src/rpcbind.c.orig 2017-03-21 10:12:35.005190509 -0400 -+++ rpcbind-0.2.4/src/rpcbind.c 2017-03-21 10:36:45.510507649 -0400 -@@ -144,6 +144,8 @@ static void rbllist_add(rpcprog_t, rpcve +--- rpcbind-1.2.6/src/rpcbind.c 2023-03-27 15:17:28.116410124 +0800 ++++ rpcbind-1.2.6-dev/src/rpcbind.c 2023-03-27 15:37:14.215749666 +0800 +@@ -143,6 +143,10 @@ static void rbllist_add(rpcprog_t, rpcve static void terminate(int); static void parseargs(int, char *[]); ++#ifndef WITHOUT_SYSTEMD +char *systemdtmp = "/usr/bin/systemd-tmpfiles --create rpcbind.conf"; ++#endif + int main(int argc, char *argv[]) { -@@ -151,13 +153,21 @@ main(int argc, char *argv[]) +@@ -150,13 +154,27 @@ main(int argc, char *argv[]) void *nc_handle; /* Net config handle */ struct rlimit rl; int maxrec = RPC_MAXDATASIZE; ++#ifndef WITHOUT_SYSTEMD + int once = 1; ++#endif parseargs(argc, argv); ++#ifndef WITHOUT_SYSTEMD +tryagain: ++#endif /* Check that another rpcbind isn't already running. */ if ((rpcbindlockfd = (open(RPCBINDDLOCK, - O_RDONLY|O_CREAT, 0444))) == -1) + O_RDONLY|O_CREAT, 0444))) == -1) { ++#ifndef WITHOUT_SYSTEMD + if (once) { + once = system(systemdtmp); /* set once to avoid a warning */ + once = 0; + goto tryagain; + } ++#endif err(1, "%s", RPCBINDDLOCK); + } diff --git a/rpcbind.spec b/rpcbind.spec index 343aef1c72a2ae8efca9df657fe73fd1b4c3500c..a368d04773ec32c28872cb0e11c644960df73c16 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,7 +3,7 @@ Name: rpcbind Version: 1.2.6 -Release: 4 +Release: 5 Summary: Universal addresses to RPC program number mapper License: BSD @@ -118,6 +118,12 @@ fi %{_mandir}/man8/*.8.gz %changelog +* Mon Mar 27 2023 wangqing - 1.2.6-5 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:add macro WITHOUT_SYSTEMD to relieve dependence on systemd + * Wed Mar 30 2022 kircher - 1.2.6-4 - Type:bugfix - Id:NA