From b5b1a06f8c40eaff84a41cc7cc585f8d63536d14bd65dd71647b13614bffe87d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 25 Apr 2014 05:13:13 +0000 Subject: [PATCH] Accepting request 231185 from home:oertel:branches:Base:System - make /var/run and /var/lock just ghost entries and create them if they do not exist at all and rely on dracut hooks to actually replace directories with symlinks there (bnc#874748) - add vscan user to ignore home list OBS-URL: https://build.opensuse.org/request/show/231185 OBS-URL: https://build.opensuse.org/package/show/Base:System/filesystem?expand=0&rev=125 --- filesystem.changes | 12 ++++++++++++ filesystem.spec | 21 +++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/filesystem.changes b/filesystem.changes index 06018df..27253ef 100644 --- a/filesystem.changes +++ b/filesystem.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Apr 23 18:44:15 CEST 2014 - ro@suse.de + +- make /var/run and /var/lock just ghost entries and create them + if they do not exist at all and rely on dracut hooks to + actually replace directories with symlinks there (bnc#874748) + +------------------------------------------------------------------- +Tue Apr 22 00:17:18 CEST 2014 - ro@suse.de + +- add vscan user to ignore home list + ------------------------------------------------------------------- Fri Apr 11 14:02:07 CEST 2014 - ro@suse.de diff --git a/filesystem.spec b/filesystem.spec index 2d35a54..6e5cb19 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -125,7 +125,10 @@ case $SRC in ;; esac ln -sf $SRC $RPM_BUILD_ROOT$DEST - echo "$DEST" >> filesystem.list + case $DEST in + /var/run|/var/lock) echo "%ghost $DEST" >> filesystem.list ;; + *) echo "$DEST" >> filesystem.list ;; + esac ;; esac done < %{SOURCE1} @@ -152,6 +155,7 @@ 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 @@ -192,22 +196,11 @@ test -n "$NON_EXISTING_DIR" && { %pretrans -p os.remove ("/usr/include/X11") os.remove ("/usr/lib/X11") -st = posix.stat("/var/run") -if st and st.type == "directory" then - sta = posix.stat("/var/run/systemd") - if sta and sta.type == "directory" then - os.execute("umount -l /var/run") - end - os.rename("/var/run","/var/run.old") +if not posix.stat("/var/run") then posix.symlink("/run","/var/run") - os.execute("rm -rf /var/run.old") end -st = posix.stat("/var/lock") -if st and st.type == "directory" then - os.execute("umount -l /var/lock") - os.rename("/var/lock","/var/lock.old") +if not posix.stat("/var/lock") then posix.symlink("/run/lock","/var/lock") - os.execute("rm -rf /var/lock.old") end %files -f filesystem.list