#36 Quick fix for koji ssl auth and koji-1.24.0
Closed 3 years ago by onosek. Opened 3 years ago by sergiomb.
rpms/ sergiomb/rpkg rawhide  into  rawhide

file added
+45
@@ -0,0 +1,45 @@ 

+ From a7521f9ee9627c80282fa59fffd8a43d8af94fb3 Mon Sep 17 00:00:00 2001

+ From: Sérgio M. Basto <sergio@serjux.com>

+ Date: Feb 23 2021 22:27:03 +0000

+ Subject: ca cert was removed on koji-1.24.0

+ 

+ 

+ Signed-off-by: Sérgio M. Basto <sergio@serjux.com>

+ 

+ ---

+ 

+ diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py

+ index a3f5edd..126f0db 100644

+ --- a/pyrpkg/__init__.py

+ +++ b/pyrpkg/__init__.py

+ @@ -276,7 +276,7 @@ class Commands(object):

+          if authtype == 'ssl' or os.path.isfile(koji_config['cert']) and authtype is None:

+              try:

+                  session.ssl_login(koji_config['cert'],

+ -                                  koji_config['ca'],

+ +                                  None,

+                                    koji_config['serverca'],

+                                    proxyuser=self.runas)

+              except Exception as e:

+ diff --git a/tests/test_commands.py b/tests/test_commands.py

+ index c0ac6b3..e82a5d2 100644

+ --- a/tests/test_commands.py

+ +++ b/tests/test_commands.py

+ @@ -625,7 +625,6 @@ class TestLoginKojiSession(CommandTestCase):

+              'authtype': 'ssl',

+              'server': 'http://localhost/kojihub',

+              'cert': '/path/to/cert',

+ -            'ca': '/path/to/ca',

+              'serverca': '/path/to/serverca',

+          }

+          self.session = Mock()

+ @@ -649,7 +648,7 @@ class TestLoginKojiSession(CommandTestCase):

+  

+          self.session.ssl_login.assert_called_once_with(

+              self.koji_config['cert'],

+ -            self.koji_config['ca'],

+ +            None,

+              self.koji_config['serverca'],

+              proxyuser=None,

+          )

+ 

file modified
+5 -1
@@ -1,6 +1,6 @@ 

  Name:           rpkg

  Version:        1.62

- Release:        2%{?dist}

+ Release:        3%{?dist}

  

  Summary:        Python library for interacting with rpm+git

  License:        GPLv2+ and LGPLv2
@@ -18,6 +18,7 @@ 

  # remove rpm-py-installer for now.

  Patch0:         remove-koji-and-rpm-py-installer-from-requires.patch

  Patch1:         0001-Do-not-use-pytest-related-dependencies-temporarily.patch

+ Patch2:         https://pagure.io/rpkg/pull-request/543.patch

  

  # RHEL7 is currently the only release that is built for Python 2.

  %if 0%{?fedora} || 0%{?rhel} > 7
@@ -236,6 +237,9 @@ 

  

  

  %changelog

+ * Wed Feb 24 2021 Sérgio Basto <sergio@serjux.com> - 1.62-3

+ - Quick fix for koji ssl auth and koji-1.24.0

+ 

  * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.62-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

  

no initial comment

Thanks for opening this, but I have already finished the patch. You can see all builds waiting in Bodhi for approval.

Pull-Request has been closed by onosek

3 years ago
Metadata