commit fd383b38577876b58f257fba123369a3837120a7 Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:56:33 2019 +0800 Package init diff --git a/0001-bumpspec-checksig-Avoid-python-3.6-regex-related-dep.patch b/0001-bumpspec-checksig-Avoid-python-3.6-regex-related-dep.patch new file mode 100644 index 0000000..37a11e3 --- /dev/null +++ b/0001-bumpspec-checksig-Avoid-python-3.6-regex-related-dep.patch @@ -0,0 +1,44 @@ +From 693c9549280b78860b756b593b5922bf3be46888 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +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 + diff --git a/rpmdevtools-8.10.tar.xz b/rpmdevtools-8.10.tar.xz new file mode 100644 index 0000000..985e9f8 Binary files /dev/null and b/rpmdevtools-8.10.tar.xz differ diff --git a/rpmdevtools.spec b/rpmdevtools.spec new file mode 100644 index 0000000..05b10c9 --- /dev/null +++ b/rpmdevtools.spec @@ -0,0 +1,75 @@ +%global spectool_version 1.0.10 +%bcond_with python3 + +Name: rpmdevtools +Version: 8.10 +Release: 7 +Summary: RPM Development Tools + +License: GPLv2+ and GPLv2 +URL: https://pagure.io/rpmdevtools +Source0: https://releases.pagure.org/rpmdevtools/%{name}-%{version}.tar.xz + +Patch0001: 0001-bumpspec-checksig-Avoid-python-3.6-regex-related-dep.patch + +BuildArch: noarch +%if %{with python3} +BuildRequires: python3 rpm-python3 +%else +BuildRequires: python >= 2.7 rpm-python +%endif +BuildRequires: emacs-common >= 1:22.3-3 bash-completion perl-generators help2man perl-podlators +Provides: spectool = %{spectool_version} +Requires: curl diffutils fakeroot file findutils gawk grep rpm-build >= 4.4.2.3 +%if %{with python3} +Requires: rpm-python3 +%else +Requires: python >= 2.4 rpm-python +%endif +Requires: sed emacs-filesystem + +%description +rpmdevtools contains many scripts to aid in package development. +rpmdevtools when installed also pulls in (roughly) the explicit minimum build environment as defined in packaging guidelines, +and contains (X)Emacs helpers that integrates rpm-spec-mode.el with rpmdev-newspec. + +%package_help + +%prep +%autosetup -p1 +%if %{with python3} +grep -lF "%{_bindir}/python " * | xargs sed -i -e "s|%{_bindir}/python |%{_bindir}/python3 |" +%endif + +%build +%configure --libdir=%{_prefix}/lib +%make_build + +%install +rm -rf $RPM_BUILD_ROOT +%make_install +echo %%{_datadir}/bash-completion > %{name}.files +[ -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d ] && \ +echo %%{_sysconfdir}/bash_completion.d > %{name}.files + +for dir in %{_emacs_sitestartdir} ; do + 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 +done + +%files -f %{name}.files +%license COPYING +%doc NEWS +%{_bindir}/* +%config(noreplace) %{_sysconfdir}/rpmdevtools/ +%{_datadir}/rpmdevtools/ +%{_emacs_sitestartdir}/rpmdev-init.el +%ghost %{_emacs_sitestartdir}/rpmdev-init.elc + +%files help +%{_mandir}/man[18]/*.[18]* + +%changelog +* Thu Nov 07 2019 openEuler Buildtam - 8.10-7 +- Package Init