forked from pool/filesystem
Accepting request 918730 from home:lnussel:usrmove
- don't perform UsrMerge if ZYPP_SINGLE_RPMTRANS is set. Rely on file trigger compat mode in that case and do it posttrans (boo#1189788). - generic %ghost handling instead of hardcoding OBS-URL: https://build.opensuse.org/request/show/918730 OBS-URL: https://build.opensuse.org/package/show/Base:System/filesystem?expand=0&rev=214
This commit is contained in:
parent
1868e87b52
commit
ea9b4c2ca9
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 27 07:26:40 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
- don't perform UsrMerge if ZYPP_SINGLE_RPMTRANS is set. Rely on
|
||||||
|
file trigger compat mode in that case and do it posttrans
|
||||||
|
(boo#1189788).
|
||||||
|
- generic %ghost handling instead of hardcoding
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 2 07:55:40 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
Mon Aug 2 07:55:40 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
# Required for FHS 2.1
|
# Required for FHS 2.1
|
||||||
spool/mail /var/mail
|
spool/mail /var/mail
|
||||||
# systemd
|
# systemd
|
||||||
../run /var/run
|
../run /var/run %ghost
|
||||||
|
@ -122,7 +122,21 @@ for i in pairs(dirs) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if needmigrate then
|
if needmigrate then
|
||||||
|
if posix.getenv("ZYPP_SINGLE_RPMTRANS") == "1" then
|
||||||
|
print("Warning: UsrMerge executed in single transcation mode")
|
||||||
|
if not posix.stat("/usr/lib/rpm/lua/usrmerge.lua") then
|
||||||
|
error("ERROR: compat-usrmerge file triggers not installed.\n!!! This will go horribly wrong. You need a rescue system now !!!")
|
||||||
|
end
|
||||||
|
rpm.define("_filesystem_need_posttrans_convertfs 1")
|
||||||
|
else
|
||||||
assert(os.execute("/usr/libexec/convertfs"))
|
assert(os.execute("/usr/libexec/convertfs"))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > posttrans.lua <<'EOF'
|
||||||
|
if rpm.expand("%%%%{?_filesystem_need_posttrans_convertfs}") == "1" then
|
||||||
|
assert(os.execute("/usr/libexec/convertfs"))
|
||||||
end
|
end
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -176,9 +190,9 @@ while read MOD OWN GRP NAME ; do
|
|||||||
create_dir $MOD $OWN $GRP $NAME
|
create_dir $MOD $OWN $GRP $NAME
|
||||||
done < directory.list
|
done < directory.list
|
||||||
# ghost files next
|
# ghost files next
|
||||||
cat ghost.list | while read MOD OWN GRP NAME ; do
|
while read MOD OWN GRP NAME ; do
|
||||||
create_dir $MOD $OWN $GRP $NAME "%%ghost "
|
create_dir $MOD $OWN $GRP $NAME "%%ghost "
|
||||||
done
|
done < ghost.list
|
||||||
# arch specific leftovers
|
# arch specific leftovers
|
||||||
for march in \
|
for march in \
|
||||||
%ifarch %ix86
|
%ifarch %ix86
|
||||||
@ -216,7 +230,7 @@ done
|
|||||||
create_dir 0755 root root /emul/ia32-linux
|
create_dir 0755 root root /emul/ia32-linux
|
||||||
%endif
|
%endif
|
||||||
# now do the links
|
# now do the links
|
||||||
while read SRC DEST ; do
|
while read SRC DEST ATTR ; do
|
||||||
case $SRC in
|
case $SRC in
|
||||||
"") continue ;;
|
"") continue ;;
|
||||||
\#*) echo "comment: $SRC $DEST" ;;
|
\#*) echo "comment: $SRC $DEST" ;;
|
||||||
@ -229,8 +243,7 @@ case $SRC in
|
|||||||
esac
|
esac
|
||||||
ln -sf $SRC $RPM_BUILD_ROOT$DEST
|
ln -sf $SRC $RPM_BUILD_ROOT$DEST
|
||||||
case $DEST in
|
case $DEST in
|
||||||
/var/run|/var/lock) echo "%ghost $DEST" >> filesystem.list ;;
|
*) echo "$ATTR${ATTR:+ }$DEST" >> filesystem.list ;;
|
||||||
*) echo "$DEST" >> filesystem.list ;;
|
|
||||||
esac
|
esac
|
||||||
# for tmpfiles.d
|
# for tmpfiles.d
|
||||||
case $DEST in
|
case $DEST in
|
||||||
@ -305,6 +318,7 @@ install -m 0644 fs-var-tmp.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/fs-var-tmp.c
|
|||||||
|
|
||||||
%pretrans -p <lua> -f pretrans.lua
|
%pretrans -p <lua> -f pretrans.lua
|
||||||
%pre -p <lua> -f pre.lua
|
%pre -p <lua> -f pre.lua
|
||||||
|
%posttrans -p <lua> -f posttrans.lua
|
||||||
|
|
||||||
%files -f filesystem.list
|
%files -f filesystem.list
|
||||||
/usr/lib/tmpfiles.d/fs-tmp.conf
|
/usr/lib/tmpfiles.d/fs-tmp.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user