From ec3b7d815d7d017da9f308a98f0e3a702eaa2ff1 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Sun, 16 Aug 2015 13:17:38 +0900 Subject: [PATCH] add `fortify_crash_workaround` patch for CPython (>= 2.4, <= 2.4.3) (#422) --- plugins/python-build/share/python-build/2.4 | 2 - plugins/python-build/share/python-build/2.4.1 | 2 - plugins/python-build/share/python-build/2.4.2 | 2 - plugins/python-build/share/python-build/2.4.3 | 2 - .../001_fortify_crash_workaround.diff | 51 +++++++++++++++++++ .../001_fortify_crash_workaround.diff | 51 +++++++++++++++++++ .../001_fortify_crash_workaround.diff | 51 +++++++++++++++++++ .../001_fortify_crash_workaround.diff | 51 +++++++++++++++++++ 8 files changed, 204 insertions(+), 8 deletions(-) create mode 100644 plugins/python-build/share/python-build/patches/2.4.1/Python-2.4.1/001_fortify_crash_workaround.diff create mode 100644 plugins/python-build/share/python-build/patches/2.4.2/Python-2.4.2/001_fortify_crash_workaround.diff create mode 100644 plugins/python-build/share/python-build/patches/2.4.3/Python-2.4.3/001_fortify_crash_workaround.diff create mode 100644 plugins/python-build/share/python-build/patches/2.4/Python-2.4/001_fortify_crash_workaround.diff diff --git a/plugins/python-build/share/python-build/2.4 b/plugins/python-build/share/python-build/2.4 index 05ea5a11..d69fa729 100644 --- a/plugins/python-build/share/python-build/2.4 +++ b/plugins/python-build/share/python-build/2.4 @@ -1,5 +1,3 @@ -# disable `_FORTITY_SOURCE` to fix build of CPython (>= 2.4, <= 2.4.3) (#422) -package_option python configure BASECFLAGS="-U_FORTIFY_SOURCE" #require_gcc install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline install_package "Python-2.4" "http://python.org/ftp/python/2.4/Python-2.4.tgz#ff746de0fae8691c082414b42a2bb172da8797e6e8ff66c9a39d2e452f7034e9" ldflags_dirs standard verify_py24 diff --git a/plugins/python-build/share/python-build/2.4.1 b/plugins/python-build/share/python-build/2.4.1 index b23e4ce0..f14a99b8 100644 --- a/plugins/python-build/share/python-build/2.4.1 +++ b/plugins/python-build/share/python-build/2.4.1 @@ -1,5 +1,3 @@ -# disable `_FORTITY_SOURCE` to fix build of CPython (>= 2.4, <= 2.4.3) (#422) -package_option python configure BASECFLAGS="-U_FORTIFY_SOURCE" #require_gcc install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline install_package "Python-2.4.1" "http://python.org/ftp/python/2.4.1/Python-2.4.1.tgz#f449c3b167389324c525ad99d02376c518ac11e163dbbbc13bc88a5c7101fd00" ldflags_dirs standard verify_py24 diff --git a/plugins/python-build/share/python-build/2.4.2 b/plugins/python-build/share/python-build/2.4.2 index 2738360b..fdeff6ad 100644 --- a/plugins/python-build/share/python-build/2.4.2 +++ b/plugins/python-build/share/python-build/2.4.2 @@ -1,5 +1,3 @@ -# disable `_FORTITY_SOURCE` to fix build of CPython (>= 2.4, <= 2.4.3) (#422) -package_option python configure BASECFLAGS="-U_FORTIFY_SOURCE" #require_gcc install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline install_package "Python-2.4.2" "http://python.org/ftp/python/2.4.2/Python-2.4.2.tgz#2653e1846e87fd9b3ee287fefc965c80c54646548b4913a22265b0dd54493adf" ldflags_dirs standard verify_py24 diff --git a/plugins/python-build/share/python-build/2.4.3 b/plugins/python-build/share/python-build/2.4.3 index ba1521ed..8579fc25 100644 --- a/plugins/python-build/share/python-build/2.4.3 +++ b/plugins/python-build/share/python-build/2.4.3 @@ -1,5 +1,3 @@ -# disable `_FORTITY_SOURCE` to fix build of CPython (>= 2.4, <= 2.4.3) (#422) -package_option python configure BASECFLAGS="-U_FORTIFY_SOURCE" #require_gcc install_package "readline-6.3" "http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline install_package "Python-2.4.3" "http://python.org/ftp/python/2.4.3/Python-2.4.3.tgz#985a413932f5e31e6280b37da6b285a3a0b2748c6786643989ed9b23de97e2d5" ldflags_dirs standard verify_py24 diff --git a/plugins/python-build/share/python-build/patches/2.4.1/Python-2.4.1/001_fortify_crash_workaround.diff b/plugins/python-build/share/python-build/patches/2.4.1/Python-2.4.1/001_fortify_crash_workaround.diff new file mode 100644 index 00000000..0e479194 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/2.4.1/Python-2.4.1/001_fortify_crash_workaround.diff @@ -0,0 +1,51 @@ +Author: Dwayne Litzenberger +Date: Sun Jun 22 01:15:05 2014 -0700 + + Patch configure to handle Ubuntu Bug#286334 + + Fixes this crash: + + *** buffer overflow detected ***: ./python terminated + ======= Backtrace: ========= + /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007] + +diff --git configure configure +index 4838393..654de3f 100755 +--- configure ++++ configure +@@ -20798,6 +20798,15 @@ done + echo "$as_me:$LINENO: result: done" >&5 + echo "${ECHO_T}done" >&6 + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" + +diff --git configure.in configure.in +index ba7a011..060a73f 100644 +--- configure.in ++++ configure.in +@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do + done + AC_MSG_RESULT(done) + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config) + AC_OUTPUT diff --git a/plugins/python-build/share/python-build/patches/2.4.2/Python-2.4.2/001_fortify_crash_workaround.diff b/plugins/python-build/share/python-build/patches/2.4.2/Python-2.4.2/001_fortify_crash_workaround.diff new file mode 100644 index 00000000..0e479194 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/2.4.2/Python-2.4.2/001_fortify_crash_workaround.diff @@ -0,0 +1,51 @@ +Author: Dwayne Litzenberger +Date: Sun Jun 22 01:15:05 2014 -0700 + + Patch configure to handle Ubuntu Bug#286334 + + Fixes this crash: + + *** buffer overflow detected ***: ./python terminated + ======= Backtrace: ========= + /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007] + +diff --git configure configure +index 4838393..654de3f 100755 +--- configure ++++ configure +@@ -20798,6 +20798,15 @@ done + echo "$as_me:$LINENO: result: done" >&5 + echo "${ECHO_T}done" >&6 + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" + +diff --git configure.in configure.in +index ba7a011..060a73f 100644 +--- configure.in ++++ configure.in +@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do + done + AC_MSG_RESULT(done) + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config) + AC_OUTPUT diff --git a/plugins/python-build/share/python-build/patches/2.4.3/Python-2.4.3/001_fortify_crash_workaround.diff b/plugins/python-build/share/python-build/patches/2.4.3/Python-2.4.3/001_fortify_crash_workaround.diff new file mode 100644 index 00000000..0e479194 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/2.4.3/Python-2.4.3/001_fortify_crash_workaround.diff @@ -0,0 +1,51 @@ +Author: Dwayne Litzenberger +Date: Sun Jun 22 01:15:05 2014 -0700 + + Patch configure to handle Ubuntu Bug#286334 + + Fixes this crash: + + *** buffer overflow detected ***: ./python terminated + ======= Backtrace: ========= + /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007] + +diff --git configure configure +index 4838393..654de3f 100755 +--- configure ++++ configure +@@ -20798,6 +20798,15 @@ done + echo "$as_me:$LINENO: result: done" >&5 + echo "${ECHO_T}done" >&6 + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" + +diff --git configure.in configure.in +index ba7a011..060a73f 100644 +--- configure.in ++++ configure.in +@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do + done + AC_MSG_RESULT(done) + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config) + AC_OUTPUT diff --git a/plugins/python-build/share/python-build/patches/2.4/Python-2.4/001_fortify_crash_workaround.diff b/plugins/python-build/share/python-build/patches/2.4/Python-2.4/001_fortify_crash_workaround.diff new file mode 100644 index 00000000..0e479194 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/2.4/Python-2.4/001_fortify_crash_workaround.diff @@ -0,0 +1,51 @@ +Author: Dwayne Litzenberger +Date: Sun Jun 22 01:15:05 2014 -0700 + + Patch configure to handle Ubuntu Bug#286334 + + Fixes this crash: + + *** buffer overflow detected ***: ./python terminated + ======= Backtrace: ========= + /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b08765c9007] + +diff --git configure configure +index 4838393..654de3f 100755 +--- configure ++++ configure +@@ -20798,6 +20798,15 @@ done + echo "$as_me:$LINENO: result: done" >&5 + echo "${ECHO_T}done" >&6 + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" + +diff --git configure.in configure.in +index ba7a011..060a73f 100644 +--- configure.in ++++ configure.in +@@ -3072,6 +3072,15 @@ for dir in $SRCDIRS; do + done + AC_MSG_RESULT(done) + ++case $ac_sys_system in ++Linux*) ++# Workaround for bug in Ubuntu 10.10 amd64 gcc-4.4 ++# See http://orip.org/2008/10/building-python-235-on-ubuntu-intrepid.html ++# and Ubuntu Bug #286334 ++BASECFLAGS="$BASECFLAGS -U_FORTIFY_SOURCE" ++;; ++esac ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config) + AC_OUTPUT