Re: buildworld fails as non-root user

From: Ruslan Ermilov <ru_at_freebsd.org>
Date: Mon, 16 Feb 2004 14:20:36 +0200
On Mon, Feb 16, 2004 at 12:53:23PM +0100, Joan Picanyol wrote:
> Hi,
> 
> I can't buildworld as a regular user with a clean /usr/obj:
> 
> building static egacy library
> ranlib libegacy.a
> install -C -C -o root -g wheel -m 444   libegacy.a /usr/obj/usr/src/i386/legacy/usr/lib
> install: /usr/obj/usr/src/i386/legacy/usr/lib/libegacy.a: chown/chgrp: Operation not permitted
> *** Error code 71
>  
> Stop in /usr/src/tools/build.
> *** Error code 1
>  
> Stop in /usr/src.
> *** Error code 1
>  
> Stop in /usr/src.
> *** Error code 1
>  
> Stop in /usr/src.
> 
> Before Stage 1.1 I also see a bunch of 'Operation not permitted' errors:
> 
> mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/i386/usr/include
> . changed
>         user expected 0 found 1000 not modified: Operation not permitted
>         permissions expected 0755 found 0700 modified
> ./arpa missing (created)
> ./arpa: user/group/mode not modified: Operation not permitted
> ./arpa: warning: file mode not set
> ./bsnmp missing (created)
> ./bsnmp: user/group/mode not modified: Operation not permitted
> ./bsnmp: warning: file mode not set
> ./c++ missing (created)
> ./c++/3.3 missing (created)
> ./c++/3.3/backward missing (created)
> ./c++/3.3/backward: user/group/mode not modified: Operation not permitted
> ./c++/3.3/backward: warning: file mode not set
> [...]
> ./sys missing (created)
> ./sys: user/group/mode not modified: Operation not permitted
> ./sys: warning: file mode not set
> ./ufs missing (created)
> ./ufs/ffs missing (created)
> ./ufs/ffs: user/group/mode not modified: Operation not permitted
> ./ufs/ffs: warning: file mode not set
> ./ufs/ufs missing (created)
> ./ufs/ufs: user/group/mode not modified: Operation not permitted
> ./ufs/ufs: warning: file mode not set
> ./ufs: user/group/mode not modified: Operation not permitted
> ./ufs: warning: file mode not set
> ./vm missing (created)
> ./vm: user/group/mode not modified: Operation not permitted
> ./vm: warning: file mode not set
> ln -sf /usr/src/sys /usr/obj/usr/src/i386
> 
> Is this expected behaviour? Is there a workaround?
> 
It should work.  It works here:

building static egacy library
ranlib libegacy.a
sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libegacy.a /home/ru/obj/usr/src/i386/legacy/usr/lib

Note the difference: it uses "sh /usr/src/tools/install.sh" as
a replacement for install(1) which in effect strips out options
like -o and -g.

Work around: take out "INSTALL= install -C" from /etc/make.conf.

Solution: file a PR so I can deal with this later, by fixing
src/Makefile.inc1 appropriately.


Cheers,
-- 
Ruslan Ermilov
FreeBSD committer
ru_at_FreeBSD.org

Received on Mon Feb 16 2004 - 03:19:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:43 UTC