Move to version 0.10.8

- Use systemd interaction macros in specfile installation sections [RH BZ 850053].
- Fix the service file to use /usr/sbin/ rather than /sbin/.
- Turn on RELRO and PIE build hardening in RPM builds.
This commit is contained in:
David Howells 2016-02-17 14:20:07 +00:00
parent c91df93eef
commit ba912d68c4
2 changed files with 13 additions and 25 deletions

View File

@ -1,7 +1,7 @@
# % define buildid .local # % define buildid .local
Name: cachefilesd Name: cachefilesd
Version: 0.10.7 Version: 0.10.8
Release: 1%{?dist}%{?buildid} Release: 1%{?dist}%{?buildid}
Summary: CacheFiles user-space management daemon Summary: CacheFiles user-space management daemon
Group: System Environment/Daemons Group: System Environment/Daemons
@ -15,6 +15,8 @@ Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
Requires: selinux-policy-base >= 3.7.19-5 Requires: selinux-policy-base >= 3.7.19-5
%define _hardened_build 1
%description %description
The cachefilesd daemon manages the caching files and directory that are that The cachefilesd daemon manages the caching files and directory that are that
are used by network file systems such a AFS and NFS to do persistent caching to are used by network file systems such a AFS and NFS to do persistent caching to
@ -26,19 +28,11 @@ the local disk.
%setup -q %setup -q
%build %build
%ifarch s390 s390x
PIE="-fPIE"
%else
PIE="-fpie"
%endif
export PIE
CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
make all \ make all \
ETCDIR=%{_sysconfdir} \ ETCDIR=%{_sysconfdir} \
SBINDIR=%{_sbindir} \ SBINDIR=%{_sbindir} \
MANDIR=%{_mandir} \ MANDIR=%{_mandir} \
CFLAGS="-Wall $RPM_OPT_FLAGS -Werror" CFLAGS="-Wall -Werror $RPM_OPT_FLAGS $RPM_LD_FLAGS $ARCH_OPT_FLAGS"
%install %install
mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
@ -55,24 +49,13 @@ install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir}
install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service
%post %post
if [ $1 -eq 1 ] ; then %systemd_post cachefilesd.service
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun %preun
if [ $1 -eq 0 ] ; then %systemd_preun cachefilesd.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable cachefilesd.service > /dev/null 2>&1 || :
/bin/systemctl stop cachefilesd.service > /dev/null 2>&1 || :
fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart cachefilesd.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart cachefilesd.service >/dev/null 2>&1 || :
fi
%files %files
%doc README %doc README
@ -88,6 +71,11 @@ fi
%{_localstatedir}/cache/fscache %{_localstatedir}/cache/fscache
%changelog %changelog
* Wed Feb 17 2016 David Howells <dhowells@redhat.com> 0.10.8-1
- Use systemd interaction macros in specfile installation sections [RH BZ 850053].
- Fix the service file to use /usr/sbin/ rather than /sbin/.
- Turn on RELRO and PIE build hardening in RPM builds.
* Wed Feb 3 2016 David Howells <dhowells@redhat.com> 0.10.7-1 * Wed Feb 3 2016 David Howells <dhowells@redhat.com> 0.10.7-1
- Call setgroups() before calling setuid() (caught by rpmlint). - Call setgroups() before calling setuid() (caught by rpmlint).

View File

@ -1 +1 @@
ea607d63a2f58cec7ef705bcefc717f4 cachefilesd-0.10.7.tar.bz2 7851b4db0e4a6fcf26f908c27e3a6fcd cachefilesd-0.10.8.tar.bz2