create and own file with the content of filesystem package

This commit is contained in:
Ondřej Vašík 2017-10-05 14:08:39 +02:00
parent 47cc2652a7
commit cfe0ceb227

View File

@ -1,7 +1,7 @@
Summary: The basic directory layout for a Linux system
Name: filesystem
Version: 3.3
Release: 3%{?dist}
Version: 3.4
Release: 1%{?dist}
License: Public Domain
URL: https://pagure.io/filesystem
Group: System Environment/Base
@ -17,6 +17,16 @@ on a Linux system. Filesystem contains the basic directory layout
for a Linux operating system, including the correct permissions for
the directories.
%package content
Summary: Directory ownership content of the filesystem package
License: Public Domain
%description content
This subpackage of filesystem package contains just the file with
the directories owned by the filesystem package. This can be used
during the build process instead of calling rpm -ql filesystem.
%prep
rm -f $RPM_BUILD_DIR/filelist
@ -107,6 +117,10 @@ for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do
echo "/usr/share/man/$i" >>$RPM_BUILD_DIR/filelist
done
mkdir -p %{buildroot}/usr/share/filesystem
#find all dirs in the buildroot owned by filesystem and store them
find %{buildroot} -type d | sed -e 's|%{buildroot}||g' >>%{buildroot}%{_datadir}/filesystem/paths
%clean
rm -rf %{buildroot}
@ -159,8 +173,12 @@ restorecon /proc 2>/dev/null >/dev/null || :
restorecon /dev 2>/dev/null >/dev/null || :
restorecon /media 2>/dev/null >/dev/null || :
%files content
%dir %{_datadir}/filesystem
%{_datadir}/filesystem/paths
%files -f filelist
%defattr(0755,root,root,-)
%defattr(0755,root,root,0755)
%dir %attr(555,root,root) /
/bin
%attr(555,root,root) /boot
@ -274,6 +292,9 @@ restorecon /media 2>/dev/null >/dev/null || :
/var/yp
%changelog
* Thu Oct 05 2017 Ondrej Vasik <ovasik@redhat.com> - 3.4-1
- create and own file with the content of filesystem package
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild