diff --git a/filesystem.spec b/filesystem.spec index 3b133d1..5f03d8d 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -2,7 +2,7 @@ Name: filesystem Version: 2.3 -Release: 4mamba +Release: 5mamba Summary: The basic directory layout for a Linux system Group: System/Configuration Vendor: openmamba @@ -74,6 +74,21 @@ ln -s ../run %{buildroot}/var/run [ -e /run/$b ] || mv $f /run/ done } + +%post +/sbin/ldconfig +if [ $1 -ge 1 ]; then + groupadd tty -g %{tty_groupid} 2>/dev/null || true +fi +: + +%triggerpostun -- filesystem < 2.3 +# /bin and /sbin are removed during old filesystem postun +[ -e /bin ] || /usr/bin/ln -s usr/bin /bin +[ -e /sbin ] || /usr/bin/ln -s usr/sbin /sbin +: + +%posttrans [ -L /bin -a -L /sbin ] || { # /bin -> /usr/bin and /sbin -> /usr/sbin migration for f in mv rm rmdir ln; do @@ -118,26 +133,6 @@ ln -s ../run %{buildroot}/var/run /usr/bin/ln -s usr/$d /$d done } -# Add if missing for safety -[ -e /bin ] || /usr/bin/ln -s usr/bin /bin -[ -e /sbin ] || /usr/bin/ln -s usr/sbin /sbin -: - -%post -/sbin/ldconfig -if [ $1 -ge 1 ]; then - groupadd tty -g %{tty_groupid} 2>/dev/null || true -fi -: - -%triggerpostun -p /usr/bin/bash -- filesystem < 2.3 -# /bin and /sbin are removed during old filesystem postun -[ -e /bin ] || /usr/bin/ln -s usr/bin /bin -[ -e /sbin ] || /usr/bin/ln -s usr/sbin /sbin -: - -%posttrans -p /usr/bin/bash -# /bin and /sbin are removed on upgrade [ -e /bin ] || /usr/bin/ln -s usr/bin /bin [ -e /sbin ] || /usr/bin/ln -s usr/sbin /sbin : @@ -231,6 +226,9 @@ fi /usr/tmp %changelog +* Mon Apr 19 2021 Silvan Calarco 2.3-5mamba +- try performing migration in posttrans to fix problematic long-term updates + * Fri Mar 05 2021 Silvan Calarco 2.3-4mamba - use /usr/bin/bash insted of /usr/bin/sh in posttrans script - add triggerpostun to try to fix further problems