On Wed Jul 23, 2003 at 10:16:03AM -0700, Jerry Talkington wrote:

> > >>If a package were built in user-mode, the executables and libraries
> > >>built would be owned by that user, and they'd be put in the .deb and
> > >>then installed, all owned by that user.
> > >
> > >This sounds like a .deb limitation; switching to .rpm would solve this
> > >very issue.
> > 
> > How is it a .deb issue? You build a .deb from a root tree, just like 
> > RPM, and of course it has to use the user/group/permissions that exist 
> > in that root tree. I'm fairly certain RPM does the same--how else would 
> > it deal with installing a .rpm with files owned by different users?
> 
> Any RPM that I've built as a user have installed with my UID (which
> means I now have to release a new package, since the executables should
> *not* have been installed with a user as the owner!)

Then you built it wrong.

First and foremost in your %files section you should have:

%defattr(-,root,root)

Then if you need something specific, ie. to make something owned by user
mail and group mail, but you want it suid mail (when the package installer
installed it, say, mode 0755):

%attr(4755,mail,mail) %{_usrbin}/exim

(or whatever the file in question is)

This preserves the permissions and ownership you want, not what it was built
as (however, sadly, the same cannot be said of src.rpm packages; those *do*
have the ownership of whomever built them if the files were owned by
that user).

(Actually, it's a shame that fink doesn't use rpm... I could contribute a
lot more to it if it did... =)

-- 
MandrakeSoft Security; http://www.mandrakesecure.net/
Online Security Resource Book; http://linsec.ca/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD}

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to