NetBSD Problem Report #48722

From www@NetBSD.org  Sun Apr  6 20:16:24 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EE14CA580A
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  6 Apr 2014 20:16:23 +0000 (UTC)
Message-Id: <20140406201511.9F6FBA5814@mollari.NetBSD.org>
Date: Sun,  6 Apr 2014 20:15:11 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: Source tarballs available in daily releng builds don't have correct permissions set on some files
X-Send-Pr-Version: www-1.0

>Number:         48722
>Category:       misc
>Synopsis:       Source tarballs available in daily releng builds don't have correct permissions set on some files
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    misc-bug-people
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 06 20:20:00 +0000 2014
>Closed-Date:    Sat Apr 12 06:37:38 +0000 2014
>Last-Modified:  Thu Mar 05 08:15:00 +0000 2015
>Originator:     David H. Gutteridge
>Release:        Current
>Organization:
Sometimes no semblance of organization whatsoever
>Environment:
n/a
>Description:
The source tarballs that are available in releng builds on the
nyftp.netbsd.org server have incorrect permissions applied to some
files, which results in build failures should someone download them
to use as the basis for a source tree. (Presumably there is some umask
issue involved when the files are being copied at some point.)

For example, there are two scripts in src/crypto/external/bsd/openssl
(openssl2netbsd and mkpc) that are missing execute permissions, which
means the build fails when it can't run mkpc.

I realize that it might not be very common for people to be using
these sets for anything, given one can grab the source from CVS using
other means, or simply download source tarballs in a different form
via the ftp.netbsd.org server, but presumably the idea is that these
files are provided so someone could indeed use them to build from.
(In my case, I was trying to debug build problems by creating a new
virtualized build environment with a snapshot of the source as of a
certain time, and these seemed one way to do it, until the build
broke.)
>How-To-Repeat:
Create a source tree from files available through releng builds and
then try to build it.
>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: misc/48722: Source tarballs available in daily releng builds don't have correct permissions set on some files
Date: Sun, 6 Apr 2014 22:21:51 +0200

 We should not rely on permissions and invoke such scripts explicitly
 with the host shell.

 Martin

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/48722: Source tarballs available in daily releng builds
 don't have correct permissions set on some files
Date: Mon, 7 Apr 2014 19:48:01 +0200

 On Sun, 06 Apr 2014, dhgutteridge@sympatico.ca wrote:
 >For example, there are two scripts in src/crypto/external/bsd/openssl
 >(openssl2netbsd and mkpc) that are missing execute permissions, which
 >means the build fails when it can't run mkpc.

 Thanks for the report.  The bug was that the build 
 attempted to run the script directly; whenever the build 
 runs a shell script, it is supposedto use ${HOST_SH}, 
 but that was not done in this case.  Revision 1.5 of 
 src/crypto/external/bsd/openssl/pkgconfig.mk should fix the 
 problem with the mkpc script.

 The openssl2netbsd script is not executed during the build; it is 
 run manually by developers importing new versions of openssl, and 
 they can deal with running it under a shell even if it doesn't 
 have execute permission.

 --apb (Alan Barrett)

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/48722: Source tarballs available in daily releng builds don't have correct permissions set on some files
Date: Thu, 10 Apr 2014 17:58:30 -0400

 Continuing on, the next build failure in the tree caused by the same
 issue (a shell script being invoked directly rather than via
 ${HOST_SH}) is here, where the "fixman" script fails to run:

 dependall =3D=3D=3D> external/bsd/libevent/man
 /home/disciple/netbsd-current2/usr/src/external/bsd/libevent/man/fixman =
 /home/disciple/netbsd-current2/i386-obj/home/disciple/netbsd-current2/usr/=
 src/tooldir.NetBSD-5.2_STABLE-i386/bin/nbsed =
 /home/disciple/netbsd-current2/usr/src/external/bsd/libevent/man/buffer.h.=
 3 evbuffer.3
 sh: =
 /home/disciple/netbsd-current2/usr/src/external/bsd/libevent/man/fixman: =
 permission denied

 *** Failed target:  evbuffer.3
 *** Failed command: =
 /home/disciple/netbsd-current2/usr/src/external/bsd/libevent/man/fixman =
 /home/disciple/netbsd-current2/i386-obj/home/disciple/netbsd-current2/usr/=
 src/tooldir.NetBSD-5.2_STABLE-i386/bin/nbsed =
 /home/disciple/netbsd-current2/usr/src/external/bsd/libevent/man/buffer.h.=
 3 evbuffer.3
 *** Error code 126

 Dave

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48722 CVS commit: src/external/bsd/libevent/man
Date: Thu, 10 Apr 2014 19:28:11 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Thu Apr 10 23:28:11 UTC 2014

 Modified Files:
 	src/external/bsd/libevent/man: Makefile

 Log Message:
 PR/48722: David H. Gutteridge: use HOST_SH to execute fixman


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/man/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/48722 CVS commit: src/external/bsd/libevent/man
Date: Fri, 11 Apr 2014 03:17:18 -0400

 On 2014-04-10, at 7:30 PM, Christos Zoulas wrote:
 > The following reply was made to PR misc/48722; it has been noted by GNATS.
 > 
 > From: "Christos Zoulas" <christos@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/48722 CVS commit: src/external/bsd/libevent/man
 > Date: Thu, 10 Apr 2014 19:28:11 -0400
 > 
 > Module Name:	src
 > Committed By:	christos
 > Date:		Thu Apr 10 23:28:11 UTC 2014
 > 
 > Modified Files:
 > 	src/external/bsd/libevent/man: Makefile
 > 
 > Log Message:
 > PR/48722: David H. Gutteridge: use HOST_SH to execute fixman
 > 
 > 
 > To generate a diff of this commit:
 > cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/man/Makefile

 After the last commit, there's a bit still missing (there's a second
 fixman invocation):

 --- Makefile.orig       2014-04-11 02:46:08.000000000 -0400
 +++ Makefile    2014-04-11 03:09:30.000000000 -0400
 @@ -30,7 +30,7 @@

  .for i in ${HSRCS2}
  ${i:S/.h.3/.3/g}: $i
 -       ${.CURDIR}/fixman ${TOOL_SED} ${.ALLSRC} ${.TARGET}
 +       ${HOST_SH} ${.CURDIR}/fixman ${TOOL_SED} ${.ALLSRC} ${.TARGET}
  .endfor

  HMAN2=${HSRCS2:S/.h.3/.3/g}

 Dave

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	dhgutteridge@sympatico.ca
Cc: 
Subject: Re: PR/48722 CVS commit: src/external/bsd/libevent/man
Date: Fri, 11 Apr 2014 09:18:56 -0400

 On Apr 11,  8:20am, dhgutteridge@sympatico.ca ("David H. Gutteridge") wrote:
 -- Subject: Re: PR/48722 CVS commit: src/external/bsd/libevent/man

 |  After the last commit, there's a bit still missing (there's a second
 |  fixman invocation):

 Thanks!

 christos

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/48722: Source tarballs available in daily releng builds don't have correct permissions set on some files
Date: Fri, 11 Apr 2014 18:09:29 -0400

 With these changes in place, I'm now able to build the distribution
 target from the tarballs. This PR can be closed.

 Thanks,

 Dave

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 12 Apr 2014 06:37:38 +0000
State-Changed-Why:
Fixed, thanks for the feedback!


From: rudolf <netbsd@eq.cz>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/48722 (build attempted to run a shell script directly)
Date: Thu, 05 Mar 2015 09:10:40 +0100

 With MKLLVM=yes and netbsd-7 sources, the build runs 
 src/external/bsd/llvm/dist/llvm/configure directly instead of with 
 ${HOST_SH} and fails:

 dependall ===> llvm
 mkdir -p config
 printf '#!/bin/sh\necho 2.7.3' > config/python
 chmod 755 config/python
 cd config && \
 /usr/src/tools/llvm/../../external/bsd/llvm/lib/../dist/llvm/configure \
 --enable-targets=x86,powerpc,sparc,aarch64,arm,mips \
 --with-c-include-dirs=/usr/include/clang-3.6:/usr/include \
 --disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
 --with-clang-srcdir=/usr/src/tools/llvm/../../external/bsd/llvm/lib/../dist/clang 
 \
 --host=x86_64--netbsd --disable-compiler-version-checks \
 llvm_cv_gnu_make_command=/usr/B/tools/bin/nbmake ac_cv_path_CIRCO="echo 
 circo" \
 ac_cv_path_DOT="echo dot" ac_cv_path_DOTTY="echo dotty" \
 ac_cv_path_FDP="echo fdp" ac_cv_path_NEATO="echo neato" \
 ac_cv_path_TWOPI="echo twopi" ac_cv_path_XDOT="echo xdot" \
 --enable-optimized CC=cc CXX=c++ \
 --with-python=/usr/B/obj/tools/llvm/config/python
 sh: 
 /usr/src/tools/llvm/../../external/bsd/llvm/lib/../dist/llvm/configure: 
 permission denied

 *** Failed target:  config/config.status
 *** Failed command: [see above]
 *** Error code 126

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.