NetBSD Problem Report #50649

From www@NetBSD.org  Mon Jan 11 20:28:21 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 6EB107ABC0
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Jan 2016 20:28:21 +0000 (UTC)
Message-Id: <20160111202820.628497ACC0@mollari.NetBSD.org>
Date: Mon, 11 Jan 2016 20:28:20 +0000 (UTC)
From: richard@NetBSD.org
Reply-To: richard@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: checkperms should probably not return error with -ff if all errors fixed
X-Send-Pr-Version: www-1.0

>Number:         50649
>Category:       pkg
>Synopsis:       checkperms should probably not return error with -ff if all errors fixed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 11 20:30:00 +0000 2016
>Last-Modified:  Tue Jan 12 05:00:01 +0000 2016
>Originator:     Richard PALO
>Release:        current
>Organization:
>Environment:
SunOS omnis 5.11 omnidev-0-g9705414 i86pc i386 i86pc

>Description:
as mentioned on pkgsrc-users@, it has been noticed that if
'checkperms -cff' is used, even if the protection errors detected
are fixed, an error is returned... which is not very intuitive.

an error should probably only be returned in this case if there
was a problem fixing the protection error, which in this case was no problem.
>How-To-Repeat:
richard@omnis:/home/richard/src/pkgsrc/devel/py-pyparsing$ bmake extract
=> Bootstrap dependency digest>=20010302: found digest-20121220
=> Checksum SHA1 OK for pyparsing-2.0.6.tar.gz
=> Checksum RMD160 OK for pyparsing-2.0.6.tar.gz
=> Checksum SHA512 OK for pyparsing-2.0.6.tar.gz
===> Installing dependencies for py27-pyparsing-2.0.6
==========================================================================
The following variables will affect the build process of this package,
py27-pyparsing-2.0.6.  Their current value is shown below:

        * PYTHON_VERSION_DEFAULT = 27

Based on these variables, the following variables have been set:

        * PYPACKAGE = python27

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/opt/local/bin/bmake clean' after
the changes.
==========================================================================
=> Tool dependency pax>=20040802: found pax-20080110nb2
=> Tool dependency checkperms>=1.1: found checkperms-1.11
=> Build dependency cwrappers>=20150314: found cwrappers-20150707
=> Full dependency py27-setuptools>=0.8: found py27-setuptools-18.8
=> Full dependency python27>=2.7.1nb2: found python27-2.7.11
===> Overriding tools for py27-pyparsing-2.0.6
===> Extracting for py27-pyparsing-2.0.6
richard@omnis:/home/richard/src/pkgsrc/devel/py-pyparsing$ find /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/ -print | checkperms -cff
warning: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/dependency_links.txt: group-writable file.
error: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/dependency_links.txt: world-writable file.
note: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/dependency_links.txt: fixed permissions from 0666 to 0644.
warning: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/PKG-INFO: group-writable file.
error: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/PKG-INFO: world-writable file.
note: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/PKG-INFO: fixed permissions from 0666 to 0644.
warning: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/SOURCES.txt: group-writable file.
error: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/SOURCES.txt: world-writable file.
note: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/SOURCES.txt: fixed permissions from 0666 to 0644.
warning: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/top_level.txt: group-writable file.
error: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/top_level.txt: world-writable file.
note: /tmp/pkgsrc/devel/py-pyparsing/work/pyparsing-2.0.6/pyparsing.egg-info/top_level.txt: fixed permissions from 0666 to 0644.
4 errors and 4 warnings.
richard@omnis:/home/richard/src/pkgsrc/devel/py-pyparsing$ echo $?
1
>Fix:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/50649: checkperms should probably not return error with -ff
 if all errors fixed
Date: Mon, 11 Jan 2016 21:48:34 +0100

 On Mon, Jan 11, 2016 at 08:30:01PM +0000, richard@NetBSD.org wrote:
 > >Description:
 > as mentioned on pkgsrc-users@, it has been noticed that if
 > 'checkperms -cff' is used, even if the protection errors detected
 > are fixed, an error is returned... which is not very intuitive.

 Indepent of anything else, packages should not depend on checkperms to
 fix things up. It is not run for PKG_DEVELOPER=no by default and errors
 only visible in that case are horrible...

 It makes me wonder if the autofix variable shouldn't be just removed in
 first place, it makes no sense.

 Joerg

From: Richard PALO <richard@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50649: checkperms should probably not return error with -ff
 if all errors fixed
Date: Tue, 12 Jan 2016 05:54:34 +0100

 Le 11/01/16 21:50, Joerg Sonnenberger a écrit :
 > The following reply was made to PR pkg/50649; it has been noted by GNATS.
 > 
 > From: Joerg Sonnenberger <joerg@britannica.bec.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 > Subject: Re: pkg/50649: checkperms should probably not return error with -ff
 >  if all errors fixed
 > Date: Mon, 11 Jan 2016 21:48:34 +0100
 > 
 >  On Mon, Jan 11, 2016 at 08:30:01PM +0000, richard@NetBSD.org wrote:
 >  > >Description:
 >  > as mentioned on pkgsrc-users@, it has been noticed that if
 >  > 'checkperms -cff' is used, even if the protection errors detected
 >  > are fixed, an error is returned... which is not very intuitive.
 >  
 >  Indepent of anything else, packages should not depend on checkperms to
 >  fix things up. It is not run for PKG_DEVELOPER=no by default and errors
 >  only visible in that case are horrible...
 >  
 >  It makes me wonder if the autofix variable shouldn't be just removed in
 >  first place, it makes no sense.
 >  
 >  Joerg
 >  
 > 

 This issue was filed based upon the documtation of checkperms itself 
 and that of check/check-perms.mk where, as it stands currently.

 If these options are chucked out, that naturally rips the rug out from under the issue.

 On the other hand, I'm not so sure our job (in pkgsrc, anyway) is to waste a lot
 of time doing things like fixing up protections that error out only because checkperms
 finds them.  

 Using CHECK_PERMS_AUTOFIX=yes in a package, in the case at hand a python package
 seems (currently) justified. 

 The files fixed up here are egg-info files auto generated by 'setup.py sdist' on windows platforms.

 The relevant information to convey upstream for fixup is, in any event, displayed
 in the message output of checkperms.

 -- 
 Richard PALO

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.