Hello community, here is the log from the commit of package rpm for openSUSE:Factory checked in at 2020-04-08 19:54:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpm (Old) and /work/SRC/openSUSE:Factory/.rpm.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpm" Wed Apr 8 19:54:07 2020 rev:279 rq:791720 version:4.15.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rpm/rpm.changes 2020-03-24 23:07:25.737849696 +0100 +++ /work/SRC/openSUSE:Factory/.rpm.new.3248/rpm.changes 2020-04-08 19:54:08.601012048 +0200 @@ -1,0 +2,6 @@ +Fri Apr 3 12:34:42 CEST 2020 - m...@suse.de + +- Initialize the libgcrypt library [bnc#1167343] + * new patch: initgcrypt.diff + +------------------------------------------------------------------- @@ -11,0 +18,14 @@ + +------------------------------------------------------------------- +Fri Mar 13 08:26:58 UTC 2020 - Fabian Vogt <fv...@suse.com> + +- Replace rpmsort with rewrite using Lua (boo#1164553) + +------------------------------------------------------------------- +Wed Feb 26 09:08:19 UTC 2020 - Fabian Vogt <fv...@suse.com> + +- Split out perl and python dep generators from rpm-build to avoid + pulling in perl and python in all RPM builds +- Port rpmconfigcheck to pure shell +- Refactor %files list of main package to not require %excludes + as those might lead to missing files in the package New: ---- initgcrypt.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpm.spec ++++++ --- /var/tmp/diff_new_pack.eVVl1C/_old 2020-04-08 19:54:10.809013661 +0200 +++ /var/tmp/diff_new_pack.eVVl1C/_new 2020-04-08 19:54:10.813013664 +0200 @@ -131,6 +131,7 @@ Patch120: disable_bdb.diff Patch121: ndb_backport.diff Patch122: db_conversion.diff +Patch123: initgcrypt.diff Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -194,7 +195,6 @@ Requires: gzip Requires: make Requires: patch -Requires: perl-base Requires: sed Requires: systemd-rpm-macros Requires: tar @@ -204,8 +204,9 @@ # drop candidates Requires: cpio Requires: file -# for pythondistdeps generator -Requires: python3-base +# Mandatory generators +Requires: (%{name}-build-perl if perl-base) +Requires: (%{name}-build-python if python3-base) # The point of the split Conflicts: rpm < 4.15.0 @@ -213,6 +214,22 @@ If you want to build a rpm, you need this package. It provides rpmbuild and requires some packages that are usually required. +%package build-python +Summary: RPM dependency generator for Python +Group: Development/Languages/Python +Requires: python3-base + +%description build-python +Provides and requires generator for .py files and modules. + +%package build-perl +Summary: RPM dependency generator for Perl +Group: Development/Languages/Perl +Requires: perl-base + +%description build-perl +Provides and requires generator for .pl files and modules. + %prep %setup -q -n rpm-%{version} rm -rf sqlite @@ -239,7 +256,7 @@ %patch -P 93 -P 94 -P 99 %patch -P 100 -P 102 -P 103 %patch -P 109 -P 117 -%patch -P 118 -P 119 -P 120 -P 121 -P 122 +%patch -P 118 -P 119 -P 120 -P 121 -P 122 -P 123 %ifarch aarch64 ppc64le riscv64 %patch6464 @@ -412,24 +429,29 @@ %doc RPM-HOWTO /etc/rpm /bin/rpm - /usr/bin/* - %exclude /usr/bin/rpmbuild - %exclude %{_libdir}/librpmbuild.so.* - %exclude /usr/lib/rpm/elfdeps - %exclude /usr/lib/rpm/rpmdeps - %exclude /usr/lib/rpm/debugedit - %exclude /usr/lib/rpm/sepdebugcrcfix - %exclude /usr/bin/rpmspec - %exclude /usr/lib/rpm/*.prov - %exclude /usr/lib/rpm/*.req - %exclude /usr/lib/rpm/brp-* - %exclude /usr/lib/rpm/check-* - %exclude /usr/lib/rpm/*find* - %exclude /usr/lib/rpm/fileattrs/pythondist.attr - %exclude /usr/lib/rpm/pythondistdeps.py + %{_bindir}/gendiff + %{_bindir}/rpm + %{_bindir}/rpm2cpio + %{_bindir}/rpmdb + %{_bindir}/rpmgraph + %{_bindir}/rpmkeys + %{_bindir}/rpmqpack + %{_bindir}/rpmquery + %{_bindir}/rpmsign + %{_bindir}/rpmverify /usr/sbin/rpmconfigcheck /usr/lib/systemd/system/rpmconfigcheck.service - /usr/lib/rpm + %dir /usr/lib/rpm + /usr/lib/rpm/macros + /usr/lib/rpm/macros.d/ + /usr/lib/rpm/platform/ + /usr/lib/rpm/rpm.supp + /usr/lib/rpm/rpmdb_* + /usr/lib/rpm/rpmpopt-* + /usr/lib/rpm/rpmrc + /usr/lib/rpm/rpmsort + /usr/lib/rpm/suse + /usr/lib/rpm/tgpg %{_libdir}/rpm-plugins %{_libdir}/librpm.so.* %{_libdir}/librpmio.so.* @@ -454,26 +476,47 @@ %files build %defattr(-,root,root) /usr/bin/rpmbuild +/usr/lib/rpm/libtooldeps.sh +/usr/lib/rpm/pkgconfigdeps.sh +/usr/lib/rpm/pythondeps.sh /usr/lib/rpm/elfdeps /usr/lib/rpm/rpmdeps /usr/lib/rpm/debugedit /usr/lib/rpm/sepdebugcrcfix /usr/bin/rpmspec -/usr/lib/rpm/*.prov -/usr/lib/rpm/*.req /usr/lib/rpm/brp-* /usr/lib/rpm/check-* /usr/lib/rpm/*find* +/usr/lib/rpm/fileattrs/ +%exclude /usr/lib/rpm/fileattrs/pythondist.attr +%exclude /usr/lib/rpm/fileattrs/perl*.attr +/usr/lib/rpm/*.prov +%exclude /usr/lib/rpm/perl.prov +/usr/lib/rpm/*.req +%exclude /usr/lib/rpm/perl.req +%ifarch aarch64 ppc64le riscv64 +/usr/lib/rpm/config.guess +/usr/lib/rpm/config.sub +%endif + +%files build-python +%defattr(-,root,root) /usr/lib/rpm/fileattrs/pythondist.attr /usr/lib/rpm/pythondistdeps.py +%files build-perl +%defattr(-,root,root) +/usr/lib/rpm/fileattrs/perl*.attr +/usr/lib/rpm/perl.prov +/usr/lib/rpm/perl.req + %files devel %defattr(644,root,root,755) - /usr/include/rpm - %{_libdir}/librpm.so - %{_libdir}/librpmbuild.so - %{_libdir}/librpmio.so - %{_libdir}/librpmsign.so - %{_libdir}/pkgconfig/rpm.pc +/usr/include/rpm +%{_libdir}/librpm.so +%{_libdir}/librpmbuild.so +%{_libdir}/librpmio.so +%{_libdir}/librpmsign.so +%{_libdir}/pkgconfig/rpm.pc %changelog ++++++ initgcrypt.diff ++++++ --- ./rpmio/digest_libgcrypt.c.orig 2020-04-06 10:10:26.096842925 +0000 +++ ./rpmio/digest_libgcrypt.c 2020-04-06 10:10:39.832806646 +0000 @@ -20,6 +20,8 @@ struct DIGEST_CTX_s { /**************************** init ************************************/ int rpmInitCrypto(void) { + gcry_check_version (NULL); + gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); return 0; } ++++++ rpmconfigcheck ++++++ --- /var/tmp/diff_new_pack.eVVl1C/_old 2020-04-08 19:54:10.993013795 +0200 +++ /var/tmp/diff_new_pack.eVVl1C/_new 2020-04-08 19:54:10.993013795 +0200 @@ -13,7 +13,11 @@ echo "Searching for unresolved configuration files" if test ! -e $configcheckfile -o ! $packages -ot $configcheckfile ; then test -e $configcheckfile && mv -f $configcheckfile $configcheckfile.old - rpm -qalc | sort | perl -lne '-e "$_.rpmnew" and print "$_.rpmnew"; -e "$_.rpmorig" and print "$_.rpmorig"; -e "$_.rpmsave" and print "$_.rpmsave"' > $configcheckfile + rpm -qalc | sort | while read line; do + for suffix in new orig save; do + [[ -e "${line}.rpm${suffix}" ]] && echo "${line}.rpm${suffix}" + done + done > $configcheckfile else mv -f $configcheckfile $configcheckfile.old while read l; do ++++++ rpmsort ++++++ --- /var/tmp/diff_new_pack.eVVl1C/_old 2020-04-08 19:54:11.021013816 +0200 +++ /var/tmp/diff_new_pack.eVVl1C/_new 2020-04-08 19:54:11.021013816 +0200 @@ -1,102 +1,76 @@ -#! /usr/bin/perl -w +#!/bin/sh +# rpmsort implemented mostly in Lua +# Copyright (c) 2020 SUSE LLC +# SPDX-License-Identifier: GPL-2.0-or-later +# Author: fv...@suse.de +# Enhanced by: mwi...@suse.com + +rpmsort() { + direction=$1 + script=' +function parse(ver) + local epoch, version, release = 0, ver, 0 + _, eend, e = ver:find("^(%d+):") + if eend then + ver = ver:sub(eend + 1) + version = ver + epoch = e + end + _, _, v, r = ver:find("(.+)%-(.+)$") + if v then + version = v + release = r + end + return epoch, version, release +end + +function pkgvercmp(a, b) + local ae, av, ar = parse(a) + local be, bv, br = parse(b) + + local ecmp = rpm.vercmp(ae, be) + if ecmp ~= 0 then return ecmp end + + local vcmp = rpm.vercmp(av, bv) + if vcmp ~= 0 then return vcmp end + + return rpm.vercmp(ar, br) +end + +vers = {} +for line in io.stdin:lines() do + table.insert(vers, line) +end +table.sort(vers, function(a, b) return pkgvercmp(a, b) == '"$direction"' end) +print(table.concat(vers, "\n")) +' -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -# USA. - -use Getopt::Long qw(:config gnu_getopt); - -sub do_rpm_cmp_versions { - my ($evr1, $evr2) = @_; - - sub _rpm_cmp { - my ($s1, $s2) = @_; - - return defined $s1 <=> defined $s2 - unless defined $s1 && defined $s2; - - my ($r, $x1, $x2); - do { - $s1 =~ s/^[^a-zA-Z0-9]+//; - $s2 =~ s/^[^a-zA-Z0-9]+//; - if ($s1 =~ /^\d/ || $s2 =~ /^\d/) { - $s1 =~ s/^(0*(\d*))//; $x1 = $2; - return -1 if $1 eq ''; - $s2 =~ s/^(0*(\d*))//; $x2 = $2; - return 1 if $1 eq ''; - $r = length $x1 <=> length $x2 || $x1 cmp $x2; - } else { - $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; - $s2 =~ s/^([a-zA-Z]*)//; $x2 = $1; - return 0 - if $x1 eq '' && $x2 eq ''; - $r = $x1 cmp $x2; - } - } until $r; - return $r; - } - - my ($e1, $v1, $r1) = $evr1 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; - my ($e2, $v2, $r2) = $evr2 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; - my $r = _rpm_cmp($e1 || 0, $e2 || 0); - $r = _rpm_cmp($v1, $v2) - unless $r; - $r = _rpm_cmp($r1, $r2) - unless $r; - return $r; + rpm --eval "%{lua: ${script}}" } -my $reorder = sub { return @_ }; -my $key = 0; -my $test = 0; - -sub rpm_cmp_versions { - my ($evr1, $evr2) = @_; - - chomp($evr1, $evr2); - my $res1 = do_rpm_cmp_versions($evr1, $evr2); - if ($test) { - open(my $fd, '-|', 'zypper', '--terse', 'versioncmp', - $evr1, $evr2) or die "zypper: $!\n"; - my $res2 = <$fd>; - close($fd) or die "zypper: $!\n"; - chomp $res2; - if ($res1 != $res2) { - my @operators = qw(< == >); - my $op1 = $operators[$res1 + 1]; - my $op2 = $operators[$res2 + 1]; - - print STDERR "BUG: $evr1 $op1 $evr2 vs. zypper: $evr1 $op2 $evr2\n"; - } - } - return $res1; +usage() { + cat >&2 <<EOF +$0 - sort input according to rpm version sorting conventions + +Expects rpm package versions separated by newlines as input and outputs +them sorted according to rpm version sorting conventions, with old versions +at the top. + +Options: + -r|--reverse sort backwards + -h|--help print this help +EOF + exit 0 } -GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, - "k|key=i" => \$key, - "test" => \$test) -or do { - print STDERR "Usage $0 [-r, --reverse] [-k N, --key=N] [--test]\n"; - exit 1; -}; - -if ($key == 0) { - # Sort by entire lines - map { print } &$reorder(sort { rpm_cmp_versions($a, $b) } <>); -} else { - # Sort by field $key - my @data = map { [(split)[$key-1], $_] } <>; - map { print } &$reorder(map { $_->[1] } - sort { rpm_cmp_versions($a->[0], $b->[0]) } @data); -} +DIRECTION=-1 +while [ $# -gt 0 ]; do + case $1 in + -r|--reverse) DIRECTION=1;; + -h|--help) usage;; + *) echo "$0: invalid parameter $1 ignored" >&2;; + esac + shift +done + +rpmsort "$DIRECTION"