import osbuild-27.3-2.el8_4

This commit is contained in:
CentOS Sources 2021-11-02 06:35:42 -04:00 committed by Stepan Oksanichenko
parent 83e4dab508
commit 5e0cdc9351
4 changed files with 57 additions and 6 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/osbuild-27.2.tar.gz
SOURCES/osbuild-27.3.tar.gz

View File

@ -1 +1 @@
781efd5f4d96e25059c002a7e998429b9d682d03 SOURCES/osbuild-27.2.tar.gz
4cf2b90685fb283a0f7972a5be48ab1bdb94376b SOURCES/osbuild-27.3.tar.gz

View File

@ -0,0 +1,43 @@
From 815bc8d1bf8f0811d7583ffeebfad463cb481354 Mon Sep 17 00:00:00 2001
From: Sanne Raymaekers <sanne.raymaekers@gmail.com>
Date: Fri, 3 Sep 2021 19:27:10 +0200
Subject: [PATCH] util/rhsm: Check if repositories is None before iterating
When `get_fallback_rhsm_secrets` was used, `Subscriptions.repositories`
was None, and `get_secrets` never returned the fallback secrets.
So check if `repositories` is None before
iterating over it, otherwise return the fallback secrets.
---
osbuild/util/rhsm.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/osbuild/util/rhsm.py b/osbuild/util/rhsm.py
index 21a2d50..3ab1729 100644
--- a/osbuild/util/rhsm.py
+++ b/osbuild/util/rhsm.py
@@ -93,13 +93,14 @@ class Subscriptions:
def get_secrets(self, url):
# Try to find a matching URL from redhat.repo file first
- for parameters in self.repositories.values():
- if parameters["matchurl"].match(url) is not None:
- return {
- "ssl_ca_cert": parameters["sslcacert"],
- "ssl_client_key": parameters["sslclientkey"],
- "ssl_client_cert": parameters["sslclientcert"]
- }
+ if self.repositories is not None:
+ for parameters in self.repositories.values():
+ if parameters["matchurl"].match(url) is not None:
+ return {
+ "ssl_ca_cert": parameters["sslcacert"],
+ "ssl_client_key": parameters["sslclientkey"],
+ "ssl_client_cert": parameters["sslclientcert"]
+ }
# In case there is no matching URL, try the fallback
if self.secrets:
--
2.21.1 (Apple Git-122.3)

View File

@ -1,7 +1,7 @@
%global forgeurl https://github.com/osbuild/osbuild
%global selinuxtype targeted
Version: 27.2
Version: 27.3
%forgemeta
@ -9,12 +9,13 @@ Version: 27.2
%global pkgdir %{_prefix}/lib/%{pypi_name}
Name: %{pypi_name}
Release: 1%{?dist}
Release: 2%{?dist}
License: ASL 2.0
URL: %{forgeurl}
Source0: %{forgesource}
Patch0: 0001-util-rhsm-Check-if-repositories-is-None-before-itera.patch
BuildArch: noarch
Summary: A build system for OS images
@ -56,10 +57,8 @@ Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
# /usr/bin/python3 is present so stages and assemblers can be run.
%global __brp_mangle_shebangs_exclude_from ^%{pkgdir}/(assemblers|runners|stages)/.*$
%{?python_enable_dependency_generator}
%description
A build system for OS images
@ -94,6 +93,7 @@ containers it uses to build OS artifacts.
%prep
%forgesetup
%patch0 -p1
%build
%py3_build
@ -190,6 +190,14 @@ fi
%changelog
* Tue Sep 07 2021 Martin Sehnoutka <msehnout@redhat.com> - 27.3-2
- Patch a bug in the RHSM util module
* Tue Aug 24 2021 Martin Sehnoutka <msehnout@redhat.com> - 27.3-1
- Upstream release 27.3
- New algorithm for getting RHSM secrets from the host system
which supports multiple entitlements at the same time.
* Thu Apr 8 2021 Christian Kellner <ckellner@redhat.com> - 27.2-1
- Upstream release 27.2.
- Support for explicitly selecting the qcow2 version.