Commit Graph

63 Commits

Author SHA1 Message Date
Thierry Thomas
693abe1cb4 lang/python3X: Fix library installation
The Python ports install the library libpython3.x.so under $PREFIX/lib,
and they set USE_LDCONFIG, but these libraries are not registered, due
to a missing symlink, and they are not found by `ldconfig -r'.

This commit make them to be registered, and for some reason it helps the
dynamic linker to find them, and this allows to fix an error in
french/aster. It also helps to fix errors in newer releases of math/sage
(not yet ready to be committed due to other problems).

No exp-run, but it has been tested with many ports on several platforms.

PR:		257864
Approved by:	koobs (Python team)
MFH:		2021Q4
2021-10-13 19:05:40 +02:00
Dimitry Andric
6bef096664 lang/python3([6-9]|10): disable detection of multiarch
It breaks with clang >= 13, which adds a major.minor version number in
-print-multiarch output, and the dot confuses Python:

ModuleNotFoundError: No module named '_sysconfigdata__freebsd14_x86_64-unknown-freebsd14'

Since we do not support multiarch, and the configure script has no way
to disable the multiarch check, stub it out during post-patch.

PR:		258377
Approved by:	maintainer timeout (2 weeks)
MFH:		2021Q3
2021-09-27 19:56:59 +02:00
Kai Knoblich
526932019c lang/python36: Update to 3.6.15
Changelog:

https://docs.python.org/release/3.6.15/whatsnew/changelog.html#changelog

PR:		258518
Reported by:	Mike Fisher
Approved by:	kai (python, maintainer)
MFH:		2021Q3
Security:	0e561173-0fa9-11ec-a2fa-080027948c12
2021-09-19 12:47:11 +02:00
Kai Knoblich
c92e5f7b9a lang/python36: Deprecate and set to expire
Python 3.6 will reach its End-of-Life at 23rd December 2021.

Set the deprecation note and expiration date accordingly.

Approved by:	koobs (python, maintainer)
MFH:		No (not neccessary, 3+ months from now should be OK)
Differential Revision:	https://reviews.freebsd.org/D31783
2021-09-09 11:02:38 +02:00
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
Po-Chuan Hsieh
a311409c74 lang/python36: Update to 3.6.14
Changes:	https://docs.python.org/release/3.6.14/whatsnew/changelog.html
2021-07-06 22:59:30 +08: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
305f148f48 Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
Wen Heping
47227f3b6b - Update to 3.6.13 2021-02-23 11:43:07 +00:00
Kyle Evans
02966fbc51 lang/python3{6,7,8,9}: Backport close_range patches
Worked out over BPO-40422 and BPO-40423, this is the culmination of months
of work to coordinate with Linux and get close_range(2) added to FreeBSD,
then the usage accepted into CPython. It has landed for Python 3.10 and here
I've backported it locally to all the supported Python 3 versions we have.

Note that this does include and supercede our previous closefrom(2) patches.
There was a lot of intersection between the work done, so this patch against
the ports tree does remove those patches from each of the ports in favor of
this patch. All the patches involved have been accepted and merged upstream.

This patch will bring a performance boost in some more situations on 12.2
and 13.0, as close_range exists there.

There is one additional patch sitting in an upstream PR that shuffles the
_Py_closerange implementation into a different file -- this is not important
for the backport, and the absence of that patch here will not realistically
cause any issues.

PR:		250322
Approved by:	lwhsu (python)
2020-10-14 18:09:41 +00:00
Wen Heping
11fba58a19 - Set PORTREVISION 2020-08-21 15:01:28 +00:00
Wen Heping
5f25c5cd24 - Remove PORTREVISION which forgot in last commit
Spotted by:	lwhsu@(Thanks!)
2020-08-19 15:55:07 +00:00
Wen Heping
7d13034833 - Update to 3.6.12(include security fix)
MFH:		2020Q3
2020-08-19 14:38:28 +00: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
Danilo G. Baio
08e466afc5 lang/python36: Update to 3.6.11
Approved by:	python (with hat)
2020-06-28 13:34:16 +00:00
Danilo G. Baio
92c7674f31 lang/python36: Update to 3.6.10, Fix security issues
The patches for CVE-2019-18348 and CVE-2020-8492 are in the 3.6 branch
and will be present on the next release.

Patch for applying CVE-2020-8492 fix here in the ports tree was reported
and submitted by Mike Fisher <mfisher911@gmail.com> and
Dani <i.dani@outlook.com>.

PR:		246984
MFH:		2020Q2
Security:	ca595a25-91d8-11ea-b470-080027846a02 (CVE-2019-18348)
Security:	a27b0bb6-84fc-11ea-b5b4-641c67a117d8 (CVE-2020-8492)
2020-06-13 13:24:29 +00:00
Antoine Brodin
e7f4f60ba1 Clean up plist 2020-03-01 14:33:45 +00:00
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
Mathieu Arnold
558224994b onvert to UCL & cleanup pkg-message (categories l-m) 2019-08-13 22:29:42 +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
052f94b90f Add note to update python documentation (lang/python-doc-*) 2019-03-29 14:16:57 +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
Wen Heping
bbc317680d - Update lang/python36 to 3.6.8
PR:		234397
Submitted by:	wenheping2000@hotmail.com
Exp-run by:	antoine@
2019-01-01 08:48:18 +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
Kurt Jaeger
a06e03ee79 lang/python36: update 3.6.5 -> 3.6.6
PR:		229386
Exp-run by:	antoine
Relnotes:	https://docs.python.org/3.6/whatsnew/changelog.html#python-3-6-6-final
2018-07-06 08:10:39 +00:00
Bernard Spil
ae29cd406a lang/python36: 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:30:00 +00:00
Sunpoet Po-Chuan Hsieh
af761c00f4 Update to 3.6.5
Changes:	https://docs.python.org/3.6/whatsnew/changelog.html
PR:		227090
Exp-run by:	antoine
2018-04-03 09:46:13 +00:00
Antoine Brodin
16d1193031 Revert r466162, exp-run is still in progress
With hat:	portmgr
2018-04-01 14:53:58 +00:00
Wen Heping
b428529141 - Update to 3.6.5 2018-04-01 14:45:45 +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
1f0bde91fb Update to 3.6.4
Changes:	https://docs.python.org/3.6/whatsnew/changelog.html
2017-12-20 14:38:13 +00:00
Mathieu Arnold
551be3c723 Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored.  They will
  automatically get flavors (py27, py34, py35, py36) depending on what
  versions they support.

  There is also a USE_PYTHON=flavors for ports that do not use distutils
  but need FLAVORS to be set.  A USE_PYTHON=noflavors can be set if
  using distutils but flavors are not wanted.

  A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
  added to cope with Python ports that did not have the Python
  PKGNAMEPREFIX but are flavored.

  USES=python now also exports a PY_FLAVOR variable that contains the
  current python flavor.  It can be used in dependency lines when the
  port itself is not python flavored.  For example, deskutils/calibre.

  By default, all the flavors are generated.  To only generate flavors
  for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
  BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.

  In all the ports with Python dependencies, the *_DEPENDS entries MUST
  end with the flavor so that the framework knows which to build/use.
  This is done by appending '@${PY_FLAVOR}' after the origin (or
  @${FLAVOR} if in a Python module with Python flavors, as the content
  will be the same).  For example:

    RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}

PR:		223071
Reviewed by:	portmgr, python
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12464
2017-11-30 15:50:30 +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