Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#54685 - [python2] don't use getentropy syscall

Attached to Project: Arch Linux
Opened by Alan Yang (alany) - Tuesday, 04 July 2017, 07:34 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 12 January 2018, 18:44 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Angel Velasquez (angvp)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Up to 2.7.13-2, python2 did not use the getentropy() syscall, thus working fine on old (pre-3.17) kernels.

However, builders apparently had the HAVE_GETENTROPY marco set for 2.7.13-3. Now it is broken on old long-term kernels.

I doubt that upstream is going to add a fallback mechanism (as in Python 3). So I suggest disabling this when packaging.


Steps to reproduce:

Python 2.7.13 (default, Jul 2 2017, 22:24:59)
[GCC 7.1.1 20170621] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sysconfig
>>> sysconfig.get_config_var('HAVE_GETENTROPY')
1
>>> os.urandom(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 38] Function not implemented
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 12 January 2018, 18:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  python2 2.7.14
Comment by Eli Schwartz (eschwartz) - Tuesday, 04 July 2017, 14:41 GMT
Partial upgrades are unsupported, 3.17 hasn't been available in the repos since December 2014, or September 2015 for linux-lts.

I'm not sure I see the justification in disabling something in python2 purely for the sake of old LTS kernels from the AUR on a rolling-release distro; it seems reasonable to me that that is Python's job, to apply maintenance and compatibility fixes to python2...
Comment by Alan Yang (alany) - Wednesday, 05 July 2017, 02:16 GMT
I apologize. It turned out this has been fixed upstream.

https://github.com/python/cpython/commit/01bdbad3e951014c58581635b94b22868537901c


I understand that partial upgrades are not supported, and pre-3.17 is way too old for Arch. Yet I use Arch in containers, where the kernel is out of my control.
Also, it appears the builder has some inconsistencies. I wouldn't have reported this if 2.7.13-2 and previous releases also used getentropy(). I don't know why 2.7.13-3 suddenly have this enabled, as there are no recent changes about this either in python2 or glibc.

Loading...