Update to 9.0

This commit is contained in:
Neal Gompa 2020-07-14 22:04:19 -04:00
parent 28701c0ee0
commit 6bbfd36f3c
4 changed files with 24 additions and 125 deletions

View File

@ -1,37 +0,0 @@
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

View File

@ -1,44 +0,0 @@
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

View File

@ -1,14 +1,6 @@
%global spectool_version 1.0.10
%if 0%{?fedora} || 0%{?rhel} >= 9
%bcond_without python3
%else
%bcond_with python3
%endif
Name: rpmdevtools
Version: 8.10
Release: 11%{?dist}
Version: 9.0
Release: 1%{?dist}
Summary: RPM Development Tools
# rpmdev-setuptree is GPLv2, everything else GPLv2+
@ -16,29 +8,17 @@ License: GPLv2+ and GPLv2
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
BuildRequires: help2man
BuildRequires: %{_bindir}/pod2man
BuildRequires: perl-generators
# perl dependencies for spectool
# python dependencies for spectool
# spectool is executed for creating man page
BuildRequires: perl(FileHandle)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(strict)
%if %{with python3}
BuildRequires: python3
BuildRequires: rpm-python3
%else
BuildRequires: python >= 2.7
BuildRequires: rpm-python
%endif
BuildRequires: python3-devel
BuildRequires: python3dist(progressbar2)
BuildRequires: python3dist(requests-download)
BuildRequires: python3dist(rpm)
# emacs-common >= 1:22.3-3 for macros.emacs
BuildRequires: emacs-common >= 1:22.3-3
BuildRequires: bash-completion
@ -46,7 +26,6 @@ BuildRequires: bash-completion
# xemacs-common >= 21.5.29-8 for macros.xemacs
BuildRequires: xemacs-common >= 21.5.29-8
%endif
Provides: spectool = %{spectool_version}
Requires: curl
Requires: diffutils
Requires: fakeroot
@ -55,12 +34,10 @@ Requires: findutils
Requires: gawk
Requires: grep
Requires: rpm-build >= 4.4.2.3
%if %{with python3}
Requires: rpm-python3
%else
Requires: python >= 2.4
Requires: rpm-python
%endif
Requires: python%{python3_version}dist(argcomplete)
Requires: python%{python3_version}dist(progressbar2)
Requires: python%{python3_version}dist(requests-download)
Requires: python%{python3_version}dist(rpm)
Requires: sed
Requires: emacs-filesystem
%if 0%{?fedora}
@ -78,7 +55,7 @@ rpmdev-checksig Check package signatures using alternate RPM keyring
rpminfo Print information about executables and libraries
rpmdev-md5/sha* Display checksums of all files in an archive file
rpmdev-vercmp RPM version comparison checker
spectool Expand and download sources and patches in specfiles
rpmdev-spectool Expand and download sources and patches in specfiles
rpmdev-wipetree Erase all files within dirs created by rpmdev-setuptree
rpmdev-extract Extract various archives, "tar xvf" style
rpmdev-bumpspec Bump revision in specfile
@ -87,10 +64,8 @@ rpmdev-bumpspec Bump revision in specfile
%prep
%autosetup -p1
%if %{with python3}
grep -lF "%{_bindir}/python " * \
| xargs sed -i -e "s|%{_bindir}/python |%{_bindir}/python3 |"
%endif
%build
@ -99,12 +74,10 @@ grep -lF "%{_bindir}/python " * \
%install
rm -rf $RPM_BUILD_ROOT
%make_install
echo %%{_datadir}/bash-completion > %{name}.files
[ -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d ] && \
[ -d %{buildroot}%{_sysconfdir}/bash_completion.d ] && \
echo %%{_sysconfdir}/bash_completion.d > %{name}.files
%if 0%{?fedora}
@ -112,11 +85,15 @@ for dir in %{_emacs_sitestartdir} %{_xemacs_sitestartdir} ; do
%else
for dir in %{_emacs_sitestartdir} ; do
%endif
install -dm 755 $RPM_BUILD_ROOT$dir
ln -s %{_datadir}/rpmdevtools/rpmdev-init.el $RPM_BUILD_ROOT$dir
touch $RPM_BUILD_ROOT$dir/rpmdev-init.elc
install -dm 755 %{buildroot}$dir
ln -s %{_datadir}/rpmdevtools/rpmdev-init.el %{buildroot}$dir
touch %{buildroot}$dir/rpmdev-init.elc
done
# For backwards compatibility
ln -sr %{buildroot}%{_bindir}/rpmdev-spectool %{buildroot}%{_bindir}/spectool
echo ".so man1/rpmdev-spectool.1" > %{buildroot}%{_mandir}/man1/spectool.1
%files -f %{name}.files
%license COPYING
@ -134,6 +111,9 @@ done
%changelog
* Tue Jul 14 2020 Neal Gompa <ngompa13@gmail.com> - 9.0-1
- Update to 9.0
* Wed Mar 25 2020 Jitka Plesnikova <jplesnik@redhat.com> - 8.10-11
- Add perl dependencies needed for build

View File

@ -1 +1 @@
SHA512 (rpmdevtools-8.10.tar.xz) = 49f310d5cf1e709e8001ffcf2b17afa7f7a89ef9c8f805d694149a914c40626a08afe93b16d9ed41df1717d0bc97713c06a3b0e63f13fa53d978c6204bb05d57
SHA512 (rpmdevtools-9.0.tar.xz) = ace319089773440e7a36cc57ef32656f2fe0f4715b16ac9fb9bc96a02a02c40704b3ec274f0e45dc0f8b8968e0265d7b1fdddccaf983b7e671fa5d36902c613d