From d2348730ede520505ea970e929cdc5591c2bb964 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 3 Jun 2026 02:26:52 +0000 Subject: [PATCH 1/2] fix(autopatch): auto-fix for lorax-templates-rhel on c10s Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requires: lines --- config.yaml | 14 ++++++++------ scripts/lorax-templates-almalinux-requires.sh | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config.yaml b/config.yaml index 99a5981..d74e70c 100644 --- a/config.yaml +++ b/config.yaml @@ -1,7 +1,7 @@ actions: - replace: - target: "spec" - find: "%define templatedir %{_datadir}/lorax/templates.d/80-rhel" + find: "%define templatedir %{_datadir}/lorax/templates.d/" replace: | %define templatedir %{_datadir}/lorax/templates.d/80-rhel %define almatemplatedir %{_datadir}/lorax/templates.d/70-almalinux @@ -15,7 +15,7 @@ actions: find: | %description RHEL-specific Lorax templates for creating the boot.iso and live isos are - placed in %{templatedir} + placed in %{templatedir}/80-rhel replace: | %description RHEL-specific Lorax templates for creating the boot.iso and live isos are @@ -57,10 +57,12 @@ actions: - target: "spec" find: | mkdir -p $RPM_BUILD_ROOT/%{templatedir} - cp -a 80-rhel/* $RPM_BUILD_ROOT/%{templatedir} + cp -a 80-rhel $RPM_BUILD_ROOT/%{templatedir} + cp -a 70-64k $RPM_BUILD_ROOT/%{templatedir} replace: | mkdir -p $RPM_BUILD_ROOT/%{templatedir} - cp -a 80-rhel/* $RPM_BUILD_ROOT/%{templatedir} + cp -a 80-rhel $RPM_BUILD_ROOT/%{templatedir} + cp -a 70-64k $RPM_BUILD_ROOT/%{templatedir} # Install AlmaLinux templates mkdir -p $RPM_BUILD_ROOT/%{almatemplatedir} @@ -72,11 +74,11 @@ actions: find: | %files %dir %{templatedir} - %{templatedir}/* + %{templatedir}/80-rhel/* replace: | %files %dir %{templatedir} - %{templatedir}/* + %{templatedir}/80-rhel/* %files -n lorax-templates-almalinux %dir %{almatemplatedir} diff --git a/scripts/lorax-templates-almalinux-requires.sh b/scripts/lorax-templates-almalinux-requires.sh index b7ba677..6c1a7fb 100644 --- a/scripts/lorax-templates-almalinux-requires.sh +++ b/scripts/lorax-templates-almalinux-requires.sh @@ -5,5 +5,5 @@ set -e # Get the "Requires" from the lorax-templates-rhel.spec file (main package) # and replace the 'Requires: ' string for the lorax-templates-almalinux subpackage -requires=$(grep 'Requires:' lorax-templates-rhel.spec | grep -v '') +requires=$(grep 'Requires:' lorax-templates-rhel.spec | grep -v '' | head -1) sed -i "s/^Requires:.*/$requires/" lorax-templates-rhel.spec -- 2.47.3 From ce7767d04ae0c6dd8def7fb116da548cb996ec80 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 3 Jun 2026 11:29:51 +0300 Subject: [PATCH 2/2] Use templatedir in almatemplatedir var --- config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index d74e70c..c4e1c1b 100644 --- a/config.yaml +++ b/config.yaml @@ -3,8 +3,8 @@ actions: - target: "spec" find: "%define templatedir %{_datadir}/lorax/templates.d/" replace: | - %define templatedir %{_datadir}/lorax/templates.d/80-rhel - %define almatemplatedir %{_datadir}/lorax/templates.d/70-almalinux + %define templatedir %{_datadir}/lorax/templates.d/ + %define almatemplatedir %{templatedir}/70-almalinux # AlmaLinux support and rebranding Patch1001: Add-x86_64_v2-support.patch @@ -19,7 +19,7 @@ actions: replace: | %description RHEL-specific Lorax templates for creating the boot.iso and live isos are - placed in %{templatedir} + placed in %{templatedir}/80-rhel %package -n lorax-templates-almalinux Summary: AlmaLinux build templates for lorax and livemedia-creator -- 2.47.3