lorax: Add release license files to / of the iso
This commit is contained in:
parent
092c593d6b
commit
9fe59eed0b
@ -52,12 +52,12 @@ mkdir ${KERNELDIR}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Create optional product.img and updates.img
|
# Create optional product.img and updates.img
|
||||||
<% imggraft=""; images=["product", "updates"] %>
|
<% filegraft=""; images=["product", "updates"] %>
|
||||||
%for img in images:
|
%for img in images:
|
||||||
%if exists("%s/%s/" % (LORAXDIR, img)):
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
||||||
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
||||||
treeinfo images-${basearch} ${img}.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
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
@ -65,9 +65,15 @@ mkdir ${KERNELDIR}
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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"):
|
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
||||||
## make boot.iso
|
## make boot.iso
|
||||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||||
@ -75,6 +81,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
|
|||||||
-graft-points \
|
-graft-points \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
||||||
${efigraft} ${imggraft}
|
${efigraft} ${filegraft}
|
||||||
treeinfo images-${basearch} boot.iso images/boot.iso
|
treeinfo images-${basearch} boot.iso images/boot.iso
|
||||||
%endif
|
%endif
|
||||||
|
@ -52,7 +52,13 @@ treeinfo ${basearch} platforms ${platforms}
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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
|
## FIXME: ARM may need some extra boot config
|
||||||
|
@ -21,6 +21,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
|||||||
|
|
||||||
## Anaconda finds the CDROM device automatically
|
## Anaconda finds the CDROM device automatically
|
||||||
rootarg = ""
|
rootarg = ""
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
%>
|
%>
|
||||||
|
|
||||||
## Test ${runtime_img} to see if udf is needed
|
## Test ${runtime_img} to see if udf is needed
|
||||||
@ -93,12 +95,12 @@ install ${configdir}/mapping ${BOOTDIR}
|
|||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
# Create optional product.img and updates.img
|
# Create optional product.img and updates.img
|
||||||
<% imggraft=""; images=["product", "updates"] %>
|
<% filegraft=""; images=["product", "updates"] %>
|
||||||
%for img in images:
|
%for img in images:
|
||||||
%if exists("%s/%s/" % (LORAXDIR, img)):
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
||||||
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
||||||
treeinfo images-${basearch} ${img}.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
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
@ -106,9 +108,15 @@ install ${configdir}/mapping ${BOOTDIR}
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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
|
## make boot.iso
|
||||||
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
||||||
${prepboot} -part -hfs -T -r -l -J \
|
${prepboot} -part -hfs -T -r -l -J \
|
||||||
@ -120,7 +128,7 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
|||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
||||||
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
|
||||||
|
|
||||||
|
|
||||||
%for kernel in kernels:
|
%for kernel in kernels:
|
||||||
|
@ -14,6 +14,8 @@ isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
|||||||
|
|
||||||
## Anaconda finds the CDROM device automatically
|
## Anaconda finds the CDROM device automatically
|
||||||
rootarg = ""
|
rootarg = ""
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
%>
|
%>
|
||||||
|
|
||||||
## Test ${runtime_img} to see if udf is needed
|
## Test ${runtime_img} to see if udf is needed
|
||||||
@ -69,12 +71,12 @@ install ${configdir}/mapping ${BOOTDIR}
|
|||||||
|
|
||||||
mkdir images/
|
mkdir images/
|
||||||
# Create optional product.img and updates.img
|
# Create optional product.img and updates.img
|
||||||
<% imggraft=""; images=["product", "updates"] %>
|
<% filegraft=""; images=["product", "updates"] %>
|
||||||
%for img in images:
|
%for img in images:
|
||||||
%if exists("%s/%s/" % (LORAXDIR, img)):
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
||||||
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
||||||
treeinfo images-${basearch} ${img}.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
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
@ -82,9 +84,15 @@ mkdir images/
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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
|
## make boot.iso
|
||||||
runcmd mkisofs -v -U -J -R -T \
|
runcmd mkisofs -v -U -J -R -T \
|
||||||
-o ${outroot}/images/boot.iso \
|
-o ${outroot}/images/boot.iso \
|
||||||
@ -96,7 +104,7 @@ runcmd mkisofs -v -U -J -R -T \
|
|||||||
-no-desktop -allow-multidot ${udfargs} -graft-points \
|
-no-desktop -allow-multidot ${udfargs} -graft-points \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
${GRUBDIR}=${outroot}/${GRUBDIR} \
|
||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${imggraft}
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft}
|
||||||
|
|
||||||
%for kernel in kernels:
|
%for kernel in kernels:
|
||||||
treeinfo images-${kernel.arch} boot.iso images/boot.iso
|
treeinfo images-${kernel.arch} boot.iso images/boot.iso
|
||||||
|
@ -7,6 +7,8 @@ INITRD_ADDRESS="0x02000000"
|
|||||||
LORAXDIR="usr/share/lorax/"
|
LORAXDIR="usr/share/lorax/"
|
||||||
# The assumption seems to be that there is only one s390 kernel, ever
|
# The assumption seems to be that there is only one s390 kernel, ever
|
||||||
kernel = kernels[0]
|
kernel = kernels[0]
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
%>
|
%>
|
||||||
|
|
||||||
mkdir images
|
mkdir images
|
||||||
@ -36,12 +38,12 @@ treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm
|
|||||||
treeinfo images-${basearch} generic.ins generic.ins
|
treeinfo images-${basearch} generic.ins generic.ins
|
||||||
|
|
||||||
# Create optional product.img and updates.img
|
# Create optional product.img and updates.img
|
||||||
<% imggraft=""; images=["product", "updates"] %>
|
<% filegraft=""; images=["product", "updates"] %>
|
||||||
%for img in images:
|
%for img in images:
|
||||||
%if exists("%s/%s/" % (LORAXDIR, img)):
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
||||||
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
||||||
treeinfo images-${basearch} ${img}.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
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
@ -49,5 +51,11 @@ treeinfo images-${basearch} generic.ins generic.ins
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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
|
||||||
|
@ -93,7 +93,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Create optional product.img and updates.img
|
# Create optional product.img and updates.img
|
||||||
<% imggraft=""; images=["product", "updates"]; compressargs=None; %>
|
<% filegraft=""; images=["product", "updates"]; compressargs=None; %>
|
||||||
%if basearch == 'i386':
|
%if basearch == 'i386':
|
||||||
# Limit the amount of memory xz uses on i386
|
# Limit the amount of memory xz uses on i386
|
||||||
<% compressargs="--xz -9 --memlimit-compress=3700MiB" %>
|
<% compressargs="--xz -9 --memlimit-compress=3700MiB" %>
|
||||||
@ -102,7 +102,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
%if exists("%s/%s/" % (LORAXDIR, img)):
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
||||||
installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
|
installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img
|
||||||
treeinfo images-${basearch} ${img}.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
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
@ -110,9 +110,15 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
<%
|
<%
|
||||||
import os
|
import os
|
||||||
if os.path.exists(workdir + "/iso-graft"):
|
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
|
## make boot.iso
|
||||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
||||||
@ -122,6 +128,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
|
|||||||
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${efigraft} ${imggraft}
|
${efigraft} ${filegraft}
|
||||||
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
|
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
|
||||||
treeinfo images-${basearch} boot.iso images/boot.iso
|
treeinfo images-${basearch} boot.iso images/boot.iso
|
||||||
|
Loading…
Reference in New Issue
Block a user