46c814
# % define buildid .local
46c814
46c814
Name:		cachefilesd
46c814
Version:	0.10.10
46c814
Release:	4%{?dist}%{?buildid}
46c814
Summary:	CacheFiles user-space management daemon
46c814
Group:		System Environment/Daemons
46c814
License:	GPLv2+
46c814
URL:		http://people.redhat.com/~dhowells/fscache/
46c814
Source0:	http://people.redhat.com/dhowells/fscache/cachefilesd-%{version}.tar.bz2
46c814
46c814
BuildRequires: systemd-units
46c814
Requires(post): systemd-units
46c814
Requires(preun): systemd-units
46c814
Requires(postun): systemd-units
46c814
Requires: selinux-policy-base >= 3.7.19-5
46c814
46c814
%define _hardened_build 1
46c814
46c814
%description
46c814
The cachefilesd daemon manages the caching files and directory that are that
46c814
are used by network file systems such a AFS and NFS to do persistent caching to
46c814
the local disk.
46c814
46c814
%global docdir %{_docdir}/cachefilesd
46c814
46c814
%prep
46c814
%setup -q
46c814
46c814
%build
46c814
make all \
46c814
	ETCDIR=%{_sysconfdir} \
46c814
	SBINDIR=%{_sbindir} \
46c814
	MANDIR=%{_mandir} \
46c814
	CFLAGS="-Wall -Werror $RPM_OPT_FLAGS $RPM_LD_FLAGS $ARCH_OPT_FLAGS"
46c814
46c814
%install
46c814
mkdir -p %{buildroot}%{_sbindir}
46c814
mkdir -p %{buildroot}%{_unitdir}
46c814
mkdir -p %{buildroot}%{_mandir}/{man5,man8}
46c814
mkdir -p %{buildroot}%{_localstatedir}/cache/fscache
46c814
make DESTDIR=%{buildroot} install \
46c814
	ETCDIR=%{_sysconfdir} \
46c814
	SBINDIR=%{_sbindir} \
46c814
	MANDIR=%{_mandir} \
46c814
	CFLAGS="-Wall $RPM_OPT_FLAGS -Werror"
46c814
46c814
install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir}
46c814
install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service
46c814
46c814
%post
46c814
%systemd_post cachefilesd.service
46c814
46c814
%preun
46c814
%systemd_preun cachefilesd.service
46c814
46c814
%postun
46c814
%systemd_postun_with_restart cachefilesd.service
46c814
46c814
%files
46c814
%doc README
46c814
%doc howto.txt
46c814
%doc selinux/move-cache.txt
46c814
%doc selinux/*.fc
46c814
%doc selinux/*.if
46c814
%doc selinux/*.te
46c814
%config(noreplace) %{_sysconfdir}/cachefilesd.conf
46c814
%{_sbindir}/*
46c814
%{_unitdir}/*
46c814
%{_mandir}/*/*
46c814
%{_localstatedir}/cache/fscache
46c814
46c814
%changelog
46c814
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.10-4
46c814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
46c814
46c814
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.10-3
46c814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
46c814
46c814
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.10-2
46c814
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
46c814
46c814
* Wed Mar 7 2017 David Howells <dhowells@redhat.com> 0.10.10-1
46c814
- Stop using readdir_r [RH BZ 1423289].
46c814
46c814
* Wed Feb 17 2016 David Howells <dhowells@redhat.com> 0.10.9-1
46c814
- Fix name of directory in Makefile-generated tarball.
46c814
46c814
* Wed Feb 17 2016 David Howells <dhowells@redhat.com> 0.10.8-1
46c814
- Use systemd interaction macros in specfile installation sections [RH BZ 850053].
46c814
- Fix the service file to use /usr/sbin/ rather than /sbin/.
46c814
- Turn on RELRO and PIE build hardening in RPM builds.
46c814
46c814
* Wed Feb 3 2016 David Howells <dhowells@redhat.com> 0.10.7-1
46c814
- Call setgroups() before calling setuid() (caught by rpmlint).
46c814
46c814
* Wed Feb 3 2016 David Howells <dhowells@redhat.com> 0.10.6-1
46c814
- Note the correct licence.
46c814
- Handle malformed kernel status correctly.
46c814
- Permit culling to be disabled on the command line with the -N flag.
46c814
- Suspend culling when cache space is short and cache objects are pinned.
46c814
46c814
* Tue Dec 6 2011 David Howells <dhowells@redhat.com> 0.10.5-1
46c814
- Fix systemd service data according to review comments [RH BZ 754811].
46c814
46c814
* Tue Dec 6 2011 Dan HorĂ¡k <dan[at]danny.cz>
46c814
- use Fedora CFLAGS in build (fixes build on s390)
46c814
46c814
* Wed Nov 30 2011 David Howells <dhowells@redhat.com> 0.10.4-1
46c814
- Fix packaging of systemd service file [RH BZ 754811].
46c814
- Fix rpmlint complaints.
46c814
46c814
* Tue Nov 22 2011 David Howells <dhowells@redhat.com> 0.10.3-1
46c814
- Move to native systemd management [RH BZ 754811].
46c814
46c814
* Fri Jul 15 2011 David Howells <dhowells@redhat.com> 0.10.2-1
46c814
- Downgrade all the culling messages to debug level [RH BZ 660347].
46c814
46c814
* Fri Jun 18 2010 David Howells <dhowells@redhat.com>
46c814
- Fix the initscript to have the appropriate parseable description and exit codes.
46c814
46c814
* Wed Apr 28 2010 David Howells <dhowells@redhat.com>
46c814
- Fix the Requires line on selinux-policy-base to be >=, not =.
46c814
46c814
* Fri Apr 23 2010 David Howells <dhowells@redhat.com> 0.10.1-1
46c814
- The SELinux policies for cachefilesd now live in the selinux-policy RPM, so
46c814
  the cachefilesd-selinux RPM is now redundant.
46c814
- Move the default cache dir to /var/cache/fscache.
46c814
- Make the initscript do a restorecon when starting the cache to make sure the
46c814
  labels are correct.
46c814
- Fix a wildchar that should be a literal dot in the SELinux policy.
46c814
46c814
* Thu Feb 25 2010 David Howells <dhowells@redhat.com> 0.10-1
46c814
- Fix the SELinux policies for cachefilesd.
46c814
- Compress the installed policy files.
46c814
46c814
* Tue Feb 23 2010 David Howells <dhowells@redhat.com>
46c814
- Must include sys/stat.h to use stat() and co. [RH BZ 565135].
46c814
- Remove tail comments from functions.
46c814
46c814
* Thu Aug 9 2007 David Howells <dhowells@redhat.com> 0.9-1
46c814
- The cachefiles module no longer accepts directory fds on cull and inuse
46c814
  commands, but rather uses current working directory.
46c814
46c814
* Mon Jul 2 2007 David Howells <dhowells@redhat.com> 0.8-16
46c814
- Use stat64/fstatat64 to avoid EOVERFLOW errors from the kernel on large files.
46c814
46c814
* Tue Nov 14 2006 David Howells <dhowells@redhat.com> 0.8-15
46c814
- Made cachefilesd ask the kernel whether cullable objects are in use and omit
46c814
  them from the cull table if they are.
46c814
- Made the size of cachefilesd's culling tables configurable.
46c814
- Updated the manual pages.
46c814
46c814
* Mon Nov 13 2006 David Howells <dhowells@redhat.com> 0.8-14
46c814
- Documented SELinux interaction.
46c814
46c814
* Fri Nov 10 2006 David Howells <dhowells@redhat.com> 0.8-11
46c814
- Include SELinux policy for cachefilesd.
46c814
46c814
* Thu Oct 19 2006 Steve Dickson <steved@redhat.com> 0.7-3
46c814
- Fixed typo that was causing the howto.txt not to be installed.
46c814
46c814
* Tue Oct 17 2006 David Howells <dhowells@redhat.com> 0.8-1
46c814
- Use /dev/cachefiles if it present in preference to /proc/fs/cachefiles.
46c814
- Use poll rather than SIGURG on /dev/cachefilesd.
46c814
46c814
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 0.7-2
46c814
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
46c814
46c814
* Fri Sep 22 2006 Steve Dickson <steved@redhat.com> 0.7-1
46c814
- updated to 0.7 which adds the howto.txt
46c814
46c814
* Wed Aug 30 2006 Steve Dickson <steved@redhat.com> 0.6-1
46c814
- Fixed memory corruption problem
46c814
- Added the fcull/fstop/frun options
46c814
46c814
* Fri Aug 11 2006 Steve Dickson <steved@redhat.com> 0.5-1
46c814
- Upgraded to 0.5 which fixed initial scan problem when
46c814
  started on an empty cache (bz 202184)
46c814
46c814
* Tue Aug  8 2006 Steve Dickson <steved@redhat.com> 0.4-3
46c814
- Updated init.d script to look for cachefilesd in /sbin
46c814
- Added postun and preun rules so cachefilesd is stopped
46c814
  and started when the rpm is updated or removed.
46c814
46c814
* Tue Aug  8 2006 Jesse Keating <jkeating@redhat.com> 0.4-2
46c814
- require /sbin/chkconfig not /usr/bin/chkconfig
46c814
46c814
* Tue Aug  1 2006 David Howells <dhowells@redhat.com> 0.4-1
46c814
- Discard use of autotools
46c814
46c814
* Tue Aug  1 2006 Steve Dickson <steved@redhat.com> 0.3-3
46c814
- Added URL to source file
46c814
46c814
* Fri Jul 28 2006 Steve Dickson <steved@redhat.com> 0.3-2
46c814
- Added post and preun rules
46c814
- Changed init.d script to up right before portmapper.
46c814
46c814
* Fri Jun  9 2006 Steve Dickson <steved@redhat.com> 0.3-1
46c814
- Incorporated David Howells manual page updates
46c814
46c814
* Thu Jun  8 2006 Steve Dickson <steved@redhat.com> 0.2-1
46c814
- Made the daemon 64-bit application.
46c814
- Changed the syslog logging to log the daemon's PID
46c814
- Changed OS error logging to log errno number as well the string
46c814
46c814
* Sat Apr 22 2006 Steve Dickson <steved@redhat.com> 0.1-1
46c814
- Initial commit