[packman] realcrypt-7.0a-0.pm.2.1.i586 RPM scriptlet/postinstall bugs

Matthias Andree matthias.andree at gmx.de
Tue Nov 30 16:27:29 CET 2010


Greetings,

the realcrypt RPM scriptlets don't take upgrading into account, and will
deinstall the sudoers/groups after an upgrade with zypper, as though the package
had been deinstalled (which it hasn't).

Reason is that the scriptlets do not check $1 to figure how many versions of the
package are installed.

Instructions: <http://fedoraproject.org/wiki/Packaging/ScriptletSnippets>
(also apply to openSUSE)


IOW, the whole %postun scriptlet should be (note single = here, double == is an
unnecessary non-portable bashism)

%postun
if [ "$1" = 0 ] ; then
  # original scriptlet follows
  echo 'Removing group realcrypt...'
  /usr/sbin/groupdel realcrypt &>/dev/null || :
  echo 'Removing entry in /etc/sudoers...'
  sed -i '/%realcrypt/d' /etc/sudoers
  # end of original scriptlet
fi


The postinstall script seems safe at first superficial glance.

(I can correspond in German and English, so pick whatever is conventional for
the list.)

-- 
Matthias Andree




More information about the Packman mailing list