Compare commits

..

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

12 changed files with 435 additions and 304 deletions

View File

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

1
.gitignore vendored
View File

@ -0,0 +1 @@
/filesystem.conf

View File

@ -1,328 +1,80 @@
Summary: The basic directory layout for a Linux system
Name: filesystem
Version: 3.8
Release: 6%{?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
BuildRequires: iso-codes
Requires(pre): setup
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.18-9
- Bump release for June 2024 mass rebuild
%description
The filesystem package is one of the basic packages that is installed
on a Linux system. Filesystem contains the basic directory layout
for a Linux operating system, including the correct permissions for
the directories.
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
%package content
Summary: Directory ownership content of the filesystem package
License: Public Domain
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
%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.
* Fri Jul 21 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 3.18-6
- Add /etc/keys for initrd/kernel related keys
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
%prep
rm -f $RPM_BUILD_DIR/filelist
* Tue Feb 21 2023 Than Ngo <than@redhat.com> - 3.18-4
- migrated to SPDX license
%build
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
%install
rm -rf %{buildroot}
mkdir %{buildroot}
install -p -c -m755 %SOURCE2 %{buildroot}/iso_639.sed
install -p -c -m755 %SOURCE3 %{buildroot}/iso_3166.sed
* Tue Aug 09 2022 Martin Osvald <mosvald@redhat.com> - 3.18-2
- Filesystem has a dependency on /bin/sh (rhbz#1306489)
cd %{buildroot}
* 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
mkdir -p boot dev \
etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki,bash_completion.d} \
home media mnt opt proc root run srv sys tmp \
usr/{bin,games,include,%{_lib}/{bpf,games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug/{.dwz,usr},games,locale,modules,sysimage,sse2},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} \
var/{adm,empty,ftp,gopher,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache/bpf,opt,games,yp}
* Mon Jul 25 2022 Debarshi Ray <rishi@fedoraproject.org> - 3.17-1
- Assume ownership of /usr/lib/tmpfiles.d
#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
ln -snf usr/sbin sbin
ln -snf usr/lib lib
ln -snf usr/%{_lib} %{_lib}
ln -snf ../run var/run
ln -snf ../run/lock var/lock
ln -snf usr/bin usr/lib/debug/bin
ln -snf usr/lib usr/lib/debug/lib
ln -snf usr/%{_lib} usr/lib/debug/%{_lib}
ln -snf ../.dwz usr/lib/debug/usr/.dwz
ln -snf usr/sbin usr/lib/debug/sbin
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
>%{buildroot}/iso_639.tab
sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \
>%{buildroot}/iso_3166.tab
* Thu Jan 20 2022 Petr Menšík <pemensik@redhat.com> - 3.16-3
- Include systemd directories for %unitdir and similar
grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
[[ "$d" =~ "^Reserved" ]] && continue
[[ "$d" =~ "^No linguistic" ]] && continue
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
locale=$c
if [ "$locale" = "XX" ]; then
locale=$b
fi
echo "%lang(${locale}) /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist
echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist
done
cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do
locale=$loc
locality=
special=
[[ "$locale" =~ "@" ]] && locale=${locale%%%%@*}
[[ "$locale" =~ "_" ]] && locality=${locale##*_}
[[ "$locality" =~ "." ]] && locality=${locality%%%%.*}
[[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc
* Tue Aug 3 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.15-1
- Move /afs into main package
# If the locality is not official, skip it
if [ -n "$locality" ]; then
grep -q "^$locality" %{buildroot}/iso_3166.tab || continue
fi
# If the locale is not official and not special, skip it
if [ -z "$special" ]; then
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \
%{buildroot}/iso_639.tab || continue
fi
echo "%lang(${locale}) /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist
echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist
done
* Fri Aug 07 2020 Pavel Raiskup <praiskup@redhat.com> - 3.14-4
- /proc and /sys made %%ghost to allow filesystem package updates in rootless
container environments (rhbz#1548403)
rm -f %{buildroot}/iso_639.tab
rm -f %{buildroot}/iso_639.sed
rm -f %{buildroot}/iso_3166.tab
rm -f %{buildroot}/iso_3166.sed
* Mon Jan 27 2020 Ondrej Vasik <ovasik@redhat.com> - 3.14-1
- do not restore context of /proc (#1722766)
cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
done
* Wed Dec 18 2019 Ondrej Vasik <ovasik@redhat.com> - 3.13-1
- add ownership for eBPF bytecode files directories (#1781646)
cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do
mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
done
* Thu Jun 20 2019 David Howells <dhowells@redhat.com> - 3.12-1
- add new -afs supbackage for /afs directory (#FPC888,#1720232)
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
* Mon Apr 29 2019 Ondrej Vasik <ovasik@redhat.com> - 3.11-1
- drop ownership for /etc/xinet.d (#1691146)
- drop ownership for %{_libdir}/tls, %{_libdir}/sse2 (#1702329)
mkdir -p %{buildroot}/usr/share/filesystem
#find all dirs in the buildroot owned by filesystem and store them
find %{buildroot} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \
| LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths
* Mon Feb 11 2019 Ondrej Vasik <ovasik@redhat.com> - 3.10-1
- drop legacy /var/gopher (#1667231)
%clean
rm -rf %{buildroot}
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
%pretrans -p <lua>
--# 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
--# transaction list. Let's create the needed base directories and symlinks
--# here, to place the files from other packages in the right locations.
--# When our rpm is unpacked by cpio, it will set all permissions and modes
--# later.
posix.mkdir("/usr")
posix.mkdir("/usr/bin")
posix.mkdir("/usr/sbin")
posix.mkdir("/usr/lib")
posix.mkdir("/usr/lib/debug")
posix.mkdir("/usr/lib/debug/usr/")
posix.mkdir("/usr/lib/debug/usr/bin")
posix.mkdir("/usr/lib/debug/usr/sbin")
posix.mkdir("/usr/lib/debug/usr/lib")
posix.mkdir("/usr/lib/debug/usr/%{_lib}")
posix.mkdir("/usr/%{_lib}")
posix.symlink("usr/bin", "/bin")
posix.symlink("usr/sbin", "/sbin")
posix.symlink("usr/lib", "/lib")
posix.symlink("usr/bin", "/usr/lib/debug/bin")
posix.symlink("usr/lib", "/usr/lib/debug/lib")
posix.symlink("usr/%{_lib}", "/usr/lib/debug/%{_lib}")
posix.symlink("../.dwz", "/usr/lib/debug/usr/.dwz")
posix.symlink("usr/sbin", "/usr/lib/debug/sbin")
posix.symlink("usr/%{_lib}", "/%{_lib}")
posix.mkdir("/run")
posix.mkdir("/proc")
posix.mkdir("/sys")
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
st = posix.stat("/proc")
if st and st.mode ~= 0555 then
posix.chmod("/proc", 0555)
end
* Thu Jun 21 2018 Ondrej Vasik <ovasik@redhat.com> - 3.9-1
- add ownership of /etc/rwtab.d and /etc/statetab.d
st = posix.stat("/sys")
if st and st.mode ~= 0555 then
posix.chmod("/sys", 0555)
end
st = posix.stat("/media")
if st and st.type == "link" then
os.remove("/media")
end
posix.mkdir("/var")
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 /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,0755)
%dir %attr(555,root,root) /
/bin
%attr(555,root,root) /boot
/dev
%dir /etc
/etc/X11
/etc/xdg
/etc/opt
/etc/pm
/etc/xinetd.d
/etc/skel
/etc/sysconfig
/etc/pki
/etc/bash_completion.d/
/home
/lib
%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64
/%{_lib}
%endif
/media
%dir /mnt
%dir /opt
%ghost %attr(555,root,root) /proc
%ghost %attr(555,root,root) /sys
%attr(550,root,root) /root
/run
/sbin
/srv
%attr(1777,root,root) /tmp
%dir /usr
%attr(555,root,root) /usr/bin
/usr/games
/usr/include
%dir %attr(555,root,root) /usr/lib
%dir /usr/lib/sysimage
%dir /usr/lib/locale
%dir /usr/lib/modules
%dir /usr/lib/debug
%dir /usr/lib/debug/.dwz
%ghost /usr/lib/debug/bin
%ghost /usr/lib/debug/lib
%ghost /usr/lib/debug/%{_lib}
%ghost /usr/lib/debug/usr
%ghost /usr/lib/debug/usr/bin
%ghost /usr/lib/debug/usr/sbin
%ghost /usr/lib/debug/usr/lib
%ghost /usr/lib/debug/usr/%{_lib}
%ghost /usr/lib/debug/usr/.dwz
%ghost /usr/lib/debug/sbin
%attr(555,root,root) /usr/lib/games
%attr(555,root,root) /usr/lib/sse2
%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64
%attr(555,root,root) /usr/%{_lib}
%else
%attr(555,root,root) /usr/lib/tls
%attr(555,root,root) /usr/lib/X11
%attr(555,root,root) /usr/lib/bpf
%attr(555,root,root) /usr/lib/pm-utils
%endif
/usr/libexec
/usr/local
%attr(555,root,root) /usr/sbin
%dir /usr/share
/usr/share/aclocal
/usr/share/appdata
/usr/share/applications
/usr/share/augeas
/usr/share/backgrounds
%dir /usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/helpers
/usr/share/desktop-directories
/usr/share/dict
/usr/share/doc
%attr(555,root,root) %dir /usr/share/empty
/usr/share/games
/usr/share/gnome
/usr/share/help
/usr/share/icons
/usr/share/idl
/usr/share/info
%dir /usr/share/licenses
%dir /usr/share/locale
%dir /usr/share/man
/usr/share/metainfo
/usr/share/mime-info
/usr/share/misc
/usr/share/omf
/usr/share/pixmaps
/usr/share/sounds
/usr/share/themes
/usr/share/xsessions
/usr/share/X11
/usr/share/wayland-sessions
/usr/src
/usr/tmp
%dir /var
/var/adm
%dir /var/cache
/var/cache/bpf
/var/db
/var/empty
/var/ftp
/var/games
/var/gopher
/var/lib
/var/local
%ghost /var/lock
/var/log
/var/mail
/var/nis
/var/opt
/var/preserve
%ghost /var/run
%dir /var/spool
%attr(755,root,root) /var/spool/lpd
%attr(775,root,mail) /var/spool/mail
%attr(1777,root,root) /var/tmp
/var/yp
%changelog
* Mon Jun 21 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.8-6
- Make /proc and /sys ghost to workaround issue in container
- Revert restorecon change
* Thu Apr 23 2020 Pavel Zhukov <pzhukov@redhat.com> - 3.8-4
- Do not restore content of /proc (#1827087)
* Wed Apr 22 2020 Pavel Zhukov <pavel@desktop.zhukoff.net> - 3.8-3
- Add BPF directories (#1788999)
* Tue Feb 20 2018 Adam Jackson <ajax@redhat.com> - 3.8-3
- own /etc/X11/xinit/{,{xinitrc,xinput}.d}
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
@ -436,7 +188,7 @@ restorecon /media 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
@ -864,7 +616,7 @@ restorecon /media 2>/dev/null >/dev/null || :
* Mon Aug 28 1999 Preston Brown <pbrown@redhat.com>
- added /opt, /var/state, /var/cache for FHS compliance (#3966)
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 4)
* Sun Jan 17 1999 Jeff Johnson <jbj@redhat.com>

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

314
filesystem.spec Normal file
View File

@ -0,0 +1,314 @@
Summary: The basic directory layout for a Linux system
Name: filesystem
Version: 3.18
Release: %autorelease
License: LicenseRef-Fedora-Public-Domain
URL: https://pagure.io/filesystem
Source1: https://pagure.io/filesystem/raw/master/f/lang-exceptions
Source2: iso_639.sed
Source3: iso_3166.sed
BuildRequires: iso-codes
Requires(pre): setup
Provides: filesystem-afs = %{version}-%{release}
Obsoletes: filesystem-afs <= 3.14-2
%description
The filesystem package is one of the basic packages that is installed
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
%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
%build
%install
rm -rf %{buildroot}
mkdir %{buildroot}
install -p -c -m755 %SOURCE2 %{buildroot}/iso_639.sed
install -p -c -m755 %SOURCE3 %{buildroot}/iso_3166.sed
cd %{buildroot}
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,keys/ima,pki,bash_completion.d,default,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,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
ln -snf ../var/tmp usr/tmp
ln -snf spool/mail var/mail
ln -snf usr/bin bin
ln -snf usr/sbin sbin
ln -snf usr/lib lib
ln -snf usr/%{_lib} %{_lib}
ln -snf ../run var/run
ln -snf ../run/lock var/lock
ln -snf usr/bin usr/lib/debug/bin
ln -snf usr/lib usr/lib/debug/lib
ln -snf usr/%{_lib} usr/lib/debug/%{_lib}
ln -snf ../.dwz usr/lib/debug/usr/.dwz
ln -snf usr/sbin usr/lib/debug/sbin
sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
>%{buildroot}/iso_639.tab
sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \
>%{buildroot}/iso_3166.tab
grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
[[ "$d" =~ "^Reserved" ]] && continue
[[ "$d" =~ "^No linguistic" ]] && continue
locale=$c
if [ "$locale" = "XX" ]; then
locale=$b
fi
echo "%lang(${locale}) /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist
echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist
done
cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do
locale=$loc
locality=
special=
[[ "$locale" =~ "@" ]] && locale=${locale%%%%@*}
[[ "$locale" =~ "_" ]] && locality=${locale##*_}
[[ "$locality" =~ "." ]] && locality=${locality%%%%.*}
[[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc
# If the locality is not official, skip it
if [ -n "$locality" ]; then
grep -q "^$locality" %{buildroot}/iso_3166.tab || continue
fi
# If the locale is not official and not special, skip it
if [ -z "$special" ]; then
egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \
%{buildroot}/iso_639.tab || continue
fi
echo "%lang(${locale}) /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist
echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist
done
rm -f %{buildroot}/iso_639.tab
rm -f %{buildroot}/iso_639.sed
rm -f %{buildroot}/iso_3166.tab
rm -f %{buildroot}/iso_3166.sed
cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do
mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
done
cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do
mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
done
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} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \
| LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths
%pretrans -p <lua>
--# 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
--# transaction list. Let's create the needed base directories and symlinks
--# here, to place the files from other packages in the right locations.
--# When our rpm is unpacked by cpio, it will set all permissions and modes
--# later.
posix.mkdir("/usr")
posix.mkdir("/usr/bin")
posix.mkdir("/usr/sbin")
posix.mkdir("/usr/lib")
posix.mkdir("/usr/lib/debug")
posix.mkdir("/usr/lib/debug/usr/")
posix.mkdir("/usr/lib/debug/usr/bin")
posix.mkdir("/usr/lib/debug/usr/sbin")
posix.mkdir("/usr/lib/debug/usr/lib")
posix.mkdir("/usr/lib/debug/usr/%{_lib}")
posix.mkdir("/usr/%{_lib}")
posix.symlink("usr/bin", "/bin")
posix.symlink("usr/sbin", "/sbin")
posix.symlink("usr/lib", "/lib")
posix.symlink("usr/bin", "/usr/lib/debug/bin")
posix.symlink("usr/lib", "/usr/lib/debug/lib")
posix.symlink("usr/%{_lib}", "/usr/lib/debug/%{_lib}")
posix.symlink("../.dwz", "/usr/lib/debug/usr/.dwz")
posix.symlink("usr/sbin", "/usr/lib/debug/sbin")
posix.symlink("usr/%{_lib}", "/%{_lib}")
posix.mkdir("/run")
posix.mkdir("/proc")
posix.mkdir("/sys")
posix.chmod("/proc", 0555)
posix.chmod("/sys", 0555)
st = posix.stat("/media")
if st and st.type == "link" then
os.remove("/media")
end
posix.mkdir("/var")
posix.symlink("../run", "/var/run")
posix.symlink("../run/lock", "/var/lock")
return 0
%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
rpm.execute("/usr/sbin/restorecon", "/var", "/var/run", "/var/lock", "/sys", "/boot", "/dev", "/media", "/afs")
rpm.execute("/usr/sbin/restorecon", "-r", "/usr/lib/debug")
end
%files content
%dir %{_datadir}/filesystem
%{_datadir}/filesystem/paths
%files -f filelist
%defattr(0755,root,root,0755)
%dir %attr(555,root,root) /
/bin
%attr(555,root,root) /boot
%attr(555,root,root) /afs
/dev
%dir /etc
/etc/X11
/etc/xdg
/etc/opt
/etc/pm
/etc/skel
/etc/sysconfig
/etc/keys
/etc/pki
/etc/bash_completion.d/
%dir /etc/default
%dir /etc/rwtab.d
%dir /etc/statetab.d
/home
/lib
%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64
/%{_lib}
%endif
/media
%dir /mnt
%dir /opt
%ghost %attr(555,root,root) /proc
%attr(550,root,root) /root
/run
/sbin
/srv
%ghost %attr(555,root,root) /sys
%attr(1777,root,root) /tmp
%dir /usr
%attr(555,root,root) /usr/bin
/usr/games
/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
%dir /usr/lib/debug/.dwz
%ghost /usr/lib/debug/bin
%ghost /usr/lib/debug/lib
%ghost /usr/lib/debug/%{_lib}
%ghost %dir /usr/lib/debug/usr
%ghost /usr/lib/debug/usr/bin
%ghost /usr/lib/debug/usr/sbin
%ghost /usr/lib/debug/usr/lib
%ghost /usr/lib/debug/usr/%{_lib}
%ghost /usr/lib/debug/usr/.dwz
%ghost /usr/lib/debug/sbin
%attr(555,root,root) /usr/lib/games
%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64
%attr(555,root,root) /usr/%{_lib}
%else
%attr(555,root,root) /usr/lib/bpf
%attr(555,root,root) /usr/lib/X11
%attr(555,root,root) /usr/lib/pm-utils
%endif
/usr/libexec
/usr/local
%attr(555,root,root) /usr/sbin
%dir /usr/share
/usr/share/aclocal
/usr/share/appdata
/usr/share/applications
/usr/share/augeas
/usr/share/backgrounds
%dir /usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/helpers
/usr/share/desktop-directories
/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
/usr/share/icons
/usr/share/idl
/usr/share/info
%dir /usr/share/licenses
%dir /usr/share/locale
%dir /usr/share/man
/usr/share/metainfo
/usr/share/mime-info
/usr/share/misc
/usr/share/omf
/usr/share/pixmaps
/usr/share/sounds
/usr/share/themes
/usr/share/xsessions
%dir /usr/share/X11
/usr/share/X11/fonts
/usr/share/wayland-sessions
/usr/share/zsh
/usr/src
/usr/tmp
%dir /var
/var/adm
%dir /var/cache
/var/cache/bpf
/var/db
/var/empty
/var/ftp
/var/games
/var/lib
/var/local
%ghost /var/lock
/var/log
/var/mail
/var/nis
/var/opt
/var/preserve
%ghost /var/run
%dir /var/spool
%attr(755,root,root) /var/spool/lpd
%attr(775,root,mail) /var/spool/mail
%attr(1777,root,root) /var/tmp
/var/yp
%changelog
%autochangelog

25
gating.yaml Normal file
View File

@ -0,0 +1,25 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#Rawhide
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#gating rhel
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

36
plans.fmf Normal file
View File

@ -0,0 +1,36 @@
/tier1-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/tier1/internal
/tier1-public:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/tier1/public
/tier2-tier3-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/tier2-tier3/internal
/tier2-tier3-public:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/tier2-tier3/public
/others-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/others/internal
/others-public:
plan:
import:
url: https://src.fedoraproject.org/tests/filesystem.git
name: /plans/others/public

1
sources Normal file
View File

@ -0,0 +1 @@
5f5fdcfaf7d0730bb9546c665b6c769e filesystem.conf