[packages/setup] go back to joinpasswd in %post

atler atler at pld-linux.org
Sat Apr 10 23:31:59 CEST 2021


commit 841dc2f529959132861e802fb35d409048e8659d
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Apr 10 22:21:12 2021 +0200

    go back to joinpasswd in %post
    
    %triggerpostun is way too late at least with rpm4.
    
    suppose packageA in version 2 requires group G during installation and G
    is provided by setup version 2. packageA has R: setup >= 2. user has old
    versions of packageA 1 and setup 1 installed and upgrades packageA
    pulling new version of setup. both are part of same transaction. rpm4
    first installs setup 2 (until %post), than packageA 2 (until %post) and
    only then starts cleanup seemingly in reverse dependency order so first
    packageA and then setup. that makes %triggerpostun of setup package to
    be one of the very last operation while the group G was required at the
    very beginning during packageA installation. new group needs to be added
    at the point of %post.
    
    joinpasswd used to be part of %post, but moved to %triggerpostun back in
    2003 without explanation in commit message. perhaps binary was not
    static back then?

 setup.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/setup.spec b/setup.spec
index 732755c..9e15961 100644
--- a/setup.spec
+++ b/setup.spec
@@ -119,13 +119,13 @@ rm -rf $RPM_BUILD_ROOT
 -/bin/sh -c '/usr/bin/test -L /etc/mtab || /bin/mv -v /etc/mtab /etc/mtab.rpmsave'
 
 %triggerpostun -p /sbin/postshell -- %{name} < %{version}-%{release}
-%{_sbindir}/joinpasswd
 %{_sbindir}/delpasswd -g ttyS cdwrite
 
 %triggerin -p %{_sbindir}/update-fstab -- %{name} < 2.4.10-1
 
 %post -p /sbin/postshell
 -/sbin/env-update -u
+%{_sbindir}/joinpasswd
 
 %postun -p /sbin/postshell
 -/sbin/env-update -u
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/setup.git/commitdiff/841dc2f529959132861e802fb35d409048e8659d



More information about the pld-cvs-commit mailing list