bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool-1.5.18 -- installed files owned by non-root user


From: Ralf Wildenhues
Subject: Re: libtool-1.5.18 -- installed files owned by non-root user
Date: Wed, 6 Jul 2005 21:43:41 +0200
User-agent: Mutt/1.5.9i

Hi Peter,

* Peter Breitenlohner wrote on Wed, Jul 06, 2005 at 09:34:24AM CEST:
> 
> another package that needs some of its files chowned to root is gcc!! (at
> least 3.4.x) -- for reasons not related to timestamps.

Oh well.

> On Wed, 6 Jul 2005, Ralf Wildenhues wrote:
> >Oh well.  Let's try to play safe here.   Would something like
> >       if test "`id -u`" != 0; then :; else \
> >         chown -R root $(DESTDIR)$(ltdldatadir) && \
> >         chgrp -R root $(DESTDIR)$(ltdldatadir) || exit 1; \
> >       fi
> >
> >be ok?  (Rationale: if `id' does not work, we try to chown/chgrp anyway.
> 
> The above doesn't work. If `id' fails it most probably won't yield "0"
> and the chown/chgrp will be skipped.

I have only one excuse: it was rather early this morning, and I did
not actually test what I wrote.  Sorry.

> The design goal should be that if `make install' is done by
> 
> (1) root, then all installed files SHOULD be (on posix systems MUST be)
> owned by root.
> 
> (2) non-root (e.g. a staged install aka package building), a failing "chown"
> or "chgrp" MUST NOT cause make to terminate with an error.
> 
> What about simply
>       chown -R root $(DESTDIR)$(ltdldatadir) && \
>       chgrp -R root $(DESTDIR)$(ltdldatadir) || :
> where failure of chown/chgrp is ignored? Who cares about some noise when
> `make install' is done by non-root or on non-posix systems, in particular
> when the cause of such noise can easily be deduced.

This is what I had too, at first.  Only question I was not sure of:
Might there be a reasonable case where the install user is root, but
above fails (e.g. with ACLs)?  I'd hate having to do a 1.5.22 just
because we don't get this right.

> BTW: There might actually be some privilege granting mechanism's that allow
> a non-root user to successfully chown/chgrp files.

OK.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]