NetBSD Problem Report #54056

From www@NetBSD.org  Tue Mar 12 02:33:04 2019
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2E1B07A1B0
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Mar 2019 02:33:04 +0000 (UTC)
Message-Id: <20190312023303.15F3F7A202@mollari.NetBSD.org>
Date: Tue, 12 Mar 2019 02:33:03 +0000 (UTC)
From: dave@weller-fahy.com
Reply-To: dave@weller-fahy.com
To: gnats-bugs@NetBSD.org
Subject: Python27 fails to build on Fedora 29
X-Send-Pr-Version: www-1.0

>Number:         54056
>Category:       pkg
>Synopsis:       Python27 fails to build on Fedora 29
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linux-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 12 02:35:00 +0000 2019
>Closed-Date:    Thu Mar 14 15:58:40 +0000 2019
>Last-Modified:  Thu Mar 14 15:58:40 +0000 2019
>Originator:     David J. Weller-Fahy
>Release:        pkgsrc current as of 2019-03-11
>Organization:
n/a
>Environment:
Linux pooh.weller-fahy.local 4.20.13-200.fc29.x86_64 #1 SMP Wed Feb 27 19:42:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>Description:
The line 'elif ${OPSYS} == "NetBSD" || exists(/usr/bin/ypcat)' in the Makefile results in incorrect values for PLIST.nis and PLIST.no-nis on non-BSD systems that do not have a ypcat binary.

The resulting error message follows.

#v+
=> Checking file-check results for python27-2.7.15nb1
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in
/home/dave/pkg-fedora-29/usr/work/lang/python27/work/.destdir/home/dave/pkg-fedora-29:
ERROR:
/home/dave/pkg-fedora-29/usr/work/lang/python27/work/.destdir/home/dave/pkg-fedora-29/lib/python2.7/lib-
dynload/nis.so
*** Error code 1

Stop.
bmake[1]: stopped in /home/dave/usr/src/pkgsrc/lang/python27
*** Error code 1

Stop.
bmake: stopped in /home/dave/usr/src/pkgsrc/lang/python27
#v-

I discussed this on the pkgsrc-users mailing list, and a suggestion was made to check for the rpcsvc/yp_prot.h file in the same way that Python does. I've created the attached patch to fix the problem in a (hopefully) general way. I've only applied my change to Linux, as I'm not sure it would apply more broadly.
>How-To-Repeat:
Try to `bmake install` within the lang/python27 package on a Fedora 29 system without the yp-tools RPM installed.
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python27/Makefile,v
retrieving revision 1.77
diff -u -p -r1.77 Makefile
--- Makefile	5 Mar 2019 12:43:40 -0000	1.77
+++ Makefile	12 Mar 2019 02:30:48 -0000
@@ -113,6 +113,14 @@ PLIST.nis=	yes
 PLIST.dll=	yes
 .  if ${OPSYS} == "MirBSD" || "${OS_VARIANT}" == "chromeos"
 # neither nis nor no-nis
+.  elif ${OPSYS} == "Linux"
+includedirs!=	cpp -v /dev/null -o /dev/null 2>&1 | sed '/^\#include </,/^End of/{//!b};d'
+.    for includedir in ${includedirs}
+check_file:=	${includedir}/rpcsvc/yp_prot.h
+.      if exists(${check_file})
+PLIST.nis=	yes
+.      endif
+.    endfor
 .  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
 PLIST.nis=	yes
 .  else

>Release-Note:

>Audit-Trail:
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/54056: Python27 fails to build on Fedora 29
Date: Tue, 12 Mar 2019 08:35:13 +0100

 dave@weller-fahy.com writes:
 > [...]
 > >Description:
 > The line 'elif ${OPSYS} =3D=3D "NetBSD" || exists(/usr/bin/ypcat)' in th=
 e Makefile results in incorrect values for PLIST.nis and PLIST.no-nis on n=
 on-BSD systems that do not have a ypcat binary.
 >
 > The resulting error message follows.
 >
 > #v+
 > =3D> Checking file-check results for python27-2.7.15nb1
 > ERROR: ************************************************************
 > ERROR: The following files are in the PLIST but not in
 > /home/dave/pkg-fedora-29/usr/work/lang/python27/work/.destdir/home/dave/=
 pkg-fedora-29:
 > ERROR:
 > /home/dave/pkg-fedora-29/usr/work/lang/python27/work/.destdir/home/dave/=
 pkg-fedora-29/lib/python2.7/lib-
 > dynload/nis.so
 > *** Error code 1
 >
 > Stop.
 > bmake[1]: stopped in /home/dave/usr/src/pkgsrc/lang/python27
 > *** Error code 1
 >
 > Stop.
 > bmake: stopped in /home/dave/usr/src/pkgsrc/lang/python27
 > [...]

 JFTR/as-a-reminder when this will addressed, this is related/same
 problem of PR pkg/53673 and probably affects all lang/python*
 packages.

Responsible-Changed-From-To: pkg-manager->linux-pkg-people
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Tue, 12 Mar 2019 07:51:12 +0000
Responsible-Changed-Why:
Linux problem


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 14 Mar 2019 15:58:40 +0000
State-Changed-Why:
Duplicate of 53673 (q.v.)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.