diff --git a/config.yaml b/config.yaml index 99a5981..c4e1c1b 100644 --- a/config.yaml +++ b/config.yaml @@ -1,10 +1,10 @@ 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 + %define templatedir %{_datadir}/lorax/templates.d/ + %define almatemplatedir %{templatedir}/70-almalinux # AlmaLinux support and rebranding Patch1001: Add-x86_64_v2-support.patch @@ -15,11 +15,11 @@ 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 - placed in %{templatedir} + placed in %{templatedir}/80-rhel %package -n lorax-templates-almalinux Summary: AlmaLinux build templates for lorax and livemedia-creator @@ -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