NetBSD Problem Report #37148

From martin@duskware.de  Thu Oct 18 23:33:15 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id AC5C663B8FE
	for <gnats-bugs@gnats.netbsd.org>; Thu, 18 Oct 2007 23:33:15 +0000 (UTC)
Message-Id: <20071018232859.7F5F963B8FE@narn.NetBSD.org>
Date: Thu, 18 Oct 2007 23:28:59 +0000 (UTC)
From: lacombar@gmail.com
Reply-To: lacombar@gmail.com
To: netbsd-bugs-owner@NetBSD.org
Subject: _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
X-Send-Pr-Version: www-1.0

>Number:         37148
>Category:       pkg
>Synopsis:       _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 18 23:35:00 +0000 2007
>Closed-Date:    
>Last-Modified:  Sun Mar 27 17:20:39 +0000 2011
>Originator:     Arnaud Lacombe
>Release:        -current
>Organization:
>Environment:
NetBSD 4.99.32
>Description:
if NO_CHECKSUM="yes" is defined in Makefile and that patch exists, the call to ${_CHECKSUM_CMD} in `../patch/patch.mk:300` will result in:
-p: command not found
>How-To-Repeat:
try to install pkg which defines NO_CHECKSUM and have patch
>Fix:
define _CHECKSUM_CMD whether or not NO_CHECKSUM is defined:

cvs diff: Diffing .
Index: bsd.checksum-vars.mk
===================================================================
RCS file: /data/netbsd/cvsroot/pkgsrc/mk/checksum/bsd.checksum-vars.mk,v
retrieving revision 1.1
diff -u -r1.1 bsd.checksum-vars.mk
--- bsd.checksum-vars.mk        13 Jul 2006 14:02:34 -0000      1.1
+++ bsd.checksum-vars.mk        18 Oct 2007 22:31:11 -0000
@@ -10,3 +10,10 @@
 #

 DISTINFO_FILE?=                ${PKGDIR}/distinfo+
+_CHECKSUM_CMD=                                                        \
+       ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q}          \
+               ECHO=${TOOLS_ECHO:Q} SED=${TOOLS_SED:Q}                \
+               TEST=${TOOLS_TEST:Q}                                   \
+       ${SH} ${PKGSRCDIR}/mk/checksum/checksum                        \
+
Index: checksum.mk
===================================================================
RCS file: /data/netbsd/cvsroot/pkgsrc/mk/checksum/checksum.mk,v
retrieving revision 1.12
diff -u -r1.12 checksum.mk
--- checksum.mk 9 Oct 2007 19:19:13 -0000       1.12
+++ checksum.mk 18 Oct 2007 22:28:31 -0000
@@ -26,12 +26,6 @@
 #
 _COOKIE.checksum=      ${_COOKIE.extract}

-_CHECKSUM_CMD=                                                        \
-       ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q}          \
-               ECHO=${TOOLS_ECHO:Q} SED=${TOOLS_SED:Q}                \
-               TEST=${TOOLS_TEST:Q}                                   \
-       ${SH} ${PKGSRCDIR}/mk/checksum/checksum                        \
- 
checksum checksum-phase:
        ${RUN} set -e;                                                 \
        case ${.TARGET:Q} in                                           \

>Release-Note:

>Audit-Trail:
[20110327 shattered] edited Environment: field

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37148: _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
Date: Fri, 19 Oct 2007 01:39:25 +0200

 On Thu, Oct 18, 2007 at 11:35:00PM +0000, lacombar@gmail.com wrote:
 > if NO_CHECKSUM="yes" is defined in Makefile and that patch exists,
 > the call to ${_CHECKSUM_CMD} in `../patch/patch.mk:300` will result in:
 > -p: command not found

 In which situation did you hit this? It was generally considered to be
 an error to do this. The only really valid reason to have NO_CHECKSUM in
 a package is if the files are local.

 Joerg

From: "Arnaud Lacombe" <lacombar@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/37148: _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
Date: Fri, 19 Oct 2007 01:47:23 +0200

 On 10/19/07, Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
 > The following reply was made to PR pkg/37148; it has been noted by GNATS.
 >
 > From: Joerg Sonnenberger <joerg@britannica.bec.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: pkg/37148: _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
 > Date: Fri, 19 Oct 2007 01:39:25 +0200
 >
 >  On Thu, Oct 18, 2007 at 11:35:00PM +0000, lacombar@gmail.com wrote:
 >  > if NO_CHECKSUM="yes" is defined in Makefile and that patch exists,
 >  > the call to ${_CHECKSUM_CMD} in `../patch/patch.mk:300` will result in:
 >  > -p: command not found
 >
 >  In which situation did you hit this? It was generally considered to be
 >  an error to do this. The only really valid reason to have NO_CHECKSUM in
 >  a package is if the files are local.
 >
 in wip/qemu-neo1973 (you're right, it's not part of pkgsrc, but anyway
 :) ), this package fetch sources via SVN and then patch them.

  - Arnaud

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37148: _CHECKSUM_CMD not defined if NO_CHECKSUM="yes"
Date: Fri, 19 Oct 2007 02:05:20 +0200

 On Thu, Oct 18, 2007 at 11:55:02PM +0000, Arnaud Lacombe wrote:
 >  in wip/qemu-neo1973 (you're right, it's not part of pkgsrc, but anyway
 >  :) ), this package fetch sources via SVN and then patch them.

 So, why do you need to set NO_CHECKSUM in that case? Just overriding the
 DISTFILES should be enough?

 Joerg

State-Changed-From-To: open->analyzed
State-Changed-By: jlam@NetBSD.org
State-Changed-When: Thu, 28 Feb 2008 21:54:20 +0000
State-Changed-Why:
This is not really a bug in the code, but rather a bug in the documentation.
NO_CHECKSUM should really only be used by packages that have no distinfo
file.  The "checksum" action occurs during both the fetch, extract, and
patch stages.  In the case where there is no distfile yet patches need
to be applied, the appropriate thing to do is to set DISTFILES to an
empty value.  This needs to be documented somewhere, probably in the
pkgsrc guide, before this PR can be closed.


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.