Several distinct fixes

Filesystem has a dependency on /bin/sh (#1306489)
Add /usr/share/X11/fonts/ to default filesystem (#2107447)
Remove obsolete and forbidden Group tag
Own zsh and fish completions directories (rhbz#1312594)
Improve directory creation to avoid 'Argument list too long' error
This commit is contained in:
Martin Osvald 2022-08-03 14:59:32 +02:00
parent 6e008c5d67
commit 47d37ac941

View File

@ -1,10 +1,9 @@
Summary: The basic directory layout for a Linux system
Name: filesystem
Version: 3.16
Release: 4%{?dist}
Version: 3.18
Release: 1%{?dist}
License: Public Domain
URL: https://pagure.io/filesystem
Group: System Environment/Base
Source1: https://pagure.io/filesystem/raw/master/f/lang-exceptions
Source2: iso_639.sed
Source3: iso_3166.sed
@ -42,14 +41,17 @@ install -p -c -m755 %SOURCE3 %{buildroot}/iso_3166.sed
cd %{buildroot}
mkdir -p afs boot dev \
Paths=(
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} \
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,systemd/{system,user},sysusers.d,tmpfiles.d},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,systemd/{system,user},sysusers.d,tmpfiles.d},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,fish/vendor_completions.d,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/fonts,wayland-sessions,zsh/site-functions},src,src/kernels,src/debug} \
var/{adm,empty,ftp,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache/bpf,opt,games,yp}
)
for i in "${Paths[@]}"; do
mkdir -p "$i"
done
#do not create the symlink atm.
#ln -snf etc/sysconfig etc/default
ln -snf ../var/tmp usr/tmp
ln -snf spool/mail var/mail
ln -snf usr/bin bin
@ -165,17 +167,24 @@ posix.symlink("../run", "/var/run")
posix.symlink("../run/lock", "/var/lock")
return 0
%posttrans
#we need to restorecon on some dirs created in %pretrans or by other packages
restorecon /var 2>/dev/null >/dev/null || :
restorecon /var/run 2>/dev/null >/dev/null || :
restorecon /var/lock 2>/dev/null >/dev/null || :
restorecon -r /usr/lib/debug/ 2>/dev/null >/dev/null || :
restorecon /sys 2>/dev/null >/dev/null || :
restorecon /boot 2>/dev/null >/dev/null || :
restorecon /dev 2>/dev/null >/dev/null || :
restorecon /media 2>/dev/null >/dev/null || :
restorecon /afs 2>/dev/null >/dev/null || :
%posttrans -p <lua>
--# we need to restorecon on some dirs created in %pretrans or by other packages
if posix.access ("/usr/sbin/restorecon", "x") then
local pid = posix.fork()
if pid == 0 then
posix.exec("/usr/sbin/restorecon", "/var")
posix.exec("/usr/sbin/restorecon", "/var/run")
posix.exec("/usr/sbin/restorecon", "/var/lock")
posix.exec("/usr/sbin/restorecon", "-r", "/usr/lib/debug/")
posix.exec("/usr/sbin/restorecon", "/sys")
posix.exec("/usr/sbin/restorecon", "/boot")
posix.exec("/usr/sbin/restorecon", "/dev")
posix.exec("/usr/sbin/restorecon", "/media")
posix.exec("/usr/sbin/restorecon", "/afs")
elseif pid > 0 then
posix.wait(pid)
end
end
%files content
%dir %{_datadir}/filesystem
@ -222,6 +231,11 @@ restorecon /afs 2>/dev/null >/dev/null || :
/usr/include
%dir %attr(555,root,root) /usr/lib
%dir /usr/lib/sysimage
%dir /usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/user
%dir /usr/lib/sysusers.d
%dir /usr/lib/tmpfiles.d
%dir /usr/lib/locale
%dir /usr/lib/modules
%dir /usr/lib/debug
@ -229,7 +243,7 @@ restorecon /afs 2>/dev/null >/dev/null || :
%ghost /usr/lib/debug/bin
%ghost /usr/lib/debug/lib
%ghost /usr/lib/debug/%{_lib}
%ghost /usr/lib/debug/usr
%ghost %dir /usr/lib/debug/usr
%ghost /usr/lib/debug/usr/bin
%ghost /usr/lib/debug/usr/sbin
%ghost /usr/lib/debug/usr/lib
@ -237,9 +251,6 @@ restorecon /afs 2>/dev/null >/dev/null || :
%ghost /usr/lib/debug/usr/.dwz
%ghost /usr/lib/debug/sbin
%attr(555,root,root) /usr/lib/games
%dir /usr/lib/sysusers.d
/usr/lib/systemd
%dir /usr/lib/tmpfiles.d
%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64
%attr(555,root,root) /usr/%{_lib}
%else
@ -263,6 +274,7 @@ restorecon /afs 2>/dev/null >/dev/null || :
/usr/share/dict
/usr/share/doc
%attr(555,root,root) %dir /usr/share/empty
/usr/share/fish
/usr/share/games
/usr/share/gnome
/usr/share/help
@ -280,8 +292,10 @@ restorecon /afs 2>/dev/null >/dev/null || :
/usr/share/sounds
/usr/share/themes
/usr/share/xsessions
/usr/share/X11
%dir /usr/share/X11
/usr/share/X11/fonts
/usr/share/wayland-sessions
/usr/share/zsh
/usr/src
/usr/tmp
%dir /var
@ -308,6 +322,16 @@ restorecon /afs 2>/dev/null >/dev/null || :
/var/yp
%changelog
* Tue Jul 26 2022 Martin Osvald <mosvald@redhat.com> - 3.18-1
- Filesystem has a dependency on /bin/sh (#1306489)
- Add /usr/share/X11/fonts/ to default filesystem (#2107447)
- Remove obsolete and forbidden Group tag
- Own zsh and fish completions directories (rhbz#1312594)
- Improve directory creation to avoid 'Argument list too long' error
* Mon Jul 25 2022 Debarshi Ray <rishi@fedoraproject.org> - 3.17-1
- Assume ownership of /usr/lib/tmpfiles.d
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
@ -464,7 +488,7 @@ restorecon /afs 2>/dev/null >/dev/null || :
* Sun Jun 30 2013 Ondrej Vasik <ovasik@redhat.com> - 3.2-17
- .dwz symlink is needed as well (#974130)
* Wed Jun 20 2013 Ondrej Vasik <ovasik@redhat.com> - 3.2-16
* Thu Jun 20 2013 Ondrej Vasik <ovasik@redhat.com> - 3.2-16
- /var/run and /var/lock can't be in payload for some reason
* Wed Jun 19 2013 Ondrej Vasik <ovasik@redhat.com> - 3.2-15