NetBSD Problem Report #51358

From www@NetBSD.org  Mon Jul 25 15:08:18 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DC2D87A264
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 25 Jul 2016 15:08:18 +0000 (UTC)
Message-Id: <20160725150817.8F89D7A269@mollari.NetBSD.org>
Date: Mon, 25 Jul 2016 15:08:17 +0000 (UTC)
From: richard@NetBSD.org
Reply-To: richard@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: /usr/bin/cvs fakes file permissions
X-Send-Pr-Version: www-1.0

>Number:         51358
>Category:       bin
>Synopsis:       /usr/bin/cvs fakes file permissions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 25 15:10:00 +0000 2016
>Last-Modified:  Sun Oct 29 05:59:53 +0000 2017
>Originator:     Richard PALO
>Release:        NetBSD 7.0.1 (GENERIC.201605221355Z) i386
>Organization:
>Environment:
>Description:
after freshly installing 7.0.1 i386 on a laptop,
I did a cvs checkout of the pkgsrc current tree.

noticed when hitting the first gnu-configure package
that the mk/gnu-config directory has the following:
> bash-4.3$ ls  -la /usr/pkgsrc/mk/gnu-config/
> total 256
> drwxr-xr-x   3 richard  wheel    512 Jul 25 14:57 .
> drwxr-xr-x  32 richard  wheel   2560 Jul 25 14:14 ..
> drwxr-xr-x   2 richard  wheel    512 Jul 25 14:57 CVS
> -rw-r--r--   1 richard  wheel  43423 Jul 25 14:57 config.guess
> -rw-r--r--   1 richard  wheel  36087 Jul 25 14:57 config.sub
> -rw-r--r--   1 richard  wheel  29308 Jul 25 14:57 libtool-1.4.m4
> -rw-r--r--   1 richard  wheel  10179 Jul 25 14:57 missing

which caused the following when building the first gnu package:
> --- ./configure ---
> CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /tmp/pkgsrc/x11/xproto/work/xproto-7.0.29/missing autoconf
> --- ./do-not-use-config.h.in ---
> /tmp/pkgsrc/x11/xproto/work/.tools/bin/autoheader: /usr/pkgsrc/mk/gnu-config/missing: permission denied
> *** [./do-not-use-config.h.in] Error code 126
>
> make: stopped in /tmp/pkgsrc/x11/xproto/work/xproto-7.0.29


To compare, on SunOS the cvs directory above comes out as follows:
>richard@omnis:/home/richard/src/pkgsrc/mk/gnu-config$ ls -l
>total 149
>-rwxr-xr-x   1 richard  staff      43423 juin  9  2015 config.guess*
>-rwxr-xr-x   1 richard  staff      36087 juin  9  2015 config.sub*
>drwxr-xr-x   2 richard  staff          6 juil. 24 10:52 CVS/
>-rw-r--r--   1 richard  staff      29308 févr. 20  2004 libtool-1.4.m4
>-rwxr-xr-x   1 richard  staff      10179 oct.  1  2013 missing*


>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 25 Jul 2016 17:20:26 +0200

 On Mon, Jul 25, 2016 at 03:10:00PM +0000, richard@NetBSD.org wrote:
 > >Synopsis:       /usr/bin/cvs fakes file permissions

 For a strange value of "fake" - it obeys your umask.

 At least in the base tree we consider everything requiring exec permissions
 in the source tree a bug and fix it.

 Martin

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 25 Jul 2016 18:02:37 +0200

 Le 25/07/16 17:25, Martin Husemann a écrit :
 > The following reply was made to PR port-i386/51358; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
 > Date: Mon, 25 Jul 2016 17:20:26 +0200
 > 
 >  On Mon, Jul 25, 2016 at 03:10:00PM +0000, richard@NetBSD.org wrote:
 >  > >Synopsis:       /usr/bin/cvs fakes file permissions
 >  
 >  For a strange value of "fake" - it obeys your umask.
 >  
 >  At least in the base tree we consider everything requiring exec permissions
 >  in the source tree a bug and fix it.
 >  
 >  Martin
 >  
 > 

 How is this to work for pkgsrc then? 

 Is there some script to fixup infrastructure scripts apparently needing to be executable?
 Or is the error encountered perhaps more a pkgsrc infrastructure 'bug'?

 Must say I haven't run across this before:-O (and I only use cvs for the NetBSD project repos)

 -- 
 Richard PALO

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,
        netbsd-bugs@netbsd.org, richard@NetBSD.org
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 25 Jul 2016 18:29:02 +0200

 On Mon, Jul 25, 2016 at 04:05:01PM +0000, Richard PALO wrote:
 >  How is this to work for pkgsrc then? 
 >  
 >  Is there some script to fixup infrastructure scripts apparently needing to be executable?
 >  Or is the error encountered perhaps more a pkgsrc infrastructure 'bug'?
 >  
 >  Must say I haven't run across this before:-O (and I only use cvs for the NetBSD project repos)

 I do, including on TNF bulk builders.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Richard PALO <richard@netbsd.org>
To: Manuel Bouyer <bouyer@antioche.eu.org>, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Thu, 28 Jul 2016 07:06:20 +0200

 Le 25/07/16 18:29, Manuel Bouyer a écrit :
 > On Mon, Jul 25, 2016 at 04:05:01PM +0000, Richard PALO wrote:
 > I do, including on TNF bulk builders.
 > 

 Okay, I tried a workaround to the wrapper invocation of pkgsrc's missing as follows:
 > nb32$ cvs diff
 > Index: create.mk
 > ===================================================================
 > RCS file: /cvsroot/pkgsrc/mk/tools/create.mk,v
 > retrieving revision 1.5
 > diff -u -r1.5 create.mk
 > --- create.mk   27 Feb 2013 12:09:39 -0000      1.5
 > +++ create.mk   28 Jul 2016 05:01:01 -0000
 > @@ -108,7 +108,7 @@
 >  
 >  .for _t_ in ${TOOLS_GNU_MISSING}
 >  TOOLS_CREATE+=         ${_t_}
 > -TOOLS_PATH.${_t_}?=    ${PKGSRCDIR}/mk/gnu-config/missing
 > +TOOLS_PATH.${_t_}?=    ${TOOLS_SHELL} ${PKGSRCDIR}/mk/gnu-config/missing
 >  TOOLS_SCRIPT.${_t_}?=  ${TOOLS_PATH.${_t_}} ${_t_:T:C/-[0-9].*$//}
 >  .endfor
 >  
 This seems to work in the case of x11/xproto and as well in another case encountered
 textproc/json-c.  It would be nice to here if it fixes the TNF bulk builds.

 -- 
 Richard PALO

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Thu, 28 Jul 2016 07:15:51 +0200

 BTW, I'm find if Martin closes this issue as not really being a bug in NetBSD cvs
 since it appears to be more a pkgsrc tools wrappering issue.
 thanks
 -- 
 Richard PALO

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Sun, 31 Jul 2016 20:04:01 +0000

 On Mon, Jul 25, 2016 at 03:25:01PM +0000, Martin Husemann wrote:
  >  On Mon, Jul 25, 2016 at 03:10:00PM +0000, richard@NetBSD.org wrote:
  >  > >Synopsis:       /usr/bin/cvs fakes file permissions
  >  
  >  For a strange value of "fake" - it obeys your umask.

 I'm missing something -- he said nothing about what his umask was, and
 if he had his umask set to 111 or something silly like that, it's his
 fault.

  >  At least in the base tree we consider everything requiring exec permissions
  >  in the source tree a bug and fix it.

 sure, but as it is it ought to work, and it does for me, including in
 an i386 chroot...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Sun, 31 Jul 2016 22:15:57 +0200

 Le 31/07/16 22:05, David Holland a écrit :
 > The following reply was made to PR port-i386/51358; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
 > Date: Sun, 31 Jul 2016 20:04:01 +0000
 > 
 >  On Mon, Jul 25, 2016 at 03:25:01PM +0000, Martin Husemann wrote:
 >   >  On Mon, Jul 25, 2016 at 03:10:00PM +0000, richard@NetBSD.org wrote:
 >   >  > >Synopsis:       /usr/bin/cvs fakes file permissions
 >   >  
 >   >  For a strange value of "fake" - it obeys your umask.
 >  
 >  I'm missing something -- he said nothing about what his umask was, and
 >  if he had his umask set to 111 or something silly like that, it's his
 >  fault.
 >  
 >   >  At least in the base tree we consider everything requiring exec permissions
 >   >  in the source tree a bug and fix it.
 >  
 >  sure, but as it is it ought to work, and it does for me, including in
 >  an i386 chroot...
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  
 > 

 ?? how is that possible?
 can I see a log from an unprivileged build for xproto and json-c, for example?
 and ls -la for /usr/pkgsrc/mk/gnu-config

 -- 
 Richard PALO

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Sun, 31 Jul 2016 20:32:17 +0000

 On Sun, Jul 31, 2016 at 08:20:01PM +0000, Richard PALO wrote:
  >  >  sure, but as it is it ought to work, and it does for me, including in
  >  >  an i386 chroot...
  >  
  >  ?? how is that possible?

 Depends on what broke your case...

 ...are you maybe using a volume mounted noexec or something like that?

  >  can I see a log from an unprivileged build for xproto and json-c,
  >  for example?  and ls -la for /usr/pkgsrc/mk/gnu-config

 There isn't any need to build, because the files get the right
 permissions:

 macaran% uname -a
 NetBSD macaran 7.99.30 NetBSD 7.99.30 (MACARAN) #39: Tue Jun  7 15:26:15 EDT 2016
 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN i386
 macaran% mkdir /tmp/x
 macaran% cd /tmp/x
 macaran% cvs -q checkout pkgsrc/mk
 U pkgsrc/mk/alternatives.mk
    [...]
 U pkgsrc/mk/wrapper/wrapper.sh
 macaran% ls -l pkgsrc/mk/gnu-config/
 total 122
 drwx------  2 dholland  wheel    512 Jul 31 20:29 CVS
 -rwx------  1 dholland  wheel  43423 Jun  3  2015 config.guess
 -rwx------  1 dholland  wheel  36087 Jun  3  2015 config.sub
 -rw-------  1 dholland  wheel  29308 Feb 20  2004 libtool-1.4.m4
 -rwx------  1 dholland  wheel  10179 Sep 30  2013 missing
 macaran% 

 -- 
 David A. Holland
 dholland@netbsd.org

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Sun, 31 Jul 2016 22:52:24 +0200

 Le 31/07/16 22:35, David Holland a écrit :
 > The following reply was made to PR port-i386/51358; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
 > Date: Sun, 31 Jul 2016 20:32:17 +0000
 > 
 >  On Sun, Jul 31, 2016 at 08:20:01PM +0000, Richard PALO wrote:
 >   >  >  sure, but as it is it ought to work, and it does for me, including in
 >   >  >  an i386 chroot...
 >   >  
 >   >  ?? how is that possible?
 >  
 >  Depends on what broke your case...
 >  
 >  ...are you maybe using a volume mounted noexec or something like that?
 >  
 >   >  can I see a log from an unprivileged build for xproto and json-c,
 >   >  for example?  and ls -la for /usr/pkgsrc/mk/gnu-config
 >  
 >  There isn't any need to build, because the files get the right
 >  permissions:
 >  
 >  macaran% uname -a
 >  NetBSD macaran 7.99.30 NetBSD 7.99.30 (MACARAN) #39: Tue Jun  7 15:26:15 EDT 2016
 >  dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN i386
 >  macaran% mkdir /tmp/x
 >  macaran% cd /tmp/x
 >  macaran% cvs -q checkout pkgsrc/mk
 >  U pkgsrc/mk/alternatives.mk
 >     [...]
 >  U pkgsrc/mk/wrapper/wrapper.sh
 >  macaran% ls -l pkgsrc/mk/gnu-config/
 >  total 122
 >  drwx------  2 dholland  wheel    512 Jul 31 20:29 CVS
 >  -rwx------  1 dholland  wheel  43423 Jun  3  2015 config.guess
 >  -rwx------  1 dholland  wheel  36087 Jun  3  2015 config.sub
 >  -rw-------  1 dholland  wheel  29308 Feb 20  2004 libtool-1.4.m4
 >  -rwx------  1 dholland  wheel  10179 Sep 30  2013 missing
 >  macaran% 
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  
 > 

 I'm on barebones i386 with /usr on /:
 > nb32$ uname -a
 > NetBSD nb32.xxxx.fr 7.99.34 NetBSD 7.99.34 (GEN.nb32) #2: Sun Jul 31 09:59:20 CEST 2016  richard@nb32.xxxx.fr:/usr/objdir/sys/arch/i386/compile/GEN.nb32 i386
 > nb32$ cat /etc/fstab 
 > # NetBSD /targetroot/etc/fstab
 > # See /usr/share/examples/fstab/ for more examples.
 > /dev/wd0a               /       ffs     rw,log           1 1
 > /dev/wd0b               none    swap    sw,dp            0 0
 > kernfs          /kern   kernfs  rw
 > ptyfs           /dev/pts        ptyfs   rw
 > procfs          /proc   procfs  rw
 > /dev/cd0a               /cdrom  cd9660  ro,noauto
 > tmpfs           /var/shm        tmpfs   rw,-m1777,-sram%25
 > nb32$ id
 > uid=1000(richard) gid=100(users) groups=100(users),0(wheel)
 > nb32$ mkdir /tmp/x
 > nb32$ cd /tmp/x
 > nb32$ CVSROOT=anoncvs@anoncvs.fr.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
 > U pkgsrc/mk/gnu-config/config.guess
 > U pkgsrc/mk/gnu-config/config.sub
 > U pkgsrc/mk/gnu-config/libtool-1.4.m4
 > U pkgsrc/mk/gnu-config/missing
 > nb32$ ls -l pkgsrc/
 > pkgsrc/CVS pkgsrc/mk 
 > nb32$ ls -l pkgsrc/mk/
 > pkgsrc/mk/CVS        pkgsrc/mk/gnu-config
 > nb32$ ls -l pkgsrc/mk/gnu-config/
 > total 244
 > drwxr-xr-x  2 richard  wheel    512 Jul 31 22:47 CVS
 > -rw-r--r--  1 richard  wheel  43423 Jun  3  2015 config.guess
 > -rw-r--r--  1 richard  wheel  36087 Jun  3  2015 config.sub
 > -rw-r--r--  1 richard  wheel  29308 Feb 20  2004 libtool-1.4.m4
 > -rw-r--r--  1 richard  wheel  10179 Sep 30  2013 missing

 There is a clear difference in execution permissions
 -- 
 Richard PALO

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, richard@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 00:53:50 +0200

 Le 31/07/16 22:55, Richard PALO a écrit :
 >  I'm on barebones i386 with /usr on /:
 >  > nb32$ uname -a
 >  > NetBSD nb32.xxxx.fr 7.99.34 NetBSD 7.99.34 (GEN.nb32) #2: Sun Jul 31 09:59:20 CEST 2016  richard@nb32.xxxx.fr:/usr/objdir/sys/arch/i386/compile/GEN.nb32 i386
 >  > nb32$ cat /etc/fstab 
 >  > # NetBSD /targetroot/etc/fstab
 >  > # See /usr/share/examples/fstab/ for more examples.
 >  > /dev/wd0a               /       ffs     rw,log           1 1
 >  > /dev/wd0b               none    swap    sw,dp            0 0
 >  > kernfs          /kern   kernfs  rw
 >  > ptyfs           /dev/pts        ptyfs   rw
 >  > procfs          /proc   procfs  rw
 >  > /dev/cd0a               /cdrom  cd9660  ro,noauto
 >  > tmpfs           /var/shm        tmpfs   rw,-m1777,-sram%25
 >  > nb32$ id
 >  > uid=1000(richard) gid=100(users) groups=100(users),0(wheel)
 >  > nb32$ mkdir /tmp/x
 >  > nb32$ cd /tmp/x
 >  > nb32$ CVSROOT=anoncvs@anoncvs.fr.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
 >  > U pkgsrc/mk/gnu-config/config.guess
 >  > U pkgsrc/mk/gnu-config/config.sub
 >  > U pkgsrc/mk/gnu-config/libtool-1.4.m4
 >  > U pkgsrc/mk/gnu-config/missing
 >  > nb32$ ls -l pkgsrc/
 >  > pkgsrc/CVS pkgsrc/mk 
 >  > nb32$ ls -l pkgsrc/mk/
 >  > pkgsrc/mk/CVS        pkgsrc/mk/gnu-config
 >  > nb32$ ls -l pkgsrc/mk/gnu-config/
 >  > total 244
 >  > drwxr-xr-x  2 richard  wheel    512 Jul 31 22:47 CVS
 >  > -rw-r--r--  1 richard  wheel  43423 Jun  3  2015 config.guess
 >  > -rw-r--r--  1 richard  wheel  36087 Jun  3  2015 config.sub
 >  > -rw-r--r--  1 richard  wheel  29308 Feb 20  2004 libtool-1.4.m4
 >  > -rw-r--r--  1 richard  wheel  10179 Sep 30  2013 missing
 >  
 >  There is a clear difference in execution permissions
 >  -- 
 >  Richard PALO
 >  
 > 

 Is this possibly a cousin to https://mail-index.netbsd.org/current-users/2016/04/04/msg029164.html?

 -- 
 Richard PALO

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Sun, 31 Jul 2016 23:03:51 +0000

 On Sun, Jul 31, 2016 at 10:55:01PM +0000, Richard PALO wrote:
  >  >  > nb32$ CVSROOT=anoncvs@anoncvs.fr.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config

 Try with CVSROOT=anoncvs@anoncvs.netbsd.org.

 It's definitely possible that the permissions are wrong on the mirror;
 the way CVS stores execute permissions is by giving the ,v file
 execute permission or not, so it's fragile in some circumstances.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@netbsd.org, richard@NetBSD.org
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 07:07:26 +0800 (PHT)

 On Mon, 1 Aug 2016, Richard PALO wrote:

 > Is this possibly a cousin to https://mail-index.netbsd.org/current-users/2016/04/04/msg029164.html?


 Unlikely, as the issue in that thread was caused by a forgotten "alias" 
 in my .cshrc file.   In other words, that one was "pilot error".


 +------------------+--------------------------+------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
 +------------------+--------------------------+------------------------+

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 01:14:38 +0200

 Le 01/08/16 01:05, David Holland a écrit :
 > Try with CVSROOT=anoncvs@anoncvs.netbsd.org.
 >  
 >  It's definitely possible that the permissions are wrong on the mirror;
 >  the way CVS stores execute permissions is by giving the ,v file
 >  execute permission or not, so it's fragile in some circumstances.
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  
 > 

 good grief!
 > nb32$  CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
 > U pkgsrc/mk/gnu-config/config.guess
 > U pkgsrc/mk/gnu-config/config.sub
 > U pkgsrc/mk/gnu-config/libtool-1.4.m4
 > U pkgsrc/mk/gnu-config/missing
 > nb32$ ls -l pkgsrc/mk/gnu-config/
 > total 244
 > drwxr-xr-x  2 richard  wheel    512 Aug  1 01:11 CVS
 > -rwxr-xr-x  1 richard  wheel  43423 Jun  3  2015 config.guess
 > -rwxr-xr-x  1 richard  wheel  36087 Jun  3  2015 config.sub
 > -rw-r--r--  1 richard  wheel  29308 Feb 20  2004 libtool-1.4.m4
 > -rwxr-xr-x  1 richard  wheel  10179 Sep 30  2013 missing

 -- 
 Richard PALO

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 00:20:32 +0000

 On Sun, Jul 31, 2016 at 11:15:01PM +0000, Richard PALO wrote:
  >  good grief!
  >  > nb32$  CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
  >  > U pkgsrc/mk/gnu-config/config.guess
  >  > U pkgsrc/mk/gnu-config/config.sub
  >  > U pkgsrc/mk/gnu-config/libtool-1.4.m4
  >  > U pkgsrc/mk/gnu-config/missing
  >  > nb32$ ls -l pkgsrc/mk/gnu-config/
  >  > total 244
  >  > drwxr-xr-x  2 richard  wheel    512 Aug  1 01:11 CVS
  >  > -rwxr-xr-x  1 richard  wheel  43423 Jun  3  2015 config.guess
  >  > -rwxr-xr-x  1 richard  wheel  36087 Jun  3  2015 config.sub
  >  > -rw-r--r--  1 richard  wheel  29308 Feb 20  2004 libtool-1.4.m4
  >  > -rwxr-xr-x  1 richard  wheel  10179 Sep 30  2013 missing

 Ok, well at least now we know what's happening.

 We should get the permissions on the mirror fixed (who needs to be
 poked for that to happen?) but also it's a good idea to pursue a patch
 that avoids needing execute permission in the pkgsrc tree. There are
 reasons for that besides cvs being fragile, the most significant
 probably being that on some OSes (e.g. Solaris) you don't want to use
 /bin/sh. (These particular scripts probably account for Solaris, but
 others might not, and who knows what other ancient buggix-type systems
 someone might want to use pkgsrc on...)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 07:15:36 +0200

 Le 01/08/16 02:25, David Holland a écrit :
 >  We should get the permissions on the mirror fixed (who needs to be
 >  poked for that to happen?) but also it's a good idea to pursue a patch
 >  that avoids needing execute permission in the pkgsrc tree. There are
 >  reasons for that besides cvs being fragile, the most significant
 >  probably being that on some OSes (e.g. Solaris) you don't want to use
 >  /bin/sh. (These particular scripts probably account for Solaris, but
 >  others might not, and who knows what other ancient buggix-type systems
 >  someone might want to use pkgsrc on...)
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  
 > 

 The patch proposed uses TOOLS_SHELL which on SunOS is typically bash or pdksh
 (if bootstrapped with --full) or dash with the wip patchset from jperkin@

 I have not had occasion to test it out in a full bulk build (neither on NetBSD
 nor SunOS) but it seems fine on the packages previously affected by the issue.

 -- 
 Richard PALO

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: Manuel Bouyer <bouyer@antioche.eu.org>
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 09:05:08 +0200

 I think the problem is this:

 wiz@yt:~> cd /tmp
 wiz@yt:/tmp> mkdir a
 wiz@yt:/tmp> cd a
 wiz@yt:/tmp/a> CVSROOT=anoncvs@anoncvs.fr.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
 The authenticity of host 'anoncvs.fr.netbsd.org (132.227.74.11)' can't be established.
 ECDSA key fingerprint is SHA256:mnWHwfcyEqmHK9KpBn2/fevec/+0R8ZHvJQlVaJRzwE.
 No matching host key fingerprint found in DNS.
 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added 'anoncvs.fr.netbsd.org,132.227.74.11' (ECDSA) to the list of known hosts.
 U pkgsrc/mk/gnu-config/config.guess
 U pkgsrc/mk/gnu-config/config.sub
 U pkgsrc/mk/gnu-config/libtool-1.4.m4
 U pkgsrc/mk/gnu-config/missing
 wiz@yt:/tmp/a> ls -l pkgsrc/mk/gnu-config/
 total 128
 drwxrwxr-x  2 wiz  wheel    144 Aug  1 09:03 CVS
 -rw-r--r--  1 wiz  wheel  43423 Jun  3  2015 config.guess
 -rw-r--r--  1 wiz  wheel  36087 Jun  3  2015 config.sub
 -rw-r--r--  1 wiz  wheel  29308 Feb 20  2004 libtool-1.4.m4
 -rw-r--r--  1 wiz  wheel  10179 Sep 30  2013 missing
 wiz@yt:/tmp/a> cd ..
 wiz@yt:/tmp> mkdir b
 wiz@yt:/tmp> cd b
 wiz@yt:/tmp/b> CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot cvs -q checkout pkgsrc/mk/gnu-config
 Warning: Permanently added the RSA host key for IP address '199.233.217.198' to the list of known hosts.
 U pkgsrc/mk/gnu-config/config.guess
 U pkgsrc/mk/gnu-config/config.sub
 U pkgsrc/mk/gnu-config/libtool-1.4.m4
 U pkgsrc/mk/gnu-config/missing
 wiz@yt:/tmp/b> ls -l pkgsrc/mk/gnu-config
 total 128
 drwxrwxr-x  2 wiz  wheel    144 Aug  1 09:03 CVS
 -rwxr-xr-x  1 wiz  wheel  43423 Jun  3  2015 config.guess
 -rwxr-xr-x  1 wiz  wheel  36087 Jun  3  2015 config.sub
 -rw-r--r--  1 wiz  wheel  29308 Feb 20  2004 libtool-1.4.m4
 -rwxr-xr-x  1 wiz  wheel  10179 Sep 30  2013 missing
 wiz@yt:/tmp/b>

 I.e. wrong permissions on the anoncvs.fr mirror.
 Please talk to the mirror maintainer. Is it bouyer?
  Thomas

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Thomas Klausner <wiz@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 10:16:11 +0200

 On Mon, Aug 01, 2016 at 09:05:08AM +0200, Thomas Klausner wrote:
 > [...]
 > 
 > I.e. wrong permissions on the anoncvs.fr mirror.
 > Please talk to the mirror maintainer. Is it bouyer?

 It's me.
 I do a rsync --chmod=D755,F644 because on occasion I did get wrong
 read permissions.

 I added -E, lets see if this fixes the problem.



 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 13:49:54 +0200

 Le 01/08/16 10:20, Manuel Bouyer a écrit :
 > ...
 >  I added -E, lets see if this fixes the problem.
 >  

 Seems to work okay now.  Merci manu!

 So, patch or no patch? wiz@?

 cdlt
 -- 
 Richard PALO

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 13:58:50 +0200

 Le 01/08/16 13:50, Richard PALO a écrit :
 > The following reply was made to PR port-i386/51358; it has been noted by GNATS.
 > 
 > From: Richard PALO <richard@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
 > Date: Mon, 01 Aug 2016 13:49:54 +0200
 > 
 >  Le 01/08/16 10:20, Manuel Bouyer a écrit :
 >  > ...
 >  >  I added -E, lets see if this fixes the problem.
 >  >  
 >  
 >  Seems to work okay now.  Merci manu!
 >  

 Except cvs update -C doesn't seem to update my current tree in-situ.

 Is the only way to do it means delete first the files then cvs update?

 -- 
 Richard PALO

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 14:31:25 +0200

 On Mon, Aug 01, 2016 at 12:00:01PM +0000, Richard Palo wrote:
 >  Is the only way to do it means delete first the files then cvs update?

 Yes :(
  Thomas

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 14:33:25 +0200

 On Thu, Jul 28, 2016 at 05:10:01AM +0000, Richard Palo wrote:
 >  Okay, I tried a workaround to the wrapper invocation of pkgsrc's missing as follows:
 >  > nb32$ cvs diff
 >  > Index: create.mk
 >  > ===================================================================
 >  > RCS file: /cvsroot/pkgsrc/mk/tools/create.mk,v
 >  > retrieving revision 1.5
 >  > diff -u -r1.5 create.mk
 >  > --- create.mk   27 Feb 2013 12:09:39 -0000      1.5
 >  > +++ create.mk   28 Jul 2016 05:01:01 -0000
 >  > @@ -108,7 +108,7 @@
 >  >  
 >  >  .for _t_ in ${TOOLS_GNU_MISSING}
 >  >  TOOLS_CREATE+=         ${_t_}
 >  > -TOOLS_PATH.${_t_}?=    ${PKGSRCDIR}/mk/gnu-config/missing
 >  > +TOOLS_PATH.${_t_}?=    ${TOOLS_SHELL} ${PKGSRCDIR}/mk/gnu-config/missing
 >  >  TOOLS_SCRIPT.${_t_}?=  ${TOOLS_PATH.${_t_}} ${_t_:T:C/-[0-9].*$//}
 >  >  .endfor
 >  >  
 >  This seems to work in the case of x11/xproto and as well in another case encountered
 >  textproc/json-c.

 Fine with me. Probably also needed in texinfo.mk.
  Thomas

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, richard@NetBSD.org
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 19:03:12 +0200

 On Mon, Aug 01, 2016 at 12:35:01PM +0000, Thomas Klausner wrote:
 > The following reply was made to PR port-i386/51358; it has been noted by GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
 > Date: Mon, 1 Aug 2016 14:33:25 +0200
 > 
 >  On Thu, Jul 28, 2016 at 05:10:01AM +0000, Richard Palo wrote:
 >  >  Okay, I tried a workaround to the wrapper invocation of pkgsrc's missing as follows:
 >  >  > nb32$ cvs diff
 >  >  > Index: create.mk
 >  >  > ===================================================================
 >  >  > RCS file: /cvsroot/pkgsrc/mk/tools/create.mk,v
 >  >  > retrieving revision 1.5
 >  >  > diff -u -r1.5 create.mk
 >  >  > --- create.mk   27 Feb 2013 12:09:39 -0000      1.5
 >  >  > +++ create.mk   28 Jul 2016 05:01:01 -0000
 >  >  > @@ -108,7 +108,7 @@
 >  >  >  
 >  >  >  .for _t_ in ${TOOLS_GNU_MISSING}
 >  >  >  TOOLS_CREATE+=         ${_t_}
 >  >  > -TOOLS_PATH.${_t_}?=    ${PKGSRCDIR}/mk/gnu-config/missing
 >  >  > +TOOLS_PATH.${_t_}?=    ${TOOLS_SHELL} ${PKGSRCDIR}/mk/gnu-config/missing
 >  >  >  TOOLS_SCRIPT.${_t_}?=  ${TOOLS_PATH.${_t_}} ${_t_:T:C/-[0-9].*$//}
 >  >  >  .endfor
 >  >  >  
 >  >  This seems to work in the case of x11/xproto and as well in another case encountered
 >  >  textproc/json-c.
 >  
 >  Fine with me. Probably also needed in texinfo.mk.

 NAK. TOOLS_PATH as the name implies is really meant to be path.

 Joerg

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 01 Aug 2016 19:29:01 +0200

 Le 01/08/16 19:05, Joerg Sonnenberger a écrit :
 >  >  On Thu, Jul 28, 2016 at 05:10:01AM +0000, Richard Palo wrote:
 >  >  >  Okay, I tried a workaround to the wrapper invocation of pkgsrc's missing as follows:
 >  >  >  > nb32$ cvs diff
 >  >  >  > Index: create.mk
 >  >  >  > ===================================================================
 >  >  >  > RCS file: /cvsroot/pkgsrc/mk/tools/create.mk,v
 >  >  >  > retrieving revision 1.5
 >  >  >  > diff -u -r1.5 create.mk
 >  >  >  > --- create.mk   27 Feb 2013 12:09:39 -0000      1.5
 >  >  >  > +++ create.mk   28 Jul 2016 05:01:01 -0000
 >  >  >  > @@ -108,7 +108,7 @@
 >  >  >  >  
 >  >  >  >  .for _t_ in ${TOOLS_GNU_MISSING}
 >  >  >  >  TOOLS_CREATE+=         ${_t_}
 >  >  >  > -TOOLS_PATH.${_t_}?=    ${PKGSRCDIR}/mk/gnu-config/missing
 >  >  >  > +TOOLS_PATH.${_t_}?=    ${TOOLS_SHELL} ${PKGSRCDIR}/mk/gnu-config/missing
 >  >  >  >  TOOLS_SCRIPT.${_t_}?=  ${TOOLS_PATH.${_t_}} ${_t_:T:C/-[0-9].*$//}
 >  >  >  >  .endfor
 >  >  >  >  
 >  >  >  This seems to work in the case of x11/xproto and as well in another case encountered
 >  >  >  textproc/json-c.
 >  >  
 >  >  Fine with me. Probably also needed in texinfo.mk.
 >  
 >  NAK. TOOLS_PATH as the name implies is really meant to be path.
 >  
 >  Joerg
 >  
 > 

 In my original test patch, I put ${TOOLS_SHELL} before ${TOOLS_PATH} in TOOLS_SCRIPT.

 I opted for the above since given the '?=' (it could possibly be overridden), in which case
 it's not necessarily the pkgsrc 'missing' being discussed.

 I agree that this isn't correct given there are other tools that I use TOOLS_PATH for in scripts.

 Perhaps either holding off, or putting some execution logic in the wrapper itself if test -x fails
 for POSIX shell scripts (or others) is going to need to be done.

 -- 
 Richard PALO

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/51358: /usr/bin/cvs fakes file permissions
Date: Mon, 1 Aug 2016 18:19:05 +0000

 On Mon, Aug 01, 2016 at 05:30:01PM +0000, Richard PALO wrote:
  > In my original test patch, I put ${TOOLS_SHELL} before
  > ${TOOLS_PATH} in TOOLS_SCRIPT.
  >  
  > I opted for the above since given the '?=' (it could possibly be
  > overridden), in which case it's not necessarily the pkgsrc
  > 'missing' being discussed.

 Right... might be something other than a shell script, so feeding it
 to the shell is wrong.

 This makes it all a pain.

 Is it limited to being one pathname, or is it legitimate for it to be
 a path in the $PATH sense? That would make it even more problematic.

  > Perhaps either holding off, or putting some execution logic in the
  > wrapper itself if test -x fails for POSIX shell scripts (or others)
  > is going to need to be done.

 One could put in something like

    if [ ! -x "${TOOLS_PATH.foo}" ]; then
 	TOOLS_INTERP.foo=$(${TOOL_SED} < "${TOOLS_PATH.foo}" -e 's/^#! *//;1q')
    fi

 but this is going to slow everything down a lot...

 -- 
 David A. Holland
 dholland@netbsd.org

Responsible-Changed-From-To: port-i386-maintainer->bin-bug-people
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Sun, 29 Oct 2017 05:59:53 +0000
Responsible-Changed-Why:
Not an i386 architecture bug, moving category


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