Use xorrisofs instead of mkisofs

Update the templates to use xorrisofs, require the newer version of
syslinux and syslinux-nonlinux.

This closes issue #326
This commit is contained in:
Brian C. Lane 2018-04-26 09:52:07 -07:00
parent e4fe1aab32
commit 2a3c41e1ce
9 changed files with 30 additions and 91 deletions

View File

@ -137,7 +137,7 @@ on the architecture that the iso is being created for. They are also stored in
configuration template files, configuration variable substitution, treeinfo configuration template files, configuration variable substitution, treeinfo
metadata (via the :func:`treeinfo <pylorax.ltmpl.LoraxTemplateRunner.treeinfo>` metadata (via the :func:`treeinfo <pylorax.ltmpl.LoraxTemplateRunner.treeinfo>`
template command). Kernel and initrd are copied from the installroot to their template command). Kernel and initrd are copied from the installroot to their
final locations and then mkisofs is run to create the boot.iso final locations and then xorrisofs is run to create the boot.iso
Custom Templates Custom Templates

View File

@ -27,7 +27,7 @@ Requires: dosfstools
Requires: e2fsprogs Requires: e2fsprogs
Requires: findutils Requires: findutils
Requires: gawk Requires: gawk
Requires: genisoimage Requires: xorrisofs
Requires: glib2 Requires: glib2
Requires: glibc Requires: glibc
Requires: glibc-common Requires: glibc-common
@ -59,7 +59,8 @@ Requires: hfsplus-tools
%endif %endif
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
Requires: syslinux >= 6.02-4 Requires: syslinux >= 6.03-1
Requires: syslinux-nonlinux >= 6.03-1
%endif %endif
%ifarch ppc64le %ifarch ppc64le

View File

@ -9,16 +9,6 @@ LORAXDIR="usr/share/lorax/"
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir images mkdir images
install ${runtime_img} ${STAGE2IMG} install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage ${STAGE2IMG} treeinfo stage2 mainimage ${STAGE2IMG}
@ -77,8 +67,8 @@ mkdir ${KERNELDIR}
%if exists("boot/efi/EFI/*/gcdaa64.efi"): %if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ ${efiargs} -R -J -V '${isolabel}' \
-graft-points \ -graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \

View File

@ -15,16 +15,6 @@ delimiter = ''
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir images mkdir images
install ${runtime_img} ${STAGE2IMG} install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage ${STAGE2IMG} treeinfo stage2 mainimage ${STAGE2IMG}
@ -94,8 +84,8 @@ treeinfo ${basearch} platforms ${platforms}
%if exists("boot/efi/EFI/*/gcdarm.efi"): %if exists("boot/efi/EFI/*/gcdarm.efi"):
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ ${efiargs} -R -J -V '${isolabel}' \
-graft-points \ -graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \

View File

@ -15,16 +15,6 @@ isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir ${LIVEDIR} mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img install ${runtime_img} ${LIVEDIR}/squashfs.img
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
@ -83,8 +73,8 @@ mkdir ${KERNELDIR}
%if exists("boot/efi/EFI/*/gcdaa64.efi"): %if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ ${efiargs} -R -J -V '${isolabel}' \
-graft-points \ -graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \ ${LIVEDIR}=${outroot}/${LIVEDIR} \

View File

@ -17,16 +17,6 @@ isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir ${LIVEDIR} mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img install ${runtime_img} ${LIVEDIR}/squashfs.img
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
@ -69,7 +59,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif %endif
## WHeeeeeeee, EFI. ## WHeeeeeeee, EFI.
<% efiargs=""; efigraft=""; efihybrid=""; efiarch32=None; efiarch64=None %> <% efiargs=""; efigraft=""; efiarch32=None; efiarch64=None %>
%if exists("boot/efi/EFI/*/gcdia32.efi"): %if exists("boot/efi/EFI/*/gcdia32.efi"):
<% efiarch32 = 'IA32' %> <% efiarch32 = 'IA32' %>
%endif %endif
@ -79,18 +69,17 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if (efiarch32 or efiarch64) and basearch != 'i386': %if (efiarch32 or efiarch64) and basearch != 'i386':
<% <%
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
images = ["images/efiboot.img"] images = [("images/efiboot.img", "-isohybrid-gpt-basdat")]
if domacboot: if domacboot:
images.append("images/macboot.img") images.append(("images/macboot.img", "-isohybrid-gpt-hfsplus"))
%> %>
%for img in images: %for img, hybrid in images:
<% <%
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img) efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
efigraft += " {0}={1}/{0}".format(img,outroot) efigraft += " {0}={1}/{0}".format(img,outroot)
%> %>
treeinfo images-${basearch} ${img|basename} ${img} treeinfo images-${basearch} ${img|basename} ${img}
%endfor %endfor
<% efihybrid = "--uefi --mac" if domacboot else "--uefi" %>
<%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
@ -115,14 +104,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endfor %endfor
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \ -b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -boot-info-table -no-emul-boot \ -boot-load-size 4 -boot-info-table -no-emul-boot \
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ ${efiargs} -R -J -V '${isolabel}' \
-graft-points \ -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \ ${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \ ${LIVEDIR}=${outroot}/${LIVEDIR} \
${efigraft} ${filegraft} ${efigraft} ${filegraft}
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -15,16 +15,6 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir images mkdir images
install ${runtime_img} ${STAGE2IMG} install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage ${STAGE2IMG} treeinfo stage2 mainimage ${STAGE2IMG}
@ -90,14 +80,14 @@ install ${configdir}/mapping ${BOOTDIR}
%endfor %endfor
## make boot.iso ## make boot.iso
runcmd mkisofs -v -U -J -R -T \ runcmd xorrisofs -v -U -J -R \
-o ${outroot}/images/boot.iso \ -o ${outroot}/images/boot.iso \
-part -hfs -r -l -sysid PPC \ -part -hfs -r -l -sysid PPC \
-A "${product.name} ${product.version}" -V '${isolabel}' \ -A "${product.name} ${product.version}" -V '${isolabel}' \
-volset "${product.version}" -volset-size 1 -volset-seqno 1 \ -volset "${product.version}" -volset-size 1 -volset-seqno 1 \
-hfs-volid ${product.version} \ -hfs-volid ${product.version} \
-chrp-boot -map ${inroot}/${configdir}/mapping \ -chrp-boot -map ${inroot}/${configdir}/mapping \
-no-desktop -allow-multidot ${udfargs} -graft-points \ -no-desktop -allow-multidot -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \ ${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \ ${GRUBDIR}=${outroot}/${GRUBDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft} ${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}

View File

@ -68,10 +68,10 @@ runcmd mk-s390-cdboot -i ${outroot}/${KERNELDIR}/kernel.img \
-o ${outroot}/${BOOTDIR}/cdboot.img -o ${outroot}/${BOOTDIR}/cdboot.img
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
-b ${BOOTDIR}/cdboot.img -c ${BOOTDIR}/boot.cat \ -b ${BOOTDIR}/cdboot.img -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -no-emul-boot \ -boot-load-size 4 -no-emul-boot \
-R -J -V '${isolabel}' -T -graft-points \ -R -J -V '${isolabel}' -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \ ${BOOTDIR}=${outroot}/${BOOTDIR} \
${filegraft} ${filegraft}
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso

View File

@ -17,16 +17,6 @@ isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
from os.path import basename from os.path import basename
%> %>
## Test ${runtime_img} to see if udf is needed
<%
import os
from pylorax.sysutils import joinpaths
if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
udfargs = "-allow-limited-size"
else:
udfargs = ""
%>
mkdir images mkdir images
install ${runtime_img} ${STAGE2IMG} install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage images/${runtime_base} treeinfo stage2 mainimage images/${runtime_base}
@ -71,7 +61,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif %endif
## WHeeeeeeee, EFI. ## WHeeeeeeee, EFI.
<% efiargs=""; efigraft=""; efihybrid=""; efiarch32=None; efiarch64=None %> <% efiargs=""; efigraft=""; efiarch32=None; efiarch64=None %>
%if exists("boot/efi/EFI/*/gcdia32.efi"): %if exists("boot/efi/EFI/*/gcdia32.efi"):
<% efiarch32 = 'IA32' %> <% efiarch32 = 'IA32' %>
%endif %endif
@ -81,18 +71,17 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if (efiarch32 or efiarch64) and basearch != 'i386': %if (efiarch32 or efiarch64) and basearch != 'i386':
<% <%
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
images = ["images/efiboot.img"] images = [("images/efiboot.img", "-isohybrid-gpt-basdat")]
if domacboot: if domacboot:
images.append("images/macboot.img") images.append(("images/macboot.img", "-isohybrid-gpt-hfsplus"))
%> %>
%for img in images: %for img, hybrid in images:
<% <%
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img) efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
efigraft += " {0}={1}/{0}".format(img,outroot) efigraft += " {0}={1}/{0}".format(img,outroot)
%> %>
treeinfo images-${basearch} ${img|basename} ${img} treeinfo images-${basearch} ${img|basename} ${img}
%endfor %endfor
<% efihybrid = "--uefi --mac" if domacboot else "--uefi" %>
<%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
@ -124,14 +113,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endfor %endfor
## make boot.iso ## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \ runcmd xorrisofs -o ${outroot}/images/boot.iso \
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \ -b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -boot-info-table -no-emul-boot \ -boot-load-size 4 -boot-info-table -no-emul-boot \
${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ ${efiargs} -R -J -V '${isolabel}' \
-graft-points \ -graft-points \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${BOOTDIR}=${outroot}/${BOOTDIR} \ ${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \ ${KERNELDIR}=${outroot}/${KERNELDIR} \
${efigraft} ${filegraft} ${efigraft} ${filegraft}
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso