From fb6a99896b7ac7ae167c7f8e23a49e3dc39af137 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 30 Oct 2024 09:40:14 +0100 Subject: [PATCH] containers-common-0.60.2-9.el10 - ensure required configurations for RHEL10 is present - Resolves: RHEL-58990 Signed-off-by: Jindrich Novy --- containers-common.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/containers-common.spec b/containers-common.spec index 86901c8..944732b 100644 --- a/containers-common.spec +++ b/containers-common.spec @@ -40,7 +40,7 @@ Epoch: 5 # copr and koji builds. # If you're reading this on dist-git, the version is automatically filled in by Packit. Version: 0.60.2 -Release: 8%{?dist} +Release: 9%{?dist} License: Apache-2.0 BuildArch: noarch # for BuildRequires: go-md2man @@ -141,6 +141,25 @@ for i in docs/*.5.md; do done %install +ensure() { + if grep ^$2[[:blank:]].*= $1 > /dev/null + then + sed -i "s;^$2[[:blank:]]=.*;$2 = $3;" $1 + else + if grep ^\#.*$2[[:blank:]].*= $1 > /dev/null + then + sed -i "/^#.*$2[[:blank:]].*=/a \ +$2 = $3" $1 + else + echo "$2 = $3" >> $1 + fi + fi +} + +# ensure required configurations for RHEL10 is present +ensure pkg/config/containers.conf runtime \"crun\" +ensure pkg/config/containers.conf log_driver \"file\" + # install config and policy files for registries install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,systemd} install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore @@ -230,6 +249,10 @@ ln -s ../../../..%{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/ %files extra %changelog +* Wed Oct 30 2024 Jindrich Novy - 5:0.60.2-9 +- ensure required configurations for RHEL10 is present +- Resolves: RHEL-58990 + * Tue Oct 29 2024 Troy Dawson - 5:0.60.2-8 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018