NetBSD Problem Report #46182
From gson@gson.org Mon Mar 12 20:13:49 2012
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id DE1E663B8C0
for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 Mar 2012 20:13:48 +0000 (UTC)
Message-Id: <20120312201353.92FBF75E5E@guava.gson.org>
Date: Mon, 12 Mar 2012 22:13:53 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@gnats.NetBSD.org
Subject: Sources from src.tgz do not build
X-Send-Pr-Version: 3.95
>Number: 46182
>Category: misc
>Synopsis: Sources from src.tgz do not build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 12 20:15:00 +0000 2012
>Closed-Date: Tue Aug 05 13:19:31 +0000 2014
>Last-Modified: Fri Aug 08 05:00:01 +0000 2014
>Originator: Andreas Gustafsson
>Release: NetBSD-current
>Organization:
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:
If I do a "build.sh release" using sources extracted from source sets like
http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201203091940Z/source/sets/src.tgz
instead of sources directly checked out from CVS, the build fails:
Making install in doc
test -z "/usr/src/obj/tooldir.NetBSD-6.99.3-i386/share/info" || /usr/src/tools/gmp/../../external/lgpl3/gmp/dist/install-sh -c -d "/usr/src/obj/tooldir.NetBSD-6.99.3-i386/share/info"
sh: /usr/src/tools/gmp/../../external/lgpl3/gmp/dist/install-sh: permission denied
Looks like the install-sh script is lacking execute permissions:
$ zcat src.tgz | tar tfv - | grep gmp/dist/install-sh
-rw-rw-r-- 1 root wsrc 9505 Jun 20 2011 usr/src/external/lgpl3/gmp/dist/install-sh
The same script in a source tree checked out from CVS does have
execute permissions.
>How-To-Repeat:
See above.
>Fix:
>Release-Note:
>Audit-Trail:
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/46182: Sources from src.tgz do not build
Date: Tue, 27 Mar 2012 09:17:51 +0300
The problem still exists in the latest daily snapshot:
ftp http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201203252030Z/source/sets/src.tgz
zcat src.tgz | tar tfv -| grep gmp/dist/install-sh
-rw-rw-r-- 1 root wsrc 9505 Jun 20 2011 usr/src/external/lgpl3/gmp/dist/install-sh
--
Andreas Gustafsson, gson@gson.org
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/46182
Date: Tue, 27 Mar 2012 23:06:28 +0200
This probably is caused by src/distrib/sets/makesrctars which does a sed
run on an mtree specification to make sure all simple files get 0664
permissions:
${SED} -e 's:type=file:& mode=0664:' \
-e 's:type=dir:& mode=0775:' \
A few lines below it special cases build.sh and adds exec permissions.
Now there are two ways to solve this:
- add more exceptions to the script, so it creats executable scripts where
needed
- make sure the whole build does not need to invoke any shell script as
direct command (but use "sh $script" instaed)
The latter seems overall preferable, the former needs to be done if any
exceptions remain.
Martin
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: martin@duskware.de, tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/46182
Date: Sat, 31 Mar 2012 16:44:24 +0900
> - add more exceptions to the script, so it creats executable scripts where
> needed
>
> - make sure the whole build does not need to invoke any shell script as
> direct command (but use "sh $script" instaed)
IIRC some Makefiles pre-generated by autoconf invoke scripts as
direct command, and it's a bit annoying to fix third party distributions
which may require specific autoconf versions.
---
Izumi Tsutsui
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gson@gson.org (Andreas Gustafsson)
Subject: re: toolchain/46182
Date: Sat, 31 Mar 2012 18:56:12 +1100
> The following reply was made to PR misc/46182; it has been noted by GNATS.
>
> From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
> To: gnats-bugs@NetBSD.org
> Cc: martin@duskware.de, tsutsui@ceres.dti.ne.jp
> Subject: Re: toolchain/46182
> Date: Sat, 31 Mar 2012 16:44:24 +0900
>
> > - add more exceptions to the script, so it creats executable scripts where
> > needed
> >
> > - make sure the whole build does not need to invoke any shell script as
> > direct command (but use "sh $script" instaed)
>
> IIRC some Makefiles pre-generated by autoconf invoke scripts as
> direct command, and it's a bit annoying to fix third party distributions
> which may require specific autoconf versions.
in this case i have absolutely no objections to simply patching the
configure script (and the ignored configure.in, of course) directly.
.mrg.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/46182
Date: Sun, 6 Oct 2013 12:12:50 +0000
On Tue, Mar 27, 2012 at 09:10:07PM +0000, Martin Husemann wrote:
> This probably is caused by src/distrib/sets/makesrctars which does a sed
> run on an mtree specification to make sure all simple files get 0664
> permissions:
>
> ${SED} -e 's:type=file:& mode=0664:' \
> -e 's:type=dir:& mode=0775:' \
>
> A few lines below it special cases build.sh and adds exec permissions.
>
> Now there are two ways to solve this:
>
> - add more exceptions to the script, so it creats executable scripts where
> needed
>
> - make sure the whole build does not need to invoke any shell script as
> direct command (but use "sh $script" instaed)
Wouldn't it be better to fix the script to preserve execute
permissions on regular files?
--
David A. Holland
dholland@netbsd.org
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46182 CVS commit: src/distrib/sets
Date: Tue, 7 Jan 2014 08:32:39 -0500
Module Name: src
Committed By: christos
Date: Tue Jan 7 13:32:38 UTC 2014
Modified Files:
src/distrib/sets: makesrctars
Log Message:
PR/46182: Andreas Gustafsson: Make all files ending in [.-]sh executable.
The perfect is the enemy of the good.
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/distrib/sets/makesrctars
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 02 Jun 2014 01:16:30 +0000
State-Changed-Why:
is this currently working?
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org,
netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org,
dholland@NetBSD.org
Subject: Re: misc/46182 (Sources from src.tgz do not build)
Date: Fri, 6 Jun 2014 09:19:09 +0300
dholland@NetBSD.org wrote:
> is this currently working?
No, it is now failing in a different place:
dependall ===> tests/bin/sh/dotcmd
# create dotcmd/Atffile
/usr/src/tests/bin/sh/dotcmd/scoped_command 'case' 'break' 'break' >'break_case'
sh: /usr/src/tests/bin/sh/dotcmd/scoped_command: permission denied
*** Failed target: break_case
*** Failed command: /usr/src/tests/bin/sh/dotcmd/scoped_command 'case' 'break' 'break' >'break_case'
*** Error code 126
Stop.
nbmake[9]: stopped in /usr/src/tests/bin/sh/dotcmd
--
Andreas Gustafsson, gson@gson.org
State-Changed-From-To: feedback->open
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 06 Jun 2014 07:20:16 +0000
State-Changed-Why:
More problems surfaced.
State-Changed-From-To: open->closed
State-Changed-By: apb@NetBSD.org
State-Changed-When: Tue, 05 Aug 2014 13:19:31 +0000
State-Changed-Why:
I fixed it again
.
From: Andreas Gustafsson <gson@gson.org>
To: apb@NetBSD.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: misc/46182 (Sources from src.tgz do not build)
Date: Fri, 8 Aug 2014 07:57:21 +0300
apb@NetBSD.org wrote:
> I fixed it again
I can confirm that it is now indeed fixed. Thank you.
--
Andreas Gustafsson, gson@gson.org
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.