Commit Graph

31 Commits

Author SHA1 Message Date
Tobias C. Berner
78321ca20c Fix makefile ordering.
Reported by:	mat
2019-12-07 22:19:30 +00:00
Li-Wen Hsu
7a2c287047 Backport fix of https://bugs.python.org/issue32849
This is needed for starting sysutils/azure-agent at boot:
https://github.com/Azure/WALinuxAgent/issues/1687

Obtained from:	f9c01a16da
MFH:		2019Q4
Sponsored by:	The FreeBSD Foundation
2019-12-07 21:28:10 +00:00
Tobias C. Berner
6bd55ab779 Fix namespace pollution in python3.5 and python3.6 (upstreamed fix)
The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worked on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).

- python2.7 and > 3.6 are already fixed

PR:		232792
Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>, Dima Pasechnik <dimpase+freebsd@gmail.com>
Approved by:	python (maintainer timeout)
Obtained from:	b545ba0a50
2019-12-07 19:11:47 +00:00
Kubilay Kocak
e4c2b30ce8 lang/python{27,35,36,37,38}: Add closefrom(2) support
A single close(fd) syscall is cheap, but when MAXFDS (maximum file
descriptor number) is high, the loop calling close(fd) on each file
descriptor can take several milliseconds.

The default value of subprocess.Popen "close_fds" parameter changed to True
in Python 3. Compared to Python 2, close_fds=True can make Popen 10x
slower: see bpo-37790 [1]

The present workaround on FreeBSD to improve performance is to load and
mount the fdescfs kernel module, but this is not enabled by default.

This change adds minimum viable (and upstreamable) closefrom(2) syscall
support to Python's subprocess and posix modules, improving performance
significantly for loads that involve working with many processes, such as
diffoscope, ansible, and many others.

For additional optimizations, upstream recently (3.8) landed posix_spawn(2)
support [3] and has stated that they will adopt close_range(2) after Linux
merges it [4]. Linux/FreeBSD developers are already collaborating on
ensuring compatible implementations, with FreeBSD's implementation pending
in D21627. [5]

Thank you emaste, cem, kevans for providing analysis, input,
clarifications, comms/upstream support and patches.

[1] https://bugs.python.org/issue37790
[2] https://bugs.python.org/issue38061
[3] https://bugs.python.org/issue35537
[4] https://lwn.net/Articles/789023/
[5] https://reviews.freebsd.org/D21627

Additional References:

https://bugs.python.org/issue8052
https://bugs.python.org/issue11284
https://bugs.python.org/issue13788
https://bugs.python.org/issue1663329
https://www.python.org/dev/peps/pep-0446/

PR:		242274, 221700
Submitted by:	kevans (emaste, cem)
Approved by:	koobs (python (maintainer), santa)
2019-11-29 10:55:00 +00:00
Baptiste Daroussin
7eab0ea11d Drop the ipv6 virtual category for l* category as it is not relevant anymore 2019-10-09 11:53:57 +00:00
Wen Heping
068e793643 - Update to python-3.6.9(include security fix)
PR:		238952
Submitted by:	wenheping2000@hotmail.com(myself)
Reviewed by:	koobs@
Exp-run by:	antoine@
MFH:		2019Q3
2019-07-08 23:10:32 +00:00
Antoine Brodin
8a40adf64d Recompile _sysconfigdata.py after reinplacing it
Reported by:	tcberner
With hat:	portmgr
2019-04-14 16:27:25 +00:00
Sunpoet Po-Chuan Hsieh
40c9c7f7eb Update devel/readline to 8.0
- Bump PORTREVISION of dependent ports for shlib change

Changes:	https://tiswww.case.edu/php/chet/readline/CHANGES
PR:		236156
Exp-run by:	antoine
2019-04-09 14:04:49 +00:00
Sunpoet Po-Chuan Hsieh
519fc0a478 Fix CVE-2019-5010
- Bump PORTREVISION for package change

Obtained from:	216a4d83c3
Reference:	https://bugs.python.org/issue35746
Security:	d74371d2-4fee-11e9-a5cd-1df8a848de3d
MFH:		2019Q1
2019-03-27 19:23:34 +00:00
Rene Ladan
8a502cb2d4 Remove compatibility code for FreeBSD < 11.2 from all ports.
Simplify some ports where DragonFlyBSD no longer needs to be special-cased.
Submitted by:	rene
Reviewed by:	bapt, jbeich
Differential Revision:	https://reviews.freebsd.org/D17724
2018-11-02 13:32:34 +00:00
Wen Heping
04e1cc5fe5 - Update to 3.6.7
PR:		232504
Submitted by:	wen@(myself)
Exp-run by:	antoine@
2018-10-27 04:06:06 +00:00
Kubilay Kocak
929a1b95c8 lang/python27,35+: Remove MAKE_JOBS_UNSAFE
ports r393217 via bug 200622 [1] originally set MAKE_JOBS_UNSAFE=yes due to
incorrect uses of recursive make [2], causing intermittent build failures when
run with multiple jobs (-jN).

Upstream committed a fix for the issue in default (3.6, at the time), 3.5 and
2.7 which are now contained in all released lang/python?? port versions. 3.4 did
not receieve a backport merge.

lang/python3.5+ ports inadvertently inherited MAKE_JOBS_UNSAFE=yes, via
repocopies from lang/python34 on their creation, when they were infact safe to
use with -j.

Remove MAKE_JOBS_UNSAFE in all lang/python?? ports except python34 accordingly.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200622
[2] https://bugs.python.org/issue22359

PR:		232308
Reported by:	cem
Reviewed by:	cem
Approved by:	koobs (python)
MFH:		2018Q4
Differential Revision:	D17579
2018-10-17 06:23:59 +00:00
Tobias Kortkamp
dcbb4afe98 lang/python3?: Fix python3.?-config behavior when symlinked
When python3.?-config is symlinked to another location it starts
outputting bogus paths.  For example

$ pwd
/home/tobias
$ python3.6-config --includes
-I/usr/local/include/python3.6m -I/usr/local/include/python3.6m
$ ln -s /usr/local/bin/python3.6-config python3-config
$ ./python3-config --includes
-I/home/include/python3.6m -I/home/include/python3.6m

This breaks ports trying to use BINARY_ALIAS together with
python3.?-config.  Apply a patch to resolve the symlink first before
trying to find the install prefix.

PR:		229749
Submitted by:	tobik
Reviewed by:	antoine, miwi
Approved by:	python (miwi)
2018-07-26 08:58:50 +00:00
Sunpoet Po-Chuan Hsieh
8fc5634d4f Remove BROKEN_SSL=openssl-devel
PR:		225871
Submitted by:	brnrd
MFH:		2018Q1
2018-02-15 12:48:15 +00:00
Sunpoet Po-Chuan Hsieh
22b1b2a5a7 Silence patch messages 2018-02-12 19:04:02 +00:00
Sunpoet Po-Chuan Hsieh
77c1dd85f1 Remove over-patched shebang fix of Lib/cgi.py
The change from /usr/local/bin/python to /usr/local/bin/python3.6 is already done by USES=shebangfix.

% head -1 /usr/local/lib/python3.6/cgi.py
#!/usr/local/bin/python3.63.6
2018-02-11 16:52:53 +00:00
Sunpoet Po-Chuan Hsieh
5327348fea Clean up Makefile
- Move BROKEN_SSL upward
- Sort USES
- Remove CPE_*: all of them are default values
- Update PLIST_FILES: do not use %%
- Update http:// links in Makefile comments and patch files
2018-02-11 14:36:16 +00:00
Dmitry Marakasov
a0805c0e13 - Fix more shebangs
Approved by:	portmgr blanket
2017-12-21 17:21:14 +00:00
Sunpoet Po-Chuan Hsieh
dc6db978a7 Update to 3.6.3
Changes:	https://docs.python.org/3.6/whatsnew/changelog.html
2017-10-04 10:55:25 +00:00
Sean Bruno
64c2c626f8 Add a code block for the qemu-user enabled cross build environment. When using
this environment in poudriere, CC is not set to the default of /usr/bin/cc and
a cross-compile toolchain is used.  We need to hand edit this so that the run
time configuration for python matches what the FreeBSD base system provides.

PR:		208282
Submitted by:	manu
Approved by:	portmgr (mat)
2017-08-03 00:56:08 +00:00
Sunpoet Po-Chuan Hsieh
a8598a611b Update to 3.6.2
Changes:	https://docs.python.org/3.6/whatsnew/changelog.html
2017-07-17 18:42:02 +00:00
Danilo G. Baio
a4046066e9 lang/python{27,33,34,35,36}: Make Python curses module work with Unicode
Use readline from ports (USES= readline:port) and patch
setup.py to ignore readline from base. The patch is necessary for
FreeBSD < 1100000, as after this the readline library became an
INTERNALLIB, see base r268461 [1]

Link devel/readline against termcapw instead of termcap is part of
this change, see ports r444463 [2]

Note that this is the **ports** approach for getting Python curses
module working with Unicode. The other way is splitting libncurses
into separate libncurses and libtinfo in base, for which an open
issue exists [3].

Apart from Python language ports, at least www/rtv and
sysutils/py-ranger ports have been tested to work correctly
(display Unicode) after this change.

[1] https://svnweb.freebsd.org/changeset/base/268461
[2] https://svnweb.freebsd.org/changeset/ports/444463
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197317

PR:		171246, 197317
Reported by:	Vitaly Magerya <vmagerya gmail com>
Reviewed by:	garga, koobs, miwi, sunpoet
Approved by:	garga (mentor), sunpoet (python, with hat)
Differential Revision:	https://reviews.freebsd.org/D11127
2017-06-28 02:37:53 +00:00
Sunpoet Po-Chuan Hsieh
cb037d3c98 Update devel/readline to 7.0 patch 3
- Bump PORTREVISION for shlib change

Changes:	https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES
		https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
		https://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html
Differential Revision:	https://reviews.freebsd.org/D11172
PR:		219947
Exp-run by:	antoine
2017-06-27 13:46:53 +00:00
Mathieu Arnold
d43901881d Mark BROKEN with openssl-devel.
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/python36/work/stage/usr/local/lib/python3.6/lib-dynload/_ssl.so:No such file or directory

Sponsored by:	Absolight
2017-06-08 10:31:15 +00:00
Kubilay Kocak
2f6fe8dcec lang/python{27,33,34,35,36}: Install GDB debugging script
Users with a GDB that supports [1] Python extensions will automatically
load the extra debugging extensions when debugging programs that are
linked with libpythonX.Y.so.foo.

This enables extensions like 'py-bt' and 'py-frame' as described in
the Fedora Wiki Article: Easier Python Debugging [2], which can be
useful for debugging Python program state from crashes in C extensions,
for example.

[1] PYTHON option enabled in devel/gdb
[2] https://fedoraproject.org/wiki/Features/EasierPythonDebugging

PR:		203021
Submitted by:	cem
Reviewed by:	mat, koobs (python)
Approved by:	koobs (python)
Differential Revision: D10398
2017-06-06 12:56:47 +00:00
Sunpoet Po-Chuan Hsieh
b242df8cd3 Remove BROKEN_SSL
PR:		217703
Submitted by:	Melvyn Sopacua <m.r.sopacua@gmail.com>
2017-05-27 19:30:33 +00:00
Sunpoet Po-Chuan Hsieh
2619ed3ece Use BROKEN_SSL and fix indent 2017-04-16 11:08:44 +00:00
Martin Wilke
d69a0b0f5d - Fix shebang
Thanks to: amdmi3
2017-04-14 18:07:08 +00:00
Sunpoet Po-Chuan Hsieh
a92815fe29 Clean up Makefile
- Use PORTVERSION
- Remove CPE_VERSION
- Update WWW
2017-03-14 21:35:52 +00:00
Sunpoet Po-Chuan Hsieh
f51c2f0758 - Remove TSC option
PR:		215580
Submitted by:	Roland Smith <rsmith@xs4all.nl>
2016-12-26 16:45:31 +00:00
Wen Heping
234f3ad658 - Repocopy lang/python35 --> lang/python36 and update to 3.6.0 2016-12-25 15:08:35 +00:00