rpmbuild and upgrades

Michael Schwendt mschwendt.tmp0501.nospam at arcor.de
Thu Aug 25 11:25:20 UTC 2005


On Wed, 24 Aug 2005 11:25:31 -0500, Mike McGrath wrote:

> I'm having difficulty with building an RPM file to upgrade.  The issue
> comes when I need to add and delete a user.  In the spec file I have it
> creating the user in %pre and removing the user in %postun.  I'm using
> useradd and userdel to create and delete the user.  When I build and
> install the RPM everything works as expected, same goes when I remove
> it.  But when I do an rpm -U for an upgrade for some reason when all is
> said and done the user does not exist.  Anyone know what's going on?

That's because your %postun [of the old package to be removed]
is executed _last_. In it you need to evaluate $1 and make sure it's
not executed during a package upgrade.

Otherwise, Paul Howarth already mentioned that deleting non-fixed
user ids creates a security weakness.
  	
-- 
Michael Schwendt <mschwendt at users.sf.net>
Fedora Core release 5 (Development) - Linux 2.6.12-1.1505_FC5
loadavg: 4.17 4.30 3.89




More information about the fedora-list mailing list