fix(autopatch): Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requ #1
20
config.yaml
20
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}
|
||||
|
||||
@ -5,5 +5,5 @@ set -e
|
||||
# Get the "Requires" from the lorax-templates-rhel.spec file (main package)
|
||||
# and replace the 'Requires: <Requires>' string for the lorax-templates-almalinux subpackage
|
||||
|
||||
requires=$(grep 'Requires:' lorax-templates-rhel.spec | grep -v '<Requires>')
|
||||
requires=$(grep 'Requires:' lorax-templates-rhel.spec | grep -v '<Requires>' | head -1)
|
||||
sed -i "s/^Requires:.*<Requires>/$requires/" lorax-templates-rhel.spec
|
||||
|
||||
Loading…
Reference in New Issue
Block a user