From f2284bde4746cb04d8fd477b5aad5e60e4a6999bd1d996d149479d64aba16c3e Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 4 Oct 2023 13:26:16 +0000 Subject: [PATCH] Accepting request 1113407 from home:lnussel:branches:Base:System - Add /run/lock (boo#1212926) - Remove /var/spool/mail (boo#1179574) - Remove obsolete home dir check. The filesystem package is not meant to contain home directories of random system users anymore - Create ghost symlinks also in pretrans, needed to get /var/run as link right away OBS-URL: https://build.opensuse.org/request/show/1113407 OBS-URL: https://build.opensuse.org/package/show/Base:System/filesystem?expand=0&rev=242 --- directory.list | 1 - filesystem.changes | 10 ++++++++++ filesystem.links | 3 +-- filesystem.spec | 36 ++++++++++++++---------------------- ghost.list | 1 + 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/directory.list b/directory.list index 36b19cb..a0bdcd8 100644 --- a/directory.list +++ b/directory.list @@ -120,7 +120,6 @@ 0555 root root /var/lib/empty 0755 root root /var/lib/misc 0755 root root /var/spool -1777 root root /var/spool/mail 1777 root root /var/tmp 0755 root root /var/log 0755 root root /var/opt diff --git a/filesystem.changes b/filesystem.changes index 7e0d847..3599a0f 100644 --- a/filesystem.changes +++ b/filesystem.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Sep 25 08:45:52 UTC 2023 - Ludwig Nussel + +- Add /run/lock (boo#1212926) +- Remove /var/spool/mail (boo#1179574) +- Remove obsolete home dir check. The filesystem package is not + meant to contain home directories of random system users anymore +- Create ghost symlinks also in pretrans, needed to get /var/run as + link right away + ------------------------------------------------------------------- Tue Sep 12 12:19:29 UTC 2023 - Dirk Müller diff --git a/filesystem.links b/filesystem.links index fc09b0d..0c68d30 100644 --- a/filesystem.links +++ b/filesystem.links @@ -1,5 +1,4 @@ # links to be created -# Required for FHS 2.1 -spool/mail /var/mail # systemd ../run /var/run %ghost +../run/lock /var/lock %ghost diff --git a/filesystem.spec b/filesystem.spec index 147bf1d..74f7e5a 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -102,6 +102,20 @@ for i in pairs(ghosts) do mkdir_p(i) posix.chmod(i, ghosts[i]) end + +local ghost_links = { +EOF +# ghost symlinks +while read SRC DEST ATTR ; do + [ "$ATTR" = "%%ghost" ] || continue + echo "[\"$DEST\"] = \"$SRC\"," +done < filesystem.links >> pretrans.lua +cat >> pretrans.lua <<'EOF' +} +for i in pairs(ghost_links) do + mkdir_p(i:match(".*/")) + posix.symlink(ghost_links[i], i) +end EOF # # @@ -273,28 +287,6 @@ done < %{SOURCE4} RPM_INSTALL_PREFIX=$RPM_BUILD_ROOT export RPM_BUILD_ROOT -# check, if all home directories are present. -UNFOUND=false -UNFOUND_DIRS= -OLDIFS="$IFS" -IFS=":" -while read LOGIN PASSWD UID_T GID_T NAME HOME_DIR SHELL_T ; do - test "$LOGIN" = "abuild" && continue - test "$LOGIN" = "icecream" && continue - test "$LOGIN" = "vscan" && continue - test -n "$HOME_DIR" || continue - test "$UID_T" -gt 100 && continue - test -d $RPM_BUILD_ROOT/$HOME_DIR && continue - echo $HOME_DIR does not exist. - UNFOUND=true - UNFOUND_DIRS="$UNFOUND_DIRS $HOME_DIR" -done < /etc/passwd -IFS=$OLDIFS -if test "$UNFOUND" = true ; then - echo There are home directories defined, which are not present. - echo Unfound: $UNFOUND_DIRS - exit 1 -fi # # now check, if all files of aaa_base have a directory in this package # diff --git a/ghost.list b/ghost.list index 042c31e..c0563f1 100644 --- a/ghost.list +++ b/ghost.list @@ -7,6 +7,7 @@ 0755 root root /srv/www 0755 root root /srv/www/cgi-bin 0755 root root /srv/www/htdocs +0755 root root /run/lock 0555 root root /sys 0755 root root /usr/local 0755 root root /usr/local/bin