pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54056: Python27 fails to build on Fedora 29



>Number:         54056
>Category:       pkg
>Synopsis:       Python27 fails to build on Fedora 29
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 12 02:35:00 +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



Home | Main Index | Thread Index | Old Index