]> git.pld-linux.org Git - packages/rpcbind.git/commitdiff
- use upstream systemd units (with patch); real life check wanted auto/th/rpcbind-0.2.4-1
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 11 Apr 2018 17:50:57 +0000 (19:50 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 11 Apr 2018 17:50:57 +0000 (19:50 +0200)
- use upstream make install

rpcbind-systemd.patch [new file with mode: 0644]
rpcbind.service [deleted file]
rpcbind.socket [deleted file]
rpcbind.spec

diff --git a/rpcbind-systemd.patch b/rpcbind-systemd.patch
new file mode 100644 (file)
index 0000000..c38ca9c
--- /dev/null
@@ -0,0 +1,29 @@
+--- rpcbind-0.2.4/systemd/rpcbind.service.in.orig      2016-11-28 21:47:28.000000000 +0100
++++ rpcbind-0.2.4/systemd/rpcbind.service.in   2018-04-11 19:41:46.466605338 +0200
+@@ -6,12 +6,13 @@
+ # Make sure we use the IP addresses listed for
+ # rpcbind.socket, no matter how this unit is started.
+ Wants=rpcbind.socket
+-After=rpcbind.socket
++After=rpcbind.socket syslog.target network.target
+ [Service]
+ Type=notify
+-# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
++EnvironmentFile=-/etc/sysconfig/rpcbind
+ ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
+ [Install]
+ WantedBy=multi-user.target
++Also=rpcbind.socket
+--- rpcbind-0.2.4/systemd/rpcbind.socket.orig  2016-11-28 21:47:28.000000000 +0100
++++ rpcbind-0.2.4/systemd/rpcbind.socket       2018-04-11 19:43:27.366604185 +0200
+@@ -5,7 +5,7 @@
+ Before=rpcbind.target
+ [Socket]
+-ListenStream=/run/rpcbind.sock
++ListenStream=/var/run/rpcbind.sock
+ # RPC netconfig can't handle ipv6/ipv4 dual sockets
+ BindIPv6Only=ipv6-only
diff --git a/rpcbind.service b/rpcbind.service
deleted file mode 100644 (file)
index fab7898..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=RPC bind service
-Requires=rpcbind.socket
-After=syslog.target network.target
-
-[Service]
-Type=forking
-EnvironmentFile=-/etc/sysconfig/rpcbind
-ExecStart=/sbin/rpcbind -w $RPCBIND_OPTIONS
-
-[Install]
-WantedBy=multi-user.target
-Also=rpcbind.socket
diff --git a/rpcbind.socket b/rpcbind.socket
deleted file mode 100644 (file)
index d63c1d9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=RPCbind Server Activation Socket
-
-[Socket]
-ListenStream=/var/run/rpcbind.sock
-
-[Install]
-WantedBy=sockets.target
index 54936661a5d976d52826b314e4ff96464f480284..544fe5a5df04c0ec6a70333f2af313ff98b67861 100644 (file)
@@ -9,12 +9,11 @@ Source0:      http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
 # Source0-md5: cf10cd41ed8228fc54c316191c1f07fe
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
-Source3:       %{name}.service
-Source4:       %{name}.socket
 Patch0:                %{name}-libwrap.patch
 Patch1:                %{name}-syslog.patch
 Patch2:                %{name}-sunrpc.patch
 Patch3:                %{name}-nss.h.patch
+Patch4:                %{name}-systemd.patch
 Patch6:                %{name}-tcp-addrs.patch
 # http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
 URL:           http://sourceforge.net/projects/rpcbind/
@@ -57,6 +56,7 @@ wywołania RPC na serwerze na tej maszynie.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 %patch6 -p1
 
 %build
@@ -65,29 +65,26 @@ wywołania RPC na serwerze na tej maszynie.
 %{__autoconf}
 %{__automake}
 %configure \
+       --bindir=/sbin \
        --enable-libwrap \
        --enable-warmstarts \
        --with-statedir=/var/lib/rpcbind \
        --with-rpcuser=rpc \
-       --with-systemdsystemunitdir=%{%systemdunitdir}
+       --with-systemdsystemunitdir=%{systemdunitdir}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
-       $RPM_BUILD_ROOT{%{_mandir}/man8,%{_var}/lib/%{name},%{systemdunitdir}}
+install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d},/var/lib/rpcbind}
 
-install rpcbind $RPM_BUILD_ROOT/sbin
-install rpcinfo $RPM_BUILD_ROOT%{_sbindir}
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-install man/{rpcbind,rpcinfo}.8 $RPM_BUILD_ROOT%{_mandir}/man8
+%{__mv} $RPM_BUILD_ROOT/sbin/rpcinfo $RPM_BUILD_ROOT%{_sbindir}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
 
-install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.service
-install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/rpcbind.socket
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -115,8 +112,8 @@ fi
 %triggerpostun -- %{name} < 0.2.0-5
 if [ -f /etc/sysconfig/rpcbind ]; then
        . /etc/sysconfig/rpcbind
-       [ "$RPCBIND_VERBOSE" == "no" ] || RPCBIND_OPTIONS="-l"
-       [ "$RPCBIND_INSECURE" == "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
+       [ "$RPCBIND_VERBOSE" = "no" ] || RPCBIND_OPTIONS="-l"
+       [ "$RPCBIND_INSECURE" = "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
        for a in $RPCBIND_ADDRESSES ; do
                RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
        done
This page took 0.090656 seconds and 4 git commands to generate.