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