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
This commit is contained in:
Panu Matilainen 2018-06-29 15:43:00 +03:00
parent e79d625c87
commit 22e1547001
4 changed files with 15 additions and 602 deletions

View File

@ -1,29 +0,0 @@
commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b
Author: Mark Wielaard <mark@klomp.org>
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 <mark@klomp.org>
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

View File

@ -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],[

View File

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

View File

@ -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 <pmatilai@redhat.com> - 4.14.2-13
* Fri Jun 29 2018 Panu Matilainen <pmatilai@redhat.com> - 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 <pmatilai@redhat.com> - 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 <pmatilai@redhat.com> - 4.14.2-12
* Fri Jun 29 2018 Panu Matilainen <pmatilai@redhat.com> - 4.14.1-12
- Invoke python2 explicitly from test-suite to unbreak build
* Fri Jun 29 2018 Panu Matilainen <pmatilai@redhat.com> - 4.14.2-11
* Fri Jun 29 2018 Panu Matilainen <pmatilai@redhat.com> - 4.14.1-11
- Remove direct ldconfig calls, use compat macros instead
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 4.14.1-10.1