public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedpkg] 1.48-1: New release 1.43
@ 2026-08-10 21:46 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-10 21:46 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedpkg
            Branch : 1.48-1
            Commit : dc26734292962e799705693ac574e38136fcfb67
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2022-09-07T03:26:41+00:00
            Stats  : +76/-617 in 8 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedpkg/c/dc26734292962e799705693ac574e38136fcfb67?branch=1.48-1

            Log:
            New release 1.43

Signed-off-by: Ondřej Nosek <onosek@redhat.com>

---
diff --git a/.gitignore b/.gitignore
index 3754beb..0a66223 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,4 @@
 /fedpkg-1.40.tar.bz2
 /fedpkg-1.41.tar.bz2
 /fedpkg-1.42.tar.bz2
+/fedpkg-1.43.tar.bz2

diff --git a/0003-Remove-Environment-Markers-syntax.patch b/0003-Remove-Environment-Markers-syntax.patch
new file mode 100644
index 0000000..746200a
--- /dev/null
+++ b/0003-Remove-Environment-Markers-syntax.patch
@@ -0,0 +1,23 @@
+From d59edea4da1aaeafa81ab09e9807993aa95d879c Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Wed, 7 Sep 2022 05:13:28 +0200
+Subject: [PATCH] Remove "Environment Markers" syntax
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ tests-requirements.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests-requirements.txt b/tests-requirements.txt
+index a700317..be75121 100644
+--- a/tests-requirements.txt
++++ b/tests-requirements.txt
+@@ -1,4 +1,4 @@
+-mock >= 1.0.1;python_version<"3.3"
++mock >= 1.0.1
+ coverage<5.0.0
+ cccolutils
+ gitpython
+-- 
+2.37.2
+

diff --git a/0003-fedpkg-update-suggest-logout-option-added.patch b/0003-fedpkg-update-suggest-logout-option-added.patch
deleted file mode 100644
index 794178c..0000000
--- a/0003-fedpkg-update-suggest-logout-option-added.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 07e7c53b1471bfc2e45c82d5975433848d7f1e83 Mon Sep 17 00:00:00 2001
-From: Dominik Rumian <drumian@redhat.com>
-Date: Fri, 8 Apr 2022 13:13:05 +0200
-Subject: [PATCH 1/2] fedpkg update --suggest-logout option added
-
-Option --suggest-logout was not implemented although it
-is supported by Bodhi. This commit adds this option.
-
-Jira: RHELCMP-8704
-Fixes: https://pagure.io/fedpkg/issue/472
-
-Signed-off-by: Dominik Rumian <drumian@redhat.com>
----
- fedpkg/__init__.py |  4 ++++
- fedpkg/cli.py      | 34 +++++++++++++++++++++++++---------
- test/test_cli.py   | 15 ++++++++++++++-
- 3 files changed, 43 insertions(+), 10 deletions(-)
-
-diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py
-index a52c70d..60a8193 100644
---- a/fedpkg/__init__.py
-+++ b/fedpkg/__init__.py
-@@ -62,6 +62,7 @@ if _BodhiClient is not None:
- 
-         UPDATE_TYPES = ['bugfix', 'security', 'enhancement', 'newpackage']
-         REQUEST_TYPES = ['testing', 'stable']
-+        SUGGEST_TYPES = ['unspecified', 'reboot', 'logout']
- 
-         @clear_csrf_and_retry
-         def save(self, *args, **kwargs):
-@@ -359,6 +360,9 @@ class Commands(pyrpkg.Commands):
-             if detail['request'] not in BodhiClient.REQUEST_TYPES:
-                 raise ValueError(
-                     'Incorrect request type {0}'.format(detail['request']))
-+            if detail['suggest'] not in BodhiClient.SUGGEST_TYPES:
-+                raise ValueError(
-+                    'Incorrect suggest type {0}'.format(detail['suggest']))
- 
-             try:
-                 self.log.info(bodhi.update_str(bodhi.save(**detail), minimal=False))
-diff --git a/fedpkg/cli.py b/fedpkg/cli.py
-index 58fabbe..8fc8f8d 100644
---- a/fedpkg/cli.py
-+++ b/fedpkg/cli.py
-@@ -78,8 +78,10 @@ unstable_karma=%(unstable_karma)s
- # Automatically close bugs when this marked as stable
- close_bugs=%(close_bugs)s
- 
--# Suggest that users restart after update
--suggest_reboot=%(suggest_reboot)s
-+# Suggest that users performs one of the following actions after the update:
-+# unspecified, restart, logout
-+# The default value is unspecified
-+suggest=%(suggest)s
- 
- # A boolean to require that all of the bugs in your update have been confirmed by testers.
- require_bugs=%(require_bugs)s
-@@ -244,12 +246,6 @@ class fedpkgClient(cliClient):
-             help='By default, update will be created by enabling to close bugs'
-                  ' automatically. If this is what you do not want, use this '
-                  'option to disable the default behavior.')
--        update_parser.add_argument(
--            '--suggest-reboot',
--            action='store_true',
--            default=False,
--            dest='suggest_reboot',
--            help='Suggest user to reboot after update. Default is False.')
-         update_parser.add_argument(
-             '--no-require-bugs',
-             action='store_false',
-@@ -264,6 +260,21 @@ class fedpkgClient(cliClient):
-             dest='require_testcases',
-             help='Disables the requirement that this update passes all test cases '
-                  'before reaching stable. Default is True.')
-+
-+        group = update_parser.add_mutually_exclusive_group()
-+        group.add_argument(
-+            '--suggest-reboot',
-+            action='store_true',
-+            default=False,
-+            dest='suggest_reboot',
-+            help='Suggest user to reboot after update. Default is False.')
-+        group.add_argument(
-+            '--suggest-logout',
-+            action='store_true',
-+            default=False,
-+            dest='suggest_logout',
-+            help='Suggest user to logout after update. Default is False.')
-+
-         update_parser.set_defaults(command=self.update)
- 
-     def get_distgit_namespaces(self):
-@@ -810,11 +821,16 @@ class fedpkgClient(cliClient):
-             'stable_karma': self.args.stable_karma,
-             'unstable_karma': self.args.unstable_karma,
-             'close_bugs': str(self.args.close_bugs),
--            'suggest_reboot': str(self.args.suggest_reboot),
-+            'suggest': 'unspecified',
-             'require_bugs': str(self.args.require_bugs),
-             'require_testcases': str(self.args.require_testcases),
-         }
- 
-+        if self.args.suggest_reboot:
-+            bodhi_args['suggest'] = 'reboot'
-+        elif self.args.suggest_logout:
-+            bodhi_args['suggest'] = 'logout'
-+
-         if self.args.update_type:
-             bodhi_args['type_'] = self.args.update_type
-         else:
-diff --git a/test/test_cli.py b/test/test_cli.py
-index 957cefe..6a9864d 100644
---- a/test/test_cli.py
-+++ b/test/test_cli.py
-@@ -169,7 +169,8 @@ class TestUpdate(CliTestCase):
-     @patch('fedora.client.OpenIdBaseClient._load_cookies')
-     def assert_bodhi_update(self, cli, _load_cookies, send_request, csrf,
-                             update_type=None, request_type=None, notes=None,
--                            stable_karma=None, unstable_karma=None):
-+                            stable_karma=None, unstable_karma=None,
-+                            suggest=None):
-         csrf.return_value = '123456'
- 
-         def run_command_side_effect(command, shell):
-@@ -189,6 +190,10 @@ class TestUpdate(CliTestCase):
-                     content = re.sub('request=[a-z]+\n',
-                                      'request={0}\n'.format(request_type),
-                                      content)
-+                if suggest:
-+                    content = re.sub('suggest=[a-z]+\n',
-+                                     'suggest={0}\n'.format(suggest),
-+                                     content)
-                 f.write(content)
- 
-         self.mock_run_command.side_effect = run_command_side_effect
-@@ -327,6 +332,14 @@ class TestUpdate(CliTestCase):
-                               update_type='enhancement',
-                               request_type='xxx')
- 
-+    def test_incorrect_suggest_type_in_template(self):
-+        cli_cmd = ['fedpkg-stage', '--path', self.cloned_repo_path, 'update']
-+        cli = self.get_cli(cli_cmd)
-+        six.assertRaisesRegex(self, rpkgError, 'Incorrect suggest type',
-+                              self.assert_bodhi_update, cli,
-+                              update_type='enhancement',
-+                              suggest='123')
-+
-     def test_create_with_cli_options(self):
-         cli_cmd = [
-             'fedpkg-stage', '--path', self.cloned_repo_path,
--- 
-2.35.1
-

diff --git a/0004-Add-compatibility-for-Bodhi-6.0.0.patch b/0004-Add-compatibility-for-Bodhi-6.0.0.patch
deleted file mode 100644
index 69ef3b6..0000000
--- a/0004-Add-compatibility-for-Bodhi-6.0.0.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-From 7dbe79dc9baaea045dd558430abfbaea13b4c36a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= <aurelien@bompard.org>
-Date: Mon, 28 Mar 2022 11:40:16 +0200
-Subject: [PATCH 2/2] Add compatibility for Bodhi >= 6.0.0
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Compatibility with Bodhi 5.X is retained.
-JIRA: RHELCMP-8929
-Merges: https://pagure.io/fedpkg/pull-request/470
-
-Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
----
- fedpkg/__init__.py   | 67 ++++++--------------------------------------
- fedpkg/bodhi_5.py    | 63 +++++++++++++++++++++++++++++++++++++++++
- fedpkg/bodhi_6.py    | 26 +++++++++++++++++
- requirements-py2.txt |  1 +
- requirements.txt     |  1 +
- test/test_cli.py     | 13 ++++++---
- 6 files changed, 109 insertions(+), 62 deletions(-)
- create mode 100644 fedpkg/bodhi_5.py
- create mode 100644 fedpkg/bodhi_6.py
-
-diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py
-index 60a8193..f041b97 100644
---- a/fedpkg/__init__.py
-+++ b/fedpkg/__init__.py
-@@ -21,11 +21,7 @@ from datetime import datetime, timedelta
- from . import cli  # noqa
- from .lookaside import FedoraLookasideCache
- from pyrpkg.utils import cached_property
--
--try:
--    from bodhi.client.bindings import BodhiClient as _BodhiClient
--except ImportError:
--    _BodhiClient = None
-+from pkg_resources import get_distribution, parse_version
- 
- try:
-     from distro import linux_distribution  # noqa
-@@ -33,56 +29,11 @@ except ImportError:
-     from platform import linux_distribution  # noqa
- 
- 
--if _BodhiClient is not None:
--    from fedora.client import AuthError
--
--    def clear_csrf_and_retry(func):
--        """Clear csrf token and retry
--
--        fedpkg uses Bodhi Python binding API list_overrides first before other
--        save and extend APIs. That causes a readonly csrf token is received,
--        which will be got again when next time to construct request data to
--        modify updates. That is not expected and AuthError will be raised.
--
--        So, the solution is to capture the AuthError error, clear the token and
--        try to modify update again by requesting another token with user's
--        credential.
--        """
--        def _decorator(self, *args, **kwargs):
--            try:
--                return func(self, *args, **kwargs)
--            except AuthError:
--                self._session.cookies.clear()
--                self.csrf_token = None
--                return func(self, *args, **kwargs)
--        return _decorator
--
--    class BodhiClient(_BodhiClient):
--        """Customized BodhiClient for fedpkg"""
--
--        UPDATE_TYPES = ['bugfix', 'security', 'enhancement', 'newpackage']
--        REQUEST_TYPES = ['testing', 'stable']
--        SUGGEST_TYPES = ['unspecified', 'reboot', 'logout']
--
--        @clear_csrf_and_retry
--        def save(self, *args, **kwargs):
--            return super(BodhiClient, self).save(*args, **kwargs)
--
--        @clear_csrf_and_retry
--        def save_override(self, *args, **kwargs):
--            return super(BodhiClient, self).save_override(*args, **kwargs)
--
--        @clear_csrf_and_retry
--        def extend_override(self, override, expiration_date):
--            data = dict(
--                nvr=override['nvr'],
--                notes=override['notes'],
--                expiration_date=expiration_date,
--                edited=override['nvr'],
--                csrf_token=self.csrf(),
--            )
--            return self.send_request(
--                'overrides/', verb='POST', auth=True, data=data)
-+bodhi_version = get_distribution('bodhi-client').version
-+if parse_version(bodhi_version) < parse_version("6.0.0"):
-+    from .bodhi_5 import BodhiClient, UPDATE_TYPES, REQUEST_TYPES, SUGGEST_TYPES
-+else:
-+    from .bodhi_6 import BodhiClient, UPDATE_TYPES, REQUEST_TYPES, SUGGEST_TYPES
- 
- 
- class Commands(pyrpkg.Commands):
-@@ -354,13 +305,13 @@ class Commands(pyrpkg.Commands):
-             if not detail['type']:
-                 raise ValueError(
-                     'Missing update type, which is required to create update.')
--            if detail['type'] not in BodhiClient.UPDATE_TYPES:
-+            if detail['type'] not in UPDATE_TYPES:
-                 raise ValueError(
-                     'Incorrect update type {0}'.format(detail['type']))
--            if detail['request'] not in BodhiClient.REQUEST_TYPES:
-+            if detail['request'] not in REQUEST_TYPES:
-                 raise ValueError(
-                     'Incorrect request type {0}'.format(detail['request']))
--            if detail['suggest'] not in BodhiClient.SUGGEST_TYPES:
-+            if detail['suggest'] not in SUGGEST_TYPES:
-                 raise ValueError(
-                     'Incorrect suggest type {0}'.format(detail['suggest']))
- 
-diff --git a/fedpkg/bodhi_5.py b/fedpkg/bodhi_5.py
-new file mode 100644
-index 0000000..9ffa1df
---- /dev/null
-+++ b/fedpkg/bodhi_5.py
-@@ -0,0 +1,63 @@
-+# fedpkg - a Python library for RPM Packagers
-+#
-+# Copyright (C) 2011 Red Hat Inc.
-+# Author(s): Jesse Keating <jkeating@redhat.com>
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2 of the License, or (at your
-+# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
-+# the full text of the license.
-+
-+from bodhi.client.bindings import BodhiClient as _BodhiClient
-+from fedora.client import AuthError
-+
-+
-+UPDATE_TYPES = ['bugfix', 'security', 'enhancement', 'newpackage']
-+REQUEST_TYPES = ['testing', 'stable']
-+SUGGEST_TYPES = ['unspecified', 'reboot', 'logout']
-+
-+
-+def clear_csrf_and_retry(func):
-+    """Clear csrf token and retry
-+
-+    fedpkg uses Bodhi Python binding API list_overrides first before other
-+    save and extend APIs. That causes a readonly csrf token is received,
-+    which will be got again when next time to construct request data to
-+    modify updates. That is not expected and AuthError will be raised.
-+
-+    So, the solution is to capture the AuthError error, clear the token and
-+    try to modify update again by requesting another token with user's
-+    credential.
-+    """
-+    def _decorator(self, *args, **kwargs):
-+        try:
-+            return func(self, *args, **kwargs)
-+        except AuthError:
-+            self._session.cookies.clear()
-+            self.csrf_token = None
-+            return func(self, *args, **kwargs)
-+    return _decorator
-+
-+
-+class BodhiClient(_BodhiClient):
-+    """Customized BodhiClient for fedpkg"""
-+
-+    @clear_csrf_and_retry
-+    def save(self, *args, **kwargs):
-+        return super(BodhiClient, self).save(*args, **kwargs)
-+
-+    @clear_csrf_and_retry
-+    def save_override(self, *args, **kwargs):
-+        return super(BodhiClient, self).save_override(*args, **kwargs)
-+
-+    @clear_csrf_and_retry
-+    def extend_override(self, override, expiration_date):
-+        data = dict(
-+            nvr=override['nvr'],
-+            notes=override['notes'],
-+            expiration_date=expiration_date,
-+            csrf_token=self.csrf(),
-+        )
-+        return self.send_request(
-+            'overrides/', verb='POST', auth=True, data=data)
-diff --git a/fedpkg/bodhi_6.py b/fedpkg/bodhi_6.py
-new file mode 100644
-index 0000000..415e3d2
---- /dev/null
-+++ b/fedpkg/bodhi_6.py
-@@ -0,0 +1,26 @@
-+# fedpkg - a Python library for RPM Packagers
-+#
-+# Copyright (C) 2022 Red Hat Inc.
-+# Author(s): Aurélien Bompard <aurelien@bompard.org>
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2 of the License, or (at your
-+# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
-+# the full text of the license.
-+
-+from bodhi.client.bindings import BodhiClient as BodhiClient_
-+from bodhi.client.constants import UPDATE_TYPES, REQUEST_TYPES, SUGGEST_TYPES  # noqa
-+
-+
-+class BodhiClient(BodhiClient_):
-+
-+    def __init__(self, username, *args, **kwargs):
-+        super().__init__(*args, **kwargs)
-+
-+    def extend_override(self, override, new_expiration_date):
-+        return self.save_override(
-+            nvr=override["nvr"],
-+            notes=override["notes"],
-+            expiration_date=new_expiration_date
-+        )
-diff --git a/requirements-py2.txt b/requirements-py2.txt
-index e1de6c2..de6c73a 100644
---- a/requirements-py2.txt
-+++ b/requirements-py2.txt
-@@ -1,5 +1,6 @@
- argcomplete
- openidc-client
- python-bugzilla < 3.0.0
-+python-fedora
- rpkg
- six
-diff --git a/requirements.txt b/requirements.txt
-index 7e52a2c..cb3de2c 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -2,5 +2,6 @@ argcomplete
- bodhi-client
- openidc-client
- python-bugzilla
-+python-fedora
- rpkg
- six
-diff --git a/test/test_cli.py b/test/test_cli.py
-index 6a9864d..03c9403 100644
---- a/test/test_cli.py
-+++ b/test/test_cli.py
-@@ -26,6 +26,7 @@ from six.moves import StringIO
- from six.moves.configparser import NoOptionError, NoSectionError
- 
- import fedpkg.cli
-+from fedpkg import parse_version, bodhi_version
- from fedpkg.bugzilla import BugzillaClient
- from fedpkg.cli import check_bodhi_version
- from freezegun import freeze_time
-@@ -1712,6 +1713,10 @@ class TestBodhiOverride(CliTestCase):
-                     'Buildroot override for %s already exists and not '
-                     'expired.', 'rpkg-1.54-2.fc28')
- 
-+    @unittest.skipIf(
-+        parse_version(bodhi_version) >= parse_version("6.0.0"),
-+        "Retrying is built in Bodhi 6"
-+    )
-     @patch('fedora.client.OpenIdBaseClient._load_cookies')
-     @patch('bodhi.client.bindings.BodhiClient.list_overrides')
-     @patch('bodhi.client.bindings.BodhiClient.save_override')
-@@ -1888,7 +1893,6 @@ class TestBodhiOverrideExtend(CliTestCase):
-             'expiration_date': expected_expiration_date,
-             'nvr': build_nvr,
-             'notes': build_override['notes'],
--            'edited': build_nvr,
-             'csrf_token': csrf.return_value,
-         }
-         send_request.assert_called_once_with(
-@@ -1945,7 +1949,6 @@ class TestBodhiOverrideExtend(CliTestCase):
-             'expiration_date': expected_expiration_date,
-             'nvr': build_nvr,
-             'notes': build_override['notes'],
--            'edited': build_nvr,
-             'csrf_token': csrf.return_value,
-         }
-         send_request.assert_called_once_with(
-@@ -2003,7 +2006,6 @@ class TestBodhiOverrideExtend(CliTestCase):
-             'expiration_date': expected_expiration_date,
-             'nvr': build_nvr,
-             'notes': build_override['notes'],
--            'edited': build_nvr,
-             'csrf_token': csrf.return_value,
-         }
-         send_request.assert_called_once_with(
-@@ -2042,6 +2044,10 @@ class TestBodhiOverrideExtend(CliTestCase):
-             six.assertRaisesRegex(self, rpkgError, '',
-                                   cli.extend_buildroot_override)
- 
-+    @unittest.skipIf(
-+        parse_version(bodhi_version) >= parse_version("6.0.0"),
-+        "Retrying is built in Bodhi 6"
-+    )
-     @patch('fedpkg.BodhiClient.list_overrides')
-     @patch('fedpkg.BodhiClient.csrf')
-     @patch('fedpkg.BodhiClient.send_request')
-@@ -2102,7 +2108,6 @@ class TestBodhiOverrideExtend(CliTestCase):
-                 'expiration_date': expected_expiration_date,
-                 'nvr': build_nvr,
-                 'notes': build_override['notes'],
--                'edited': build_nvr,
-                 'csrf_token': token,
-             })
-             for token in csrf.side_effect
--- 
-2.35.1
-

diff --git a/0004-Do-not-execute-unittests-for-old-bodhi-client.patch b/0004-Do-not-execute-unittests-for-old-bodhi-client.patch
new file mode 100644
index 0000000..cd3c1dc
--- /dev/null
+++ b/0004-Do-not-execute-unittests-for-old-bodhi-client.patch
@@ -0,0 +1,26 @@
+From 253737c7fed48514fc1404f9260c6195555ede6c Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Wed, 7 Sep 2022 03:46:35 +0200
+Subject: [PATCH] Do not execute unittests for old bodhi-client
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ test/test_cli.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/test/test_cli.py b/test/test_cli.py
+index 43bd20a..84d1935 100644
+--- a/test/test_cli.py
++++ b/test/test_cli.py
+@@ -45,6 +45,8 @@ except ImportError:
+ 
+ try:
+     import bodhi
++    if parse_version(bodhi_version) < parse_version("5.0.0"):
++        raise ImportError("Unsupported bodhi-client")
+ except ImportError:
+     bodhi = None
+ 
+-- 
+2.37.2
+

diff --git a/0005-Fix-tests-with-bodhi-client-6.patch b/0005-Fix-tests-with-bodhi-client-6.patch
deleted file mode 100644
index 5e5b9ba..0000000
--- a/0005-Fix-tests-with-bodhi-client-6.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From 987c00d628f4a5cfb3146cbc51c4a91bf75b93a1 Mon Sep 17 00:00:00 2001
-From: Adam Williamson <awilliam@redhat.com>
-Date: Fri, 17 Jun 2022 16:04:56 -0700
-Subject: [PATCH] Fix tests with bodhi-client 6+
-
-bodhi-client was ported to use OIDC Client for authentication.
-We need to mock out its OIDC provider metadata discovery because
-it does an unavoidable network request, and we also need to make
-sure `HOME` is defined in `os.environ` because the new OIDC code
-expects to read it (in `BodhiClient._build_oidc_client()`).
-
-Signed-off-by: Adam Williamson <awilliam@redhat.com>
----
- test/test_cli.py | 49 +++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 38 insertions(+), 11 deletions(-)
-
-diff --git a/test/test_cli.py b/test/test_cli.py
-index 03c9403..a2a2c60 100644
---- a/test/test_cli.py
-+++ b/test/test_cli.py
-@@ -49,6 +49,11 @@ except ImportError:
-     bodhi = None
- 
- 
-+def _mock_metadata(self, _):
-+    """Minimal replacement for OIDCClient._get_provider_metadata"""
-+    self.metadata = {"token_endpoint": "", "authorization_endpoint": ""}
-+
-+
- class TestIsUpdateAborted(CliTestCase):
-     """Test is_update_aborted"""
- 
-@@ -111,7 +116,7 @@ class TestUpdate(CliTestCase):
-         self.mock_check_bodhi_version = \
-             self.check_bodhi_version_patcher.start()
- 
--        self.os_environ_patcher = patch.dict('os.environ', {'EDITOR': 'vi'})
-+        self.os_environ_patcher = patch.dict('os.environ', {'EDITOR': 'vi', 'HOME': mkdtemp()})
-         self.os_environ_patcher.start()
- 
-         self.user_patcher = patch('pyrpkg.Commands.user',
-@@ -136,15 +141,11 @@ class TestUpdate(CliTestCase):
-         with io.open(clog_file, 'w', encoding='utf-8') as f:
-             f.write(os.linesep.join(self.fake_clog))
- 
--        # Get 'bodhi_client' version. Particular versions have differences
--        # across distributions.
--        self.bodhi_version = None
--        try:
--            version_object = pkg_resources.get_distribution('bodhi_client')
--            if version_object.has_version():
--                self.bodhi_version = int(version_object.version.split('.')[0])
--        except pkg_resources.DistributionNotFound:
--            pass
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher = patch(
-+                'bodhi.client.oidcclient.OIDCClient._get_provider_metadata', _mock_metadata
-+            )
-+            self.oidcmeta_patcher.start()
- 
-     def tearDown(self):
-         if os.path.exists('bodhi.template'):
-@@ -158,6 +159,8 @@ class TestUpdate(CliTestCase):
-         self.check_bodhi_version_patcher.stop()
-         self.run_command_patcher.stop()
-         self.nvr_patcher.stop()
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher.stop()
-         super(TestUpdate, self).tearDown()
- 
-     def get_cli(self, cli_cmd, name='fedpkg', cfg=None):
-@@ -221,7 +224,7 @@ class TestUpdate(CliTestCase):
- 
-         # there wasn't the option in older releases of bodhi, but these
-         # releases are still active (epel7, epel8)
--        if self.bodhi_version <= 4:
-+        if parse_version(bodhi_version) <= parse_version("4.0.0"):
-             del expected_data["display_name"]
- 
-         with patch('os.unlink') as unlink:
-@@ -1569,12 +1572,24 @@ class TestBodhiOverride(CliTestCase):
-         self.anon_kojisession_m = self.anon_kojisession_p.start()
-         self.kojisession = self.anon_kojisession_m.return_value
- 
-+        self.os_environ_patcher = patch.dict('os.environ', {'EDITOR': 'vi', 'HOME': mkdtemp()})
-+        self.os_environ_patcher.start()
-+
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher = patch(
-+                'bodhi.client.oidcclient.OIDCClient._get_provider_metadata', _mock_metadata
-+            )
-+            self.oidcmeta_patcher.start()
-+
-         # Fake build returned from Koji for the specified build NVR in tests
-         self.kojisession.getBuild.return_value = {'build_id': 1}
- 
-     def tearDown(self):
-         self.anon_kojisession_p.stop()
-         self.cbv_p.stop()
-+        self.os_environ_patcher.stop()
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher.stop()
-         super(TestBodhiOverride, self).tearDown()
- 
-     def test_raise_error_if_build_not_exist(self):
-@@ -1802,6 +1817,15 @@ class TestBodhiOverrideExtend(CliTestCase):
-         self.anon_kojisession_m = self.anon_kojisession_p.start()
-         self.kojisession = self.anon_kojisession_m.return_value
- 
-+        self.os_environ_patcher = patch.dict('os.environ', {'EDITOR': 'vi', 'HOME': mkdtemp()})
-+        self.os_environ_patcher.start()
-+
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher = patch(
-+                'bodhi.client.oidcclient.OIDCClient._get_provider_metadata', _mock_metadata
-+            )
-+            self.oidcmeta_patcher.start()
-+
-         self.load_cookies_p = patch(
-             'fedora.client.OpenIdBaseClient._load_cookies')
-         self.mock_load_cookies = self.load_cookies_p.start()
-@@ -1813,6 +1837,9 @@ class TestBodhiOverrideExtend(CliTestCase):
-         self.load_cookies_p.stop()
-         self.anon_kojisession_p.stop()
-         self.cbv_p.stop()
-+        self.os_environ_patcher.stop()
-+        if parse_version(bodhi_version) >= parse_version("6.0.0"):
-+            self.oidcmeta_patcher.stop()
-         super(TestBodhiOverrideExtend, self).tearDown()
- 
-     def test_specified_build_not_exist(self):
--- 
-2.36.1
-

diff --git a/fedpkg.spec b/fedpkg.spec
index 4f9e418..eabb747 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -4,24 +4,14 @@
 %endif
 
 Name:           fedpkg
-Version:        1.42
-Release:        5%{?dist}
+Version:        1.43
+Release:        1%{?dist}
 Summary:        Fedora utility for working with dist-git
 
 License:        GPLv2+
 URL:            https://pagure.io/fedpkg
 Source0:        https://pagure.io/releases/fedpkg/%{name}-%{version}.tar.bz2
 
-BuildArch:      noarch
-Patch1:         0001-Do-not-use-pytest-related-dependencies-temporarily.patch
-Patch2:         0002-Remove-pytest-coverage-execution.patch
-Patch3:         0003-fedpkg-update-suggest-logout-option-added.patch
-Patch4:         0004-Add-compatibility-for-Bodhi-6.0.0.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=2097858
-# https://pagure.io/fedpkg/pull-request/482
-# Fix tests with bodhi-client 6+
-Patch5:         0005-Fix-tests-with-bodhi-client-6.patch
-
 # RHEL7 is currently the only release that is built for Python 2.
 %if 0%{?fedora} || 0%{?rhel} > 7
 %bcond_with python2
@@ -29,6 +19,14 @@ Patch5:         0005-Fix-tests-with-bodhi-client-6.patch
 %bcond_without python2
 %endif
 
+BuildArch:      noarch
+Patch1:         0001-Do-not-use-pytest-related-dependencies-temporarily.patch
+Patch2:         0002-Remove-pytest-coverage-execution.patch
+%if %{with python2}
+Patch3:         0003-Remove-Environment-Markers-syntax.patch
+%endif
+Patch4:         0004-Do-not-execute-unittests-for-old-bodhi-client.patch
+
 BuildRequires:  pkgconfig
 BuildRequires:  bash-completion
 BuildRequires:  git
@@ -42,7 +40,7 @@ Requires:       redhat-rpm-config
 
 BuildRequires:  python2-devel
 # We br these things for man page generation due to imports
-BuildRequires:  python2-rpkg >= 1.64-4
+BuildRequires:  python2-rpkg >= 1.65-1
 BuildRequires:  python2-distro
 BuildRequires:  python2-fedora
 # For testing
@@ -56,7 +54,7 @@ BuildRequires:  python-bugzilla
 
 Requires:       bodhi-client >= 2.0
 Requires:       python-bugzilla
-Requires:       python2-rpkg >= 1.64-4
+Requires:       python2-rpkg >= 1.65-1
 Requires:       python2-distro
 Requires:       python2-fedora
 Requires:       python2-openidc-client >= 0.6.0
@@ -68,11 +66,10 @@ Requires:       fedora-packager
 %global __python %{__python3}
 
 BuildRequires:  python3-devel
-BuildRequires:  python3-rpkg >= 1.64-4
+BuildRequires:  python3-rpkg >= 1.65-1
 BuildRequires:  python3-distro
 BuildRequires:  python3-fedora
 # For testing
-BuildRequires:  python3-mock
 BuildRequires:  python3-pytest
 BuildRequires:  python3-setuptools
 BuildRequires:  python3-bugzilla
@@ -81,7 +78,7 @@ BuildRequires:  python3-bodhi-client
 
 
 Requires:       python3-bugzilla
-Requires:       python3-rpkg >= 1.64-4
+Requires:       python3-rpkg >= 1.65-1
 Requires:       python3-distro
 Requires:       python3-fedora
 Requires:       python3-openidc-client >= 0.6.0
@@ -151,6 +148,17 @@ mv %{buildroot}%{compdir}/fedpkg.bash %{buildroot}%{compdir}/fedpkg
 
 
 %changelog
+* Wed Sep 07 2022 Ondřej Nosek <onosek@redhat.com> - 1.43-1
+- Improve change management process documentation (onosek)
+- Fix medium level bandit findings (onosek)
+- rpmdefines changes depending on rpkg (onosek)
+- `request-branch`: detect existing branch - #481 (onosek)
+- Refactoring of _request_branch method (drumian)
+- Fix tests with bodhi-client 6+ (awilliam)
+- Add compatibility for Bodhi >= 6.0.0 (aurelien)
+- fedpkg update --suggest-logout option added - 472 (drumian)
+- WIP: Remove python3-mock dependency from fedpkg (drumian)
+
 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

diff --git a/sources b/sources
index b1adc43..c5e61cf 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fedpkg-1.42.tar.bz2) = 9dc5c6819ff065e64a0a3a736dcb82b5c0ce4ed2d3dbf6e4b8ed92dd21332bdf9b6a29c86009ffb18a12974909e823ba991a1805ea3b8bc81472a0f763a4708c
+SHA512 (fedpkg-1.43.tar.bz2) = 16f60ac37dc9982cfb16e02ef50c3b31a53da51883cc0a3f73dd9344d1dff5dbb2585c4f2e2b078e5b2dfeafe9b98a35fdee4df8eba0798617945c176b14b790

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 21:46 [rpms/fedpkg] 1.48-1: New release 1.43 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox