public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpkg] 1.70-1: Patch: follow redirects for lookaside
@ 2026-08-10 21:44 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-10 21:44 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpkg
            Branch : 1.70-1
            Commit : 8dfaf43a403be38c7320bf5b3042762463aebaca
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2022-08-18T12:51:46+00:00
            Stats  : +208/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpkg/c/8dfaf43a403be38c7320bf5b3042762463aebaca?branch=1.70-1

            Log:
            Patch: follow redirects for lookaside

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

---
diff --git a/0007-Repair-flake8-complaints.patch b/0007-Repair-flake8-complaints.patch
new file mode 100644
index 0000000..bf4fd14
--- /dev/null
+++ b/0007-Repair-flake8-complaints.patch
@@ -0,0 +1,159 @@
+From 0807e65b2a32689b0a756852191be931a2ff80e9 Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Thu, 18 Aug 2022 12:47:06 +0200
+Subject: [PATCH 1/2] Repair flake8 complaints
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py | 18 +++++++++---------
+ pyrpkg/cli.py      |  4 ++--
+ pyrpkg/utils.py    |  4 ++--
+ tests/test_cli.py  |  5 +++--
+ 4 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index 7084bdc..17388d7 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -370,7 +370,7 @@ class Commands(object):
+ 
+         if not self._branch_merge:
+             self.load_branch_merge()
+-        return(self._branch_merge)
++        return self._branch_merge
+ 
+     @branch_merge.setter
+     def branch_merge(self, value):
+@@ -519,7 +519,7 @@ class Commands(object):
+ 
+         if not self._localarch:
+             self.load_localarch()
+-        return(self._localarch)
++        return self._localarch
+ 
+     def load_localarch(self):
+         """Get the local arch as defined by rpm"""
+@@ -652,7 +652,7 @@ class Commands(object):
+         """This property ensures the rel attribute"""
+         if self._rel is None:
+             self.load_nameverrel()
+-        return(self._rel)
++        return self._rel
+ 
+     @property
+     def uses_autorelease(self):
+@@ -848,7 +848,7 @@ class Commands(object):
+ 
+         if not self._repo:
+             self.load_repo()
+-        return(self._repo)
++        return self._repo
+ 
+     def load_repo(self):
+         """Create a repo object from our path"""
+@@ -865,7 +865,7 @@ class Commands(object):
+ 
+         if not self._rpmdefines:
+             self.load_rpmdefines()
+-        return(self._rpmdefines)
++        return self._rpmdefines
+ 
+     def load_rpmdefines(self):
+         """Populate rpmdefines based on current active branch"""
+@@ -1143,7 +1143,7 @@ class Commands(object):
+         """This property ensures the ver attribute"""
+         if not self._ver:
+             self.load_nameverrel()
+-        return(self._ver)
++        return self._ver
+ 
+     @property
+     def mock_results_dir(self):
+@@ -1366,13 +1366,13 @@ class Commands(object):
+             # between FC5 and FC12 or so.  Nobody builds for that old
+             # anyway.
+             if int(re.search(r'\d+', self.distval).group()) < 6:
+-                return('md5')
++                return 'md5'
+         except Exception:
+             # An error here is OK, don't bother the user.
+             pass
+ 
+         # Fall back to the default hash type
+-        return(self.hashtype)
++        return self.hashtype
+ 
+     def _fetch_remotes(self):
+         self.log.debug('Fetching remotes')
+@@ -2876,7 +2876,7 @@ class Commands(object):
+         )
+ 
+         # Return the mess
+-        return(config)
++        return config
+ 
+     def _config_dir_other(self, config_dir, filenames=('site-defaults.cfg',
+                                                        'logging.ini')):
+diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
+index bffa561..2eaec52 100644
+--- a/pyrpkg/cli.py
++++ b/pyrpkg/cli.py
+@@ -198,7 +198,7 @@ class cliClient(object):
+ 
+         if not self._cmd:
+             self.load_cmd()
+-        return(self._cmd)
++        return self._cmd
+ 
+     def _get_bool_opt(self, opt, default=False):
+         try:
+@@ -2463,7 +2463,7 @@ class cliClient(object):
+             # if a scratch build modulemd was specified on the command line,
+             # it's OK if the SCM info can't be determined
+             if not modmd_path:
+-                raise(e)
++                raise e
+ 
+         auth_method, oidc_id_provider, oidc_client_id, oidc_client_secret, \
+             oidc_scopes = self.module_get_auth_config()
+diff --git a/pyrpkg/utils.py b/pyrpkg/utils.py
+index d3f7877..2d0e3ee 100644
+--- a/pyrpkg/utils.py
++++ b/pyrpkg/utils.py
+@@ -150,8 +150,8 @@ def make_koji_watch_tasks_handler(progname):
+         if not quiet:
+             tlist = ['%s: %s' % (t.str(), t.display_state(t.info))
+                      for t in tasks.values() if not t.is_done()]
+-            print("""Tasks still running. You can continue to watch with the '%s watch-task' command.
+-Running Tasks: %s""" % (progname, '\n'.join(tlist)))
++            print("Tasks still running. You can continue to watch with the '%s watch-task' command."
++                  "\nRunning Tasks: %s" % (progname, '\n'.join(tlist)))
+ 
+     # Save reference of the handler during first time use.
+     # It guarantees that the same object is always returned (it allows unittest to pass).
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index c532f71..dc7d648 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -68,7 +68,7 @@ KOJI_UNIQUE_PATH_REGEX = r'^cli-build/\d+\.\d+\.[a-zA-Z]+$'
+ 
+ 
+ def mock_get_rpm_package_name(self, rpm_file):
+-    return(os.path.basename(rpm_file)[:-len('.src.rpm')])
++    return os.path.basename(rpm_file)[:-len('.src.rpm')]
+ 
+ 
+ class MockLayout(layout.DistGitLayout):
+@@ -2224,7 +2224,8 @@ class TestPatch(CliTestCase):
+     @patch('os.rename')
+     @patch('os.path.isdir', return_value=True)
+     def test_rediff(self, isdir, rename):
+-        origin_diff = '''diff -up fedpkg-1.29/fedpkg/__init__.py.origin fedpkg-1.29/fedpkg/__init__.py
++        origin_diff = \
++            '''diff -up fedpkg-1.29/fedpkg/__init__.py.origin fedpkg-1.29/fedpkg/__init__.py
+ --- fedpkg-1.29/fedpkg/__init__.py.origin  2017-10-05 01:55:34.268488598 +0000
+ +++ fedpkg-1.29/fedpkg/__init__.py	2017-10-05 01:55:59.736947877 +0000
+ @@ -9,12 +9,12 @@
+-- 
+2.37.1
+

diff --git a/0008-follow-redirects-for-lookaside.patch b/0008-follow-redirects-for-lookaside.patch
new file mode 100644
index 0000000..5026e13
--- /dev/null
+++ b/0008-follow-redirects-for-lookaside.patch
@@ -0,0 +1,42 @@
+From 168c358667ca7d8527fd8061e98fb443a24dadc3 Mon Sep 17 00:00:00 2001
+From: Tomas Kopecek <tkopecek@redhat.com>
+Date: Thu, 18 Aug 2022 09:44:30 +0200
+Subject: [PATCH 2/2] follow redirects for lookaside
+
+Signed-off-by: Tomas Kopecek <tkopecek@redhat.com>
+---
+ pyrpkg/lookaside.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/lookaside.py b/pyrpkg/lookaside.py
+index 106fd0f..90f0f1e 100644
+--- a/pyrpkg/lookaside.py
++++ b/pyrpkg/lookaside.py
+@@ -173,7 +173,7 @@ class CGILookasideCache(object):
+             c.setopt(pycurl.WRITEDATA, f)
+             c.setopt(pycurl.LOW_SPEED_LIMIT, 1000)
+             c.setopt(pycurl.LOW_SPEED_TIME, 300)
+-
++            c.setopt(pycurl.FOLLOWLOCATION, 1)
+             try:
+                 c.perform()
+                 tstamp = c.getinfo(pycurl.INFO_FILETIME)
+@@ -226,6 +226,7 @@ class CGILookasideCache(object):
+             c.setopt(pycurl.URL, self.upload_url)
+             c.setopt(pycurl.WRITEFUNCTION, buf.write)
+             c.setopt(pycurl.HTTPPOST, post_data)
++            c.setopt(pycurl.FOLLOWLOCATION, 1)
+ 
+             if self.client_cert is not None:
+                 if os.path.exists(self.client_cert):
+@@ -314,6 +315,7 @@ class CGILookasideCache(object):
+             c.setopt(pycurl.PROGRESSFUNCTION, self.print_progress)
+             c.setopt(pycurl.WRITEFUNCTION, buf.write)
+             c.setopt(pycurl.HTTPPOST, post_data)
++            c.setopt(pycurl.FOLLOWLOCATION, 1)
+ 
+             if self.client_cert is not None:
+                 if os.path.exists(self.client_cert):
+-- 
+2.37.1
+

diff --git a/rpkg.spec b/rpkg.spec
index 8ecb3ff..8dac005 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
 Name:           rpkg
 Version:        1.64
-Release:        7%{?dist}
+Release:        8%{?dist}
 
 Summary:        Python library for interacting with rpm+git
 License:        GPLv2+ and LGPLv2
@@ -40,6 +40,8 @@ Patch3:         0003-Remove-Environment-Markers-syntax.patch
 Patch4:         0004-Add-custom-user-metadata-to-build-command.patch
 Patch5:         0005-Better-exit-code-for-connection-error.patch
 Patch6:         0006-add-background-option-for-container-build-which-allo.patch
+Patch7:         0007-Repair-flake8-complaints.patch
+Patch8:         0008-follow-redirects-for-lookaside.patch
 
 %description
 Python library for interacting with rpm+git
@@ -252,6 +254,10 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* Thu Aug 18 2022 Ondřej Nosek <onosek@redhat.com> - 1.64-8
+- Patch: Repair flake8 complaints
+- Patch: follow redirects for lookaside
+
 * Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.64-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-08-10 21:44 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:44 [rpms/rpkg] 1.70-1: Patch: follow redirects for lookaside 

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