From 43ea916f2fc8a6a5146f5a4fdfd9f10c95d05110 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 22 May 2018 23:01:41 +0200 Subject: [PATCH 1/9] find-debuginfo.sh: Handle application/x-pie-executable Resolves: #1581224 --- 4.14.1-find-debuginfo-pie.patch | 29 +++++++++++++++++++++++++++++ rpm.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 4.14.1-find-debuginfo-pie.patch diff --git a/4.14.1-find-debuginfo-pie.patch b/4.14.1-find-debuginfo-pie.patch new file mode 100644 index 0000000..b92c6b1 --- /dev/null +++ b/4.14.1-find-debuginfo-pie.patch @@ -0,0 +1,29 @@ +commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b +Author: Mark Wielaard +Date: Tue May 22 22:12:11 2018 +0200 + + find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output). + + A new version of file (5.33) changed the output for PIE executables. + Which are now represented as application/x-pie-executable; charset=binary. + + The following change simply recognizes that binary format as one for + which -g applies. This fixes accidental stripping of the .symtab in + glibc (which use -g to keep that symbol table). + + https://bugzilla.redhat.com/show_bug.cgi?id=1581224 + + Signed-off-by: Mark Wielaard + +diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh +index a7c2db0..90a4494 100755 +--- a/scripts/find-debuginfo.sh ++++ b/scripts/find-debuginfo.sh +@@ -235,6 +235,7 @@ strip_to_debug() + $strip_g && case "$(file -bi "$2")" in + application/x-sharedlib*) g=-g ;; + application/x-executable*) g=-g ;; ++ application/x-pie-executable*) g=-g ;; + esac + eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit + chmod 444 "$1" || exit diff --git a/rpm.spec b/rpm.spec index 9c05a38..b91b2f5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,7 +23,7 @@ %global rpmver 4.14.1 #global snapver rc2 -%global rel 8 +%global rel 9 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -67,6 +67,11 @@ Patch6: rpm-4.14.1-python-brp-bytecompile.patch # - https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build Patch7: rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch +# find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output). +# http://lists.rpm.org/pipermail/rpm-maint/2018-May/007976.html +# https://bugzilla.redhat.com/show_bug.cgi?id=1581224 +Patch8: 4.14.1-find-debuginfo-pie.patch + # Patches already upstream: # These are not yet upstream @@ -600,6 +605,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Tue May 22 2018 Mark Wielaard - 4.14.1-9 +- find-debuginfo.sh: Handle application/x-pie-executable (#1581224) + * Tue Feb 20 2018 Igor Gnatenko - 4.14.1-8 - Split rpm-build-libs to one more subpackage rpm-sign-libs From 364d038b5513066552348067918b31e9e0aed864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 14:12:32 +0200 Subject: [PATCH 2/9] Backport upstream solution to make brp-python-bytecompile automagic part opt-outable See https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation --- rpm-4.14.1-python-brp-bytecompile.patch | 25 +++++++++++++++++++++++-- rpm.spec | 10 ++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/rpm-4.14.1-python-brp-bytecompile.patch b/rpm-4.14.1-python-brp-bytecompile.patch index d99a271..692fb11 100644 --- a/rpm-4.14.1-python-brp-bytecompile.patch +++ b/rpm-4.14.1-python-brp-bytecompile.patch @@ -1,8 +1,29 @@ diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile -index 894fa3459..47776215a 100644 +index 894fa34..c06bdfa 100644 --- a/scripts/brp-python-bytecompile +++ b/scripts/brp-python-bytecompile -@@ -87,6 +87,10 @@ if [ ! -x "$default_python" ]; then +@@ -1,5 +1,6 @@ + #!/bin/bash + errors_terminate=$2 ++extra=$3 + + # If using normal root, avoid changing anything. + if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then +@@ -79,14 +80,22 @@ do + done + + +-# Handle other locations in the filesystem using the default python +-# implementation - if we have a default python interpreter ++# Handle other locations in the filesystem using the default python implementation ++# if extra is set to 0, don't do this ++if [ 0$extra -eq 0 ]; then ++ exit 0 ++fi + ++# If we don't have a default python interpreter, we cannot proceed + default_python=${1:-/usr/bin/python} + if [ ! -x "$default_python" ]; then exit 0 fi diff --git a/rpm.spec b/rpm.spec index b91b2f5..f7d2cd2 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,7 +23,7 @@ %global rpmver 4.14.1 #global snapver rc2 -%global rel 9 +%global rel 10 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -56,8 +56,10 @@ Patch3: rpm-4.9.90-no-man-dirs.patch Patch4: rpm-4.8.1-use-gpg2.patch # Temporary band-aid for rpm2cpio whining on payload size mismatch (#1142949) Patch5: rpm-4.12.0-rpm2cpio-hack.patch -# Skip automatic Python byte-compilation if *.py files are not present +# Skip automatic Python byte-compilation (outside of Python directories) if +# *.py files are not present, and allow to disable it even if they are # Upstream pull request: https://github.com/rpm-software-management/rpm/pull/383 +# https://github.com/rpm-software-management/rpm/pull/434 Patch6: rpm-4.14.1-python-brp-bytecompile.patch # Downstream-only patch: @@ -605,6 +607,10 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Mon May 28 2018 Miro Hrončok - 4.14.1-10 +- Backport upstream solution to make brp-python-bytecompile automagic part opt-outable + https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation + * Tue May 22 2018 Mark Wielaard - 4.14.1-9 - find-debuginfo.sh: Handle application/x-pie-executable (#1581224) From b86c75e7b027101d7769ece0f40dcd656dcb4dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 15 Jun 2018 12:25:41 +0200 Subject: [PATCH 3/9] Rebuilt for Python 3.7 --- rpm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpm.spec b/rpm.spec index f7d2cd2..3c8e677 100644 --- a/rpm.spec +++ b/rpm.spec @@ -35,7 +35,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist} +Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist}.1 Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -607,6 +607,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Fri Jun 15 2018 Miro Hrončok - 4.14.1-10.1 +- Rebuilt for Python 3.7 + * Mon May 28 2018 Miro Hrončok - 4.14.1-10 - Backport upstream solution to make brp-python-bytecompile automagic part opt-outable https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation From 7d7537244d65544ea318bdedf83f7677f982d1e6 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 29 Jun 2018 11:00:36 +0300 Subject: [PATCH 4/9] Remove direct ldconfig calls, use compat macros instead --- rpm.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rpm.spec b/rpm.spec index 3c8e677..f329969 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,7 +23,7 @@ %global rpmver 4.14.1 #global snapver rc2 -%global rel 10 +%global rel 11 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -35,7 +35,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist}.1 +Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -468,11 +468,9 @@ chmod a-x $RPM_BUILD_ROOT/%{rpmhome}/python-macro-helper make check || cat tests/rpmtests.log %endif -%post libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig - -%post build-libs -p /sbin/ldconfig -%postun build-libs -p /sbin/ldconfig +# Fedora < 28 and EPEL-7 builds need these +%ldconfig_scripts libs +%ldconfig_scripts build-libs %files -f %{name}.lang %license COPYING @@ -607,6 +605,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Fri Jun 29 2018 Panu Matilainen - 4.14.2-11 +- Remove direct ldconfig calls, use compat macros instead + * Fri Jun 15 2018 Miro Hrončok - 4.14.1-10.1 - Rebuilt for Python 3.7 From 8b3e871c1fbf2946dfbfe0b418c496bb7a4a074f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 29 Jun 2018 11:16:01 +0300 Subject: [PATCH 5/9] Invoke python2 explicitly from test-suite to unbreak build --- rpm-4.14.1-explicit-python2.patch | 12 ++++++++++++ rpm.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 rpm-4.14.1-explicit-python2.patch diff --git a/rpm-4.14.1-explicit-python2.patch b/rpm-4.14.1-explicit-python2.patch new file mode 100644 index 0000000..8eec835 --- /dev/null +++ b/rpm-4.14.1-explicit-python2.patch @@ -0,0 +1,12 @@ +diff -up rpm-4.14.1/tests/local.at.python2 rpm-4.14.1/tests/local.at +--- rpm-4.14.1/tests/local.at.python2 2018-06-29 11:11:42.716541572 +0300 ++++ rpm-4.14.1/tests/local.at 2017-09-06 14:58:13.034317976 +0300 +@@ -17,7 +17,7 @@ def myprint(msg = ''): + sys.stdout.write('%s\n' % msg) + $1 + EOF +-python2 test.py ++python test.py + ]]) + + m4_define([RPMPY_CHECK],[ diff --git a/rpm.spec b/rpm.spec index f329969..7863ade 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,7 +23,7 @@ %global rpmver 4.14.1 #global snapver rc2 -%global rel 11 +%global rel 12 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -74,6 +74,10 @@ Patch7: rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1581224 Patch8: 4.14.1-find-debuginfo-pie.patch +# More Python 3 fallout, invoke python2 explicitly to avoid deprecation +# warnings breaking the test-suite +Patch9: rpm-4.14.1-explicit-python2.patch + # Patches already upstream: # These are not yet upstream @@ -605,6 +609,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Fri Jun 29 2018 Panu Matilainen - 4.14.2-12 +- Invoke python2 explicitly from test-suite to unbreak build + * Fri Jun 29 2018 Panu Matilainen - 4.14.2-11 - Remove direct ldconfig calls, use compat macros instead From e79d625c87aa97deb12d8860e68e2bfd81cf1873 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 29 Jun 2018 11:41:26 +0300 Subject: [PATCH 6/9] Make it actually build, sigh - Ehm, need to patch the autogenerated rpmtests script too for python2 - Ehm, it's ldconfig_scriptlets not scripts - Drop the non-working python envvar magic from obsoleted change --- ...hat-will-be-present-during-RPM-build.patch | 28 - rpm-4.14.1-explicit-python2.patch | 515 +++++++++++++++++- rpm.spec | 20 +- 3 files changed, 519 insertions(+), 44 deletions(-) delete mode 100644 rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch diff --git a/rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch b/rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch deleted file mode 100644 index 361e1a4..0000000 --- a/rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bf636421120aa2c97f9e0fdcee3c211b4241bd86 Mon Sep 17 00:00:00 2001 -From: Tomas Orsava -Date: Mon, 29 Jan 2018 16:13:18 +0100 -Subject: [PATCH] Add envvar that will be present during RPM build - -Part of a Fedora Change for F28: -"Avoid /usr/bin/python in RPM build" -https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build ---- - macros.in | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/macros.in b/macros.in -index dd6ef67..68449e3 100644 ---- a/macros.in -+++ b/macros.in -@@ -804,6 +804,8 @@ package or when debugging this package.\ - export PKG_CONFIG_PATH\ - CONFIG_SITE=${CONFIG_SITE:-NONE}\ - export CONFIG_SITE\ -+ PYTHON_DISALLOW_AMBIGUOUS_VERSION=warn\ -+ export PYTHON_DISALLOW_AMBIGUOUS_VERSION\ - \ - %{verbose:set -x}%{!verbose:exec > /dev/null}\ - umask 022\ --- -2.13.6 - diff --git a/rpm-4.14.1-explicit-python2.patch b/rpm-4.14.1-explicit-python2.patch index 8eec835..7c946ae 100644 --- a/rpm-4.14.1-explicit-python2.patch +++ b/rpm-4.14.1-explicit-python2.patch @@ -1,12 +1,519 @@ +diff -up rpm-4.14.1/tests/rpmtests.python2 rpm-4.14.1/tests/rpmtests +--- rpm-4.14.1/tests/rpmtests.python2 2018-06-29 11:48:40.973388135 +0300 ++++ rpm-4.14.1/tests/rpmtests 2018-06-29 11:49:04.357354872 +0300 +@@ -27979,7 +27979,7 @@ def myprint(msg = ''): + myprint(rpm.__version__) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:6" + ( $at_check_trace; +@@ -27993,7 +27993,7 @@ def myprint(msg = ''): + myprint(rpm.__version__) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28052,7 +28052,7 @@ rpm.delMacro(mname) + prexp(mname) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:12" + ( $at_check_trace; +@@ -28078,7 +28078,7 @@ rpm.delMacro(mname) + prexp(mname) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28159,7 +28159,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'g + myprint('%s sized read fail (got %d bytes)\\n%s' % (iot, len(rdata), rdata)) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:35" + ( $at_check_trace; +@@ -28203,7 +28203,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'g + myprint('%s sized read fail (got %d bytes)\n%s' % (iot, len(rdata), rdata)) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28254,7 +28254,7 @@ for pkg in spec.packages: + myprint(spec.sourceHeader.format('%{nvr}')) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:70" + ( $at_check_trace; +@@ -28274,7 +28274,7 @@ for pkg in spec.packages: + myprint(spec.sourceHeader.format('%{nvr}')) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28338,7 +28338,7 @@ for a in ['name', 'bugurl', '__class__', + myprint(exc) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:85" + ( $at_check_trace; +@@ -28366,7 +28366,7 @@ for a in ['name', 'bugurl', '__class__', + myprint(exc) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28430,7 +28430,7 @@ for h in [h1, h2]: + myprint(exc) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:110" + ( $at_check_trace; +@@ -28456,7 +28456,7 @@ for h in [h1, h2]: + myprint(exc) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28506,7 +28506,7 @@ h = ts.hdrFromFdno('\${RPMDATA}/RPMS/hel + myprint(h['arch']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:129" + ( $at_check_trace; +@@ -28522,7 +28522,7 @@ h = ts.hdrFromFdno('${RPMDATA}/RPMS/hell + myprint(h['arch']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28577,7 +28577,7 @@ except rpm.error, e: + myprint(e) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:137" + ( $at_check_trace; +@@ -28599,7 +28599,7 @@ except rpm.error, e: + myprint(e) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28658,7 +28658,7 @@ except rpm.error, e: + myprint(e) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:152" + ( $at_check_trace; +@@ -28684,7 +28684,7 @@ except rpm.error, e: + myprint(e) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28737,7 +28737,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:170" + ( $at_check_trace; +@@ -28757,7 +28757,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28812,7 +28812,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:182" + ( $at_check_trace; +@@ -28834,7 +28834,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -28896,7 +28896,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:196" + ( $at_check_trace; +@@ -28925,7 +28925,7 @@ for e in ts: + myprint(e.NEVRA()) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29011,7 +29011,7 @@ for h in ts.dbMatch('packages', ix): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:231" + ( $at_check_trace; +@@ -29034,7 +29034,7 @@ for h in ts.dbMatch('packages', ix): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29066,7 +29066,7 @@ for h in mi: + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:247" + ( $at_check_trace; +@@ -29084,7 +29084,7 @@ for h in mi: + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29114,7 +29114,7 @@ for h in ts.dbMatch('name'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:258" + ( $at_check_trace; +@@ -29130,7 +29130,7 @@ for h in ts.dbMatch('name'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29161,7 +29161,7 @@ for h in ts.dbMatch('obsoletes'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:268" + ( $at_check_trace; +@@ -29177,7 +29177,7 @@ for h in ts.dbMatch('obsoletes'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29207,7 +29207,7 @@ for h in ts.dbMatch('provides', 'hi'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:277" + ( $at_check_trace; +@@ -29223,7 +29223,7 @@ for h in ts.dbMatch('provides', 'hi'): + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29253,7 +29253,7 @@ for h in ts.dbMatch('basenames', '/usr/s + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:286" + ( $at_check_trace; +@@ -29269,7 +29269,7 @@ for h in ts.dbMatch('basenames', '/usr/s + myprint(h['nevra']) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29298,7 +29298,7 @@ for di in sorted(ts.dbIndex('obsoletes') + myprint(di) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:294" + ( $at_check_trace; +@@ -29314,7 +29314,7 @@ for di in sorted(ts.dbIndex('obsoletes') + myprint(di) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29344,7 +29344,7 @@ for di in sorted(ts.dbIndex('provides')) + myprint(di) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:303" + ( $at_check_trace; +@@ -29360,7 +29360,7 @@ for di in sorted(ts.dbIndex('provides')) + myprint(di) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29413,7 +29413,7 @@ for dep in rpm.ds(h, 'requires'): + myprint(dep.DNEVR()) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:316" + ( $at_check_trace; +@@ -29430,7 +29430,7 @@ for dep in rpm.ds(h, 'requires'): + myprint(dep.DNEVR()) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29488,7 +29488,7 @@ ds = rpm.ds(h, 'provides') + myprint('%d %d' % (ds.Instance(), ds.Count())) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:333" + ( $at_check_trace; +@@ -29505,7 +29505,7 @@ ds = rpm.ds(h, 'provides') + myprint('%d %d' % (ds.Instance(), ds.Count())) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29557,7 +29557,7 @@ for f in fi: + myprint('%x: %s' % (fi.FFlags(), fi.FN())) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:343" + ( $at_check_trace; +@@ -29576,7 +29576,7 @@ for f in fi: + myprint('%x: %s' % (fi.FFlags(), fi.FN())) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29633,7 +29633,7 @@ for i in range(1, len(p)+1): + myprint('%s: %s' % (i, p[i])) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:360" + ( $at_check_trace; +@@ -29652,7 +29652,7 @@ for i in range(1, len(p)+1): + myprint('%s: %s' % (i, p[i])) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29710,7 +29710,7 @@ myprint(d2.DNEVR()) + myprint(d3.DNEVR()) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:375" + ( $at_check_trace; +@@ -29732,7 +29732,7 @@ myprint(d2.DNEVR()) + myprint(d3.DNEVR()) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29796,7 +29796,7 @@ for f in archive: + break + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:393" + ( $at_check_trace; +@@ -29824,7 +29824,7 @@ for f in archive: + break + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -29879,7 +29879,7 @@ len2 = len(h.unload()) + myprint(len1 == len2) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:413" + ( $at_check_trace; +@@ -29903,7 +29903,7 @@ len2 = len(h.unload()) + myprint(len1 == len2) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false +@@ -30183,7 +30183,7 @@ for p, r, res in tests: + myprint('FAILED: %s with %s: %s' % (d1.DNEVR(), d2.DNEVR(),ms[res])) + + EOF +-python test.py ++python2 test.py + " + at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmdepmatch.at:4" + ( $at_check_trace; +@@ -30430,7 +30430,7 @@ for p, r, res in tests: + myprint('FAILED: %s with %s: %s' % (d1.DNEVR(), d2.DNEVR(),ms[res])) + + EOF +-python test.py ++python2 test.py + + ) >>"$at_stdout" 2>>"$at_stderr" 5>&- + at_status=$? at_failed=false diff -up rpm-4.14.1/tests/local.at.python2 rpm-4.14.1/tests/local.at ---- rpm-4.14.1/tests/local.at.python2 2018-06-29 11:11:42.716541572 +0300 -+++ rpm-4.14.1/tests/local.at 2017-09-06 14:58:13.034317976 +0300 +--- rpm-4.14.1/tests/local.at.python2 2018-06-29 12:01:35.834278375 +0300 ++++ rpm-4.14.1/tests/local.at 2018-06-29 12:01:44.007266563 +0300 @@ -17,7 +17,7 @@ def myprint(msg = ''): sys.stdout.write('%s\n' % msg) $1 EOF --python2 test.py -+python test.py +-python test.py ++python2 test.py ]]) m4_define([RPMPY_CHECK],[ diff --git a/rpm.spec b/rpm.spec index 7863ade..4ec339a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,7 +23,7 @@ %global rpmver 4.14.1 #global snapver rc2 -%global rel 12 +%global rel 13 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -62,20 +62,11 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch # https://github.com/rpm-software-management/rpm/pull/434 Patch6: rpm-4.14.1-python-brp-bytecompile.patch -# Downstream-only patch: -# Add envvar that will be present during RPM build -# - Part of a Fedora Change for F28: -# - "Avoid /usr/bin/python in RPM build" -# - https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build -Patch7: rpm-4.14.1-Add-envvar-that-will-be-present-during-RPM-build.patch - # find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output). # http://lists.rpm.org/pipermail/rpm-maint/2018-May/007976.html # https://bugzilla.redhat.com/show_bug.cgi?id=1581224 Patch8: 4.14.1-find-debuginfo-pie.patch -# More Python 3 fallout, invoke python2 explicitly to avoid deprecation -# warnings breaking the test-suite Patch9: rpm-4.14.1-explicit-python2.patch # Patches already upstream: @@ -473,8 +464,8 @@ make check || cat tests/rpmtests.log %endif # Fedora < 28 and EPEL-7 builds need these -%ldconfig_scripts libs -%ldconfig_scripts build-libs +%ldconfig_scriptlets libs +%ldconfig_scriptlets build-libs %files -f %{name}.lang %license COPYING @@ -609,6 +600,11 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Fri Jun 29 2018 Panu Matilainen - 4.14.2-13 +- Ehm, need to patch the autogenerated rpmtests script too for python2 +- Ehm, it's ldconfig_scriptlets not scripts +- Drop the non-working python envvar magic from obsoleted change + * Fri Jun 29 2018 Panu Matilainen - 4.14.2-12 - Invoke python2 explicitly from test-suite to unbreak build From 22e1547001e2436961b364e3dd0647b5d2166811 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 29 Jun 2018 15:43:00 +0300 Subject: [PATCH 7/9] Update to rpm 4.14.2-rc1 Additionally... - Patching test-suite for python2 too painful, just sed it instead - Fix premature version increment from previous changelog entries, oops --- 4.14.1-find-debuginfo-pie.patch | 29 -- rpm-4.14.1-explicit-python2.patch | 519 ------------------------ rpm-4.14.1-python-brp-bytecompile.patch | 36 -- rpm.spec | 33 +- 4 files changed, 15 insertions(+), 602 deletions(-) delete mode 100644 4.14.1-find-debuginfo-pie.patch delete mode 100644 rpm-4.14.1-explicit-python2.patch delete mode 100644 rpm-4.14.1-python-brp-bytecompile.patch diff --git a/4.14.1-find-debuginfo-pie.patch b/4.14.1-find-debuginfo-pie.patch deleted file mode 100644 index b92c6b1..0000000 --- a/4.14.1-find-debuginfo-pie.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b -Author: Mark Wielaard -Date: Tue May 22 22:12:11 2018 +0200 - - find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output). - - A new version of file (5.33) changed the output for PIE executables. - Which are now represented as application/x-pie-executable; charset=binary. - - The following change simply recognizes that binary format as one for - which -g applies. This fixes accidental stripping of the .symtab in - glibc (which use -g to keep that symbol table). - - https://bugzilla.redhat.com/show_bug.cgi?id=1581224 - - Signed-off-by: Mark Wielaard - -diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh -index a7c2db0..90a4494 100755 ---- a/scripts/find-debuginfo.sh -+++ b/scripts/find-debuginfo.sh -@@ -235,6 +235,7 @@ strip_to_debug() - $strip_g && case "$(file -bi "$2")" in - application/x-sharedlib*) g=-g ;; - application/x-executable*) g=-g ;; -+ application/x-pie-executable*) g=-g ;; - esac - eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit - chmod 444 "$1" || exit diff --git a/rpm-4.14.1-explicit-python2.patch b/rpm-4.14.1-explicit-python2.patch deleted file mode 100644 index 7c946ae..0000000 --- a/rpm-4.14.1-explicit-python2.patch +++ /dev/null @@ -1,519 +0,0 @@ -diff -up rpm-4.14.1/tests/rpmtests.python2 rpm-4.14.1/tests/rpmtests ---- rpm-4.14.1/tests/rpmtests.python2 2018-06-29 11:48:40.973388135 +0300 -+++ rpm-4.14.1/tests/rpmtests 2018-06-29 11:49:04.357354872 +0300 -@@ -27979,7 +27979,7 @@ def myprint(msg = ''): - myprint(rpm.__version__) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:6" - ( $at_check_trace; -@@ -27993,7 +27993,7 @@ def myprint(msg = ''): - myprint(rpm.__version__) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28052,7 +28052,7 @@ rpm.delMacro(mname) - prexp(mname) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:12" - ( $at_check_trace; -@@ -28078,7 +28078,7 @@ rpm.delMacro(mname) - prexp(mname) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28159,7 +28159,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'g - myprint('%s sized read fail (got %d bytes)\\n%s' % (iot, len(rdata), rdata)) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:35" - ( $at_check_trace; -@@ -28203,7 +28203,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'g - myprint('%s sized read fail (got %d bytes)\n%s' % (iot, len(rdata), rdata)) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28254,7 +28254,7 @@ for pkg in spec.packages: - myprint(spec.sourceHeader.format('%{nvr}')) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:70" - ( $at_check_trace; -@@ -28274,7 +28274,7 @@ for pkg in spec.packages: - myprint(spec.sourceHeader.format('%{nvr}')) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28338,7 +28338,7 @@ for a in ['name', 'bugurl', '__class__', - myprint(exc) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:85" - ( $at_check_trace; -@@ -28366,7 +28366,7 @@ for a in ['name', 'bugurl', '__class__', - myprint(exc) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28430,7 +28430,7 @@ for h in [h1, h2]: - myprint(exc) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:110" - ( $at_check_trace; -@@ -28456,7 +28456,7 @@ for h in [h1, h2]: - myprint(exc) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28506,7 +28506,7 @@ h = ts.hdrFromFdno('\${RPMDATA}/RPMS/hel - myprint(h['arch']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:129" - ( $at_check_trace; -@@ -28522,7 +28522,7 @@ h = ts.hdrFromFdno('${RPMDATA}/RPMS/hell - myprint(h['arch']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28577,7 +28577,7 @@ except rpm.error, e: - myprint(e) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:137" - ( $at_check_trace; -@@ -28599,7 +28599,7 @@ except rpm.error, e: - myprint(e) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28658,7 +28658,7 @@ except rpm.error, e: - myprint(e) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:152" - ( $at_check_trace; -@@ -28684,7 +28684,7 @@ except rpm.error, e: - myprint(e) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28737,7 +28737,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:170" - ( $at_check_trace; -@@ -28757,7 +28757,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28812,7 +28812,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:182" - ( $at_check_trace; -@@ -28834,7 +28834,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -28896,7 +28896,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:196" - ( $at_check_trace; -@@ -28925,7 +28925,7 @@ for e in ts: - myprint(e.NEVRA()) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29011,7 +29011,7 @@ for h in ts.dbMatch('packages', ix): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:231" - ( $at_check_trace; -@@ -29034,7 +29034,7 @@ for h in ts.dbMatch('packages', ix): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29066,7 +29066,7 @@ for h in mi: - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:247" - ( $at_check_trace; -@@ -29084,7 +29084,7 @@ for h in mi: - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29114,7 +29114,7 @@ for h in ts.dbMatch('name'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:258" - ( $at_check_trace; -@@ -29130,7 +29130,7 @@ for h in ts.dbMatch('name'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29161,7 +29161,7 @@ for h in ts.dbMatch('obsoletes'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:268" - ( $at_check_trace; -@@ -29177,7 +29177,7 @@ for h in ts.dbMatch('obsoletes'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29207,7 +29207,7 @@ for h in ts.dbMatch('provides', 'hi'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:277" - ( $at_check_trace; -@@ -29223,7 +29223,7 @@ for h in ts.dbMatch('provides', 'hi'): - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29253,7 +29253,7 @@ for h in ts.dbMatch('basenames', '/usr/s - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:286" - ( $at_check_trace; -@@ -29269,7 +29269,7 @@ for h in ts.dbMatch('basenames', '/usr/s - myprint(h['nevra']) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29298,7 +29298,7 @@ for di in sorted(ts.dbIndex('obsoletes') - myprint(di) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:294" - ( $at_check_trace; -@@ -29314,7 +29314,7 @@ for di in sorted(ts.dbIndex('obsoletes') - myprint(di) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29344,7 +29344,7 @@ for di in sorted(ts.dbIndex('provides')) - myprint(di) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:303" - ( $at_check_trace; -@@ -29360,7 +29360,7 @@ for di in sorted(ts.dbIndex('provides')) - myprint(di) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29413,7 +29413,7 @@ for dep in rpm.ds(h, 'requires'): - myprint(dep.DNEVR()) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:316" - ( $at_check_trace; -@@ -29430,7 +29430,7 @@ for dep in rpm.ds(h, 'requires'): - myprint(dep.DNEVR()) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29488,7 +29488,7 @@ ds = rpm.ds(h, 'provides') - myprint('%d %d' % (ds.Instance(), ds.Count())) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:333" - ( $at_check_trace; -@@ -29505,7 +29505,7 @@ ds = rpm.ds(h, 'provides') - myprint('%d %d' % (ds.Instance(), ds.Count())) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29557,7 +29557,7 @@ for f in fi: - myprint('%x: %s' % (fi.FFlags(), fi.FN())) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:343" - ( $at_check_trace; -@@ -29576,7 +29576,7 @@ for f in fi: - myprint('%x: %s' % (fi.FFlags(), fi.FN())) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29633,7 +29633,7 @@ for i in range(1, len(p)+1): - myprint('%s: %s' % (i, p[i])) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:360" - ( $at_check_trace; -@@ -29652,7 +29652,7 @@ for i in range(1, len(p)+1): - myprint('%s: %s' % (i, p[i])) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29710,7 +29710,7 @@ myprint(d2.DNEVR()) - myprint(d3.DNEVR()) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:375" - ( $at_check_trace; -@@ -29732,7 +29732,7 @@ myprint(d2.DNEVR()) - myprint(d3.DNEVR()) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29796,7 +29796,7 @@ for f in archive: - break - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:393" - ( $at_check_trace; -@@ -29824,7 +29824,7 @@ for f in archive: - break - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -29879,7 +29879,7 @@ len2 = len(h.unload()) - myprint(len1 == len2) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmpython.at:413" - ( $at_check_trace; -@@ -29903,7 +29903,7 @@ len2 = len(h.unload()) - myprint(len1 == len2) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -@@ -30183,7 +30183,7 @@ for p, r, res in tests: - myprint('FAILED: %s with %s: %s' % (d1.DNEVR(), d2.DNEVR(),ms[res])) - - EOF --python test.py -+python2 test.py - " - at_fn_check_prepare_notrace 'a ${...} parameter expansion' "rpmdepmatch.at:4" - ( $at_check_trace; -@@ -30430,7 +30430,7 @@ for p, r, res in tests: - myprint('FAILED: %s with %s: %s' % (d1.DNEVR(), d2.DNEVR(),ms[res])) - - EOF --python test.py -+python2 test.py - - ) >>"$at_stdout" 2>>"$at_stderr" 5>&- - at_status=$? at_failed=false -diff -up rpm-4.14.1/tests/local.at.python2 rpm-4.14.1/tests/local.at ---- rpm-4.14.1/tests/local.at.python2 2018-06-29 12:01:35.834278375 +0300 -+++ rpm-4.14.1/tests/local.at 2018-06-29 12:01:44.007266563 +0300 -@@ -17,7 +17,7 @@ def myprint(msg = ''): - sys.stdout.write('%s\n' % msg) - $1 - EOF --python test.py -+python2 test.py - ]]) - - m4_define([RPMPY_CHECK],[ diff --git a/rpm-4.14.1-python-brp-bytecompile.patch b/rpm-4.14.1-python-brp-bytecompile.patch deleted file mode 100644 index 692fb11..0000000 --- a/rpm-4.14.1-python-brp-bytecompile.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile -index 894fa34..c06bdfa 100644 ---- a/scripts/brp-python-bytecompile -+++ b/scripts/brp-python-bytecompile -@@ -1,5 +1,6 @@ - #!/bin/bash - errors_terminate=$2 -+extra=$3 - - # If using normal root, avoid changing anything. - if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then -@@ -79,14 +80,22 @@ do - done - - --# Handle other locations in the filesystem using the default python --# implementation - if we have a default python interpreter -+# Handle other locations in the filesystem using the default python implementation -+# if extra is set to 0, don't do this -+if [ 0$extra -eq 0 ]; then -+ exit 0 -+fi - -+# If we don't have a default python interpreter, we cannot proceed - default_python=${1:-/usr/bin/python} - if [ ! -x "$default_python" ]; then - exit 0 - fi - -+# Figure out if there are files to be bytecompiled with the default_python at all -+# this prevents unnecessary default_python invocation -+find "$RPM_BUILD_ROOT" -type f -name "*.py" | grep -Ev "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" || exit 0 -+ - # Generate normal (.pyc) byte-compiled files. - python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/" - if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then diff --git a/rpm.spec b/rpm.spec index 4ec339a..45a74a8 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,9 +21,9 @@ %define rpmhome /usr/lib/rpm -%global rpmver 4.14.1 -#global snapver rc2 -%global rel 13 +%global rpmver 4.14.2 +%global snapver rc1 +%global rel 1 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -56,18 +56,6 @@ Patch3: rpm-4.9.90-no-man-dirs.patch Patch4: rpm-4.8.1-use-gpg2.patch # Temporary band-aid for rpm2cpio whining on payload size mismatch (#1142949) Patch5: rpm-4.12.0-rpm2cpio-hack.patch -# Skip automatic Python byte-compilation (outside of Python directories) if -# *.py files are not present, and allow to disable it even if they are -# Upstream pull request: https://github.com/rpm-software-management/rpm/pull/383 -# https://github.com/rpm-software-management/rpm/pull/434 -Patch6: rpm-4.14.1-python-brp-bytecompile.patch - -# find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output). -# http://lists.rpm.org/pipermail/rpm-maint/2018-May/007976.html -# https://bugzilla.redhat.com/show_bug.cgi?id=1581224 -Patch8: 4.14.1-find-debuginfo-pie.patch - -Patch9: rpm-4.14.1-explicit-python2.patch # Patches already upstream: @@ -353,6 +341,10 @@ nice/ionice priorities. Should not be used on systemd systems. ln -s db-%{bdbver} db %endif +# Python madness: invoke python2 explicitly to avoid deprecation warnings +# breaking the testsuite and thus the build. Easier than managing a patch... +sed -ie 's:^python test:python2 test:g' tests/rpmtests tests/local.at + %build %if %{without int_bdb} #CPPFLAGS=-I%{_includedir}/db%{bdbver} @@ -600,15 +592,20 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog -* Fri Jun 29 2018 Panu Matilainen - 4.14.2-13 +* Fri Jun 29 2018 Panu Matilainen - 4.14.2-0.rc1.1 +- Update to rpm 4.14.2-rc1 +- Patching test-suite for python2 too painful, just sed it instead +- Fix premature version increment from previous changelog entries, oops + +* Fri Jun 29 2018 Panu Matilainen - 4.14.1-13 - Ehm, need to patch the autogenerated rpmtests script too for python2 - Ehm, it's ldconfig_scriptlets not scripts - Drop the non-working python envvar magic from obsoleted change -* Fri Jun 29 2018 Panu Matilainen - 4.14.2-12 +* Fri Jun 29 2018 Panu Matilainen - 4.14.1-12 - Invoke python2 explicitly from test-suite to unbreak build -* Fri Jun 29 2018 Panu Matilainen - 4.14.2-11 +* Fri Jun 29 2018 Panu Matilainen - 4.14.1-11 - Remove direct ldconfig calls, use compat macros instead * Fri Jun 15 2018 Miro Hrončok - 4.14.1-10.1 From 816a8d9b50447ae245ede969b2e96d69478e2cf4 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 29 Jun 2018 15:44:27 +0300 Subject: [PATCH 8/9] Doh, always forgetting new-sources.. --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a9907a..3190d59 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /rpm-4.14.0-rc2.tar.bz2 /rpm-4.14.0.tar.bz2 /rpm-4.14.1.tar.bz2 +/rpm-4.14.2-rc1.tar.bz2 diff --git a/sources b/sources index 9bdf10c..6e61ba4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpm-4.14.1.tar.bz2) = 29e95eaaf40a6ddf7f23446ea6cb8a1dcd12a45d4965595a705cb9130890d772a40ecfa475b189865da51248b3d2414e4f4b1a40cbfd7ca538c482d87c50a218 +SHA512 (rpm-4.14.2-rc1.tar.bz2) = 1d8c7ce01b8d576cb9634d45f9de346ee3f6cad0072ab6ece2ac3621db65b8ed279d73f01d11e5b0c7e8a28a5eb3cb98cce0f30934a9ada71f8fb065525d35b3 From 8029c4e85b3da9899b7b7e2be71d60cb26c81557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 2 Jul 2018 18:24:09 +0200 Subject: [PATCH 9/9] Rebuilt for Python 3.7 --- rpm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpm.spec b/rpm.spec index 45a74a8..fbe900d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -35,7 +35,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist} +Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist}.1 Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -592,6 +592,9 @@ make check || cat tests/rpmtests.log %doc doc/librpm/html/* %changelog +* Mon Jul 02 2018 Miro Hrončok - 4.14.2-0.rc1.1.1 +- Rebuilt for Python 3.7 + * Fri Jun 29 2018 Panu Matilainen - 4.14.2-0.rc1.1 - Update to rpm 4.14.2-rc1 - Patching test-suite for python2 too painful, just sed it instead