3
0
forked from pool/filesystem

Accepting request 610105 from home:oertel:branches:Base:System

- pretrans lua script: try to move away /var/run and /var/lock
  unless they are already symlinks (bsc#1084119)

OBS-URL: https://build.opensuse.org/request/show/610105
OBS-URL: https://build.opensuse.org/package/show/Base:System/filesystem?expand=0&rev=168
This commit is contained in:
Marcus Meissner 2018-05-18 19:12:14 +00:00 committed by Git OBS Bridge
parent 5a816bf9c4
commit 347c51254e
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 17 15:19:29 CEST 2018 - ro@suse.de
- pretrans lua script: try to move away /var/run and /var/lock
unless they are already symlinks (bsc#1084119)
-------------------------------------------------------------------
Tue Mar 27 17:44:09 UTC 2018 - msuchanek@suse.com

View File

@ -212,12 +212,26 @@ install fs-var.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/fs-var.conf
%pretrans -p <lua>
os.remove ("/usr/include/X11")
os.remove ("/usr/lib/X11")
if not posix.readlink("/var/run") then
os.rename("/var/run","/var/run.rpmsave.tmpx")
end
if not posix.readlink("/var/lock") then
os.rename("/var/lock","/var/lock.rpmsave.tmpx")
end
if not posix.stat("/var/run") then
posix.symlink("/run","/var/run")
end
if not posix.stat("/var/lock") then
posix.symlink("/run/lock","/var/lock")
end
if posix.stat("/var/run.rpmsave.tmpx") then
os.execute("mv /var/run.rpmsave.tmpx/* /var/run")
os.remove("/var/run.rpmsave.tmpx")
end
if posix.stat("/var/lock.rpmsave.tmpx") then
os.execute("mv /var/lock.rpmsave.tmpx/* /var/lock")
os.remove("/var/lock.rpmsave.tmpx")
end
%files -f filesystem.list
/usr/lib/tmpfiles.d/fs-var.conf