From 05220bdba08d25b2f4cf291e9463167cb27ffde727414fad837d428e754d6125 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Thu, 30 Jun 2016 12:56:08 +0000 Subject: [PATCH] - python-2.7.12-makeopcode.patch - run newly-built python interpreter to make opcodes, in order not to require pre-built python OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=193 --- python-2.7.12-makeopcode.patch | 13 +++++++++++++ python-base.changes | 2 ++ python-base.spec | 8 ++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 python-2.7.12-makeopcode.patch diff --git a/python-2.7.12-makeopcode.patch b/python-2.7.12-makeopcode.patch new file mode 100644 index 0000000..dace14b --- /dev/null +++ b/python-2.7.12-makeopcode.patch @@ -0,0 +1,13 @@ +Index: Python-2.7.12/Makefile.pre.in +=================================================================== +--- Python-2.7.12.orig/Makefile.pre.in ++++ Python-2.7.12/Makefile.pre.in +@@ -319,7 +319,7 @@ OPCODETARGETS_H= \ + $(srcdir)/Python/opcode_targets.h + + OPCODETARGETGEN= \ +- $(srcdir)/Python/makeopcodetargets.py ++ ./python $(srcdir)/Python/makeopcodetargets.py + + OPCODETARGETGEN_FILES= \ + $(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py diff --git a/python-base.changes b/python-base.changes index f2155a2..f81e228 100644 --- a/python-base.changes +++ b/python-base.changes @@ -8,6 +8,8 @@ Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com CVE-2016-5636 zipimporter heap overflow (bsc#985177) - removed upstreamed python-2.7.7-mhlib-linkcount.patch - refreshed multilib patch +- python-2.7.12-makeopcode.patch - run newly-built python interpreter + to make opcodes, in order not to require pre-built python ------------------------------------------------------------------- Fri Jan 29 13:03:40 UTC 2016 - rguenther@suse.com diff --git a/python-base.spec b/python-base.spec index e2c03ef..2b189d5 100644 --- a/python-base.spec +++ b/python-base.spec @@ -55,6 +55,7 @@ Patch34: python-2.7.9-sles-disable-verification-by-default.patch # PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar@opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1 Patch35: python-ncurses-6.0-accessors.patch Patch36: python-2.7.10-overflow_check.patch +Patch37: python-2.7.12-makeopcode.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -148,6 +149,7 @@ other applications. %endif %patch35 -p1 %patch36 +%patch37 -p1 # drop Autoconf version requirement sed -i 's/^version_required/dnl version_required/' configure.ac @@ -177,7 +179,7 @@ target=profile-opt %else target=all %endif -LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \ +LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH \ make %{?_smp_mflags} $target %check @@ -223,7 +225,9 @@ make test TESTOPTS="-l -x $EXCLUDE" TESTPYTHONOPTS="-R" %install # replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python -find . -wholename "./Parser" -prune -o -name '*.py' -type f -print0 | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@' +find . -name '*.py' -type f | grep -vE "^./Parser/|^./Python/" \ + | xargs grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \ + | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@' # the grep inbetween makes it much faster ######################################## # install it