lorax: Add release license files to / of the iso

This commit is contained in:
Brian C. Lane 2017-03-09 11:08:19 -08:00
parent 092c593d6b
commit 9fe59eed0b
6 changed files with 62 additions and 20 deletions

View File

@ -52,12 +52,12 @@ mkdir ${KERNELDIR}
%endif
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -65,9 +65,15 @@ mkdir ${KERNELDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
@ -75,6 +81,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
-graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${efigraft} ${imggraft}
${efigraft} ${filegraft}
treeinfo images-${basearch} boot.iso images/boot.iso
%endif

View File

@ -52,7 +52,13 @@ treeinfo ${basearch} platforms ${platforms}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## FIXME: ARM may need some extra boot config

View File

@ -21,6 +21,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
## Anaconda finds the CDROM device automatically
rootarg = ""
from os.path import basename
%>
## Test ${runtime_img} to see if udf is needed
@ -93,12 +95,12 @@ install ${configdir}/mapping ${BOOTDIR}
%endfor
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -106,9 +108,15 @@ install ${configdir}/mapping ${BOOTDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${prepboot} -part -hfs -T -r -l -J \
@ -120,7 +128,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
%for kernel in kernels:

View File

@ -14,6 +14,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
## Anaconda finds the CDROM device automatically
rootarg = ""
from os.path import basename
%>
## Test ${runtime_img} to see if udf is needed
@ -69,12 +71,12 @@ install ${configdir}/mapping ${BOOTDIR}
mkdir images/
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -82,9 +84,15 @@ mkdir images/
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -v -U -J -R -T \
-o ${outroot}/images/boot.iso \
@ -96,7 +104,7 @@ runcmd mkisofs -v -U -J -R -T \
-no-desktop -allow-multidot ${udfargs} -graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${GRUBDIR}=${outroot}/${GRUBDIR} \
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
%for kernel in kernels:
treeinfo images-${kernel.arch} boot.iso images/boot.iso

View File

@ -7,6 +7,8 @@ INITRD_ADDRESS="0x02000000"
LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
from os.path import basename
%>
mkdir images
@ -36,12 +38,12 @@ treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm
treeinfo images-${basearch} generic.ins generic.ins
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
<% filegraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -49,5 +51,11 @@ treeinfo images-${basearch} generic.ins generic.ins
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor

View File

@ -93,7 +93,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"]; compressargs=None; %>
<% filegraft=""; images=["product", "updates"]; compressargs=None; %>
%if basearch == 'i386':
# Limit the amount of memory xz uses on i386
<% compressargs="--xz -9 --memlimit-compress=3700MiB" %>
@ -102,7 +102,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
<% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
@ -110,9 +110,15 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
filegraft += " " + workdir + "/iso-graft"
%>
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
<% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
%endfor
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
@ -122,6 +128,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${efigraft} ${imggraft}
${efigraft} ${filegraft}
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
treeinfo images-${basearch} boot.iso images/boot.iso