NetBSD Problem Report #44857

From www@NetBSD.org  Mon Apr 11 23:47:22 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 6E4A563C274
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Apr 2011 23:47:22 +0000 (UTC)
Message-Id: <20110411234721.CEDED63BA68@www.NetBSD.org>
Date: Mon, 11 Apr 2011 23:47:21 +0000 (UTC)
From: nathanial_sloss@optusnet.com.au
Reply-To: nathanial_sloss@optusnet.com.au
To: gnats-bugs@NetBSD.org
Subject: Pkgsrc2011Q1/2010Q4: building binary packages and binary packages of dependencies.
X-Send-Pr-Version: www-1.0

>Number:         44857
>Category:       pkg
>Synopsis:       Pkgsrc2011Q1/2010Q4: building binary packages and binary packages of dependencies.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 11 23:50:00 +0000 2011
>Closed-Date:    Mon May 09 07:19:47 +0000 2011
>Last-Modified:  Mon May 09 07:19:47 +0000 2011
>Originator:     Nathanial Sloss
>Release:        5.0.1
>Organization:
>Environment:
NetBSD rusty 5.0.1 NetBSD 5.0.1 (GENERIC) #1: Thu Aug 27 13:27:59 EST 2009  root@beast:/home/nat/NBSD501/usr/src/sys/arch/i386/compile/obj/GENERIC i386

>Description:
pkgsrc2011Q1 & pkgsrc2010Q4.

Problem building binary packages and packages of dependencies.

I have two machines both running NetBSD 5.0.1. I like to build binary packages from pkgsrc and install them on the other.

In attempting to do so I've found only some binary packages are created so I attempted to use 2010Q4 and found the same problem.

This was not a problem in pkgsrc2009Q1.

Thanks.

Nat.
>How-To-Repeat:
cd pkgsrc/security/sudo

make package

Sometimes binaries of dependencies are created (f2c, libtool, etc) sometimes not.
>Fix:

>Release-Note:

>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/44857: Pkgsrc2011Q1/2010Q4: building binary packages and
 binary packages of dependencies.
Date: Tue, 26 Apr 2011 22:02:49 +0900

 On Tue, 12 Apr 2011 08:50:00 +0900, <nathanial_sloss@optusnet.com.au> wrote:

 > cd pkgsrc/security/sudo
 >
 > make package
 >
 > Sometimes binaries of dependencies are created (f2c, libtool, etc) sometimes not.
 >> Fix:

 Workaround:
 put DEPENDS_TARGET=package (or pakcage-install) on /etc/mk.conf.

 It came from changes of default set to DEPENDS_TARGET in mk/bsd.depends.mk.

 with USE_DESTDIR=no (default on pkgsrc-2011Q1 and 2010Q4),
 previously, DEPENDS_TARGET will be set as "package" with "make package",
 but now, set as "package-install".
 So direct dependency will be installed as "make package" (binary package will be created),
 but indirect dependency will be istalled as "make ${UPDATE_TARGET}" (usually, "make install",
 so binary package will not be created).

 How about changes as followings?


 Index: bsd.pkg.update.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.update.mk,v
 retrieving revision 1.22
 diff -u -r1.22 bsd.pkg.update.mk
 --- bsd.pkg.update.mk   3 Jul 2010 04:24:14 -0000       1.22
 +++ bsd.pkg.update.mk   26 Apr 2011 13:01:09 -0000
 @@ -16,7 +16,7 @@
   #
   .if !defined(UPDATE_TARGET)
   .  if defined(DEPENDS_TARGET) && (${DEPENDS_TARGET} == "update")
 -.    if ${_USE_DESTDIR} != "no" || make(package)
 +.    if ${_USE_DESTDIR} != "no" || make(package) || make(package-install)
   UPDATE_TARGET= package-install
   .    else
   UPDATE_TARGET= install
 Index: depends/bsd.depends.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/depends/bsd.depends.mk,v
 retrieving revision 1.20
 diff -u -r1.20 bsd.depends.mk
 --- depends/bsd.depends.mk      25 Feb 2010 02:06:34 -0000      1.20
 +++ depends/bsd.depends.mk      26 Apr 2011 13:01:09 -0000
 @@ -22,7 +22,7 @@
   # dependencies.  This variable is user-settable in /etc/mk.conf.
   #
   .if !defined(DEPENDS_TARGET)
 -.  if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) || make(package)
 +.  if !empty(USE_DESTDIR:M[Yy][Ee][Ss]) || make(package) || make(package-install)
   DEPENDS_TARGET=                package-install
   .  elif make(update)
   .    if defined(UPDATE_TARGET) && (${UPDATE_TARGET} == "replace")


 -- 
 OBATA Akio / obache@NetBSD.org

State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Wed, 04 May 2011 09:51:18 +0000
State-Changed-Why:
Could you apply diff to your 2011Q1 tree and test it?


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44857 CVS commit: pkgsrc/mk
Date: Wed, 4 May 2011 09:49:35 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Wed May  4 09:49:35 UTC 2011

 Modified Files:
 	pkgsrc/mk: bsd.pkg.update.mk
 	pkgsrc/mk/depends: bsd.depends.mk

 Log Message:
 Also set `package-install' to UPDATE_TARGET/DEPENDS_TARGET if current target is
 `package-install', to indirect dependency also create binary package with
 `make package' or `make package-install'.

 should fix PR#44857.


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 pkgsrc/mk/bsd.pkg.update.mk
 cvs rdiff -u -r1.20 -r1.21 pkgsrc/mk/depends/bsd.depends.mk

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

From: Nat Sloss <nathanial_sloss@optusnet.com.au>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/44857: Pkgsrc2011Q1/2010Q4: building binary packages and binary packages of dependencies.
Date: Mon, 9 May 2011 16:24:34 +1000

 Hi 

 I applied the patches to my pkgsrc tree and they work.

 Binary packages are now made for all dependencies.

 Many thanks,

 Nat.


State-Changed-From-To: feedback->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 09 May 2011 07:19:47 +0000
State-Changed-Why:
confirmed fixed.  Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.