Accepting request 875129 from Base:System
OBS-URL: https://build.opensuse.org/request/show/875129 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/filesystem?expand=0&rev=155
This commit is contained in:
commit
5be8e99871
@ -1,4 +1,3 @@
|
||||
0755 root root /bin
|
||||
0755 root root /boot
|
||||
0755 root root /dev
|
||||
0755 root root /etc
|
||||
@ -24,16 +23,12 @@
|
||||
0755 root root /etc/xdg
|
||||
0755 root root /etc/xdg/autostart
|
||||
0755 root root /home
|
||||
0755 root root /lib
|
||||
0755 root root /lib/modules
|
||||
0755 root root /lib/firmware
|
||||
0755 root root /mnt
|
||||
0755 root root /opt
|
||||
0700 root root /root
|
||||
0700 root root /root/.gnupg
|
||||
0755 root root /root/bin
|
||||
0755 root root /run
|
||||
0755 root root /sbin
|
||||
0755 root root /srv/www
|
||||
0755 root root /srv/www/cgi-bin
|
||||
0755 root root /srv/www/htdocs
|
||||
|
@ -1,4 +1,3 @@
|
||||
0755 root root /lib64
|
||||
0755 root root /usr/lib64
|
||||
0755 root root /usr/lib64/pkgconfig
|
||||
0755 root root /usr/lib64/browser-plugins
|
||||
|
@ -3,6 +3,14 @@ Wed Feb 10 18:34:25 UTC 2021 - Antoine Belvire <antoine.belvire@opensuse.org>
|
||||
|
||||
- Add Ukrainian to the list of localized man directories.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 8 17:36:52 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
||||
|
||||
- prepare usrmerge (boo#1029961):
|
||||
* Decide at build time whether file lists for usrmerge or legacy
|
||||
should be created.
|
||||
* convert file system in %pre if needed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 1 14:23:11 CET 2021 - ro@suse.de
|
||||
|
||||
|
@ -3,4 +3,3 @@
|
||||
spool/mail /var/mail
|
||||
# systemd
|
||||
../run /var/run
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%define nvr %{name}-%{version}-%{release}
|
||||
|
||||
Name: filesystem
|
||||
Summary: Basic Directory Layout
|
||||
License: MIT
|
||||
@ -23,6 +25,10 @@ Group: System/Fhs
|
||||
Version: %(echo %suse_version | cut -b-2).%(echo %suse_version | cut -b3)
|
||||
Release: 0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?usrmerged}
|
||||
# XXX libsolv never sees the rpmlib provides fulfilled
|
||||
Requires(pre): (compat-usrmerge-tools or rpmlib(X-CheckUnifiedSystemdir))
|
||||
%endif
|
||||
Requires: group(root)
|
||||
Requires: user(root)
|
||||
URL: https://build.opensuse.org/package/show/openSUSE:Factory/filesystem
|
||||
@ -40,6 +46,8 @@ the home directories of system users.
|
||||
|
||||
%prep
|
||||
%setup -c -n filesystem -T
|
||||
cp %{SOURCE0} .
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
|
||||
@ -73,22 +81,38 @@ function create_dir () {
|
||||
mkdir -p $RPM_BUILD_ROOT
|
||||
# generic directories first
|
||||
echo "%%defattr(-,root,root)" > filesystem.list
|
||||
{
|
||||
cat %{SOURCE0}
|
||||
%ifarch s390x %sparc x86_64 ppc64 ppc aarch64 ppc64le riscv64
|
||||
cat %{SOURCE64}
|
||||
cat %{SOURCE64} >> directory.list
|
||||
%endif
|
||||
} | while read MOD OWN GRP NAME ; do
|
||||
%if 0%{?usrmerged}
|
||||
cat >> filesystem.links << EOF
|
||||
usr/bin /bin
|
||||
usr/sbin /sbin
|
||||
usr/lib /lib
|
||||
%ifarch s390x %sparc x86_64 ppc64 ppc aarch64 ppc64le riscv64
|
||||
usr/lib64 /lib64
|
||||
%endif
|
||||
EOF
|
||||
%else
|
||||
cat >> directory.list << EOF
|
||||
0755 root root /bin
|
||||
0755 root root /lib
|
||||
0755 root root /sbin
|
||||
%ifarch s390x %sparc x86_64 ppc64 ppc aarch64 ppc64le riscv64
|
||||
0755 root root /lib64
|
||||
%endif
|
||||
EOF
|
||||
%endif
|
||||
cat >> directory.list <<EOF
|
||||
0755 root root %{?usrmerged:/usr}/lib/modules
|
||||
0755 root root %{_firmwaredir}
|
||||
EOF
|
||||
while read MOD OWN GRP NAME ; do
|
||||
create_dir $MOD $OWN $GRP $NAME
|
||||
done
|
||||
done < directory.list
|
||||
# ghost files next
|
||||
cat %{SOURCE3} | while read MOD OWN GRP NAME ; do
|
||||
%ifarch s390 s390x
|
||||
case $NAME in
|
||||
/media/floppy|/media/cdrom) continue ;;
|
||||
esac
|
||||
%endif
|
||||
create_dir $MOD $OWN $GRP $NAME "%%verify(not mode) %%ghost "
|
||||
create_dir $MOD $OWN $GRP $NAME "%%ghost "
|
||||
done
|
||||
# arch specific leftovers
|
||||
for march in \
|
||||
@ -149,7 +173,7 @@ case $SRC in
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done < %{SOURCE1}
|
||||
done < filesystem.links
|
||||
# Create the locale directories:
|
||||
while read LANG ; do
|
||||
create_dir 0755 root root /usr/share/locale/$LANG/LC_MESSAGES
|
||||
@ -237,6 +261,26 @@ if posix.stat("/var/lock.rpmsave.tmpx") then
|
||||
os.execute("mv /var/lock.rpmsave.tmpx/* /var/lock")
|
||||
os.remove("/var/lock.rpmsave.tmpx")
|
||||
end
|
||||
%if 0%{?usrmerged}
|
||||
needmigrate = false
|
||||
local dirs = {"/bin",
|
||||
"/sbin",
|
||||
%ifarch s390x %sparc x86_64 ppc64 ppc aarch64 ppc64le riscv64
|
||||
"/lib64",
|
||||
%endif
|
||||
"/lib" }
|
||||
for i in pairs(dirs) do
|
||||
local t = posix.stat(dirs[i], "type")
|
||||
if t == nil then
|
||||
posix.symlink("usr"..dirs[i], dirs[i])
|
||||
elseif t == "directory" then
|
||||
needmigrate = true
|
||||
end
|
||||
end
|
||||
if needmigrate then
|
||||
assert(os.execute("/usr/libexec/convertfs"))
|
||||
end
|
||||
%endif
|
||||
posix.mkdir("/proc")
|
||||
posix.chmod("/proc", 0555)
|
||||
posix.mkdir("/sys")
|
||||
|
Loading…
Reference in New Issue
Block a user