Hello community, here is the log from the commit of package rpmdevtools for openSUSE:Factory checked in at 2020-04-27 23:33:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmdevtools (Old) and /work/SRC/openSUSE:Factory/.rpmdevtools.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmdevtools" Mon Apr 27 23:33:11 2020 rev:7 rq:797599 version:8.10 Changes: -------- --- /work/SRC/openSUSE:Factory/rpmdevtools/rpmdevtools.changes 2020-03-24 22:37:35.305242383 +0100 +++ /work/SRC/openSUSE:Factory/.rpmdevtools.new.2738/rpmdevtools.changes 2020-04-27 23:33:35.482962630 +0200 @@ -1,0 +2,13 @@ +Sat Apr 25 08:50:20 UTC 2020 - Benoît Monin <[email protected]> + +- Switch to python 3: + * Require python3-rpm instead of python2-rpm + * Add python3-shebang.patch to run python scripts with python3 + * Add rmdevelrpms_fix_filename_search.patch to add compatibility + with both newer and older rpm binding + * Backport upstream commits 2ddae80, 693c954 and ea772da as + rmdevelrpms_use_more_raw_strings.patch + bumpspec_checksig_avoid_python_3.6_regex_related_deprecations.patch + limit_newversion_re.sub_to_a_single_replacement.patch + +------------------------------------------------------------------- New: ---- bumpspec_checksig_avoid_python_3.6_regex_related_deprecations.patch limit_newversion_re.sub_to_a_single_replacement.patch python3-shebang.patch rmdevelrpms_fix_filename_search.patch rmdevelrpms_use_more_raw_strings.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmdevtools.spec ++++++ --- /var/tmp/diff_new_pack.IW3J9O/_old 2020-04-27 23:33:36.250964129 +0200 +++ /var/tmp/diff_new_pack.IW3J9O/_new 2020-04-27 23:33:36.250964129 +0200 @@ -31,9 +31,19 @@ # PATCH-FIX-OPENSUSE suse-specfile.patch -- Apply fix to comply to http://en.opensuse.org/openSUSE:Specfile_guidelines Patch0: suse-specfile.patch Patch1: dont-drop-Groups.patch +# PATCH-FIX-OPENSUSE python3-shebang.patch -- Run python scripts with python3 +Patch2: python3-shebang.patch +# PATCH-FIX-UPSTREAM rmdevelrpms_use_more_raw_strings.patch -- Backport of commit 2ddae80 for python3 +Patch3: rmdevelrpms_use_more_raw_strings.patch +# PATCH-FIX-UPSTREAM bumpspec_checksig_avoid_python_3.6_regex_related_deprecations.patch -- Backport of commit 693c954 for python3 +Patch4: bumpspec_checksig_avoid_python_3.6_regex_related_deprecations.patch +# PATCH-FIX-UPSTREAM limit_newversion_re.sub_to_a_single_replacement.patch -- Backport of commit ea772da for python3 +Patch5: limit_newversion_re.sub_to_a_single_replacement.patch +# PATCH-FIX-OPENSUSE rmdevelrpms_fix_filename_search.patch -- Add compat with both newer and older rpm binding +Patch6: rmdevelrpms_fix_filename_search.patch BuildRequires: help2man BuildRequires: pkgconfig -BuildRequires: python2-rpm +BuildRequires: python3-rpm BuildRequires: pkgconfig(bash-completion) # Required for bash-completion Requires: bash-completion @@ -43,7 +53,7 @@ # Minimal RPM build requirements Requires: distribution-release Requires: fakeroot -Requires: python2-rpm +Requires: python3-rpm BuildArch: noarch %description @@ -65,6 +75,7 @@ %prep %autosetup -p1 + cp -a %{SOURCE1} template.init # Use the "rpmdev-" prefix for spectool that conflicts with Redhat spectool ++++++ bumpspec_checksig_avoid_python_3.6_regex_related_deprecations.patch ++++++ >From 693c9549280b78860b756b593b5922bf3be46888 Mon Sep 17 00:00:00 2001 From: Ville Skyttä <[email protected]> Date: Feb 15 2017 09:19:29 +0000 Subject: bumpspec, checksig: Avoid python 3.6 regex related deprecations --- diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec index ea2ddd9..35e6c9c 100755 --- a/rpmdev-bumpspec +++ b/rpmdev-bumpspec @@ -44,8 +44,10 @@ class SpecFile(object): # supported release value macro definitions _macro_bump_patterns = ( - re.compile(r"^%(?:define|global)\s+(?i)release\s+(\d+.*)"), - re.compile(r"^%(?:define|global)\s+(?i)baserelease\s+(\d+.*)"), + re.compile(r"^%(?:define|global)\s+" + r"[Rr][Ee][Ll][Ee][Aa][Ss][Ee]\s+(\d+.*)"), + re.compile(r"^%(?:define|global)\s+" + r"[Bb][Aa][Ss][Ee][Rr][Ee][Ll][Ee][Aa][Ss][Ee]\s+(\d+.*)"), ) # normal "Release:" tag lines _tag_bump_patterns = ( diff --git a/rpmdev-checksig b/rpmdev-checksig index 0e90fe5..76b5967 100755 --- a/rpmdev-checksig +++ b/rpmdev-checksig @@ -44,7 +44,7 @@ def lookupKeyID(ts, keyid): mi.pattern('version', rpm.RPMMIRE_STRCMP, keyid) for hdr in mi: sum = hdr['summary'] - mo = re.search(b'\<.*\>', sum) + mo = re.search(rb'\<.*\>', sum) email = mo.group().decode(errors='replace') return email ++++++ limit_newversion_re.sub_to_a_single_replacement.patch ++++++ >From ea772dae0d8bb266233c3fd9e2012281a821ef44 Mon Sep 17 00:00:00 2001 From: Josh Stone <[email protected]> Date: Nov 02 2018 23:20:22 +0000 Subject: Limit newVersion's re.sub to a single replacement Python 3.7 changed `re.sub` to replace empty matches next to a previous non-empty match, which caused `SpecFile.newVersion` to double its replacements. We can use `count=1` to limit this. ref: https://bugs.python.org/issue32308 --- diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec index 35e6c9c..06737b5 100755 --- a/rpmdev-bumpspec +++ b/rpmdev-bumpspec @@ -134,13 +134,13 @@ class SpecFile(object): original = self.lines[i] if self.lines[i].lower().startswith('version:'): self.lines[i] = re.sub( - r'[^: \t]*$', v, self.lines[i].rstrip()) + '\n' + r'[^: \t]*$', v, self.lines[i].rstrip(), count=1) + '\n' changed = changed or self.lines[i] != original elif self.lines[i].lower().startswith('release:'): # split and reconstruct to preserve whitespace split = re.split(r':', self.lines[i].rstrip()) self.lines[i] = split[0] + ':' + \ - re.sub(r'[^ \t]*$', r, split[1]) + '\n' + re.sub(r'[^ \t]*$', r, split[1], count=1) + '\n' changed = changed or self.lines[i] != original return changed ++++++ python3-shebang.patch ++++++ Index: rpmdevtools-8.10/rpmdev-bumpspec =================================================================== --- rpmdevtools-8.10.orig/rpmdev-bumpspec +++ rpmdevtools-8.10/rpmdev-bumpspec @@ -1,4 +1,4 @@ -#!/usr/bin/python -tt +#!/usr/bin/python3 # -*- mode: Python; indent-tabs-mode: nil; coding: utf-8 -*- # # Copyright (c) 2005-2014 Fedora Project Index: rpmdevtools-8.10/rpmdev-checksig =================================================================== --- rpmdevtools-8.10.orig/rpmdev-checksig +++ rpmdevtools-8.10/rpmdev-checksig @@ -1,4 +1,4 @@ -#!/usr/bin/python -tt +#!/usr/bin/python3 # # 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 Index: rpmdevtools-8.10/rpmdev-rmdevelrpms.py =================================================================== --- rpmdevtools-8.10.orig/rpmdev-rmdevelrpms.py +++ rpmdevtools-8.10/rpmdev-rmdevelrpms.py @@ -1,4 +1,4 @@ -#!/usr/bin/python -tt +#!/usr/bin/python3 # -*- coding: utf-8 -*- # rpmdev-rmdevelrpms -- Find (and optionally remove) "development" RPMs Index: rpmdevtools-8.10/rpmdev-sort =================================================================== --- rpmdevtools-8.10.orig/rpmdev-sort +++ rpmdevtools-8.10/rpmdev-sort @@ -1,4 +1,4 @@ -#!/usr/bin/python -tt +#!/usr/bin/python3 # -*- coding: utf-8 -*- # # rpmdev-sort -- sort rpms from standard input Index: rpmdevtools-8.10/rpmdev-vercmp =================================================================== --- rpmdevtools-8.10.orig/rpmdev-vercmp +++ rpmdevtools-8.10/rpmdev-vercmp @@ -1,4 +1,4 @@ -#!/usr/bin/python -tt +#!/usr/bin/python3 # -*- coding: utf-8 -*- # # rpmdev-vercmp -- compare rpm versions ++++++ rmdevelrpms_fix_filename_search.patch ++++++ Index: rpmdevtools-8.10/rpmdev-rmdevelrpms.py =================================================================== --- rpmdevtools-8.10.orig/rpmdev-rmdevelrpms.py +++ rpmdevtools-8.10/rpmdev-rmdevelrpms.py @@ -111,7 +111,11 @@ def isDevelPkg(hdr): if not (stat.S_ISLNK(fmodes[i]) or stat.S_ISREG(fmodes[i])): # Not a file or a symlink: ignore. pass - fn = fnames[i] + # newer rpm binding returns filenames as string, so convert to bytes + try: + fn = fnames[i].encode() + except AttributeError: + fn = fnames[i] if so_re.search(fn): # *.so or a *.so.*: cannot be sure, treat pkg as non-devel. so_found = 1 ++++++ rmdevelrpms_use_more_raw_strings.patch ++++++ >From 2ddae8028ceb778fb387acf23b97fd43fdb15f98 Mon Sep 17 00:00:00 2001 From: Ville Skyttä <[email protected]> Date: Feb 14 2017 09:58:15 +0000 Subject: rmdevelrpms: Use more raw strings --- diff --git a/rpmdev-rmdevelrpms.py b/rpmdev-rmdevelrpms.py index 815e402..79a3497 100755 --- a/rpmdev-rmdevelrpms.py +++ b/rpmdev-rmdevelrpms.py @@ -38,15 +38,15 @@ except NameError: __version__ = "1.15" -dev_re = re.compile("-(?:de(?:buginfo|vel)|sdk|static)\\b", re.IGNORECASE) -test_re = re.compile("^perl-(?:Devel|ExtUtils|Test)-") -lib_re1 = re.compile("^lib.+") -lib_re2 = re.compile("-libs?$") -a_re = re.compile(b"\\w\\.a$") -so_re = re.compile(b"\\w\\.so(?:\\.\\d+)*$") -comp_re = re.compile("^compat-gcc") +dev_re = re.compile(r"-(?:de(?:buginfo|vel)|sdk|static)\b", re.IGNORECASE) +test_re = re.compile(r"^perl-(?:Devel|ExtUtils|Test)-") +lib_re1 = re.compile(r"^lib.+") +lib_re2 = re.compile(r"-libs?$") +a_re = re.compile(rb"\w\.a$") +so_re = re.compile(rb"\w\.so(?:\.\d+)*$") +comp_re = re.compile(r"^compat-gcc") # required by Ant, which is required by Eclipse... -jdev_re = re.compile("^java-.+-gcj-compat-devel$") +jdev_re = re.compile(r"^java-.+-gcj-compat-devel$") def_devpkgs = \
