- 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
This commit is contained in:
Jan Matejek 2016-06-30 12:56:08 +00:00 committed by Git OBS Bridge
parent 91b628d395
commit 05220bdba0
3 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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