- Fix package for FTBFS and F20 UnversionedDocDirs (#992036)

- Use sed in %prep to substitute doc path references and to remove
  the references to the old cachefilesd-selinux package
- Remove obsolete spec items (buildroot definition, cleaning, %defattr)

[-Fix bogus dates in %changelog]
This commit is contained in:
Michael Schwendt 2013-12-22 12:43:09 +01:00
parent 9103a72521
commit 2040008091

View File

@ -2,14 +2,15 @@
Name: cachefilesd
Version: 0.10.5
Release: 5%{?dist}%{?buildid}
Release: 6%{?dist}%{?buildid}
Summary: CacheFiles user-space management daemon
Group: System Environment/Daemons
# TODO: source code and config file claim "GPLv2+"
License: GPLv2
URL: http://people.redhat.com/~dhowells/fscache/
# TODO: it's not a bzip2 file!
Source0: http://people.redhat.com/dhowells/fscache/cachefilesd-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
@ -24,6 +25,13 @@ the local disk.
%prep
%setup -q
# these should be fixed upstream
%if 0%{?fedora} && 0%{?fedora} >= 20
sed -i 's!\(/usr/share/doc/cachefilesd\)-[0-9\.\*]*/!\1/!g' cachefilesd.8 cachefilesd.conf.5 howto.txt README selinux/move-cache.txt
%endif
# that package doesn't exist anymore
sed -i 's!cachefilesd-selinux!cachefilesd!g' selinux/move-cache.txt
%build
%ifarch s390 s390x
PIE="-fPIE"
@ -36,21 +44,14 @@ CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
make all CFLAGS="$CFLAGS"
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/sbin
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}
mkdir -p %{buildroot}%{_localstatedir}/cache/fscache
make DESTDIR=%{buildroot} install
install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir}
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
if [ $1 -eq 1 ] ; then
@ -73,7 +74,6 @@ if [ $1 -ge 1 ] ; then
fi
%files
%defattr(-,root,root)
%doc README
%doc howto.txt
%doc selinux/move-cache.txt
@ -87,6 +87,12 @@ fi
%{_localstatedir}/cache/fscache
%changelog
* Sun Dec 22 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 0.10.5-6
- Fix package for FTBFS and F20 UnversionedDocDirs (#992036)
- Use sed in %%prep to substitute doc path references and to remove
the references to the old cachefilesd-selinux package
- Remove obsolete spec items (buildroot definition, cleaning, %%defattr)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
@ -144,13 +150,13 @@ fi
* Mon Jul 2 2007 David Howells <dhowells@redhat.com> 0.8-16
- Use stat64/fstatat64 to avoid EOVERFLOW errors from the kernel on large files.
* Tue Nov 15 2006 David Howells <dhowells@redhat.com> 0.8-15
* Wed Nov 15 2006 David Howells <dhowells@redhat.com> 0.8-15
- Made cachefilesd ask the kernel whether cullable objects are in use and omit
them from the cull table if they are.
- Made the size of cachefilesd's culling tables configurable.
- Updated the manual pages.
* Mon Nov 14 2006 David Howells <dhowells@redhat.com> 0.8-14
* Tue Nov 14 2006 David Howells <dhowells@redhat.com> 0.8-14
- Documented SELinux interaction.
* Fri Nov 10 2006 David Howells <dhowells@redhat.com> 0.8-11
@ -182,7 +188,7 @@ fi
- Added postun and preun rules so cachefilesd is stopped
and started when the rpm is updated or removed.
* Tue Aug 7 2006 Jesse Keating <jkeating@redhat.com> 0.4-2
* Mon Aug 7 2006 Jesse Keating <jkeating@redhat.com> 0.4-2
- require /sbin/chkconfig not /usr/bin/chkconfig
* Tue Aug 1 2006 David Howells <dhowells@redhat.com> 0.4-1