1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
Commit Graph

241 Commits

Author SHA1 Message Date
Kubilay Kocak
5d7a9aceb6 lang/python{27,31,32}: Replace USE_XZ with USES=tar:xz
USE_XZ has been deprecated, replace it with the new USES value.

Python 3.3 and 3.4 ports have already been converted.
2014-04-22 14:37:04 +00:00
Kubilay Kocak
aab3da8d2a lang/python{31,32,33}: Fix stage/package as non-root
Copy the second part of a change previously made to python27 [1], to
python31, python32 and python33.

This fixes staging and packaging of these ports by a non-root user by
running ranlib on the archive prior to it being installed read-only.

While I'm here:

- python27: Add breadcrumbs and references to the patch header
- python34: Update breadcrumbs and references to the patch header

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

Submitted by:	antoine
Reviewed by:	kwm, sbz
2014-04-22 12:14:26 +00:00
Kubilay Kocak
21c7eb2952 lang/python{31,32,33}: Add clang 3.4 fix from python27
Copy change committed to python27 [1] to python31, python32 and
python33 to fix builds of some extensions with Clang 3.4.

Also add breadcrumbs to the patch header in lang/python27 referencing
the upstream issue. [2]

The Python 3.4 port (lang/python34) already carries the patch.

[1] https://svnweb.freebsd.org/ports?view=revision&revision=346428
[2] http://bugs.python.org/issue20767
2014-04-20 01:35:39 +00:00
Sunpoet Po-Chuan Hsieh
c5569783bd - Pet portlint: use PYTHON_DISTNAME instead of PYTHON_DISTFILE 2014-04-11 08:25:47 +00:00
Antoine Brodin
2a13bbe17c - Fix build with readline 6.3 from ports
the patch was backported from upstream (issue #20374)
- Add missing USES=readline

Obtained from:	python
2014-03-01 15:19:43 +00:00
Kubilay Kocak
7a2c2ce6e7 lang/python*: Backport security fix for CVE-2014-1912
A vulnerability was reported [1] in Python's socket module, due to a
boundary error within the sock_recvfrom_into() function, which could be
exploited to cause a buffer overflow.

This could be used to crash a Python application that uses the
socket.recvfrom_info() function or, possibly, execute arbitrary code
with the permissions of the user running vulnerable Python code.

This vulnerable function, socket.recvfrom_into(), was introduced in
Python 2.5. Earlier versions are not affected by this flaw.  This is
fixed in upstream branches for version 2.7, 3.1, 3.2 and 3.3.

[1] http://bugs.python.org/issue20246

MFH:		2014Q1
Security:	8e5e6d42-a0fa-11e3-b09a-080027f2d077
2014-03-01 10:52:55 +00:00
Marcus von Appen
a23998721f - Fix bad libpython* symlinks after enabling the lang/python* ports to
be stagedir-aware

PR:		ports/186284
Submitted by:	marino@
Pointyhat to:	myself
2014-02-01 09:21:23 +00:00
Marcus von Appen
6e3723845d - Enable stagedir support
- Convert to new LIB_DEPENDS
2014-01-26 14:47:56 +00:00
Kubilay Kocak
7db9db9528 Bump PORTREVISION for all Python ports to pickup the recent ARM patch
PR:		ports/149167
2013-12-08 09:03:01 +00:00
Kubilay Kocak
d536d1d88b All Python ports: Address abort() for ctypes import on FreeBSD/ARM
The current FreeBSD/ARM __clear_cache() implementation does nothing #if
__i386__ || __x86_64__ #else abort();

cognet@ advises this is an issue for anything !Apple that is using the
libcompiler_rt provided by Clang on ARM, and requires upstreaming.

This is the root cause of abort() on import for the ctypes module in
Python, as they bundle libffi. [1]

This change patches the bundled libffi library in all Python ports, even
though it is a NOOP for the ports that use devel/libffi. These ports,
currently python31, will get the fix via ports/184517

A huge shout out to cognet@ who helped diagnose the issue and created
the patch to address it. Thank you!

PR:		ports/149167 [1]
PR:		ports/184517
Submitted by:	cognet [3]
Reviewed by:	cognet, eadler, milki, ak
2013-12-08 06:22:07 +00:00
Kubilay Kocak
c46e0576fd Fix OSS Audio and enable FreeBSD 11 support in Python 3.2 and 3.1
- Add the appropriate Python platform  (plat-*) files for FreeBSD 11
- Update pkg-plist

Backport a upstream change [1] removing OS major version from the check
to enable the OSS Audio module in setup.py:

Issue #12326: don't test the major version of sys.platform Use
startswith, instead of ==, when testing sys.platform to support
new platforms like Linux 3 or OpenBSD 5. [2]

[1] http://hg.python.org/cpython/rev/50f1922bc1d5
[2] http://bugs.python.org/issue12326
2013-12-01 12:25:37 +00:00
Kubilay Kocak
7472d2087e lang/python32: Backport upstream kevent fix
Backport a change fixing use of kevent flags that was merged to Python
default, 3.3 and 2.7 branches, but not 3.2 and 3.1 that were in
security-only mode at the time of commit. [1]

- Add patch: patch-Modules__selectmodule.c

References:

[1] Issue #11973: Fix a problem in kevent. The flags and fflags fields
    are now properly handled as unsigned. [#11973]

    http://bugs.python.org/issue11973
    http://hg.python.org/cpython/rev/8345fb616cbd

While I'm here:

- Add LICENSE (PSFL)
- Clean up, reorganise, sort & whitespace align sections

PR:		ports/156759
Submitted by:	David Naylor <naylor.b.david@gmail.com>
Reviewed by:	mva
2013-12-01 09:36:49 +00:00
Marcus von Appen
0216ac480f - Unbreak the build on 10.x and newer, which provides pipe2()
This relates to http://bugs.python.org/issue12852

PR:		ports/184140
Submitted by:	Yuta Sato <nigoro.gentoo@0x100.com>
2013-11-30 10:48:41 +00:00
Baptiste Daroussin
888ab73a81 Add NO_STAGE all over the place in preparation for the staging support (cat: lang) 2013-09-20 19:53:09 +00:00
Kubilay Kocak
ec7259ec32 Resolve gettext (libintl) detection and linking in all Python ports
Fix gettext (NLS) detection, includes and linking:
- all: Use LDFLAGS and CPPFLAGS over CFLAGS for NLS option (with comment)
- python26,27: Pass LIBS="-lintl" to CONFIGURE_ENV

Workaround Pythons odd build mechanics causing duplicate args:
- all: Remove CFLAGS from OPT= in CONFIGURE_ENV
- python32,33: Remove CONFIGURE_* variables from Makefile.pre.in

Other:
- python32: Patch setup.py to pass OPT correctly to shared modules

PR:		ports/181721
Reported by:	pawel
Reviewed by:	bapt mva sbz
2013-09-08 14:05:18 +00:00
Marcus von Appen
7452555915 - Move the symlink magic for the default python version into lang/python
and lang/python2 and lang/python3. This change brings us closer to the goal
  of making Python ports usable with different Python versions at the same
  time.
- Add a new lang/python2 port to handle the symlinks for bin/python2,
  bin/idle2, bin/pydoc2 and so on.
- Add a new lang/python3 port to handle the symlinks for bin/python3,
  bin/idle3, bin/pydoc3 and so on.
- Bump the PORTREVISION on all lang/python* ports.
2013-08-17 19:10:59 +00:00
Alex Kozlov
d4041784dc - Remove MAKE_JOBS_SAFE variable
Approved by:	portmgr (bdrewery)
2013-08-14 22:35:50 +00:00
Ruslan Makhmatkhanov
b922bed77e Add patch that resolves the issue, found after r250991 in src HEAD.
Investigation and the patch are from Marcel Moolenaar.

I also added upstream bug-report, based on Marcel's info:
http://bugs.python.org/issue18178

There also was relevant discussion on current@:
http://lists.freebsd.org/pipermail/freebsd-current/2013-June/

Please see there for details of the issue.

Submitted by:	marcel (python@ ML)
Reported by:	many
2013-06-10 08:20:15 +00:00
Ruslan Makhmatkhanov
96f67b5600 Update lang/python32 to 3.2.5 and lang/python33 to 3.3.2 2013-05-18 08:21:00 +00:00
Ruslan Makhmatkhanov
11bf569497 - update to latest upstream versions:
. lang/python27: 2.7.3 -> 2.7.5
  . lang/python32: 3.2.3 -> 3.2.4
  . lang/python33: 3.3.0 -> 3.3.1
- update Mk/bsd.python.mk with new versions
- mark lang/python26 and lang/python31 as deprecated (set them to
  upstream EoL dates)
- update docs (lang/python-doc-html)
- align databases/py-bsddb patch for python27 - most of it was applied
  upstream. Raise BDB version to 4.3 atleast, according to
  upstream requirements.

Many thanks to Martin (miwi) for his time on this update.

PR:		178506
Submitted by:	rm (myself)
Exp-run by:	    portmgr (miwi)

- revert erroneous threads patch in lang/python26 and lang/python27,
  that was added after ports/131080. It was rejected upstream, because it's
  not actually a bug, but misuse.

  Gabor Pali (pgj) in collaboration with Kubilay Kocak (koobs) did an
  independent investigation regard the issue. See here for details:

  http://lists.freebsd.org/pipermail/freebsd-python/2013-April/005376.html

PR:	    153167
Submitted by:	Duncan Findlay <duncan@duncf.ca>
Reported by:	pgj/koobs (at python@ ML)
Exp-run by:     portmgr (miwi)
2013-05-17 04:17:22 +00:00
Ruslan Makhmatkhanov
f831a5f25d Commit all the non-functional changes to python ports to reduce the diff size
for an exp-run of updated python versions.

- trim Makefile headers
- remove leading indefinite article from COMMENT
- use PYTHON shortcut in MASTER_SITES
- whitespace fixes
- remove checks for unsupported versions of FreeBSD
- use static value ``33'' instead of PYTHON_SUFFIX in lang/python33/pkg-plist,
  because this value is not supposed to be changed across the branch and for
  consistency with other python3 ports
- remove conflicts in lang/python-mode.el with not more existing python-2.4
2013-05-11 11:37:54 +00:00
Jason Helfman
b34e07ba4e - finish conversion for USES of gettext 2013-05-06 09:58:09 +00:00
Jason Helfman
7cdc62b981 - adoption of USES for gettext
Approved by:	portmgr (bapt@)
2013-05-06 06:32:22 +00:00
Li-Wen Hsu
6e2fa0573b - Remove "first-installed-win" logic for automatically setting
${PYTHON_DEFAULT_VERSION}, this generates conflicting packages.

- Create symbolic links as PEP 394 [1] suggests. ${PYTHON_DEFAULT_VERSION}
  will create python and python${MAJOR_VERSION} links.  In current default,
  lang/python27 will create: python -> python2 -> python2.7

- Introduce ${PYTHON3_DEFAULT_VERSION}, which will handle bin/python3 link.
  At this point, lang/python33 will create python3 -> python3.3

- Minor cleanups
  * Trim Makefile headers
  * Remove ${OSVERSION} detection for xz, whihc is done by USE_XZ

[1] http://www.python.org/dev/peps/pep-0394/
2012-12-23 17:52:46 +00:00
Ruslan Makhmatkhanov
309da33d2f - do not hardcode distfile extension for lang/python ports in bsd.python.mk
(PYTHON_DISTFILE variable)
- switch lang/python ports (and it's slaves) to tar.xz

I compared all the four pairs .tgz/.tar.xz and they have no content differences.

Discussed on:	python@
2012-10-03 04:06:37 +00:00
Marcus von Appen
2f377af2d0 - Fix builds, if the NLS option switch is set. In some cases
expat-related modules are not built correctly.

PR:		ports/169276
Submitted by:	Greg Byshenk <freebsd@byshenk.net>
2012-06-20 22:35:15 +00:00
Marcus von Appen
b89f9ab26f - Fix gettext detection for the locale module
- Explicitly enable/disable gettext support via a new NLS OPTION switch.

PR:		ports/168684 ports/136917
On behalf of:	python@
2012-06-19 17:48:42 +00:00
Martin Wilke
7e94fe3d3d - Correct PYMALLOC logic (that fix the build of devel/gobject-introspection)
- Remove old OPTION layout from py32
- Bump PORTREVISON
2012-05-31 10:13:55 +00:00
Martin Wilke
8c2c328510 - Convert to new options framework
Reviewed by:	bapt
2012-05-29 16:42:24 +00:00
Martin Wilke
19425757a8 - Update:
* python26 -> 2.6.8
  * python27 -> 2.7.3
  * python31 -> 3.1.5
  * python32 -> 3.2.1

Security:	http://www.vuxml.org/freebsd/b4f8be9e-56b2-11e1-9fb7-003067b2972c.html
		CVE-2012-0845 CVE-2012-0876 CVE-2012-1150 CVE-2012-0845 CVE-2011-3389
2012-04-11 12:52:17 +00:00
Martin Wilke
c70027929c - Mark Python as Secure
- Fix DoS via malformed XML-RPC / HTTP POST

Submitted by:	rm@
Reported by:	many
Obtained from:	python hg
Security:	http://www.vuxml.org/freebsd/b4f8be9e-56b2-11e1-9fb7-003067b2972c.html
2012-02-18 17:53:53 +00:00
Martin Wilke
e1c6649edf - Remove WITH_FBSD10_FIX, is no longer needed 2011-11-09 15:26:04 +00:00
Sunpoet Po-Chuan Hsieh
03ff71952d - Remove outdated patch to prune __wchar_t from CFLAGS (python-config --cflags)
- Bump PORTREVISION for package change

PR:		ports/161564
Submitted by:	Nali Toja <nalitoja@gmail.com>
2011-11-05 13:18:26 +00:00
Beat Gaetzi
5bc148fb49 - Fix build on FreeBSD 10
Approved by:	miwi (implicit)
2011-10-28 10:42:24 +00:00
Li-Wen Hsu
fc7b20b6d4 - Remove the HUGE_STACK_SIZE option, now Python will use default
thread stack size of the system.
2011-09-25 15:05:18 +00:00
Dmitry Marakasov
6f6fbe4bdf - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)
- Fix all ports that add {CPP,LD}FLAGS to *_ENV to modify flags instead

PR:		157936
Submitted by:	myself
Exp-runs by:	pav
Approved by:	pav
2011-09-23 22:26:39 +00:00
Chris Rees
d03cd9afc5 Handle built world without NIS more gracefully; detect missing ypcat and
disable NIS module.

PR:		ports/115940
Submitted by:	Alex Deiter <tiamat@komi.mts.ru>
Reviewed by:	bf
2011-09-18 08:33:15 +00:00
Wen Heping
adf82ac916 - Update lang/python32 to 3.2.2 2011-09-05 01:28:56 +00:00
Li-Wen Hsu
80b804c403 - Fix pkg-plist when building with WITHOUT_THREADS
PR:		ports/159842
Submitted by:	Ruslan Mahmatkhanov <cvs-src@yandex.ru>
2011-08-19 13:09:30 +00:00
Li-Wen Hsu
1aeea51c58 - Update to 3.2.1
PR:		ports/158850
Submitted by:	wen
2011-07-22 15:12:07 +00:00
Li-Wen Hsu
e1537c17b9 - Link the shared library to correct name
Reported by:	Alex Vasylenko <lxv AT omut.org>
2011-02-28 05:40:03 +00:00
Li-Wen Hsu
2c49e3321b - Suport PEP 3149 -- ABI version tagged .so files
This fixes building with UCS4 or PYMALLOC turned off.
2011-02-27 15:39:49 +00:00
Li-Wen Hsu
4420c18f00 - Finish removal of PLIST trick and OpenSSL 0.9.8 detection.
Now supported FreeBSD versions are all use OpenSSL greater
  than 0.9.8 .  This also fixes the problem of generating and
  leaving pkg-plist.tmp in /usr/ports/lang/python32 .

- Add some PLIST_SUB anchors, this does:
  * Not being conflict with default python version
    (the one installed as /usr/local/bin/python)
  * Make life easier for later 3.2.x (and higher) updates
  * Add NO_NIS support back
2011-02-26 11:31:09 +00:00
Wen Heping
24fc729f59 - Update to 3.2.0 and complete repocopy
PR:		ports/153829
Submitted by:	Wen Heping (myself)
Reviewed by:	miwi@
2011-02-22 07:44:48 +00:00
Wen Heping
39858860ea - Update to 3.1.3 2010-12-14 06:31:19 +00:00
Jung-uk Kim
5045cff4a0 Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).
Although POSIX says the type is 'int', all BSD variants (including Mac OS X)
have been using 'unsigned long' type for very long time and its use predates
the standard long enough.  For certain commands (e.g., TIOCSWINSZ, FIONBIO),
the Python value may get sign-extended on 64-bit platforms (by implicit type
promotion) and it causes annoying warnings from kernel such as this:

WARNING pid 24509 (python2.6): ioctl sign-extension ioctl ffffffff8004667e

Approved by:	python (maintainer timeout)
2010-07-19 21:59:28 +00:00
Wen Heping
25e48ae956 - Update lang/python26 to 2.6.5
- Update lang/python31 to 3.1.2

Reviewed by:	miwi@, lwhsu@
2010-05-12 12:13:07 +00:00
Martin Wilke
73f5bae3a4 - Ups s/PORTREVISON/PORTREVISION 2009-11-26 12:46:32 +00:00
Martin Wilke
61155613f0 - add missing patch 2009-11-26 12:45:14 +00:00
Martin Wilke
5879a953cb - Add support for FreeBSD 9 2009-11-26 12:44:47 +00:00