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
This commit is contained in:
parent
0d9aa63a3b
commit
d2348730ed
14
config.yaml
14
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}
|
||||
|
||||
@ -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