Build the nis module with tirpc

This commit is contained in:
Petr Viktorin 2018-01-17 13:58:28 +01:00
parent 75ba8b986c
commit 3056bfd92a
4 changed files with 51 additions and 3 deletions

View File

@ -104,6 +104,15 @@ diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index fbfa1c1..138fb33 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -231,7 +231,7 @@
# Some more UNIX dependent modules -- off by default, since these
# are not supported by all UNIX systems:
-nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib64/nsl
termios termios.c # Steen Lumholt's termios module
resource resource.c # Jeremy Hylton's rlimit interface
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
# Edit the variables DB and DBLIBVERto point to the db top directory
# and the subdirectory of PORT where you built it.

View File

@ -0,0 +1,26 @@
diff a/setup.py b/setup.py
--- a/setup.py 2018-01-17 11:58:45.384354567 +0100
+++ b/setup.py 2018-01-17 11:54:23.384743168 +0100
@@ -1346,19 +1346,10 @@
else:
missing.append('resource')
- # Sun yellow pages. Some systems have the functions in libc.
- if (host_platform not in ['cygwin', 'atheos', 'qnx6'] and
- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
- libs = ['nsl']
- else:
- libs = []
- exts.append( Extension('nis', ['nismodule.c'],
- libraries = libs) )
- else:
- missing.append('nis')
+ # nis (Sun yellow pages) is handled in Setup.dist
+
else:
- missing.extend(['nis', 'resource', 'termios'])
+ missing.extend(['resource', 'termios'])
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.

View File

@ -111,7 +111,7 @@
-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
-#termios termios.c # Steen Lumholt's termios module
-#resource resource.c # Jeremy Hylton's rlimit interface
+nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
+termios termios.c # Steen Lumholt's termios module
+resource resource.c # Jeremy Hylton's rlimit interface

View File

@ -112,7 +112,7 @@ Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.14
Release: 6%{?dist}
Release: 7%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@ -142,6 +142,10 @@ BuildRequires: readline-devel
BuildRequires: sqlite-devel
BuildRequires: tcl-devel
# For the nis module
BuildRequires: libnsl2-devel
BuildRequires: libtirpc-devel
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME. We use
# it (in pyexpat) in order to enable the fix in Python-2.7.3 for CVE-2012-0876:
BuildRequires: expat-devel >= 2.1.0
@ -228,6 +232,7 @@ Source7: pynche
# - various modules are built by default by upstream as static libraries;
# we built them as shared libraries
# - build the "readline" module (appears to also be handled by setup.py now)
# - build the nis module (which needs the tirpc library since glibc 2.26)
# - enable the build of the following modules:
# - array arraymodule.c # array objects
# - cmath cmathmodule.c # -lm # complex math library functions
@ -254,7 +259,6 @@ Source7: pynche
# - _socket socketmodule.c # Socket module helper for socket(2)
# - _ssl _ssl.c
# - crypt cryptmodule.c -lcrypt # crypt(3)
# - nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
# - termios termios.c # Steen Lumholt's termios module
# - resource resource.c # Jeremy Hylton's rlimit interface
# - audioop audioop.c # Operations on audio samples
@ -754,6 +758,11 @@ Patch285: 00285-fix-non-deterministic-read-in-test_pty.patch
# Fixed upstream: https://bugs.python.org/issue32186
Patch287: 00287-fix-thread-hanging-on-inaccessible-nfs-server.patch
# 00289 #
# Disable automatic detection for the nis module
# (we handle it it in Setup.dist, see Patch0)
Patch289: 00289-disable-nis-detection.patch
# (New patches go here ^^^)
#
# When adding new patches to "python2" and "python3" in Fedora, EL, etc.,
@ -1077,6 +1086,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
%patch284 -p1
%patch285 -p1
%patch287 -p1
%patch289 -p1
%if 0%{?_module_build}
@ -1957,6 +1967,9 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Wed Jan 17 2018 Petr Viktorin <pviktori@redhat.com> - 2.7.14-7
- Build the nis module with tirpc
* Tue Jan 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.14-6
- Rebuild for reverted gdbm 1.13 on Fedora 27