public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Stephen Smoogen <smooge@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/fedpkg] 1.48-1: Merge with master. Update to work with RHEL8
Date: Mon, 10 Aug 2026 21:45:45 GMT	[thread overview]
Message-ID: <178639834534.1.6093658564224638491.rpms-fedpkg-598e5008f986@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/fedpkg
Branch : 1.48-1
Commit : 598e5008f986929cac368356f98450db750b6f00
Author : Stephen Smoogen <smooge@gmail.com>
Date   : 2019-07-25T19:43:28+00:00
Stats  : +567/-70 in 9 file(s)
URL    : https://src.fedoraproject.org/rpms/fedpkg/c/598e5008f986929cac368356f98450db750b6f00?branch=1.48-1

Log:
Merge with master. Update to work with RHEL8

---
diff --git a/.gitignore b/.gitignore
index 08ff1d5..6bf0b86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,9 @@
 /fedpkg-1.29.tar.bz2
 /fedpkg-1.30.tar.bz2
 /fedpkg-1.31.tar.bz2
+/fedpkg-1.32.tar.bz2
+/fedpkg-1.33.tar.bz2
+/fedpkg-1.34.tar.bz2
+/fedpkg-1.35.tar.bz2
+/fedpkg-1.36.tar.bz2
+/fedpkg-1.37.tar.bz2

diff --git a/0001-Bump-check-for-bodhi-client.patch b/0001-Bump-check-for-bodhi-client.patch
new file mode 100644
index 0000000..9a77448
--- /dev/null
+++ b/0001-Bump-check-for-bodhi-client.patch
@@ -0,0 +1,32 @@
+From b78a5ee21f5bd9d07aa2ace7177ac0f49ee11c06 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
+Date: Fri, 31 May 2019 09:36:10 +0200
+Subject: [PATCH] Bump check for bodhi client
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There should be no change on the client for what fedpkg is using.
+
+Fixes: https://pagure.io/fedpkg/issue/330
+Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
+---
+ fedpkg/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index e8ebe4a..d7b0872 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -84,7 +84,7 @@ def check_bodhi_version():
+     except pkg_resources.DistributionNotFound:
+         raise rpkgError('bodhi-client < 2.0 is not supported.')
+     major = int(dist.version.split('.', 1)[0])
+-    if major >= 4:
++    if major >= 5:
+         raise rpkgError(
+             'This system has bodhi v{0}, which is unsupported.'.format(major))
+ 
+-- 
+2.20.1
+

diff --git a/0001-fix-broken-syntax-in-bash-completion.patch b/0001-fix-broken-syntax-in-bash-completion.patch
deleted file mode 100644
index a062d0d..0000000
--- a/0001-fix-broken-syntax-in-bash-completion.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 99b506b6552ba91a91af4b9714d35eb38bae7dbb Mon Sep 17 00:00:00 2001
-From: Todd Zullinger <tmz@pobox.com>
-Date: Wed, 7 Feb 2018 15:42:22 -0500
-Subject: [PATCH] fix broken syntax in bash completion
-
-The completion code added in f7d9b56 ("Port fedrepo-req and
-fedrepo-req-branch to fedpkg", 2017-12-07) missed ';;' separating the
-request-branch and request-repo patterns.  Attempting to source the
-bash completion script results in an error:
-
-$ . /usr/share/bash-completion/completions/fedpkg.bash
--bash: /usr/share/bash-completion/completions/fedpkg.bash: line 196: syntax error near unexpected token `)'
--bash: /usr/share/bash-completion/completions/fedpkg.bash: line 196: `        request-repo)'
-
-Signed-off-by: Todd Zullinger <tmz@pobox.com>
----
- conf/bash-completion/fedpkg.bash | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/conf/bash-completion/fedpkg.bash b/conf/bash-completion/fedpkg.bash
-index 03fa399..f5a0b14 100644
---- a/conf/bash-completion/fedpkg.bash
-+++ b/conf/bash-completion/fedpkg.bash
-@@ -193,6 +193,7 @@ _fedpkg()
-         request-branch)
-             options="--no-git-branch --all-releases"
-             options_string="--sl"
-+            ;;
-         request-repo)
-             options="--exception"
-             options_string="--description --monitor --upstreamurl --summary"
--- 
-2.14.3
-

diff --git a/0002-Support-for-epel-playground-branch-requests.patch b/0002-Support-for-epel-playground-branch-requests.patch
new file mode 100644
index 0000000..7f07f0c
--- /dev/null
+++ b/0002-Support-for-epel-playground-branch-requests.patch
@@ -0,0 +1,68 @@
+From eabb5ae7dd0495f67b73d76137df78b84e2792ec Mon Sep 17 00:00:00 2001
+From: Mohan Boddu <mboddu@bhujji.com>
+Date: Tue, 9 Jul 2019 22:07:06 -0400
+Subject: [PATCH 1/2] Support for epel*-playground branch requests
+
+Fixes: #334
+JIRA: COMPOSE-3677
+Merges: https://pagure.io/fedpkg/pull-request/336
+
+Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
+---
+ fedpkg/cli.py | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index d7b0872..1732a22 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -904,10 +904,26 @@ targets to build the package for a particular stream.
+                                 'a git repository')
+ 
+         pdc_url = config.get('{0}.pdc'.format(name), 'url')
++        # When a 'epel\d' branch is requested, it should automatically request
++        # 'epel\d+-playground' branch.
++        epel_playground = False
++        epel_version = None
+         if branch:
++            # Check if the requested branch is an epel branch
++            match = re.match(r'^epel(?P<epel_version>\d+)$', branch)
++            if match:
++                epel_playground = True
++                epel_version = int(match.groupdict()["epel_version"])
++
+             if is_epel(branch):
+                 assert_valid_epel_package(repo_name, branch)
+ 
++            # Requesting epel\d-playground branches is not allowed
++            if bool(re.match(r'^epel\d+-playground$', branch)):
++                raise rpkgError(
++                    'You cannot directly request {0} branch, as they are '
++                    'created as part of epel branch requests'.format(branch))
++
+             if ns in ['modules', 'test-modules', 'flatpaks']:
+                 branch_valid = bool(re.match(r'^[a-zA-Z0-9.\-_+]+$', branch))
+                 if not branch_valid:
+@@ -941,6 +957,11 @@ targets to build the package for a particular stream.
+                 *list(get_release_branches(pdc_url).values())))
+             branches = [b for b in release_branches
+                         if re.match(r'^(f\d+)$', b)]
++        # If the requested branch is epel branch then also add epel\d+-playground branch
++        # to the request list.
++        # TODO: Remove the check for epel version >= 7 when we enable playground for epel7
++        elif epel_playground and epel_version >= 7:
++            branches = [branch, branch+"-playground"]
+         else:
+             branches = [branch]
+ 
+@@ -968,6 +989,7 @@ targets to build the package for a particular stream.
+             auto_module = (
+                 ns == 'rpms'
+                 and not re.match(RELEASE_BRANCH_REGEX, b)
++                and not epel_playground  # Dont run auto_module on epel requests
+                 and not no_auto_module
+             )
+             if auto_module:
+-- 
+2.20.1
+

diff --git a/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch b/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
new file mode 100644
index 0000000..06c175d
--- /dev/null
+++ b/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
@@ -0,0 +1,26 @@
+From f97d06c785a837ed860a20660ac6344ec546802c Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Thu, 18 Jul 2019 10:01:27 +0200
+Subject: [PATCH 2/2] Allow epel*-playground requests for epel8 and newer
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ fedpkg/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index 1732a22..8e73f0f 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -960,7 +960,7 @@ targets to build the package for a particular stream.
+         # If the requested branch is epel branch then also add epel\d+-playground branch
+         # to the request list.
+         # TODO: Remove the check for epel version >= 7 when we enable playground for epel7
+-        elif epel_playground and epel_version >= 7:
++        elif epel_playground and epel_version >= 8:
+             branches = [branch, branch+"-playground"]
+         else:
+             branches = [branch]
+-- 
+2.20.1
+

diff --git a/fedpkg.spec b/fedpkg.spec
index ef5f264..ce861b8 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -4,47 +4,66 @@
 %endif
 
 Name:           fedpkg
-Version:        1.31
-Release:        6%{?dist}
+Version:        1.37
+Release:        5%{?dist}.1
 Summary:        Fedora utility for working with dist-git
 
-Group:          Applications/System
 License:        GPLv2+
 URL:            https://pagure.io/fedpkg
 Source0:        https://pagure.io/releases/fedpkg/%{name}-%{version}.tar.bz2
-Patch0:         0001-fix-broken-syntax-in-bash-completion.patch
-# https://pagure.io/fedpkg/pull-request/162
-Patch1:         0001-fedpkg-request-use-pdc-active-releases.patch
-# https://pagure.io/fedpkg/pull-request/188
 
 BuildArch:      noarch
+Patch0:         0001-Bump-check-for-bodhi-client.patch
+Patch1:         0002-Support-for-epel-playground-branch-requests.patch
+Patch2:         0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
+
+# fedpkg command switched to python3 on Fedora 29 and RHEL > 7:
+%if 0%{?fedora} > 28 || 0%{?rhel} > 7
+%bcond_with python2
+%else
+%bcond_without python2
+%endif
 
 BuildRequires:  pkgconfig
+BuildRequires:  bash-completion
+BuildRequires:  git
+
+Requires:       fedora-packager
+Requires:       koji
+Requires:       redhat-rpm-config
+
+%if %{with python2}
+# This package redefines __python and can use the python_ macros
+%global __python %{__python2}
+
 BuildRequires:  python2-devel
 # We br these things for man page generation due to imports
-BuildRequires:  python2-rpkg >= 1.51
-BuildRequires:  bash-completion
+BuildRequires:  python2-rpkg >= 1.58-5
+BuildRequires:  python2-distro
 # This until fedora-cert gets fixed
 BuildRequires:  python2-fedora
 # For testing
-BuildRequires:  git
 BuildRequires:  python2-mock
 
-%if 0%{?rhel}
-BuildRequires:  python-unittest2
-%else
-BuildRequires:  python2-unittest2
-%endif
 
 %if 0%{?rhel} && 0%{?rhel} < 7
 BuildRequires:  python-nose
 BuildRequires:  python-setuptools
+BuildRequires:  python-unittest2
+BuildRequires:  python-freezegun
 %else
 BuildRequires:  python2-nose
 BuildRequires:  python2-setuptools
+BuildRequires:  python2-freezegun
+%endif
+
+%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} == 7)
+# Only bodhi-client>=2.0 is supported. EL6 has older version bodhi-client<1.0
+BuildRequires:  bodhi-client >= 2.0
+Requires:       bodhi-client >= 2.0
 %endif
 
-%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7)
+%if (0%{?rhel} && 0%{?rhel} <= 7)
 BuildRequires:  python-bugzilla
 Requires:       python-bugzilla
 %else
@@ -52,13 +71,38 @@ BuildRequires:  python2-bugzilla
 Requires:       python2-bugzilla
 %endif
 
-Requires:       bodhi-client
-Requires:       fedora-packager
-Requires:       koji
-Requires:       redhat-rpm-config
-Requires:       python2-rpkg >= 1.51
+Requires:       python2-rpkg >= 1.58-5
+Requires:       python2-distro
 Requires:       python2-fedora
-Requires:       python2-openidc-client
+Requires:       python2-openidc-client >= 0.6.0
+
+%else  # python3
+# This package redefines __python and can use the python_ macros
+%global __python %{__python3}
+
+BuildRequires:  python3-devel
+BuildRequires:  python3-rpkg >= 1.58-5
+BuildRequires:  python3-distro
+# This until fedora-cert gets fixed
+BuildRequires:  python3-fedora
+# For testing
+BuildRequires:  python3-mock
+BuildRequires:  python3-unittest2
+BuildRequires:  python3-nose
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-bugzilla
+BuildRequires:  python3-freezegun
+BuildRequires:  python3-bodhi-client
+
+
+Requires:       python3-bugzilla
+Requires:       python3-rpkg >= 1.58-5
+Requires:       python3-distro
+Requires:       python3-fedora
+Requires:       python3-openidc-client >= 0.6.0
+Requires:       python3-bodhi-client
+Requires:       python3-setuptools
+%endif
 
 
 %description
@@ -66,46 +110,53 @@ Provides the fedpkg command for working with dist-git
 
 %package        -n fedpkg-stage
 Summary:        Fedora utility for working with dist-git
-Group:          Applications/System
 Requires:       %{name} = %{version}-%{release}
 
 %description    -n fedpkg-stage
 Provides the fedpkg command for working with dist-git
 
 %prep
-%setup -q
-%patch0 -p1
+%autosetup -p1
 
 %build
-%{__python} setup.py build
+%py_build
 %{__python} doc/fedpkg_man_page.py > fedpkg.1
 
 
 %install
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-%{__install} -d $RPM_BUILD_ROOT%{_mandir}/man1
-%{__install} -p -m 0644 fedpkg.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%py_install
+%{__install} -d %{buildroot}%{_mandir}/man1
+%{__install} -p -m 0644 fedpkg.1 %{buildroot}%{_mandir}/man1
 %if 0%{?rhel} && 0%{?rhel} == 7
 # The completion file must be named similarly to the command.
-mv $RPM_BUILD_ROOT%{compdir}/fedpkg.bash $RPM_BUILD_ROOT%{compdir}/fedpkg
+mv %{buildroot}%{compdir}/fedpkg.bash %{buildroot}%{compdir}/fedpkg
 %endif
 
 
 %check
+%if 0%{?rhel} == 6
+# cannot use -m nose on EL6 (python 2.6)
 nosetests
-
+%else
+%{__python} -m nose
+%endif
 
 
 %files
-%doc README CHANGELOG.rst
+%doc README.rst CHANGELOG.rst
 %license COPYING
 %config(noreplace) %{_sysconfdir}/rpkg/fedpkg.conf
 %(dirname %{compdir})
 %{_bindir}/%{name}
 %{_mandir}/*/*
 # For noarch packages: sitelib
+%if %{with python2}
 %{python2_sitelib}/%{name}
 %{python2_sitelib}/%{name}-%{version}-py*.egg-info
+%else
+%{python3_sitelib}/%{name}
+%{python3_sitelib}/%{name}-%{version}-py*.egg-info
+%endif
 # zsh completion
 %{_datadir}/zsh/site-functions/_%{name}
 
@@ -115,8 +166,161 @@ nosetests
 
 
 %changelog
-* Tue Feb 27 2018 Mohan Boddu <mboddu@redhat.com> 1.31-6
-- Use PDC instead of Bodhi to get the active release branches
+* Thu Jul 25 2019 Stephen Smoogen <smooge@fedoraproject.org> - 1.37-5.1
+- Merge with master. Update to work with RHEL8
+
+
+* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Thu Jul 18 2019 Ondřej Nosek <onosek@redhat.com> - 1.37-4
+- Require python*-rpkg-1.58-5 as minimum version
+
+* Thu Jul 18 2019 Ondřej Nosek <onosek@redhat.com> - 1.37-3
+- Backport: Support for epel*-playground branch requests
+
+* Fri May 31 2019 Ondřej Nosek <onosek@redhat.com> - 1.37-2
+- Backport: Bump check for bodhi client (version 4)
+
+* Mon Apr 29 2019 Ondrej Nosek <onosek@redhat.com> - 1.37-1
+- Ignore files in a cloned repository - patterns (onosek)
+- Create env without --system-site-packages enabled to run flake8 (cqi)
+- Include possible distprefix in --define dist for Forge-based packages
+  (zebob.m)
+- Revise shell completion for module scratch builds to require SRPMs to be
+  specified individually using multiple '--srpm SRPM' options, and enable
+  completion of modulemd file path by yaml extension. (mmathesi)
+- Enable shell completion for module scratch builds. Add custom SRPM shell
+  completion with local module builds. Add missing shell completion options for
+  local module builds. (mmathesi)
+- Make fedpkg update output a report after success - #315 (zebob.m)
+- Retire 'retire' command from 'fedpkg' (mmathesi)
+- More specific expression for bug search (onosek)
+- Fix fedpkg update --bugs detection (zebob.m)
+- README: add links and format change (onosek)
+- Show hint when Pagure token expires - #285 (onosek)
+
+* Tue Feb 05 2019 Ondřej Nosek <onosek@redhat.com> - 1.36-2
+- New dependency: python-distro
+
+* Mon Feb 04 2019 Ondřej Nosek <onosek@redhat.com> - 1.36-1
+- Added update-docs script (onosek)
+- Sdist fix and Python 2.6 compatibility (onosek)
+- Add support for a 'flatpaks' namespace (otaylor)
+- Move argparse fix to rpkg - #299 (onosek)
+- Fix update command related tests (cqi)
+- Make update work for containers - #296 (lsedlar)
+- Add 'severity=' option to 'fedpkg update' template (praiskup)
+- Add contributing guide - #293 (lsedlar)
+- Use module distro instead of platform - #278 (cqi)
+- Add missing content to 1.35 release notes (cqi)
+- Help: Use foo in foo examples, not name (miro)
+
+* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.35-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Mon Sep 17 2018 Chenxiong Qi <cqi@redhat.com> - 1.35-2
+- Add mssing require python3-setuptools
+
+* Tue Aug 21 2018 Chenxiong Qi <cqi@redhat.com> - 1.35-1
+- Reserve last bodhi template on error - rhbz#1467897 (cqi)
+- New command releases-info - #247 (cqi)
+- Fix a test for request-repo command (cqi)
+- New option to request a repo without an initial commit - #215 (cqi)
+- Add --shell to bash completion for mockbuild (cqi)
+- Greenwave conf and support for gating validation (gnaponie)
+- Allow to create update directly with CLI options - #93 rhbz#1007157 (cqi)
+- Add more tests for utils (cqi)
+- Rewrite method to create bodhi update - rhbz#1492480 (cqi)
+- Mock fedora.client.OpenIdBaseClient._load_cookies (cqi)
+- Do not use configparser.SafeConfigParser in tests (cqi)
+- Fix test_retire to use unittest2 in el6 (cqi)
+- Submit builds from stream branch (cqi)
+- The create new project is not needed for packager (pingou)
+- Add py37 testenv (cqi)
+- Set PYCURL_SSL_LIBRARY directly for installing pycurl (cqi)
+- Fix flake8 errors and typo in tests (cqi)
+- Add tests for some commands (cqi)
+- Add tests for utils.py (cqi)
+- Convert test case for utils.py as normal test case (cqi)
+- Add some tests for BugzillaClient (cqi)
+- Fix TypeError raised from override create command - #256 (cqi)
+- Add missing command and options in bash completion (cqi)
+
+* Fri Aug 03 2018 Chenxiong Qi <cqi@redhat.com> - 1.34-3
+- Require python-openidc-client 0.6.0 as minimum version
+
+* Tue Jul 31 2018 Chenxiong Qi <cqi@redhat.com> - 1.34-2
+- Fix files section for Python 3 build
+
+* Tue Jul 24 2018 Chenxiong Qi <cqi@redhat.com> - 1.34-1
+- Get csrf token properly when retry bodhi API call (cqi)
+- Accept old config with module instead of repo (lsedlar)
+- Add option --namespace to command request-branch (cqi)
+- Add argument name and option --namespace to request-repo - #193 #200 (cqi)
+- Add explicit option --repo for request-branch - #244 (cqi)
+- Do not use deprecated option module-name (cqi)
+- Remove compatible code with EL5 in bash completion (cqi)
+- Handle Bodhi login automatically (cqi)
+- Refine command override create (cqi)
+- request-repo: Fix API token help text - #232 (tmz)
+- Use base_module in clone_config - #230 (tmz)
+- Extend override by number of days or specific date - #67 (cqi)
+- Use refactored man from pyrpkg (puiterwijk)
+- Add new command for creating override in Bodhi - #92 (cqi)
+- Also remove bodhi url from config (cqi)
+- Check bodhi version earlier (cqi)
+- Drop support of bodhi-client 0.9 - #223 (cqi)
+- Use custom ArgumentParser from pyrpkg.cli (jkucera)
+- Add OIDC config (puiterwijk)
+- Fix argparse error in Python 3 - #221 (cqi)
+
+* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.33-4
+- Rebuilt for Python 3.7
+
+* Tue May 22 2018 Chenxiong Qi <cqi@redhat.com> 1.33-3
+- Backport: Fix argparse error in Python 3
+
+* Mon May 21 2018 Chenxiong Qi <cqi@redhat.com> 1.33-2
+- Require python2-rpkg-1.54-2 as minimum version
+
+* Mon May 14 2018 Chenxiong Qi <cqi@redhat.com> - 1.33-1
+- Allow running tests against specified rpkg (cqi)
+- Fix test due to rpkg uses getpass.getuser (cqi)
+- Getting bodhi version works with Python 3 - #213 (cqi)
+- Detect Bodhi client by major version - #204 (cqi)
+- Allow requesting modular repositories without bug ID - #197 (rdossant)
+- Fix test test_verify_sls_invalid_date - #209 (cqi)
+- Copy pip-pycurl to ensure pycurl is installed correctly (cqi)
+- Fix unicode issue for update command in Python 3 - #206 (cqi)
+- Fix a few E722 code styles errors (cqi)
+- Fix fake PDC URL in test (cqi)
+- Use tox to run tests with multiple Python versions (cqi)
+- Reword error message for missing pagure token - #194 (cqi)
+- Tell which token ACL is required for request-repo - #195 (cqi)
+- Rename incorrect references of Koshei to be Anitya (mprahl)
+
+* Thu May 10 2018 Miro Hrončok <mhroncok@redhat.com> - 1.32-2
+- Switch to Python 3 on Fedora > 28 and EL > 7
+- Drop Groups
+- Switch to %%{buildroot}
+- Switch to %%py_build and _install
+
+* Thu Mar 01 2018 Chenxiong Qi <cqi@redhat.com> - 1.32-1
+- Add requests-tests-repo command (mvadkert)
+- Use PDC instead of Bodhi to get the active release branches - #187 (mprahl)
+- fix broken syntax in bash completion (tmz)
+- Fix Python 3 incompatible code in tests (cqi)
+- Better mocking.  Return different values for each new request. (rbean)
+- Typofix. (rbean)
+- Add docstrings. (rbean)
+- Automatically request module for non-standard branches. (rbean)
+- Refactor: parameterize the request_repo and request_branch functionality.
+  (rbean)
+- Some additions to the gitignore file. (rbean)
 
 * Wed Feb 14 2018 Chenxiong Qi <cqi@redhat.com> 1.31-5
 - Backport: fix broken syntax in bash completion

diff --git a/sources b/sources
index 0d279c6..6e185d8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fedpkg-1.31.tar.bz2) = 0b49fe3429ca140e588f55d3e817d8b90f77c07b83d76f3f2391ed7489d52eeb2e0b95d1caf3e7266e164b009374a1df32156a6a5ce7eabad439559626a39782
+SHA512 (fedpkg-1.37.tar.bz2) = 74dbd810a4d192a91ace8caec5e662437a26d0a24440b61a950273543525d13552f8acacd5ed8eced6df642ea7cd75a80a80d39d7ac9648f028438f0f1663479

diff --git a/0001-fedpkg-request-use-pdc-active-releases.patch b/0001-fedpkg-request-use-pdc-active-releases.patch
new file mode 100644
index 0000000..39b6efb
--- /dev/null
+++ b/0001-fedpkg-request-use-pdc-active-releases.patch
@@ -0,0 +1,189 @@
+From 00aed529cf22796fdae0d23f844221df640cc7c2 Mon Sep 17 00:00:00 2001
+From: mprahl <mprahl@redhat.com>
+Date: Feb 23 2018 03:01:35 +0000
+Subject: Use PDC instead of Bodhi to get the active release branches
+
+
+Fixes #187
+
+Signed-off-by: mprahl <mprahl@redhat.com>
+
+---
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index a203b91..e8ff6be 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -462,7 +462,7 @@ suggest_reboot=False
+                 raise rpkgError('You must specify a branch if you are not in '
+                                 'a git repository')
+ 
+-        bodhi_url = config.get('{0}.bodhi'.format(name), 'url')
++        pdc_url = config.get('{0}.pdc'.format(name), 'url')
+         if branch:
+             if is_epel(branch):
+                 assert_valid_epel_package(module_name, branch)
+@@ -474,7 +474,7 @@ suggest_reboot=False
+                         'Only characters, numbers, periods, dashes, '
+                         'underscores, and pluses are allowed in module branch '
+                         'names')
+-            release_branches = get_release_branches(bodhi_url)
++            release_branches = get_release_branches(pdc_url)
+             if branch in release_branches:
+                 if service_levels:
+                     raise rpkgError(
+@@ -489,14 +489,13 @@ suggest_reboot=False
+ 
+         # If service levels were provided, verify them
+         if service_levels:
+-            pdc_url = config.get('{0}.pdc'.format(name), 'url')
+             sl_dict = sl_list_to_dict(service_levels)
+             verify_sls(pdc_url, sl_dict)
+ 
+         pagure_url = config.get('{0}.pagure'.format(name), 'url')
+         pagure_token = get_pagure_token(config, name)
+         if all_releases:
+-            release_branches = get_release_branches(bodhi_url)
++            release_branches = get_release_branches(pdc_url)
+             branches = [b for b in release_branches
+                         if re.match(r'^(f\d+)$', b)]
+         else:
+diff --git a/fedpkg/utils.py b/fedpkg/utils.py
+index d241308..b3d704c 100644
+--- a/fedpkg/utils.py
++++ b/fedpkg/utils.py
+@@ -18,7 +18,6 @@ from six.moves.urllib.parse import urlencode
+ from six.moves.configparser import NoSectionError, NoOptionError
+ import requests
+ from requests.exceptions import ConnectionError
+-from fedora.client.bodhi import Bodhi2Client
+ from pyrpkg import rpkgError
+ 
+ 
+@@ -97,26 +96,55 @@ def new_pagure_issue(url, token, title, body):
+         url.rstrip('/'), rv.json()['issue']['id'])
+ 
+ 
+-def get_release_branches(bodhi_url):
++def get_release_branches(url):
+     """
+-    Get the active Fedora release branches from Bodhi
+-    :param bodhi_url: a string of the URL to Bodhi
++    Get the active Fedora release branches from PDC
++    :param url: a string of the URL to PDC
+     :return: a set containing the active Fedora release branches
+     """
+-    bodhi = Bodhi2Client(bodhi_url)
+     branches = set()
+-    page = 1
++    api_url = '{0}/rest_api/v1/product-versions/'.format(url.rstrip('/'))
++    query_args = {
++        'fields': ['short', 'version'],
++        'active': True
++    }
+     while True:
+-        rv = bodhi.send_request('releases', auth=False, params={'page': page})
+-        for release in rv['releases']:
+-            if release['state'] == 'current':
+-                branches.add(release['branch'])
+-        if page < rv['pages']:
+-            page += 1
+-        else:
+-            break
++        try:
++            rv = requests.get(api_url, params=query_args, timeout=60)
++        except ConnectionError as error:
++            error_msg = ('The connection to PDC failed while trying to get '
++                         'the active release branches. The error was: {0}'
++                         .format(str(error)))
++            raise rpkgError(error_msg)
+ 
+-    return branches
++        if not rv.ok:
++            base_error_msg = ('The following error occurred while trying to '
++                              'get the active release branches in PDC: {0}')
++            raise rpkgError(base_error_msg.format(rv.text))
++
++        rv_json = rv.json()
++        for product_version in rv_json['results']:
++            # If the version is not a digit we can ignore it (e.g. rawhide)
++            if not product_version['version'].isdigit():
++                continue
++
++            if product_version['short'] == 'epel':
++                prefix = 'epel'
++                if product_version['version'] == '6':
++                    prefix = 'el'
++                branches.add('{0}{1}'.format(
++                    prefix, product_version['version']))
++            elif product_version['short'] == 'fedora':
++                branches.add('f{0}'.format(product_version['version']))
++
++        if rv_json['next']:
++            # Clear the query_args because they are baked into the "next" URL
++            query_args = {}
++            api_url = rv_json['next']
++        else:
++            # We've gone through every page, so we can return the found
++            # branches
++            return branches
+ 
+ 
+ def sl_list_to_dict(sls):
+diff --git a/test/test_utils.py b/test/test_utils.py
+index cff22bd..7ca395f 100644
+--- a/test/test_utils.py
++++ b/test/test_utils.py
+@@ -115,29 +115,29 @@ class TestUtils(CliTestCase):
+                 assert str(e) == ('The SL "{0}" must expire on June 1st or '
+                                   'December 1st'.format(eol))
+ 
+-    @patch('fedpkg.utils.Bodhi2Client')
+-    def test_get_release_branches(self, mock_bodhi):
++    @patch('requests.get')
++    def test_get_release_branches(self, mock_request_get):
+         """Test that get_release_branches returns all the active Fedora release
+         branches.
+         """
+-        mock_bodhi_client = Mock()
+-        mock_bodhi_client.send_request.return_value = {
+-            u'page': 1,
+-            u'pages': 1,
+-            u'releases': [
+-                {'state': 'current', 'branch': 'el6'},
+-                {'state': 'archived', 'branch': 'f24'},
+-                {'state': 'current', 'branch': 'epel7'},
+-                {'state': 'current', 'branch': 'f25'},
+-                {'state': 'archived', 'branch': 'el5'},
+-                {'state': 'archived', 'branch': 'f23'},
+-                {'state': 'current', 'branch': 'f26'},
+-                {'state': 'pending', 'branch': 'f27m'},
+-                {'state': 'current', 'branch': 'f27'}
+-            ],
+-            u'rows_per_page': 20,
+-            u'total': 11}
+-        mock_bodhi.return_value = mock_bodhi_client
+-        expected = set(['el6', 'epel7', 'f25', 'f26', 'f27'])
+-        actual = utils.get_release_branches('http://bodhi.local')
++        mock_rv = Mock()
++        mock_rv.ok = True
++        # This abbreviated data returned from the product-versions PDC API
++        mock_rv.json.return_value = {
++            'count': 7,
++            'next': None,
++            'previous': None,
++            'results': [
++                {'short': 'epel', 'version': '6'},
++                {'short': 'epel', 'version': '7'},
++                {'short': 'fedora', 'version': '25'},
++                {'short': 'fedora', 'version': '26'},
++                {'short': 'fedora', 'version': '27'},
++                {'short': 'fedora', 'version': '28'},
++                {'short': 'fedora', 'version': 'rawhide'}
++            ]
++        }
++        mock_request_get.return_value = mock_rv
++        expected = set(['el6', 'epel7', 'f25', 'f26', 'f27', 'f28'])
++        actual = utils.get_release_branches('http://pdc.local')
+         self.assertEqual(expected, actual)
+

diff --git a/fedpkg.spec b/fedpkg.spec
index 7e08ecc..ce861b8 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -5,7 +5,7 @@
 
 Name:           fedpkg
 Version:        1.37
-Release:        5%{?dist}
+Release:        5%{?dist}.1
 Summary:        Fedora utility for working with dist-git
 
 License:        GPLv2+
@@ -166,6 +166,10 @@ nosetests
 
 
 %changelog
+* Thu Jul 25 2019 Stephen Smoogen <smooge@fedoraproject.org> - 1.37-5.1
+- Merge with master. Update to work with RHEL8
+
+
 * Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
 

diff --git a/package.cfg b/package.cfg
new file mode 100644
index 0000000..7e5a05b
--- /dev/null
+++ b/package.cfg
@@ -0,0 +1,2 @@
+[koji]
+targets = epel8 epel8-playground

                 reply	other threads:[~2026-08-10 21:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178639834534.1.6093658564224638491.rpms-fedpkg-598e5008f986@fedoraproject.org \
    --to=smooge@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox