commit 6625c70759cb5ec05acc2a3bab27cf4ba9eab72d
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Tue Feb 15 10:49:37 2022 +0000
add an fix to download of old sources with md5 hash
...dd-xorg-x11-drv-nvidia-470xx-to-multilibs.patch | 2 +-
...e-to-multilibs-because-is-an-i686-package.patch | 2 +-
...the-download-of-old-sources-with-md5-hash.patch | 47 ++++++++++++++++++++++
rfpkg.spec | 5 ++-
4 files changed, 53 insertions(+), 3 deletions(-)
---
diff --git a/0001-Add-xorg-x11-drv-nvidia-470xx-to-multilibs.patch
b/0001-Add-xorg-x11-drv-nvidia-470xx-to-multilibs.patch
index 7ac9155..30d5a52 100644
--- a/0001-Add-xorg-x11-drv-nvidia-470xx-to-multilibs.patch
+++ b/0001-Add-xorg-x11-drv-nvidia-470xx-to-multilibs.patch
@@ -1,7 +1,7 @@
From aff0a841d6e3237304326685fa2dea0054b0dba9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio(a)serjux.com>
Date: Sun, 31 Oct 2021 11:39:48 +0000
-Subject: [PATCH 1/2] Add xorg-x11-drv-nvidia-470xx to multilibs
+Subject: [PATCH 1/3] Add xorg-x11-drv-nvidia-470xx to multilibs
---
rfpkg/__init__.py | 3 ++-
diff --git a/0002-Add-unace-to-multilibs-because-is-an-i686-package.patch
b/0002-Add-unace-to-multilibs-because-is-an-i686-package.patch
index 509fa63..7dde58f 100644
--- a/0002-Add-unace-to-multilibs-because-is-an-i686-package.patch
+++ b/0002-Add-unace-to-multilibs-because-is-an-i686-package.patch
@@ -1,7 +1,7 @@
From 11f2c566d4513eac1303a4a38eff3418b442739e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio(a)serjux.com>
Date: Fri, 11 Feb 2022 23:20:56 +0000
-Subject: [PATCH 2/2] Add unace to multilibs because is an i686 package
+Subject: [PATCH 2/3] Add unace to multilibs because is an i686 package
---
rfpkg/__init__.py | 2 +-
diff --git a/0003-Fix-the-download-of-old-sources-with-md5-hash.patch
b/0003-Fix-the-download-of-old-sources-with-md5-hash.patch
new file mode 100644
index 0000000..e7a1d04
--- /dev/null
+++ b/0003-Fix-the-download-of-old-sources-with-md5-hash.patch
@@ -0,0 +1,47 @@
+From b1284ae05677e92391d115057316b32b0fd77f8f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio(a)serjux.com>
+Date: Mon, 14 Feb 2022 02:30:26 +0000
+Subject: [PATCH 3/3] Fix the download of old sources with md5 hash
+
+---
+ rfpkg/lookaside.py | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/rfpkg/lookaside.py b/rfpkg/lookaside.py
+index dbdca57..7e4a619 100644
+--- a/rfpkg/lookaside.py
++++ b/rfpkg/lookaside.py
+@@ -14,6 +14,7 @@ download path.
+ """
+
+
++import os
+ from pyrpkg.lookaside import CGILookasideCache
+
+
+@@ -24,10 +25,18 @@ class RPMFusionLookasideCache(CGILookasideCache):
+ hashtype, download_url, upload_url, client_cert=client_cert,
+ ca_cert=ca_cert)
+
++ self.download_path_md5 = (
++ namespace + '/%(name)s/%(filename)s/%(hash)s/%(filename)s')
++ self.download_path = (
++ namespace +
'/%(name)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s')
++
++ def get_download_url(self, name, filename, hash, hashtype=None, **kwargs):
++ path_dict = {'name': name, 'filename': filename,
++ 'hash': hash, 'hashtype': hashtype}
++ path_dict.update(kwargs)
+ if hashtype == 'md5':
+- self.download_path = (
+- namespace + '/%(name)s/%(filename)s/%(hash)s/%(filename)s')
++ path = self.download_path_md5 % path_dict
+ else:
+- self.download_path = (
+- namespace +
'/%(name)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s')
++ path = self.download_path % path_dict
++ return os.path.join(self.download_url, path)
+
+--
+2.34.1
+
diff --git a/rfpkg.spec b/rfpkg.spec
index c592019..8ae048c 100644
--- a/rfpkg.spec
+++ b/rfpkg.spec
@@ -5,7 +5,7 @@
Name: rfpkg
Version: 1.27.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: RPM Fusion utility for working with dist-git
License: GPLv2+
Group: Applications/System
@@ -141,6 +141,9 @@ nosetests
%changelog
+* Tue Feb 15 2022 Sérgio Basto <sergio(a)serjux.com> - 1.27.0-3
+- add an fix to download of old sources with md5 hash
+
* Sat Feb 12 2022 Sérgio Basto <sergio(a)serjux.com> - 1.27.0-2
- update target of 2 packages
Show replies by date