From 98cb21ee0767d0b429f1136e4ddf3f69a5ab61d0e6ccd79a776e5c70184181da Mon Sep 17 00:00:00 2001 From: Olaf Kirch Date: Mon, 14 Nov 2016 09:36:14 +0000 Subject: [PATCH] Accepting request 440171 from home:kukuk:branches:network - Move /var/lib/rpcbind to /run/rpcbind, data should not survive reboot and this makes read-only root filesystem easier. This update also requires the dracut update OBS-URL: https://build.opensuse.org/request/show/440171 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=64 --- rpcbind.changes | 6 ++++++ rpcbind.conf | 1 + rpcbind.spec | 10 ++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 rpcbind.conf diff --git a/rpcbind.changes b/rpcbind.changes index 1ede68d..4938a8d 100644 --- a/rpcbind.changes +++ b/rpcbind.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Nov 12 21:19:10 CET 2016 - kukuk@suse.de + +- Move /var/lib/rpcbind to /run/rpcbind, data should not survive + reboot and this makes read-only root filesystem easier. + ------------------------------------------------------------------- Tue Jun 7 17:04:12 UTC 2016 - fbui@suse.com diff --git a/rpcbind.conf b/rpcbind.conf new file mode 100644 index 0000000..6a11118 --- /dev/null +++ b/rpcbind.conf @@ -0,0 +1 @@ +d /run/rpcbind 0755 rpc root diff --git a/rpcbind.spec b/rpcbind.spec index b9274e6..cb8ecd7 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -27,6 +27,7 @@ Source: %{name}-%{version}.tar.bz2 Source2: sysconfig.rpcbind Source3: rpcbind.xml Source4: pmap_set.c +Source5: rpcbind.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libtirpc-devel >= 1.0.1 BuildRequires: libtool @@ -50,7 +51,6 @@ Patch14: 0014-When-using-systemd-redirect-syslog-calls-to-the-syst.patch Patch30: 0030-systemd-fix-rmtcall.patch Patch31: 0031-rpcbind-manpage.patch -%define statefile /var/lib/portmap.state %{?systemd_requires} Provides: portmap @@ -87,7 +87,7 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now" --enable-libwrap \ --enable-warmstarts \ --disable-debug \ - --with-statedir=%{_localstatedir}/lib/rpcbind \ + --with-statedir=%{_rundir}/rpcbind \ --with-rpcuser=rpc \ --with-systemdsystemunitdir=%{_unitdir} @@ -96,12 +96,13 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now" %install make install DESTDIR=$RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%_localstatedir/lib/rpcbind # fillup template mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/ mkdir -p $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d/ +mkdir -p $RPM_BUILD_ROOT/usr/lib/tmpfiles.d +install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/ # install -m 755 pmap_set $RPM_BUILD_ROOT/sbin/pmap_set2 # create symlink for rcrpcbind @@ -123,6 +124,7 @@ exit 0 %post %{fillup_only -n rpcbind} +/usr/bin/systemd-tmpfiles --create rpcbind.conf ||: %service_add_post %{name}.service %{name}.socket %postun @@ -136,8 +138,8 @@ exit 0 /sbin/rpcinfo %{_sbindir}/rcrpcbind %{_mandir}/*/* -%attr(-,rpc,root) %{_localstatedir}/lib/rpcbind /var/adm/fillup-templates/sysconfig.rpcbind +/usr/lib/tmpfiles.d/rpcbind.conf %{_datadir}/omc/svcinfo.d/rpcbind.xml %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket