From f9067bfb8d0ae21854a0d10e2efe6cb239b48020 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 30 Nov 2011 11:22:54 +0000 Subject: [PATCH] Move to version 0.10.3 - Move to native systemd management [RH BZ 754811]. - Downgrade all the culling messages to debug level [RH BZ 660347]. - Fix the initscript to have the appropriate parseable description and exit codes. - Fix the Requires line on selinux-policy-base to be >=, not =. --- .gitignore | 1 + cachefilesd.spec | 57 ++++++++++++++++++++++++++++-------------------- sources | 2 +- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index dd9893f..ee18a24 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ cachefilesd-0.7.tar.bz2 cachefilesd-0.9.tar.bz2 cachefilesd-0.10.tar.bz2 cachefilesd-0.10.1.tar.bz2 +/cachefilesd-0.10.3.tar.bz2 diff --git a/cachefilesd.spec b/cachefilesd.spec index 7cc6dce..34d1911 100644 --- a/cachefilesd.spec +++ b/cachefilesd.spec @@ -1,6 +1,8 @@ +# % define buildid .local + Name: cachefilesd -Version: 0.10.1 -Release: 3%{?dist} +Version: 0.10.3 +Release: 1%{?dist}%{?buildid} Summary: CacheFiles userspace management daemon Group: System Environment/Daemons License: GPL @@ -8,9 +10,9 @@ URL: http://people.redhat.com/~dhowells/fscache/ Source0: http://people.redhat.com/dhowells/fscache/cachefilesd-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) -BuildRequires: automake, autoconf -Requires(post): /sbin/chkconfig, /sbin/service -Requires(preun): /sbin/chkconfig, /sbin/service +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units Requires: selinux-policy-base >= 3.7.19-5 %description @@ -35,7 +37,7 @@ make all %install rm -rf %{buildroot} mkdir -p %{buildroot}/sbin -mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d +mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_mandir}/{man5,man8} mkdir -p %{buildroot}/usr/share/doc/%{name}-%{version} mkdir -p %{buildroot}/usr/share/doc/%{name}-selinux-%{version} @@ -43,29 +45,30 @@ mkdir -p %{buildroot}%{_localstatedir}/cache/fscache make DESTDIR=%{buildroot} install install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir} -install -m 755 cachefilesd.initd %{buildroot}%{_sysconfdir}/rc.d/init.d/cachefilesd +install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service install -m 644 selinux/move-cache.txt %{buildroot}/usr/share/doc/%{name}-%{version}/ %clean rm -rf $RPM_BUILD_ROOT %post -/sbin/chkconfig --add %{name} - -if [ "$1" -ge 1 ]; then - /sbin/service cachefilesd condrestart > /dev/null +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %preun -if [ $1 -eq 0 ]; then - /sbin/service cachefilesd stop - /sbin/chkconfig --del %{name} +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 %postun -if [ $1 -eq 0 ]; then - # Fix up non-standard directory context - /sbin/restorecon -R %{_localstatedir}/cache/fscache || : +/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 %files @@ -77,19 +80,25 @@ fi %doc selinux/*.if %doc selinux/*.te %config(noreplace) %{_sysconfdir}/cachefilesd.conf -%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/cachefilesd /sbin/* +%{_unitdir}/* %{_mandir}/*/* %{_localstatedir}/cache/fscache %changelog -* Tue Feb 08 2011 Fedora Release Engineering - 0.10.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild +* Tue Nov 22 2011 David Howells 0.10.3-1 +- Move to native systemd management [RH BZ 754811]. -* Wed Apr 28 2010 Steve Dickson -- SELinux: Fix the RPM Requires dependency on selinux-policy-base +* Fri Jul 15 2011 David Howells 0.10.2-1 +- Downgrade all the culling messages to debug level [RH BZ 660347]. -* Fri Apr 23 2010 David Howells +* Fri Jun 18 2010 David Howells +- Fix the initscript to have the appropriate parseable description and exit codes. + +* Wed Apr 28 2010 David Howells +- Fix the Requires line on selinux-policy-base to be >=, not =. + +* Fri Apr 23 2010 David Howells 0.10.1-1 - The SELinux policies for cachefilesd now live in the selinux-policy RPM, so the cachefilesd-selinux RPM is now redundant. - Move the default cache dir to /var/cache/fscache. @@ -97,7 +106,7 @@ fi labels are correct. - Fix a wildchar that should be a literal dot in the SELinux policy. -* Thu Feb 25 2010 David Howells +* Thu Feb 25 2010 David Howells 0.10-1 - Fix the SELinux policies for cachefilesd. - Compress the installed policy files. diff --git a/sources b/sources index 96df24d..8dd93ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59da7af8efeb81bdc1d3e3df69cb6a44 cachefilesd-0.10.1.tar.bz2 +d77f692876d779c3c931a18fc2e10a1b cachefilesd-0.10.3.tar.bz2