Commit graph

328 commits

Author SHA1 Message Date
Dmitry Marakasov
7f1bab7e19 lang/python*: sort pkg-plists
Sort pkg-plists to reduce diff between existing and future versions
of python.

Approved by:	portmgr blanket (cosmetic change)
2021-07-14 21:56:31 +03:00
Dmitry Marakasov
5f69415313 Mk: switch from PYTHON_PORTVERSION to PYTHON_DISTVERSION
This brings python framework in consistense with handbook recommendations
to prefer DISTVERSION and simplifies adding prerelease versions of
python

PR:		255013
Differential Revision:	https://reviews.freebsd.org/D29418
Exp-run by:	antoine
Approved by:	wen@, no objection from python@ or portmgr@
2021-05-25 16:55:44 +03:00
Yasuhiro Kimura
9671981826
*: Remove unnecessary 'port' argument from USES=readline
PR:		248459
Exp-run by:	antoine
2021-05-15 09:14:04 +02:00
Mathieu Arnold
cf118ccf87
One more small cleanup, forgotten yesterday.
Reported by:	lwhsu
2021-04-07 10:09:01 +02:00
Mathieu Arnold
305f148f48
Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
Niclas Zeising
0e32330f15 Chanse update of devel/libffi
Chase the devel/libffi update
Bump portrevision of all dependent ports to chace shard library version bump
in libffi.
Update LIB_DEPENDS lines where needed to not require a specific version of
libffi.so.

PR:		247028 (for tracking)
2020-07-04 18:11:42 +00:00
Wen Heping
039f21f95a - Update to 2.7.18 [1]
(include security fix)
- Fix build with OPTION of DEBUG THREADS [2]

PR:		245776
Submitted by:	vvd@unislabs.com [1],
		takefu@airport.fm [2]
Exp-run by:	antoine@ [1]
MFH:		2020Q2
Security:	CVE-2019-18348, CVE-2020-8492
2020-05-05 08:23:11 +00:00
Antoine Brodin
9249a557d6 Deprecate python2
With hat:	portmgr
2020-01-01 16:21:17 +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
Wen Heping
2128d8e259 - Update lang/python27 to 2.7.17
PR:		241357
Submitted by:	wen@
Exp-run by:	antoine@
2019-10-24 15:13:26 +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
Mark Linimon
1633253e05 In various places in the ports tree, tests against ARCH are iterated
one-by-one when a pattern test would be more robust.

This consolidates the tests for 64-bit functionality.

PR:		239163
Approved by:	sunpoet (python, maintainer)
2019-10-04 22:46:20 +00:00
Mathieu Arnold
558224994b onvert to UCL & cleanup pkg-message (categories l-m) 2019-08-13 22:29:42 +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
052f94b90f Add note to update python documentation (lang/python-doc-*) 2019-03-29 14:16:57 +00:00
Wen Heping
a8ad5de611 - Update python27 to 2.7.16
PR:		236318
Submitted by:	wen@(myself)
Exp-run by:	antoine@FreeBSD.org
2019-03-11 08:18:00 +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
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
Wen Heping
fdda348b25 - Update to 2.7.15(include security fix)
PR:		228028
Submitted by:	wen@(myself)
Exp-run by:	antoine@
MFH:		2018Q2
2018-05-11 12:49:32 +00:00
Bernard Spil
54ca080c24 lang/python27: Fix build with LibreSSL 2.7
PR:		226883
Submitted by:	Charlie Li <ml+freebsd vishwin info>
Approved by:	python (koobs)
Differential Revision:	https://reviews.freebsd.org/D14837
2018-04-28 19:11:13 +00:00
Antoine Brodin
0c9368fcde Revert r462630, it introduced regressions
PR:		226135
With hat:	portmgr
2018-03-02 06:54:14 +00:00
Antoine Brodin
2ba800981d Revert r463321, it breaks lang/python27 on at least vanilla FreeBSD 10.x
Reported by:	pkg-fallout
With hat:	portmgr
2018-03-02 06:31:47 +00:00
Kubilay Kocak
461fb52bc7 lang/python27: Fix build regression
r462630 added OpenSSL include/library paths to CFLAGS/LIBS which caused
the _elementtree and pyexpat modules to fail to build. Adding paths to CFLAGS
is known to cause issues [1].

Accordingly:

- Switch to using CPPFLAGS for OpenSSL include/library paths (like NLS).
- Move the comment describing why this is necessary to the top of the port
  with reasonable warning about what can happen and why.

[1] https://svnweb.freebsd.org/ports?view=revision&revision=326729

PR:		226135, 222795)
Reported by:	many
Reviewed by:	sunpoet (python)
Approved by:	koobs (python)
2018-03-01 13:47:10 +00:00
Sunpoet Po-Chuan Hsieh
9b4c6eb378 Fix build with OpenSSL 1.1.0 (security/openssl-devel)
This is a follow up commit of r461915.

MFH:		2018Q1
2018-02-22 19:50:54 +00:00
Sunpoet Po-Chuan Hsieh
ba9d9265aa Clean up ARCH statement
PR:		223985
Submitted by:	linimon
MFH:		2018Q1
2018-02-16 15:43:43 +00:00
Sunpoet Po-Chuan Hsieh
1d451321eb Fix build with OpenSSL 1.1.0 (security/openssl-devel)
- Remove BROKEN_SSL=openssl-devel

Reference:	https://bugs.python.org/issue30622
		b2d096bd2a
PR:		222795
Submitted by:	brnrd
MFH:		2018Q1
2018-02-15 12:47:58 +00:00
Sunpoet Po-Chuan Hsieh
e5c08e7aec Silence patch messages 2018-02-12 19:03:48 +00:00
Sunpoet Po-Chuan Hsieh
a76632bc34 Set PORTNAME to python and add PKGNAMESUFFIX
- Sort USES
- Remove CPE_*: all of them are default values
- Update http:// links in Makefile comments and patch files
2018-02-11 16:52:36 +00:00
Antoine Brodin
5729569bac When cross-compiling with qemu, recompile _sysconfigdata.py after patching it
Reported by:	rene@
With hat:	portmgr
2017-10-15 15:01:15 +00:00
Wen Heping
50bb8c90c4 - Update to 2.7.14(include security fix)
PR:		222398
Submitted by:	wen@(myself)
Exp-run by:	antoine@
MFH:		2017Q3
2017-09-24 11:57:09 +00:00
Sean Bruno
e6f4295f5c 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-02 17:58:03 +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
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
Martin Wilke
38e0c39859 - Remove SEM option by making it always avalible
Since FreeBSD 8.x EOL in 2015-08-01 the option doesn't have any value beyond
footshooting[1]. sem_open() and sem_init(pshared=1) always work FreeBSD 9.0
or later after base r201546.

[1] https://lists.freebsd.org/pipermail/freebsd-ports/2017-April/108116.html

PR:		218641
Reported by:	jbeich
Exp-run:        antoine
MFH:		2017Q2
Differential Revision:	https://reviews.freebsd.org/D10446
2017-04-23 21:16:47 +00:00
Sunpoet Po-Chuan Hsieh
a9fa3bf2ae Use BROKEN_SSL and update WWW 2017-04-16 11:08:25 +00:00
Martin Wilke
d69a0b0f5d - Fix shebang
Thanks to: amdmi3
2017-04-14 18:07:08 +00:00
Wen Heping
ab10a180af - Fix the pkg-plist when build with WITHOUT_NIS=yes 2016-12-26 14:12:26 +00:00
Wen Heping
003329ce22 - Update to 2.7.13
PR:		215375
Submitted by:	wen@
Exp-run by:	antoine@
2016-12-26 01:01:04 +00:00
Mathieu Arnold
703ff6d361 Mark some ports as not openssl-devel ready.
Sponsored by:	Absolight
2016-11-29 18:46:21 +00:00
Tijl Coosemans
0d2a64d2f9 Remove no-op patch.
This patch was submitted to upstream libffi and from there to upstream
libtool, but it doesn't do anything.  The original patch committed in
r158131 did do something but when it was no longer needed it was changed
into something that doesn't make sense in r221521 instead of being removed.
Remove it now before it causes more confusion.
2016-11-02 14:51:48 +00:00
Mathieu Arnold
a0bcd2cf68 Use USES=pathfix where applicable.
PR:		213195
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D8093
2016-10-21 15:21:13 +00:00
Wen Heping
427fad8f42 - Update to version 2.7.12
- Remove patch that is included upstream
- Switch USE_OPENSSL to USES= ssl [1]
- Update documentation for python27
- Don't set CPE_VERSION, default is PORTVERSION [1]

PR:		210685
Submitted by:	wen@(myself), brnrd@ [1]
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D6994
2016-07-03 00:10:42 +00:00
Ruslan Makhmatkhanov
5643ed620a lang/python[xx]: backport upstream fix for CVE-2016-5636
Add patch for integer overflow in zipimport module to all our python ports.

While I'm here, get rid of -f flag in ${RM} invocation, because ${RM} already
expands to rm -f, so in result we are getting something like:

/bin/rm -f -f /wrkdirs/usr/ports/lang/python35/work/stage/usr/local/lib/libpython3.so

PR:		210325
Submitted by:	 Vladimir Krstulja <vlad-fbsd@acheronmedia.com>
Security:	1d0f6852-33d8-11e6-a671-60a44ce6887b
With hat:	python
2016-06-17 17:09:04 +00:00
Dmitry Marakasov
c86e9d9724 Remove NLS, DOCS, EXAMPLES and IPV6 from OPTIONS_DEFAULT, they are enabled by default anyway and don't need to be listed
Approved by:	portmgr blanket
2016-05-23 20:35:01 +00:00
Dimitry Andric
3ab35818fc For the various lang/python* ports, improve the __FreeBSD_version
check in pyport.h for working around a very old ctype issue.

If the workaround for this issue is enabled, pyport.h redefines
toupper() and some other ctype macros, and this wreaks havoc when
including newer libc++ headers (or any other system header which tries
to declare those functions).

Approved by:	portmgr (antoine)
PR:		208486
MFH:		2016Q2
2016-04-25 20:22:19 +00:00
Mathieu Arnold
a9dcad2fff Remove ${PORTSDIR}/ from dependencies, categories h, i, j, k, and l.
With hat:	portmgr
Sponsored by:	Absolight
2016-04-01 14:08:37 +00:00
Kubilay Kocak
474ff0ec6a lang/python{27,3*}: Backport patch in upstream issue20397
In certain situations, file references (.py[co]) for Python files that
fail to compile with compileall() are still added to distutils --record
output.

This output is used for pkg-plist generation and must only contain
references to files that will be installed.

One example of a failure condition is when a Python 2/3 compatible
package containing a file containing Python 3.x only code is built with
Python 2.x, such as Gunicorn's _gaiohttp.py [1]

This change backports patches submitted against upstream issue 20397 [2]
that has not yet been committed.

 - For Python 2.7 and 3.5, backport both install_lib and test
 - For Python 3.2, 3.3 and 3.4, only backport install_lib

[1] https://svnweb.freebsd.org/changeset/ports/404558
[2] https://bugs.python.org/issue20397

Thank you to Brendan Molloy for producing and submitting the patches
against upstream sources.

Reviewed by:		sbz (python)
MFH:			2016Q1
Differential Revision:	D4832
2016-01-08 16:45:09 +00:00
John Marino
6256117d69 lang/python27(3*), Mk/Uses/python.mk: remove make spawn
There are some inefficiencies in python.mk that significantly slow down
full tree scanning.  The use of bmake to obtain the current version of
a specific python is responsible for the majority of the slow done.

This commit splits out the PYTHON_PORTVERSION definition (which is the
same as the lang/python* PORTVERSION) into separate files.  With this
change, python.mk can simple include the makefile fragment instead of
spawning a new instance of make.

Different Revision:	https://reviews.freebsd.org/D4660
Approved by:		antoine (python), mva (python)
2015-12-29 12:03:09 +00:00
Martin Wilke
b05bb8a6fb - Switch regression-test to TEST_TARGED
Discussed in:   D4695
Reviewed by:	koobs
2015-12-24 11:39:53 +00:00