diff --git a/move-lock-file-to-run-fs.patch b/move-lock-file-to-run-fs.patch new file mode 100644 index 0000000..ca425af --- /dev/null +++ b/move-lock-file-to-run-fs.patch @@ -0,0 +1,13 @@ +Index: rpcbind-0.2.0_git201103171419/src/rpcbind.c +=================================================================== +--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c ++++ rpcbind-0.2.0_git201103171419/src/rpcbind.c +@@ -93,7 +93,7 @@ char *rpcbinduser = NULL; + /* who to suid to if -s is given */ + #define RUN_AS "daemon" + +-#define RPCBINDDLOCK "/var/run/rpcbind.lock" ++#define RPCBINDDLOCK "/run/rpcbind.lock" + + int runasdaemon = 0; + int insecure = 0; diff --git a/rpcbind.changes b/rpcbind.changes index a9373f9..114b505 100644 --- a/rpcbind.changes +++ b/rpcbind.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 28 14:44:15 UTC 2012 - rmilasan@suse.com + +- Move rpcbind.sock and rpcbind.lock to /run to not interfere with + systemd. + ------------------------------------------------------------------- Thu Oct 25 21:29:15 UTC 2012 - crrodriguez@opensuse.org diff --git a/rpcbind.spec b/rpcbind.spec index 34e90bb..bd1b409 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -43,6 +43,7 @@ Patch0: 0001-systemd-add-support-for-system-bus-activation.patch Patch1: socket-activation-don-t-unlink-socket-we-didn-t-create Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets Patch3: rpcbind-journal.patch +Patch4: move-lock-file-to-run-fs.patch %define statefile /var/lib/portmap.state %if 0%{?suse_version} > 1140 BuildRequires: systemd-devel @@ -71,6 +72,8 @@ cp %{SOURCE4} . %patch1 -p1 %patch2 -p1 %patch3 +%patch4 -p1 + %build autoreconf -fiv export CFLAGS="$RPM_OPT_FLAGS -fpie" diff --git a/socket-activation-fix-rpcbind-service-to-use-separate-sockets b/socket-activation-fix-rpcbind-service-to-use-separate-sockets index a57b210..191ff8e 100644 --- a/socket-activation-fix-rpcbind-service-to-use-separate-sockets +++ b/socket-activation-fix-rpcbind-service-to-use-separate-sockets @@ -16,8 +16,10 @@ Signed-off-by: Jeff Mahoney systemd/rpcbind.socket | 9 +++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) ---- a/src/rpcbind.c -+++ b/src/rpcbind.c +Index: rpcbind-0.2.0_git201103171419/src/rpcbind.c +=================================================================== +--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c ++++ rpcbind-0.2.0_git201103171419/src/rpcbind.c @@ -50,6 +50,7 @@ #include #include @@ -26,7 +28,7 @@ Signed-off-by: Jeff Mahoney #include #include #ifdef PORTMAP -@@ -262,6 +264,32 @@ main(int argc, char *argv[]) +@@ -263,6 +264,32 @@ main(int argc, char *argv[]) } /* @@ -59,7 +61,7 @@ Signed-off-by: Jeff Mahoney * Adds the entry into the rpcbind database. * If PORTMAP, then for UDP and TCP, it adds the entries for version 2 also * Returns 0 if succeeds, else fails -@@ -313,7 +341,7 @@ init_transport(struct netconfig *nconf) +@@ -314,7 +341,7 @@ init_transport(struct netconfig *nconf) #ifdef SYSTEMD n = sd_listen_fds(0); if (n < 0) { @@ -68,7 +70,7 @@ Signed-off-by: Jeff Mahoney return 1; } -@@ -347,6 +375,9 @@ init_transport(struct netconfig *nconf) +@@ -348,6 +375,9 @@ init_transport(struct netconfig *nconf) goto error; } @@ -78,14 +80,18 @@ Signed-off-by: Jeff Mahoney /* Copy the address */ taddr.addr.maxlen = taddr.addr.len = addrlen; taddr.addr.buf = malloc(addrlen); ---- a/systemd/rpcbind.socket -+++ b/systemd/rpcbind.socket -@@ -5,8 +5,13 @@ Before=rpcbind.target +Index: rpcbind-0.2.0_git201103171419/systemd/rpcbind.socket +=================================================================== +--- rpcbind-0.2.0_git201103171419.orig/systemd/rpcbind.socket ++++ rpcbind-0.2.0_git201103171419/systemd/rpcbind.socket +@@ -4,9 +4,14 @@ Wants=rpcbind.target + Before=rpcbind.target [Socket] - ListenStream=/var/run/rpcbind.sock +-ListenStream=/var/run/rpcbind.sock -ListenStream=111 -ListenDatagram=111 ++ListenStream=/run/rpcbind.sock + +# RPC netconfig can't handle ipv6/ipv4 dual sockets +BindIPv6Only=ipv6-only @@ -96,4 +102,3 @@ Signed-off-by: Jeff Mahoney [Install] WantedBy=sockets.target -