Subject: toolchain/25606: NetBSD build failure when some sctripts are not executable
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mishka@apk.od.ua>
List: netbsd-bugs
Date: 05/17/2004 10:08:58
>Number: 25606
>Category: toolchain
>Synopsis: NetBSD build failure when some sctripts are not executable
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 17 07:12:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Mike M. Volokhov
>Release: NetBSD 2.x
>Organization:
ISPK
>Environment:
System: NetBSD nostromo.holding.local 2.0C NetBSD 2.0C (NOSTROMO) #2: Fri May 7 10:09:22 EEST 2004 mishka@nostromo.holding.local:/build/netbsd/src-current-20040415/sys/arch/i386/compile/NOSTROMO i386
Architecture: i386
Machine: i386
>Description:
Greetings!
The build process of NetBSD will fails if all in-tree files
will have standard permissions 644 (rw,r,r). This happens
because some commands called by build toolchain uses "raw"
script execution (i.e. "./configure"). The example errors
are as follows:
---- cut ----
mkdir libiberty
(cd libiberty;
env CC=cc /build/netbsd/src-2-0/gnu/dist/gcc/libiberty/configure &&
env CC=cc /build/netbsd/src-2-0/../obj/tooldir.NetBSD-2.0C-i386/bin/nbmake)
env: /build/netbsd/src-2-0/gnu/dist/gcc/libiberty/configure: Permission denied
*** Failed target: libiberty
*** Failed command: (cd libiberty;
env CC=cc /build/netbsd/src-2-0/gnu/dist/gcc/libiberty/configure &&
env CC=cc /build/netbsd/src-2-0/../obj/tooldir.NetBSD-2.0C-i386/bin/nbmake)
*** Error code 126
Stop.
nbmake: stopped in /build/netbsd/src-2-0/gnu/usr.bin/gcc3/host-libiberty
---- cut ----
$ grep 'Failed target:' build.log
*** Failed target: libiberty
*** Failed target: dependall-host-libiberty
*** Failed target: dependall-gcc3
*** Failed target: dependall-usr.bin
*** Failed target: dependall-gnu
*** Failed target: do-build
*** Failed target: build
*** Failed target: release
>How-To-Repeat:
In my case it was happened after following commands:
cp -R src-current src-2-0
cd src-2-0 && cvs update -P -d -C
Seems that CVS doesn't handle permission rights good. The
build problem can be reproduced via following synthetic
way:
cd usr/src && find . -type f -exec chmod 644 {} \;
sh build.sh release
>Fix:
1) Use "${SH} ${SCRIPT}" instead of "${SCRIPT}" for all
such things (it may be something like buildlink in
pkgsrc).
2) Use mtree(8) for handling permissions.
--
TIA, Mishka.
>Release-Note:
>Audit-Trail:
>Unformatted: