Dominique Leuenberger 2016-11-16 12:31:19 +00:00 committed by Git OBS Bridge
commit f1632425b9
3 changed files with 13 additions and 4 deletions

View File

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

1
rpcbind.conf Normal file
View File

@ -0,0 +1 @@
d /run/rpcbind 0755 rpc root

View File

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