Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cabbc608ac | |||
| acb4cf9573 | |||
| 6df4896829 | |||
| a488e997ab | |||
| e47f8797e3 | |||
| f43651e736 | |||
| 3db610549f | |||
| d65daa3d50 | |||
| 154304be4d | |||
| 98732e8e31 | |||
| be5fa647cd | |||
| d05045c447 | |||
| 0032c5270d | |||
| 7fba799422 | |||
| 4f5745c71e |
@@ -0,0 +1,37 @@
|
||||
From ea772dae0d8bb266233c3fd9e2012281a821ef44 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 2 Nov 2018 16:20:22 -0700
|
||||
Subject: [PATCH] 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
|
||||
---
|
||||
rpmdev-bumpspec | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
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
|
||||
--
|
||||
2.17.2
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From 693c9549280b78860b756b593b5922bf3be46888 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
||||
Date: Wed, 15 Feb 2017 11:19:29 +0200
|
||||
Subject: [PATCH] bumpspec, checksig: Avoid python 3.6 regex related
|
||||
deprecations
|
||||
|
||||
---
|
||||
rpmdev-bumpspec | 6 ++++--
|
||||
rpmdev-checksig | 2 +-
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
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
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+44
-7
@@ -1,20 +1,24 @@
|
||||
%global spectool_version 1.0.10
|
||||
|
||||
%if 0%{?fedora} > 22
|
||||
%if 0%{?fedora}
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bconf_with python3
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
Name: rpmdevtools
|
||||
Version: 8.9
|
||||
Release: 1%{?dist}
|
||||
Version: 8.10
|
||||
Release: 10%{?dist}
|
||||
Summary: RPM Development Tools
|
||||
|
||||
# rpmdev-setuptree is GPLv2, everything else GPLv2+
|
||||
License: GPLv2+ and GPLv2
|
||||
URL: https://fedorahosted.org/rpmdevtools/
|
||||
Source0: https://fedorahosted.org/released/rpmdevtools/%{name}-%{version}.tar.xz
|
||||
URL: https://pagure.io/rpmdevtools
|
||||
Source0: https://releases.pagure.org/rpmdevtools/%{name}-%{version}.tar.xz
|
||||
|
||||
# Backports from upstream
|
||||
Patch0001: 0001-bumpspec-checksig-Avoid-python-3.6-regex-related-dep.patch
|
||||
Patch0002: 0001-Limit-newVersion-s-re.sub-to-a-single-replacement.patch
|
||||
|
||||
BuildArch: noarch
|
||||
# help2man, pod2man, *python for creating man pages
|
||||
@@ -75,7 +79,7 @@ rpmdev-bumpspec Bump revision in specfile
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
%if %{with python3}
|
||||
grep -lF "%{_bindir}/python " * \
|
||||
| xargs sed -i -e "s|%{_bindir}/python |%{_bindir}/python3 |"
|
||||
@@ -123,6 +127,39 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Nov 28 2018 Neal Gompa <ngompa13@gmail.com> - 8.10-7
|
||||
- Fix regex substitution issues with Python 3.7 (rhbz#1651954)
|
||||
|
||||
* Sun Sep 16 2018 Neal Gompa <ngompa13@gmail.com> - 8.10-6
|
||||
- Fix regex related deprecation warnings (rhbz#1598089)
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.10-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Sat Jan 14 2017 Ville Skyttä <ville.skytta@iki.fi> - 8.10-1
|
||||
- Update to 8.10
|
||||
|
||||
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 8.9-2
|
||||
- Rebuild for Python 3.6
|
||||
|
||||
* Sat Jun 25 2016 Ville Skyttä <ville.skytta@iki.fi> - 8.9-1
|
||||
- Update to 8.9
|
||||
|
||||
|
||||
Reference in New Issue
Block a user