livemedia-creator: Add release license files to / of the iso
This used to be handled by a %post section of the kickstart, but that
won't work with lmc, so do it in the template instead.
(cherry picked from commit c91278a17d
)
This commit is contained in:
parent
10e3ec0bac
commit
5b47874e58
@ -6,6 +6,8 @@ BOOTDIR="boot"
|
|||||||
KERNELDIR=PXEBOOTDIR
|
KERNELDIR=PXEBOOTDIR
|
||||||
LIVEDIR="LiveOS"
|
LIVEDIR="LiveOS"
|
||||||
LORAXDIR="usr/share/lorax/"
|
LORAXDIR="usr/share/lorax/"
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
%>
|
%>
|
||||||
|
|
||||||
mkdir ${LIVEDIR}
|
mkdir ${LIVEDIR}
|
||||||
@ -41,5 +43,10 @@ mkdir ${KERNELDIR}
|
|||||||
%endif
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
|
# Add the license files
|
||||||
|
%for f in glob("/usr/share/licenses/*-release/*"):
|
||||||
|
install ${f} ${f|basename}
|
||||||
|
%endfor
|
||||||
|
|
||||||
## FIXME: ARM may need some extra boot config
|
## FIXME: ARM may need some extra boot config
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ prepboot = ""
|
|||||||
## Instead we'll just replace any non-ASCII characters in the isolabel
|
## Instead we'll just replace any non-ASCII characters in the isolabel
|
||||||
## with '_', which means we won't need any udev escapes.
|
## with '_', which means we won't need any udev escapes.
|
||||||
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel)
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
%>
|
%>
|
||||||
|
|
||||||
## Test ${runtime_img} to see if udf is needed
|
## Test ${runtime_img} to see if udf is needed
|
||||||
@ -90,15 +92,21 @@ 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
|
||||||
|
|
||||||
|
# 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 \
|
||||||
@ -111,7 +119,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} \
|
||||||
${LIVEDIR}=${outroot}/${LIVEDIR} ${imggraft}
|
${LIVEDIR}=${outroot}/${LIVEDIR} ${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
|
||||||
@ -34,11 +36,17 @@ treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
@ -91,7 +91,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" %>
|
||||||
@ -100,10 +100,16 @@ 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
|
||||||
|
|
||||||
|
# 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 \
|
||||||
@ -113,6 +119,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
|
|||||||
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
${BOOTDIR}=${outroot}/${BOOTDIR} \
|
||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
${LIVEDIR}=${outroot}/${LIVEDIR} \
|
||||||
${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