FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-32521: nis libtirpc by tiran · Pull Request #5137 · python/cpython · GitHub

Repository navigation

bpo-32521: nis libtirpc - #5137

Merged
tiran merged 1 commit into
python:masterfrom
tiran:nis_libtirpc
Jan 12, 2018
Merged

tiran merged 1 commit into
python:masterfrom
tiran:nis_libtirpc

Conversation

tiran commented Jan 8, 2018 •
edited
Loading

Copy link
Copy Markdown
Member

glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes christian@python.org

https://bugs.python.org/issue32521

tiran commented Jan 8, 2018

Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Contributor

Confirming here that applying the patch makes the nis module compile successfully at a system where the sun rpc interfaces are provided by libtirpc and not glibc.

Copy link
Copy Markdown
Member

With this change, setup.py first checks if rpcsvc/yp_prot.h is available:

find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None

and then it checks if libtirpc is available:

self.compiler.find_library_file(lib_dirs, 'tirpc')

If libtirpc is available, it pass /usr/include/tirpc in include directories to build nismodule.c.

In Fedora 27, rpcsvc/yp_prot.h is provided by glibc-headers. In Fedora rawhide (future F28), it's still provided by glibc-headers. It may be provided by a different package (rpcsvc-proto) in the future: https://bugzilla.redhat.com/show_bug.cgi?id=1532364

The PR is correct since rpcsvc/yp_prot.h will remain in /usr/include (full path: /usr/include/rpcsvc/yp_prot.h) even if it will be provided by a different package in Fedora 28.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, but please just rename include_dirs variable.

Later we might enhance the code by using pkg-config to get the include directory, rather than using an hardcoded path, but well... setup.py doesn't support pkg-config yet, pkg-config is not available on all platforms, and nis is going to be deprecated... So I don't think that it's worth it.

Comment thread setup.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This code lives in the giant detect_modules() function which is 1184 lines long... The function should be refactored, but that's out of the scope of the PR.

Would you mind to rename include_dirs to nic_incs, as done for for other "include_dirs=" parameters? It would avoid bad surprised with name clashes in this giant function.

glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>

tiran commented Jan 12, 2018

Copy link
Copy Markdown
Member Author

@vstinner PR is ready for review

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM.

tiran merged commit f3031b8 into python:master Jan 12, 2018

Copy link
Copy Markdown
Contributor

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6.
🐍🍒⛏🤖

tiran deleted the nis_libtirpc branch January 12, 2018 14:26
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2018
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8)

Copy link
Copy Markdown

GH-5165 is a backport of this pull request to the 3.6 branch.

Copy link
Copy Markdown

GH-5166 is a backport of this pull request to the 2.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2018
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8)
tiran pushed a commit that referenced this pull request Jan 12, 2018
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8)
tiran pushed a commit that referenced this pull request Jan 12, 2018
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8)
jcfr pushed a commit to python-cmake-buildsystem/python-cmake-buildsystem that referenced this pull request Jan 21, 2020
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes #224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillion@kitware.com>
jcfr pushed a commit to python-cmake-buildsystem/python-cmake-buildsystem that referenced this pull request Jan 21, 2020
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes #224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillion@kitware.com>
jcfr added a commit to python-cmake-buildsystem/python-cmake-buildsystem that referenced this pull request Jan 21, 2020
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes #224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
jcfr added a commit to python-cmake-buildsystem/python-cmake-buildsystem that referenced this pull request Jan 22, 2020
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes #224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
dand-oss pushed a commit to dand-oss/python-cmake-buildsystem that referenced this pull request May 13, 2020
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes python-cmake-buildsystem#224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
dand-oss pushed a commit to dand-oss/python-cmake-buildsystem that referenced this pull request Jun 5, 2022
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis moduleupdated path for rpc.h for systems using libtirpc

See python/cpython#5137

This closes python-cmake-buildsystem#224

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL