Move /afs into main package

Resolves: #1989202
This commit is contained in:
Pavel Zhukov 2021-08-03 18:22:50 +02:00
parent 7676472f5e
commit 6a778e829b

View File

@ -1,7 +1,7 @@
Summary: The basic directory layout for a Linux system Summary: The basic directory layout for a Linux system
Name: filesystem Name: filesystem
Version: 3.14 Version: 3.16
Release: 8%{?dist} Release: 1%{?dist}
License: Public Domain License: Public Domain
URL: https://pagure.io/filesystem URL: https://pagure.io/filesystem
Group: System Environment/Base Group: System Environment/Base
@ -11,6 +11,9 @@ Source3: iso_3166.sed
BuildRequires: iso-codes BuildRequires: iso-codes
Requires(pre): setup Requires(pre): setup
Provides: filesystem-afs = %{version}-%{release}
Obsoletes: filesystem-afs <= 3.14-2
%description %description
The filesystem package is one of the basic packages that is installed The filesystem package is one of the basic packages that is installed
on a Linux system. Filesystem contains the basic directory layout on a Linux system. Filesystem contains the basic directory layout
@ -26,15 +29,6 @@ This subpackage of filesystem package contains just the file with
the directories owned by the filesystem package. This can be used the directories owned by the filesystem package. This can be used
during the build process instead of calling rpm -ql filesystem. during the build process instead of calling rpm -ql filesystem.
%package afs
Summary: AFS root directory from the filesystem package
License: Public Domain
%description afs
This subpackage of filesystem package contains just the AFS filesystem
dynamic root directory. This can be used with packages that add an
AFS client.
%prep %prep
rm -f $RPM_BUILD_DIR/filelist rm -f $RPM_BUILD_DIR/filelist
@ -48,7 +42,7 @@ install -p -c -m755 %SOURCE3 %{buildroot}/iso_3166.sed
cd %{buildroot} cd %{buildroot}
mkdir -p boot dev \ mkdir -p afs boot dev \
etc/{X11/{applnk,fontpath.d,xinit/{xinitrc,xinput}.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},skel,sysconfig,pki,bash_completion.d,rwtab.d,statetab.d} \ etc/{X11/{applnk,fontpath.d,xinit/{xinitrc,xinput}.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},skel,sysconfig,pki,bash_completion.d,rwtab.d,statetab.d} \
home media mnt opt root run srv tmp \ home media mnt opt root run srv tmp \
usr/{bin,games,include,%{_lib}/{bpf,games,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug/{.dwz,usr},games,locale,modules,sysimage},libexec,local/{bin,etc,games,lib,%{_lib}/bpf,sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,appdata,applications,augeas/lenses,backgrounds,bash-completion{,/completions,/helpers},desktop-directories,dict,doc,empty,games,gnome,help,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},metainfo,mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11,wayland-sessions},src,src/kernels,src/debug} \ usr/{bin,games,include,%{_lib}/{bpf,games,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug/{.dwz,usr},games,locale,modules,sysimage},libexec,local/{bin,etc,games,lib,%{_lib}/bpf,sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,appdata,applications,augeas/lenses,backgrounds,bash-completion{,/completions,/helpers},desktop-directories,dict,doc,empty,games,gnome,help,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},metainfo,mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11,wayland-sessions},src,src/kernels,src/debug} \
@ -130,8 +124,6 @@ mkdir -p %{buildroot}/usr/share/filesystem
find %{buildroot} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \ find %{buildroot} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \
| LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths | LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths
mkdir -p afs
%pretrans -p <lua> %pretrans -p <lua>
--# If we are running in pretrans in a fresh root, there is no /usr and --# If we are running in pretrans in a fresh root, there is no /usr and
--# symlinks. We cannot be sure, to be the very first rpm in the --# symlinks. We cannot be sure, to be the very first rpm in the
@ -162,17 +154,8 @@ posix.symlink("usr/%{_lib}", "/%{_lib}")
posix.mkdir("/run") posix.mkdir("/run")
posix.mkdir("/proc") posix.mkdir("/proc")
posix.mkdir("/sys") posix.mkdir("/sys")
posix.chmod("/proc", 0555)
st = posix.stat("/proc") posix.chmod("/sys", 0555)
if st and st.mode ~= 0555 then
posix.chmod("/proc", 0555)
end
st = posix.stat("/sys")
if st and st.mode ~= 0555 then
posix.chmod("/sys", 0555)
end
st = posix.stat("/media") st = posix.stat("/media")
if st and st.type == "link" then if st and st.type == "link" then
os.remove("/media") os.remove("/media")
@ -192,22 +175,20 @@ restorecon /sys 2>/dev/null >/dev/null || :
restorecon /boot 2>/dev/null >/dev/null || : restorecon /boot 2>/dev/null >/dev/null || :
restorecon /dev 2>/dev/null >/dev/null || : restorecon /dev 2>/dev/null >/dev/null || :
restorecon /media 2>/dev/null >/dev/null || : restorecon /media 2>/dev/null >/dev/null || :
%posttrans afs
restorecon /afs 2>/dev/null >/dev/null || : restorecon /afs 2>/dev/null >/dev/null || :
%files content %files content
%dir %{_datadir}/filesystem %dir %{_datadir}/filesystem
%{_datadir}/filesystem/paths %{_datadir}/filesystem/paths
%files afs
%attr(555,root,root) /afs
%files -f filelist %files -f filelist
%defattr(0755,root,root,0755) %defattr(0755,root,root,0755)
%dir %attr(555,root,root) / %dir %attr(555,root,root) /
/bin /bin
%attr(555,root,root) /boot %attr(555,root,root) /boot
%attr(555,root,root) /afs
/dev /dev
%dir /etc %dir /etc
/etc/X11 /etc/X11
@ -324,28 +305,13 @@ restorecon /afs 2>/dev/null >/dev/null || :
/var/yp /var/yp
%changelog %changelog
* Wed Jul 7 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.14-8 * Tue Aug 3 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.15-1
- Drop /afs from -content - Move /afs into main package
* Mon Jun 21 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.14-7
- Check mode before changing it
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.14-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Aug 07 2020 Pavel Raiskup <praiskup@redhat.com> - 3.14-4 * Fri Aug 07 2020 Pavel Raiskup <praiskup@redhat.com> - 3.14-4
- /proc and /sys made %%ghost to allow filesystem package updates in rootless - /proc and /sys made %%ghost to allow filesystem package updates in rootless
container environments (rhbz#1548403) container environments (rhbz#1548403)
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 27 2020 Ondrej Vasik <ovasik@redhat.com> - 3.14-1 * Mon Jan 27 2020 Ondrej Vasik <ovasik@redhat.com> - 3.14-1
- do not restore context of /proc (#1722766) - do not restore context of /proc (#1722766)