rpmbuild and upgrades

Mike McGrath mmcgrath at iesabroad.org
Wed Aug 24 19:33:01 UTC 2005


 

> -----Original Message-----
> From: fedora-list-bounces at redhat.com 
> [mailto:fedora-list-bounces at redhat.com] On Behalf Of Paul Howarth
> Sent: Wednesday, August 24, 2005 2:21 PM
> To: For users of Fedora Core releases
> Subject: Re: rpmbuild and upgrades
> 
> On Wed, 2005-08-24 at 11:25 -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?
> 
> What exactly do you have in the %pre and %postun scripts?
> 
> It's actually considered good practise now *not* to remove 
> the user on uninstall - there may still be files on the 
> system belonging to that user, and if the user is deleted, 
> the UID can be reused by a new user, who may "inherit" the 
> leftover files.
> 
> Paul.
> --
> Paul Howarth <paul at city-fan.org>
> 
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 
> 

I hadn't thought of that, if its considered good practice then I'll not
delete the user on an uninstall, problem solved :-D

	-MIke





More information about the fedora-list mailing list