diff --git a/rpcbind-systemd-notify.patch b/rpcbind-systemd-notify.patch new file mode 100644 index 0000000..2d9e952 --- /dev/null +++ b/rpcbind-systemd-notify.patch @@ -0,0 +1,23 @@ +--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c ++++ rpcbind-0.2.0_git201103171419/src/rpcbind.c +@@ -253,7 +253,9 @@ main(int argc, char *argv[]) + #endif + + network_init(); +- ++#ifdef SYSTEMD ++ sd_notify(0, "READY=1"); ++#endif + my_svc_run(); + rpcbind_syslog(LOG_ERR, "svc_run returned unexpectedly"); + rpcbind_abort(); +--- rpcbind-0.2.0_git201103171419.orig/systemd/rpcbind.service.in ++++ rpcbind-0.2.0_git201103171419/systemd/rpcbind.service.in +@@ -2,6 +2,7 @@ + Description=RPC Bind + + [Service] ++Type=notify + ExecStart=@bindir@/rpcbind -w -f + + [Install] diff --git a/rpcbind.changes b/rpcbind.changes index a0f9fc0..fd36bf9 100644 --- a/rpcbind.changes +++ b/rpcbind.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jun 27 21:36:52 UTC 2013 - crrodriguez@opensuse.org + +- rpcbind-systemd-notify.patch make systemd service type + "notify" this is almost the same as the default but + with the difference that the daemon now is able to + to notify systemd when it finished startup hence + avoiding a race condition in where startup is faster than + the process finishing its own internal setup routines. + ------------------------------------------------------------------- Mon May 6 12:20:44 UTC 2013 - cfarrell@suse.com diff --git a/rpcbind.spec b/rpcbind.spec index 0c714bf..33d21b9 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -38,6 +38,7 @@ 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 +Patch5: rpcbind-systemd-notify.patch %define statefile /var/lib/portmap.state BuildRequires: pkgconfig(systemd) %{?systemd_requires} @@ -65,6 +66,7 @@ cp %{SOURCE4} . %patch2 -p1 %patch3 %patch4 -p1 +%patch5 -p1 %build autoreconf -fiv