forked from rpms/dnf-plugins-core
import dnf-plugins-core-4.0.21-6.el8
This commit is contained in:
parent
28fb7c3e3c
commit
3e70138712
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
|||||||
|
From ebacba86979d16cdb92ace9d7dc601a85c97b5db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Kadlcik <frostyx@email.cz>
|
||||||
|
Date: Tue, 12 Oct 2021 18:30:47 +0200
|
||||||
|
Subject: [PATCH] copr: don't traceback on empty lines in /etc/os-release
|
||||||
|
|
||||||
|
Fix RHBZ 1994944
|
||||||
|
---
|
||||||
|
plugins/copr.py | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/copr.py b/plugins/copr.py
|
||||||
|
index 4644495..8841f03 100644
|
||||||
|
--- a/plugins/copr.py
|
||||||
|
+++ b/plugins/copr.py
|
||||||
|
@@ -50,8 +50,13 @@ except ImportError:
|
||||||
|
with open('/etc/os-release') as os_release_file:
|
||||||
|
os_release_data = {}
|
||||||
|
for line in os_release_file:
|
||||||
|
- os_release_key, os_release_value = line.rstrip().split('=')
|
||||||
|
- os_release_data[os_release_key] = os_release_value.strip('"')
|
||||||
|
+ try:
|
||||||
|
+ os_release_key, os_release_value = line.rstrip().split('=')
|
||||||
|
+ os_release_data[os_release_key] = os_release_value.strip('"')
|
||||||
|
+ except ValueError:
|
||||||
|
+ # Skip empty lines and everything that is not a simple
|
||||||
|
+ # variable assignment
|
||||||
|
+ pass
|
||||||
|
return (os_release_data['NAME'], os_release_data['VERSION_ID'], None)
|
||||||
|
|
||||||
|
PLUGIN_CONF = 'copr'
|
||||||
|
--
|
||||||
|
libgit2 1.0.1
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From b60f27006cdbdd14fb480aa22610fcd32bfe41e5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marek Blaha <mblaha@redhat.com>
|
||||||
|
Date: Wed, 6 Oct 2021 13:40:55 +0200
|
||||||
|
Subject: [PATCH] reposync: Use fail_fast=False when downloading packages (RhBug:2009894)
|
||||||
|
|
||||||
|
= changelog =
|
||||||
|
msg: Reposync does not stop downloading packages on the first error
|
||||||
|
type: bugfix
|
||||||
|
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2009894
|
||||||
|
---
|
||||||
|
dnf-plugins-core.spec | 2 +-
|
||||||
|
plugins/reposync.py | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec
|
||||||
|
index 83ae6ae..cef836f 100644
|
||||||
|
--- a/dnf-plugins-core.spec
|
||||||
|
+++ b/dnf-plugins-core.spec
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.2.22}
|
||||||
|
+%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.9.2}
|
||||||
|
%global dnf_plugins_extra 2.0.0
|
||||||
|
%global hawkey_version 0.46.1
|
||||||
|
%global yum_utils_subpackage_name dnf-utils
|
||||||
|
diff --git a/plugins/reposync.py b/plugins/reposync.py
|
||||||
|
index 66c76a7..0ff936f 100644
|
||||||
|
--- a/plugins/reposync.py
|
||||||
|
+++ b/plugins/reposync.py
|
||||||
|
@@ -303,7 +303,7 @@ class RepoSyncCommand(dnf.cli.Command):
|
||||||
|
progress, 0)
|
||||||
|
payloads = [RPMPayloadLocation(pkg, progress, self.pkg_download_path(pkg))
|
||||||
|
for pkg in pkglist]
|
||||||
|
- base._download_remote_payloads(payloads, drpm, progress, None)
|
||||||
|
+ base._download_remote_payloads(payloads, drpm, progress, None, False)
|
||||||
|
|
||||||
|
def print_urls(self, pkglist):
|
||||||
|
for pkg in pkglist:
|
||||||
|
--
|
||||||
|
libgit2 1.0.1
|
||||||
|
|
101
SOURCES/0006-copr-migrate-all-calls-to-APIv3.patch
Normal file
101
SOURCES/0006-copr-migrate-all-calls-to-APIv3.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
From 54b7c5f91b4ad1db1f716f25cc7973ec7542f0d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Kadlcik <frostyx@email.cz>
|
||||||
|
Date: Tue, 12 Oct 2021 12:54:05 +0200
|
||||||
|
Subject: [PATCH] copr: migrate all calls to APIv3
|
||||||
|
|
||||||
|
In the latest Copr release we dropped all APIv1 code from frontend.
|
||||||
|
https://docs.pagure.org/copr.copr/release-notes/2021-10-01.html
|
||||||
|
|
||||||
|
Unfortunatelly we frogot to migrate DNF copr plugin to APIv3 and
|
||||||
|
therefore the following commands started failing with 404.
|
||||||
|
|
||||||
|
dnf copr search tests
|
||||||
|
dnf copr list --available-by-user frostyx
|
||||||
|
---
|
||||||
|
plugins/copr.py | 40 +++++++++++++++++-----------------------
|
||||||
|
1 file changed, 17 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/copr.py b/plugins/copr.py
|
||||||
|
index 8841f03..7fc6c6f 100644
|
||||||
|
--- a/plugins/copr.py
|
||||||
|
+++ b/plugins/copr.py
|
||||||
|
@@ -355,51 +355,45 @@ Bugzilla. In case of problems, contact the owner of this repository.
|
||||||
|
"Re-enable the project to fix this."))
|
||||||
|
|
||||||
|
def _list_user_projects(self, user_name):
|
||||||
|
- # http://copr.fedorainfracloud.org/api/coprs/ignatenkobrain/
|
||||||
|
- api_path = "/api/coprs/{}/".format(user_name)
|
||||||
|
- res = self.base.urlopen(self.copr_url + api_path, mode='w+')
|
||||||
|
+ # https://copr.fedorainfracloud.org/api_3/project/list?ownername=ignatenkobrain
|
||||||
|
+ api_path = "/api_3/project/list?ownername={0}".format(user_name)
|
||||||
|
+ url = self.copr_url + api_path
|
||||||
|
+ res = self.base.urlopen(url, mode='w+')
|
||||||
|
try:
|
||||||
|
json_parse = json.loads(res.read())
|
||||||
|
except ValueError:
|
||||||
|
raise dnf.exceptions.Error(
|
||||||
|
_("Can't parse repositories for username '{}'.")
|
||||||
|
.format(user_name))
|
||||||
|
self._check_json_output(json_parse)
|
||||||
|
section_text = _("List of {} coprs").format(user_name)
|
||||||
|
self._print_match_section(section_text)
|
||||||
|
- i = 0
|
||||||
|
- while i < len(json_parse["repos"]):
|
||||||
|
- msg = "{0}/{1} : ".format(user_name,
|
||||||
|
- json_parse["repos"][i]["name"])
|
||||||
|
- desc = json_parse["repos"][i]["description"]
|
||||||
|
- if not desc:
|
||||||
|
- desc = _("No description given")
|
||||||
|
+
|
||||||
|
+ for item in json_parse["items"]:
|
||||||
|
+ msg = "{0}/{1} : ".format(user_name, item["name"])
|
||||||
|
+ desc = item["description"] or _("No description given")
|
||||||
|
msg = self.base.output.fmtKeyValFill(ucd(msg), desc)
|
||||||
|
print(msg)
|
||||||
|
- i += 1
|
||||||
|
|
||||||
|
def _search(self, query):
|
||||||
|
- # http://copr.fedorainfracloud.org/api/coprs/search/tests/
|
||||||
|
- api_path = "/api/coprs/search/{}/".format(query)
|
||||||
|
- res = self.base.urlopen(self.copr_url + api_path, mode='w+')
|
||||||
|
+ # https://copr.fedorainfracloud.org/api_3/project/search?query=tests
|
||||||
|
+ api_path = "/api_3/project/search?query={}".format(query)
|
||||||
|
+ url = self.copr_url + api_path
|
||||||
|
+ res = self.base.urlopen(url, mode='w+')
|
||||||
|
try:
|
||||||
|
json_parse = json.loads(res.read())
|
||||||
|
except ValueError:
|
||||||
|
raise dnf.exceptions.Error(_("Can't parse search for '{}'."
|
||||||
|
).format(query))
|
||||||
|
self._check_json_output(json_parse)
|
||||||
|
section_text = _("Matched: {}").format(query)
|
||||||
|
self._print_match_section(section_text)
|
||||||
|
- i = 0
|
||||||
|
- while i < len(json_parse["repos"]):
|
||||||
|
- msg = "{0}/{1} : ".format(json_parse["repos"][i]["username"],
|
||||||
|
- json_parse["repos"][i]["coprname"])
|
||||||
|
- desc = json_parse["repos"][i]["description"]
|
||||||
|
- if not desc:
|
||||||
|
- desc = _("No description given.")
|
||||||
|
+
|
||||||
|
+ for item in json_parse["items"]:
|
||||||
|
+ msg = "{0} : ".format(item["full_name"])
|
||||||
|
+ desc = item["description"] or _("No description given.")
|
||||||
|
msg = self.base.output.fmtKeyValFill(ucd(msg), desc)
|
||||||
|
print(msg)
|
||||||
|
- i += 1
|
||||||
|
|
||||||
|
def _print_match_section(self, text):
|
||||||
|
formatted = self.base.output.fmtSection(text)
|
||||||
|
@@ -624,7 +618,7 @@ Bugzilla. In case of problems, contact the owner of this repository.
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _check_json_output(cls, json_obj):
|
||||||
|
- if json_obj["output"] != "ok":
|
||||||
|
+ if "error" in json_obj:
|
||||||
|
raise dnf.exceptions.Error("{}".format(json_obj["error"]))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
--
|
||||||
|
libgit2 1.0.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.2.22}
|
%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.7.0-5}
|
||||||
%global dnf_plugins_extra 2.0.0
|
%global dnf_plugins_extra 2.0.0
|
||||||
%global hawkey_version 0.46.1
|
%global hawkey_version 0.46.1
|
||||||
%global yum_utils_subpackage_name dnf-utils
|
%global yum_utils_subpackage_name dnf-utils
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
Name: dnf-plugins-core
|
Name: dnf-plugins-core
|
||||||
Version: 4.0.21
|
Version: 4.0.21
|
||||||
Release: 3%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Core Plugins for DNF
|
Summary: Core Plugins for DNF
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
||||||
@ -42,7 +42,9 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|||||||
Patch1: 0001-versionlock-Do-not-exclude-locked-obsoleters-RhBug1957280.patch
|
Patch1: 0001-versionlock-Do-not-exclude-locked-obsoleters-RhBug1957280.patch
|
||||||
Patch2: 0002-repomanage-Allow-running-only-with-metadata.patch
|
Patch2: 0002-repomanage-Allow-running-only-with-metadata.patch
|
||||||
Patch3: 0003-repomanage-Enhance-repomanage-documentation-RhBug1898293.patch
|
Patch3: 0003-repomanage-Enhance-repomanage-documentation-RhBug1898293.patch
|
||||||
Patch4: 0004-Update-translations.patch
|
Patch4: 0004-copr-dont-traceback-on-empty-lines-in-etcos-release.patch
|
||||||
|
Patch5: 0005-reposync-Use-fail_fastFalse-when-downloading-packages-RhBug2009894.patch
|
||||||
|
Patch6: 0006-copr-migrate-all-calls-to-APIv3.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -766,8 +768,15 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 13 2021 Marek Blaha <mblaha@redhat.com> - 4.0.21-3
|
* Tue Nov 23 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-6
|
||||||
- Translations update (RhBug:1961633)
|
- Increase dependency on dnf as it's required by reposync (RhBug:2023739)
|
||||||
|
|
||||||
|
* Fri Nov 12 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-5
|
||||||
|
- [copr] Migrate all calls to APIv3 (RhBug:2021821)
|
||||||
|
|
||||||
|
* Tue Nov 09 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-4
|
||||||
|
- [reposync] Don't stop downloading packages on the first error (RhBug:2009894)
|
||||||
|
- [copr] Fix traceback of copr search (RhBug:2019868)
|
||||||
|
|
||||||
* Tue Jul 27 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-2
|
* Tue Jul 27 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 4.0.21-2
|
||||||
- [versionlock] Locking obsoleted package does not make the obsoleter unavailable (RhBug:1957280)
|
- [versionlock] Locking obsoleted package does not make the obsoleter unavailable (RhBug:1957280)
|
||||||
|
Loading…
Reference in New Issue
Block a user