NetBSD Problem Report #49915
From www@NetBSD.org Wed May 20 02:47:01 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id E7226A65C6
for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 May 2015 02:47:01 +0000 (UTC)
Message-Id: <20150520024700.75C25A65CA@mollari.NetBSD.org>
Date: Wed, 20 May 2015 02:47:00 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: Unbreak Python builds on no-yp/nis platforms
X-Send-Pr-Version: www-1.0
>Number: 49915
>Category: pkg
>Synopsis: Unbreak Python builds on no-yp/nis platforms
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 20 02:50:00 +0000 2015
>Closed-Date: Wed May 27 15:09:15 +0000 2015
>Last-Modified: Wed May 27 15:09:15 +0000 2015
>Originator: Kamil Rytarowski
>Release: -current
>Organization:
>Environment:
NetBSD chieftec 7.99.16 NetBSD 7.99.16 (GENERIC) #0: Sat May 16 16:54:24 UTC 2015 root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
>Description:
It's possible to strip NetBSD installation from YP/NIS packages. If so Python from pkgsrc assume wrongly that yp/nis is installed it makes the package creation fatal.
This patch also resurrects nis.so vs nis_failed.so switch for python33 and python34.
All Python versions, after applying the attached patch build correctly.
As a side note, probably looking for /usr/bin/ypcat isn't the best option, but since the protocol isn't crucial it's good enough.
>How-To-Repeat:
Get clean pkgsrc-current and clean src-current.
Build and install NetBSD without YP/NIS (MKYP..) and try to build Python packages from pkgsrc.
>Fix:
Index: python27/Makefile
===================================================================
RCS file: /public/netbsd-rsync/pkgsrc/lang/python27/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- python27/Makefile 3 Mar 2015 17:19:58 -0000 1.48
+++ python27/Makefile 19 May 2015 19:58:04 -0000
@@ -125,7 +125,7 @@
PLIST.dll= yes
. if ${OPSYS} == "MirBSD"
# neither nis nor no-nis
-. elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
+. elif exists(/usr/bin/ypcat)
PLIST.nis= yes
. else
PLIST.no-nis= yes
Index: python33/Makefile
===================================================================
RCS file: /public/netbsd-rsync/pkgsrc/lang/python33/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- python33/Makefile 16 Mar 2015 13:53:05 -0000 1.30
+++ python33/Makefile 19 May 2015 22:39:37 -0000
@@ -95,7 +95,7 @@
MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
PLIST.bsddb= yes
PLIST.dll= yes
-. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
+. if exists(/usr/bin/ypcat)
PLIST.nis= yes
. else
PLIST.no-nis= yes
Index: python33/PLIST
===================================================================
RCS file: /public/netbsd-rsync/pkgsrc/lang/python33/PLIST,v
retrieving revision 1.7
diff -u -r1.7 PLIST
--- python33/PLIST 12 Mar 2014 10:42:42 -0000 1.7
+++ python33/PLIST 20 May 2015 02:20:54 -0000
@@ -1649,7 +1649,8 @@
lib/python${PY_VER_SUFFIX}/lib-dynload/grp.so
lib/python${PY_VER_SUFFIX}/lib-dynload/math.so
lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so
-lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
+${PLIST.nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
+${PLIST.no-nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis_failed.so
lib/python${PY_VER_SUFFIX}/lib-dynload/parser.so
lib/python${PY_VER_SUFFIX}/lib-dynload/resource.so
lib/python${PY_VER_SUFFIX}/lib-dynload/select.so
Index: python34/Makefile
===================================================================
RCS file: /public/netbsd-rsync/pkgsrc/lang/python34/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- python34/Makefile 26 Feb 2015 06:23:06 -0000 1.9
+++ python34/Makefile 20 May 2015 02:22:13 -0000
@@ -96,7 +96,7 @@
MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
PLIST.bsddb= yes
PLIST.dll= yes
-. if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
+. if exists(/usr/bin/ypcat)
PLIST.nis= yes
. else
PLIST.no-nis= yes
Index: python34/PLIST
===================================================================
RCS file: /public/netbsd-rsync/pkgsrc/lang/python34/PLIST,v
retrieving revision 1.4
diff -u -r1.4 PLIST
--- python34/PLIST 26 Feb 2015 06:23:06 -0000 1.4
+++ python34/PLIST 20 May 2015 02:21:28 -0000
@@ -1765,7 +1765,8 @@
lib/python${PY_VER_SUFFIX}/lib-dynload/grp.so
lib/python${PY_VER_SUFFIX}/lib-dynload/math.so
lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so
-lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
+${PLIST.nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
+${PLIST.no-nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis_failed.so
lib/python${PY_VER_SUFFIX}/lib-dynload/parser.so
lib/python${PY_VER_SUFFIX}/lib-dynload/resource.so
lib/python${PY_VER_SUFFIX}/lib-dynload/select.so
>Release-Note:
>Audit-Trail:
From: "Kamil Rytarowski" <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/49915: Unbreak Python builds on no-yp/nis platforms
Date: Wed, 20 May 2015 12:52:53 +0200
> Sent: Wednesday, May 20, 2015 at 2:50 AM
> From: gnats-admin@netbsd.org
> To: n54@gmx.com
> Subject: Re: pkg/49915: Unbreak Python builds on no-yp/nis platforms
>
> Thank you very much for your problem report.
> It has the internal identification `pkg/49915'.
> The individual assigned to look at your
> report is: pkg-manager.
>
> >Category: pkg
> >Responsible: pkg-manager
> >Synopsis: Unbreak Python builds on no-yp/nis platforms
> >Arrival-Date: Wed May 20 02:50:00 +0000 2015
>
>
Sorry the Makefile part of my patch is invalid. Only the PLIST patch for python3[34] is good.
I had leftover of ypcat after upgrade in /usr/bin and made a mistake.
If there would be a symbol lookup in shared libs lookup it would nice.
From: Aleksej Saushev <asau@inbox.ru>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/49915: Unbreak Python builds on no-yp/nis platforms
Date: Thu, 21 May 2015 11:44:34 +0300
> # neither nis nor no-nis
> -. elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
> +. elif exists(/usr/bin/ypcat)
> PLIST.nis= yes
> . else
> PLIST.no-nis= yes
This ought to be proper option rather than hidden dependency on file system state at build time.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/49915: Unbreak Python builds on no-yp/nis platforms
Date: Wed, 27 May 2015 14:58:36 +0000
On Thu, May 21, 2015 at 09:05:01AM +0000, Aleksej Saushev wrote:
> > # neither nis nor no-nis
> > -. elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
> > +. elif exists(/usr/bin/ypcat)
> > PLIST.nis= yes
> > . else
> > PLIST.no-nis= yes
>
> This ought to be proper option rather than hidden dependency on
> file system state at build time.
That's well and good, but the package itself detects and decides
whether to build the extra files, based on ... who knows what but
probably something derived from file system state at build time.
You're welcome to fiddle with Python config if you want, but in the
meantime making the plist match is a good start.
--
David A. Holland
dholland@netbsd.org
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49915 CVS commit: pkgsrc/lang
Date: Wed, 27 May 2015 15:02:58 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Wed May 27 15:02:58 UTC 2015
Modified Files:
pkgsrc/lang/python33: PLIST
pkgsrc/lang/python34: PLIST
Log Message:
Restore PLIST.nis/PLIST.no-nis support, lost at some point during updates.
From Kamil Rytarowski in PR 49915.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/python33/PLIST
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/python34/PLIST
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 27 May 2015 15:09:15 +0000
State-Changed-Why:
fixed the PLISTs; thanks
>Unformatted:
(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.