From ba912d68c4c1da5587974064632d12493c284ca9 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 17 Feb 2016 14:20:07 +0000 Subject: [PATCH] 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. --- cachefilesd.spec | 36 ++++++++++++------------------------ sources | 2 +- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/cachefilesd.spec b/cachefilesd.spec index a8d5500..47b133c 100644 --- a/cachefilesd.spec +++ b/cachefilesd.spec @@ -1,7 +1,7 @@ # % define buildid .local Name: cachefilesd -Version: 0.10.7 +Version: 0.10.8 Release: 1%{?dist}%{?buildid} Summary: CacheFiles user-space management daemon Group: System Environment/Daemons @@ -15,6 +15,8 @@ Requires(preun): systemd-units Requires(postun): systemd-units Requires: selinux-policy-base >= 3.7.19-5 +%define _hardened_build 1 + %description 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 @@ -26,19 +28,11 @@ the local disk. %setup -q %build -%ifarch s390 s390x -PIE="-fPIE" -%else -PIE="-fpie" -%endif -export PIE -CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" - make all \ ETCDIR=%{_sysconfdir} \ SBINDIR=%{_sbindir} \ MANDIR=%{_mandir} \ - CFLAGS="-Wall $RPM_OPT_FLAGS -Werror" + CFLAGS="-Wall -Werror $RPM_OPT_FLAGS $RPM_LD_FLAGS $ARCH_OPT_FLAGS" %install mkdir -p %{buildroot}%{_sbindir} @@ -55,24 +49,13 @@ install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir} install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post cachefilesd.service %preun -if [ $1 -eq 0 ] ; then - # 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 +%systemd_preun cachefilesd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart cachefilesd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart cachefilesd.service %files %doc README @@ -88,6 +71,11 @@ fi %{_localstatedir}/cache/fscache %changelog +* Wed Feb 17 2016 David Howells 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 0.10.7-1 - Call setgroups() before calling setuid() (caught by rpmlint). diff --git a/sources b/sources index 5cf5771..5440a8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea607d63a2f58cec7ef705bcefc717f4 cachefilesd-0.10.7.tar.bz2 +7851b4db0e4a6fcf26f908c27e3a6fcd cachefilesd-0.10.8.tar.bz2