Drop grafting variables

Just add them to the xorrisofs command, the order of the arguments is
interleaved and trying to assemble it from variables just makes it more
confusing.
This commit is contained in:
Brian C. Lane 2022-04-13 16:14:44 -07:00 committed by Stephen Gallagher
parent 3ec83abf28
commit 46ff4359f9
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11

View File

@ -26,15 +26,6 @@ else:
isoargs = "" isoargs = ""
%> %>
## configure grub2
mkdir ${GRUB2DIR}
install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
mkdir images mkdir images
install ${runtime_img} ${STAGE2IMG} install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage images/${runtime_base} treeinfo stage2 mainimage images/${runtime_base}
@ -66,18 +57,18 @@ mkdir ${KERNELDIR}
treeinfo images-xen initrd ${KERNELDIR}/initrd.img treeinfo images-xen initrd ${KERNELDIR}/initrd.img
%endif %endif
## configure grub2 config file
## BIOS setup mkdir ${GRUB2DIR}
<% install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
biosgraft = "boot=${outroot}/boot" replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
biosgraft += " ${GRUB2DIR}/i386-pc=${inroot}/usr/lib/grub/i386-pc" replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
biosgraft += " images/eltorito.img=${outroot}/images/eltorito.img" replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
%> replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
treeinfo images-${basearch} eltorito.img images/eltorito.img replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
## WHeeeeeeee, EFI. ## WHeeeeeeee, EFI.
<% efiargs=""; efigraft=""; efiarch32=None; efiarch64=None %> <% efiarch32=None; efiarch64=None %>
%if exists("boot/efi/EFI/*/gcdia32.efi"): %if exists("boot/efi/EFI/*/gcdia32.efi"):
<% efiarch32 = 'IA32' %> <% efiarch32 = 'IA32' %>
%endif %endif
@ -85,9 +76,6 @@ treeinfo images-${basearch} eltorito.img images/eltorito.img
<% efiarch64 = 'X64' %> <% efiarch64 = 'X64' %>
%endif %endif
%if (efiarch32 or efiarch64) and basearch != 'i386': %if (efiarch32 or efiarch64) and basearch != 'i386':
<%
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
%>
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/> <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/>
%endif %endif
@ -123,6 +111,7 @@ runcmd grub2-mkimage -O i386-pc-eltorito -d ${inroot}/usr/lib/grub/i386-pc \
-o ${outroot}/images/eltorito.img \ -o ${outroot}/images/eltorito.img \
-p /${GRUB2DIR} \ -p /${GRUB2DIR} \
iso9660 biosdisk iso9660 biosdisk
treeinfo images-${basearch} eltorito.img images/eltorito.img
## make boot.iso ## make boot.iso
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \ runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
@ -141,5 +130,9 @@ runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
.discinfo=${outroot}/.discinfo \ .discinfo=${outroot}/.discinfo \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${biosgraft} ${efigraft} ${filegraft} ${filegraft} \
${GRUB2DIR}=${outroot}/${GRUB2DIR} \
${GRUB2DIR}/i386-pc=${inroot}/usr/lib/grub/i386-pc \
images/eltorito.img=${outroot}/images/eltorito.img \
EFI/BOOT=${outroot}/EFI/BOOT
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso