Amanda-Users

Re: Changing User when using RPMs

2005-11-28 21:12:15
Subject: Re: Changing User when using RPMs
From: Matt Hyclak <hyclak AT math.ohiou DOT edu>
To: amanda-users AT amanda DOT org
Date: Mon, 28 Nov 2005 20:54:42 -0500
On Mon, Nov 28, 2005 at 05:35:16PM -0500, Gene Heskett enlightened us:
> Jeff: How do the rpms handle the perms?  When building from tarballs,
> we always do the configuration & building as the user amanda, and then
> become root to do the install so the perms are always handled
> correctly.  Root is also required to run ldconfig so the libraries can
> be found after the install also.  Does the rpm install do that?

Currently, the amanda username is hardcoded, although I think Jay was in the
process of changing that this afternoon in the Rawhide RPM to be
configurable without modifying the spec file. 

The permissions are set at packaging time, not build time, since you should
build rpms as non-root, but chances are you won't build as the amanda user.
So when collecting all the files, there are a bunch of lines like:

%attr(-,amanda,disk)    somefile

That changes the ownership to amanda:disk, and doesn't change the
permissions. 

The RPM also creates the amanda user as well as running ldconfig after
install.

If you're versed in .spec files at all, take a peek at the one in rawhide.
It's shaping up to be pretty usable. In fact, I think I'll stop maintaining
my own since most of my local changes are in those RPMs now. I'll just
rebuild from there when I need a new version.

Matt

-- 
Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263

<Prev in Thread] Current Thread [Next in Thread>