diff options
-rw-r--r-- | community/python2-tkinter/APKBUILD | 117 | ||||
-rw-r--r-- | community/python2-tkinter/musl-find_library.patch | 45 | ||||
-rw-r--r-- | community/python2-tkinter/unchecked-ioctl.patch | 11 |
3 files changed, 0 insertions, 173 deletions
diff --git a/community/python2-tkinter/APKBUILD b/community/python2-tkinter/APKBUILD deleted file mode 100644 index 4032528ee5..0000000000 --- a/community/python2-tkinter/APKBUILD +++ /dev/null @@ -1,117 +0,0 @@ -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> - -# This package must be synchronized with python2. It is splitted to avoid -# a cyclic dependency: python -> tk -> libx11 -> libxcb -> xcb-proto -> python - -pkgname=python2-tkinter -pkgver=2.7.18 -_verbase=${pkgver%.*} -pkgrel=0 -pkgdesc="A graphical user interface for the Python" -url="https://wiki.python.org/moin/TkInter" -arch="all" -license="custom" -subpackages="$pkgname-tests python2-idle:_idle:noarch" -makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev - gdbm-dev sqlite-dev libffi-dev readline-dev linux-headers paxmark - tk tk-dev python2" -replaces="python2" -replaces_priority=1 -source="https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz - musl-find_library.patch - unchecked-ioctl.patch - " -builddir="$srcdir/Python-$pkgver" - -# secfixes: -# 2.7.18-r0: -# - CVE-2019-18348 -# 2.7.17-r0: -# - CVE-2019-15903 -# - CVE-2019-16056 -# - CVE-2019-16935 -# - CVE-2019-9636 -# - CVE-2019-9948 -# 2.7.16-r0: -# - CVE-2018-14647 -# 2.7.15-r3: -# - CVE-2019-5010 -# 2.7.15-r0: -# - CVE-2018-1060 -# - CVE-2018-1061 - -prepare() { - local _pyapkbuild="$startdir"/../main/python2/APKBUILD - if [ -e "$_pyapkbuild" ]; then - _pver=$(. "$_pyapkbuild" ; echo $pkgver) - if [ "$_pver" != "$pkgver" ]; then - error "python version mismatch ($_pver). Set pkgver=$_pver" - return 1 - fi - fi - default_prepare - - # Make sure we use system libs - rm -rf Modules/expat Modules/_ctypes/libffi* Modules/zlib -} - -build() { - export OPT="$CFLAGS" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --enable-shared \ - --with-threads \ - --enable-ipv6 \ - --with-system-ffi \ - --with-system-expat \ - --with-system-zlib \ - --enable-unicode=ucs4 - make -} - -package() { - # we only care about idle, and tkinter - make DESTDIR="$builddir"/tmpinstall sharedinstall libinstall - - mkdir -p "$pkgdir"/usr/lib/python$_verbase/lib-dynload \ - "$pkgdir"/usr/bin - - for lib in idlelib lib-tk; do - mv "$builddir"/tmpinstall/usr/lib/python$_verbase/$lib \ - "$pkgdir"/usr/lib/python$_verbase/ - done - - mv "$builddir"/tmpinstall/usr/lib/python$_verbase/lib-dynload/_tkinter.so \ - "$pkgdir"/usr/lib/python$_verbase/lib-dynload/ - - mv "$builddir"/tmpinstall/usr/bin/idle \ - "$pkgdir"/usr/bin/idle$_verbase -} - -_mv_files() { - local i - for i in "$@"; do - mkdir -p "$subpkgdir"/${i%/*} - mv "$pkgdir"/$i "$subpkgdir"/$i - done -} - -tests() { - pkgdesc="The test modules from the main python package for tkinter" - replaces="python-tests python2-tests" - cd "$pkgdir" - _mv_files usr/lib/python*/*/test -} - -_idle() { - pkgdesc="IDE for Python2 using Tkinter" - depends="$pkgname=$pkgver-r$pkgrel" - cd "$pkgdir" - _mv_files usr/bin -} - -sha512sums="a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c Python-2.7.18.tar.xz -ab8eaa2858d5109049b1f9f553198d40e0ef8d78211ad6455f7b491af525bffb16738fed60fc84e960c4889568d25753b9e4a1494834fea48291b33f07000ec2 musl-find_library.patch -5a8e013a4132d71c4360771f130d27b37275ae59330cf9a75378dc8a11236017f540eb224f2a148984e82ca3fb6b29129375b1080ba05b81044faa717520ab82 unchecked-ioctl.patch" diff --git a/community/python2-tkinter/musl-find_library.patch b/community/python2-tkinter/musl-find_library.patch deleted file mode 100644 index 7899abb736..0000000000 --- a/community/python2-tkinter/musl-find_library.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ru Python-2.7.12.orig/Lib/ctypes/util.py Python-2.7.12/Lib/ctypes/util.py ---- Python-2.7.12.orig/Lib/ctypes/util.py 2016-06-26 00:49:30.000000000 +0300 -+++ Python-2.7.12/Lib/ctypes/util.py 2016-11-03 16:05:46.954665040 +0200 -@@ -204,6 +204,41 @@ - def find_library(name, is64 = False): - return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) - -+ elif True: -+ -+ # Patched for Alpine Linux / musl - search manually system paths -+ def _is_elf(filepath): -+ try: -+ with open(filepath, 'rb') as fh: -+ return fh.read(4) == b'\x7fELF' -+ except: -+ return False -+ -+ def find_library(name): -+ from glob import glob -+ # absolute name? -+ if os.path.isabs(name): -+ return name -+ # special case for libm, libcrypt and libpthread and musl -+ if name in ['m', 'crypt', 'pthread']: -+ name = 'c' -+ elif name in ['libm.so', 'libcrypt.so', 'libpthread.so']: -+ name = 'libc.so' -+ # search in standard locations (musl order) -+ paths = ['/lib', '/usr/local/lib', '/usr/lib'] -+ if 'LD_LIBRARY_PATH' in os.environ: -+ paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths -+ for d in paths: -+ f = os.path.join(d, name) -+ if _is_elf(f): -+ return os.path.basename(f) -+ -+ prefix = os.path.join(d, 'lib'+name) -+ for suffix in ['.so', '.so.*']: -+ for f in glob('{0}{1}'.format(prefix, suffix)): -+ if _is_elf(f): -+ return os.path.basename(f) -+ - else: - - def _findSoname_ldconfig(name): diff --git a/community/python2-tkinter/unchecked-ioctl.patch b/community/python2-tkinter/unchecked-ioctl.patch deleted file mode 100644 index 4d5564c2cb..0000000000 --- a/community/python2-tkinter/unchecked-ioctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./Modules/fcntlmodule.c.orig -+++ ./Modules/fcntlmodule.c -@@ -118,7 +118,7 @@ - int mutate_arg = 1; - char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */ - -- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl", -+ if (PyArg_ParseTuple(args, "O&Iw#|n:ioctl", - conv_descriptor, &fd, &code, - &str, &len, &mutate_arg)) { - char *arg; |