summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Berquist2016-03-19 20:23:37 -0400
committerEric Berquist2016-03-19 20:23:37 -0400
commit9cb559acc1982dd073f6bd7844878aee169b811b (patch)
tree4448a25fa7fbcf159be482ebc893aed365974ebf
parentd5d1034068cf36ac701f5aaf17fdd00e9fd8a974 (diff)
downloadaur-9cb559acc1982dd073f6bd7844878aee169b811b.tar.gz
Add patch to remove SSLv3.
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD42
l---------PKGBUILD.351
-rw-r--r--python-3.3-ssl-nosslv3.patch15
4 files changed, 55 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 16276ae18b4f..c386d6057b14 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Sun Mar 20 00:23:25 UTC 2016
pkgbase = python33
pkgdesc = Major release 3.3 of the Python high-level programming language
pkgver = 3.3.6
- pkgrel = 1
+ pkgrel = 2
url = http://www.python.org/
arch = i686
arch = x86_64
@@ -18,11 +20,15 @@ pkgbase = python33
depends = openssl
depends = libffi
depends = zlib
- optdepends = tk: for tkinter
+ optdepends = mpdecimal: for decimal
optdepends = sqlite
+ optdepends = tk: for tkinter
+ optdepends = xz
options = !makeflags
source = http://www.python.org/ftp/python/3.3.6/Python-3.3.6.tar.xz
+ source = python-3.3-ssl-nosslv3.patch
sha256sums = 5226e4bf7a530c3ff2bcde0c94e0e09e59a8bcde0114fe0268bc925bdabb5d3f
+ sha256sums = d54bc0ac72218b37c1c2f7a8f03f904a06c2270518a5f3b9e27e54578fe1fb04
pkgname = python33
diff --git a/PKGBUILD b/PKGBUILD
index de38e9d008b8..35c7a7247ff6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
-# Maintainer: Rodolphe Breard <packages@what.tf>
+# Maintainer: Eric Berquist <eric DOT berquist AT gmail DOT com>
+# Contributor: Rodolphe Breard <packages@what.tf>
# Contributor: Christopher Arndt <chris@chrisarndt.de>
pkgname=python33
pkgver=3.3.6
-pkgrel=1
+pkgrel=2
_pybasever=3.3
_pymajver=3
pkgdesc="Major release 3.3 of the Python high-level programming language"
@@ -12,14 +13,21 @@ license=('custom')
url="http://www.python.org/"
depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
makedepends=('tk' 'sqlite' 'valgrind' 'bluez-libs' 'mpdecimal' 'hardening-wrapper')
-optdepends=('tk: for tkinter' 'sqlite')
+optdepends=('mpdecimal: for decimal'
+ 'sqlite'
+ 'tk: for tkinter'
+ 'xz')
options=('!makeflags')
-source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz)
-sha256sums=('5226e4bf7a530c3ff2bcde0c94e0e09e59a8bcde0114fe0268bc925bdabb5d3f')
+source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
+ python-3.3-ssl-nosslv3.patch)
+sha256sums=('5226e4bf7a530c3ff2bcde0c94e0e09e59a8bcde0114fe0268bc925bdabb5d3f'
+ 'd54bc0ac72218b37c1c2f7a8f03f904a06c2270518a5f3b9e27e54578fe1fb04')
prepare() {
cd "${srcdir}/Python-${pkgver}"
+ patch -Np1 -i ${srcdir}/python-3.3-ssl-nosslv3.patch
+
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
@@ -34,6 +42,7 @@ prepare() {
build() {
cd "${srcdir}/Python-${pkgver}"
+ export CPPFLAGS="-DOPENSSL_NO_SSL3"
./configure --prefix=/usr \
--enable-shared \
--with-threads \
@@ -43,12 +52,23 @@ build() {
--with-dbmliborder=gdbm:ndbm \
--with-system-ffi \
--with-system-libmpdec \
- --enable-loadable-sqlite-extensions \
- --without-ensurepip
+ --enable-loadable-sqlite-extensions
make
}
+check() {
+ cd "${srcdir}/Python-${pkgver}"
+
+ # make test
+ LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \
+ "${srcdir}/Python-${pkgver}/python" -m test.regrtest -x \
+ test_distutils \
+ test_faulthandler \
+ test_ftplib \
+ test_ssl
+}
+
package() {
cd "${srcdir}/Python-${pkgver}"
# altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
@@ -58,16 +78,16 @@ package() {
rm "${pkgdir}/usr/lib/libpython${_pymajver}.so"
rm "${pkgdir}/usr/share/man/man1/python${_pymajver}.1"
- # Fix FS#22552
+ # fix FS#22552
ln -sf ../../libpython${_pybasever}m.so \
"${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}m/libpython${_pybasever}m.so"
- # Fix pycairo build
+ # fix pycairo build
ln -sf python${_pybasever}m-config "${pkgdir}/usr/bin/python${_pybasever}-config"
- # Clean-up reference to build directory
+ # clean-up reference to build directory
sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}m/Makefile"
- # License
+ # license
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/PKGBUILD.35 b/PKGBUILD.35
new file mode 120000
index 000000000000..38ccb45c5942
--- /dev/null
+++ b/PKGBUILD.35
@@ -0,0 +1 @@
+/var/abs/extra/python/PKGBUILD \ No newline at end of file
diff --git a/python-3.3-ssl-nosslv3.patch b/python-3.3-ssl-nosslv3.patch
new file mode 100644
index 000000000000..90b38b96907a
--- /dev/null
+++ b/python-3.3-ssl-nosslv3.patch
@@ -0,0 +1,15 @@
+diff --git a/Modules/_ssl.c b/Modules/_ssl.c
+index 499e8ba..00a47d7 100644
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -1746,8 +1746,10 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+ PySSL_BEGIN_ALLOW_THREADS
+ if (proto_version == PY_SSL_VERSION_TLS1)
+ ctx = SSL_CTX_new(TLSv1_method());
++#ifndef OPENSSL_NO_SSL3
+ else if (proto_version == PY_SSL_VERSION_SSL3)
+ ctx = SSL_CTX_new(SSLv3_method());
++#endif
+ #ifndef OPENSSL_NO_SSL2
+ else if (proto_version == PY_SSL_VERSION_SSL2)
+ ctx = SSL_CTX_new(SSLv2_method());