Accepting request 181216 from home:elvigia:branches:network

- 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.

OBS-URL: https://build.opensuse.org/request/show/181216
OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=26
This commit is contained in:
Marcus Meissner 2013-07-01 09:25:17 +00:00 committed by Git OBS Bridge
parent f34e36e117
commit 9fd5901665
3 changed files with 35 additions and 0 deletions

View File

@ -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]

View File

@ -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 Mon May 6 12:20:44 UTC 2013 - cfarrell@suse.com

View File

@ -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 Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets
Patch3: rpcbind-journal.patch Patch3: rpcbind-journal.patch
Patch4: move-lock-file-to-run-fs.patch Patch4: move-lock-file-to-run-fs.patch
Patch5: rpcbind-systemd-notify.patch
%define statefile /var/lib/portmap.state %define statefile /var/lib/portmap.state
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
%{?systemd_requires} %{?systemd_requires}
@ -65,6 +66,7 @@ cp %{SOURCE4} .
%patch2 -p1 %patch2 -p1
%patch3 %patch3
%patch4 -p1 %patch4 -p1
%patch5 -p1
%build %build
autoreconf -fiv autoreconf -fiv