From 7627838352a27300d26b0d4d3a627c7e92b88a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Wed, 24 Jul 2024 10:23:50 +0200 Subject: [PATCH] SPEC: don't install repos suffixed with 'no-aux-key' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repository definitions suffixed with 'no-aux-key' were previously mistakenly installed in RPMs. Fix that. Signed-off-by: Tomáš Hozza --- osbuild-composer.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/osbuild-composer.spec b/osbuild-composer.spec index 5783c8428..26cee2a38 100644 --- a/osbuild-composer.spec +++ b/osbuild-composer.spec @@ -172,7 +172,9 @@ install -m 0644 -vp repositories/centos-stream-%{centos}* %{buildroot}% %if 0%{?rhel} # RHEL 10 supports building all RHEL versions %if 0%{?rhel} >= 10 -install -m 0644 -vp repositories/rhel-* %{buildroot}%{_datadir}/osbuild-composer/repositories/ +for REPO_FILE in $(ls repositories/rhel-* | grep -v 'no-aux-key'); do + install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE}) +done # RHEL-8 auxiliary key is signed using SHA-1, which is not enabled by default on RHEL-10 and later for REPO_FILE in $(ls repositories/rhel-8*-no-aux-key.json); do @@ -181,11 +183,15 @@ done %else # All other RHEL versions support building for the same version -install -m 0644 -vp repositories/rhel-%{rhel}* %{buildroot}%{_datadir}/osbuild-composer/repositories/ +for REPO_FILE in $(ls repositories/rhel-%{rhel}* | grep -v 'no-aux-key'); do + install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE}) +done # RHEL 9 supports building also for RHEL 8 %if 0%{?rhel} == 9 -install -m 0644 -vp repositories/rhel-8* %{buildroot}%{_datadir}/osbuild-composer/repositories/ +for REPO_FILE in $(ls repositories/rhel-8* | grep -v 'no-aux-key'); do + install -m 0644 -vp ${REPO_FILE} %{buildroot}%{_datadir}/osbuild-composer/repositories/$(basename ${REPO_FILE}) +done %endif %endif