From 2b12e3daa856482723ff41a315e575a25f9c5476 Mon Sep 17 00:00:00 2001 From: whoisxxx Date: Wed, 3 Jun 2020 14:51:37 +0800 Subject: [PATCH] Judge arches before use valgrind All build steps which relate to valgrind should been used with macro %{valrind_arches} Signed-off-by: whoisxxx Conflicts: python2.spec --- python2.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/python2.spec b/python2.spec index 9593111..bf5d2bb 100644 --- a/python2.spec +++ b/python2.spec @@ -15,7 +15,7 @@ %undefine _debuginfo_subpackages Name: python2 Version: 2.7.18 -Release: 3 +Release: 4 Summary: Python is an interpreted, interactive object-oriented programming language suitable License: Python URL: https://www.python.org/ @@ -82,10 +82,14 @@ Patch56: CVE-2019-9674.patch Patch57: CVE-2019-20907.patch Patch58: CVE-2017-18207.patch -BuildRequires: libdb-devel libffi-devel valgrind-devel ncurses-devel expat-devel readline-devel +BuildRequires: libdb-devel libffi-devel ncurses-devel expat-devel readline-devel BuildRequires: openssl-devel libtirpc-devel tcl-devel tk-devel glibc-devel libnsl2-devel BuildRequires: zlib-devel tix-devel gdbm-devel sqlite-devel chrpath sed systemtap-sdt-devel +%ifarch %{valgrind_arches} +BuildRequires: valgrind-devel +%endif + Requires: expat glibc gdbm python-setuptools-wheel python-pip-wheel Recommends: python2-setuptools python2-pip @@ -237,7 +241,9 @@ BuildPython() { --with-system-ffi \ --with-dtrace \ --with-tapset-install-dir=%{tapsetdir} \ +%ifarch %{valgrind_arches} --with-valgrind \ +%endif $ExtraConfigArgs %make_build @@ -457,7 +463,9 @@ sed -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" %{SOURCE1} \ %{_libdir}/libpython%{pybasever}.so %{_bindir}/python*-config %{pylibdir}/distutils/command/wininst-*.exe +%ifarch %{valgrind_arches} %doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit +%endif #Tests %{pylibdir}/bsddb/test @@ -615,6 +623,12 @@ sed -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" %{SOURCE1} \ %{dynload_dir}/_testcapimodule_d.so %changelog +* Mon Jul 26 2021 whoisxxx - 2.7.18-4 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:judge arches before use valgrind as buildreqiures + * Thu Sep 10 2020 shangyibin - 2.7.18-3 - add patch for CVE-2019-20907 - modify patch for CVE-2017-18207 -- Gitee