From d9371b24163e588c14ca2918a5868a3cc9ad3045 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:35:23 +0000 Subject: [PATCH 1/8] Update requirements This file is ready by setup.py, and in turn used to determine the automatic requirements for the RPM package. There are existing imports for pycurl, OpenSSL, and six, but I can't find any imports for rpm. --- diff --git a/requirements.txt b/requirements.txt index 9d3d234..076daeb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ +pycurl +pyOpenSSL rpkg -rpm +six From 9b3f2cd873d48654a75fe07d211d199298352f39 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 2/8] Remove obsolete stuff --- diff --git a/centpkg.spec b/centpkg.spec index 80a886a..56e0d79 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -4,12 +4,9 @@ Name: centpkg Version: 0.4.6 Release: 1%{?dist} Summary: CentOS utility for working with dist-git - -Group: Applications/System License: GPLv2+ URL: https://git.centos.org/summary/centpkg.git Source0: centpkg-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) # CentOS Distributed Packages Requires: redhat-rpm-config @@ -40,12 +37,8 @@ Provides the centpkg command for working with dist-git %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) %doc README.md COPYING %config %{_sysconfdir}/rpkg/centpkg.conf %{_bindir}/%{name} @@ -77,6 +70,3 @@ rm -rf %{buildroot} * Sat Jul 05 2014 Brian Stinson bstinson@ksu.edu - 0.1-1 - Local builds and mockbuilds work - - - From 7e0e80d2021f687d8c96e8f6c482ab581391f006 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 3/8] Convert to Python 3 --- diff --git a/centpkg.spec b/centpkg.spec index 56e0d79..e1ccbc9 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -1,5 +1,3 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} - Name: centpkg Version: 0.4.6 Release: 1%{?dist} @@ -7,22 +5,11 @@ Summary: CentOS utility for working with dist-git License: GPLv2+ URL: https://git.centos.org/summary/centpkg.git Source0: centpkg-%{version}.tar.gz +BuildArch: noarch -# CentOS Distributed Packages -Requires: redhat-rpm-config -Requires: python-pycurl - -# EPEL Distributed Packages -Requires: pyrpkg >= 1.17 -Requires: koji - -BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} -# CentOS Distributed build-requires -BuildRequires: python-devel, python-setuptools - -# EPEL Distributed build-requires -BuildRequires: pyrpkg %description Provides the centpkg command for working with dist-git @@ -32,17 +19,19 @@ Provides the centpkg command for working with dist-git %build -%{__python} setup.py build +%py3_build + %install -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install %files %doc README.md COPYING %config %{_sysconfdir}/rpkg/centpkg.conf %{_bindir}/%{name} -%{python_sitelib}/* +%{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info %changelog From 599d78347ee01a482bc438c804b797c84bf2fb8a Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 4/8] Properly mark license file --- diff --git a/centpkg.spec b/centpkg.spec index e1ccbc9..92b56c5 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -27,7 +27,8 @@ Provides the centpkg command for working with dist-git %files -%doc README.md COPYING +%license COPYING +%doc README.md %config %{_sysconfdir}/rpkg/centpkg.conf %{_bindir}/%{name} %{python3_sitelib}/%{name} From 622a50a5d1f9e19e122d2f73e289619db1b9a104 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 5/8] Clean up whitespace --- diff --git a/centpkg.spec b/centpkg.spec index 92b56c5..6444c60 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -1,10 +1,10 @@ -Name: centpkg -Version: 0.4.6 -Release: 1%{?dist} -Summary: CentOS utility for working with dist-git -License: GPLv2+ -URL: https://git.centos.org/summary/centpkg.git -Source0: centpkg-%{version}.tar.gz +Name: centpkg +Version: 0.4.6 +Release: 1%{?dist} +Summary: CentOS utility for working with dist-git +License: GPLv2+ +URL: https://git.centos.org/summary/centpkg.git +Source0: centpkg-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel @@ -59,4 +59,4 @@ Provides the centpkg command for working with dist-git - Update readme and add exception checking when running toplevel commands * Sat Jul 05 2014 Brian Stinson bstinson@ksu.edu - 0.1-1 -- Local builds and mockbuilds work +- Local builds and mockbuilds work From c7c04a4de076201f28eca1ead15bcece7d0a98a9 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 6/8] Update URL and Source0 --- diff --git a/centpkg.spec b/centpkg.spec index 6444c60..e03bc99 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -3,8 +3,8 @@ Version: 0.4.6 Release: 1%{?dist} Summary: CentOS utility for working with dist-git License: GPLv2+ -URL: https://git.centos.org/summary/centpkg.git -Source0: centpkg-%{version}.tar.gz +URL: https://git.centos.org/centos/centpkg +Source0: https://git.centos.org/centos/centpkg/archive/%{version}/centpkg-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel @@ -15,7 +15,7 @@ BuildRequires: %{py3_dist setuptools} Provides the centpkg command for working with dist-git %prep -%setup -q -c +%autosetup %build From 30b0f4bbed58f24cf5375d2f4f6d36c1b958d426 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 7/8] Mark centpkg.conf as %config(noreplace) --- diff --git a/centpkg.spec b/centpkg.spec index e03bc99..5919228 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -29,7 +29,7 @@ Provides the centpkg command for working with dist-git %files %license COPYING %doc README.md -%config %{_sysconfdir}/rpkg/centpkg.conf +%config(noreplace) %{_sysconfdir}/rpkg/centpkg.conf %{_bindir}/%{name} %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info From a79c47f68c500c6c59e7a8e2d72e883cbc4dfc23 Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 24 2021 16:37:20 +0000 Subject: [PATCH 8/8] Add centpkg-sig subpackage --- diff --git a/centpkg.spec b/centpkg.spec index 5919228..86816bb 100644 --- a/centpkg.spec +++ b/centpkg.spec @@ -12,7 +12,17 @@ BuildRequires: %{py3_dist setuptools} %description -Provides the centpkg command for working with dist-git +Provides the centpkg command for working with dist-git. + + +%package sig +Summary: CentOS SIG utility for working with dist-git +Requires: %{name} = %{version}-%{release} + + +%description sig +Provides the centpkg-sig command for working with dist-git. + %prep %autosetup @@ -35,6 +45,11 @@ Provides the centpkg command for working with dist-git %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info +%files sig +%{_bindir}/%{name}-sig +%config(noreplace) %{_sysconfdir}/rpkg/centpkg-sig.conf + + %changelog * Mon Nov 28 2016 brian@bstinson.com 0.4.6-1 - Tracking updates to rpkg (thanks pavlix)