mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-16 05:11:31 +00:00
Import patches-unapplied version 2.440 to ubuntu/zesty-proposed
Imported using git-ubuntu import. Changelog parent: 26909642e9b4b01f59c80a9933ed98a15f8184bf New changelog entries: [ Steve Langasek ] * live-build/ubuntu-cpc/functions: don't call sleep as part of umount_settle; udevadm settle is synchronous and there's no reason to sleep after it. * live-build/ubuntu-cpc/functions: umount_partition: don't call umount_settle for each submount; just unmount them one by one and settle at the end. * Support passing IMAGE_TARGETS in the environment, to limit which images are output as part of a build; particularly useful for ubuntu-cpc builds which output multiple image types. [ Nishanth Aravamudan ] * live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI Initiator Name at first iscsid run for cloud images to ensure it is unique (LP: #1444992). [ Brian Murray ] * Fix the OVF's metadata to include Ubuntu specific identifiers and descriptions instead of the generic Linux ones. Thanks to Chris Glass. (LP: #1656293) * Add replace_grub_root_with_label function thereby consolidating multiple uses of the same calls to sed. Thanks to Dan Watkins. [ Adam Conrad ] * Set device_tree_address for the new kernel in the RPi bootloader config.txt
This commit is contained in:
parent
26909642e9
commit
2ac1eda867
30
debian/changelog
vendored
30
debian/changelog
vendored
@ -1,3 +1,33 @@
|
|||||||
|
livecd-rootfs (2.440) zesty; urgency=medium
|
||||||
|
|
||||||
|
[ Steve Langasek ]
|
||||||
|
* live-build/ubuntu-cpc/functions: don't call sleep as part of
|
||||||
|
umount_settle; udevadm settle is synchronous and there's no reason to
|
||||||
|
sleep after it.
|
||||||
|
* live-build/ubuntu-cpc/functions: umount_partition: don't call
|
||||||
|
umount_settle for each submount; just unmount them one by one and
|
||||||
|
settle at the end.
|
||||||
|
* Support passing IMAGE_TARGETS in the environment, to limit which images
|
||||||
|
are output as part of a build; particularly useful for ubuntu-cpc builds
|
||||||
|
which output multiple image types.
|
||||||
|
|
||||||
|
[ Nishanth Aravamudan ]
|
||||||
|
* live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot: generate iSCSI
|
||||||
|
Initiator Name at first iscsid run for cloud images to ensure it is
|
||||||
|
unique (LP: #1444992).
|
||||||
|
|
||||||
|
[ Brian Murray ]
|
||||||
|
* Fix the OVF's metadata to include Ubuntu specific identifiers and
|
||||||
|
descriptions instead of the generic Linux ones. Thanks to Chris Glass.
|
||||||
|
(LP: #1656293)
|
||||||
|
* Add replace_grub_root_with_label function thereby consolidating multiple
|
||||||
|
uses of the same calls to sed. Thanks to Dan Watkins.
|
||||||
|
|
||||||
|
[ Adam Conrad ]
|
||||||
|
* Set device_tree_address for the new kernel in the RPi bootloader config.txt
|
||||||
|
|
||||||
|
-- Adam Conrad <adconrad@ubuntu.com> Thu, 23 Mar 2017 11:39:22 -0600
|
||||||
|
|
||||||
livecd-rootfs (2.439) zesty; urgency=medium
|
livecd-rootfs (2.439) zesty; urgency=medium
|
||||||
|
|
||||||
* Fix the manifest generation in OVA files so that ovf files don't have
|
* Fix the manifest generation in OVA files so that ovf files don't have
|
||||||
|
@ -641,6 +641,7 @@ cat > /boot/firmware/config.txt << EOM
|
|||||||
# Some settings may impact device functionality. See link above for details
|
# Some settings may impact device functionality. See link above for details
|
||||||
|
|
||||||
kernel=uboot.bin
|
kernel=uboot.bin
|
||||||
|
device_tree_address=0x02000000
|
||||||
|
|
||||||
# enable i2c
|
# enable i2c
|
||||||
dtparam=i2c_arm=on
|
dtparam=i2c_arm=on
|
||||||
|
@ -115,7 +115,6 @@ umount_settle() {
|
|||||||
# Unmount device, and let it settle
|
# Unmount device, and let it settle
|
||||||
umount $1
|
umount $1
|
||||||
udevadm settle
|
udevadm settle
|
||||||
sleep 3
|
|
||||||
}
|
}
|
||||||
|
|
||||||
umount_partition() {
|
umount_partition() {
|
||||||
@ -123,9 +122,10 @@ umount_partition() {
|
|||||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||||
for submnt in proc sys dev/pts dev tmp;
|
for submnt in proc sys dev/pts dev tmp;
|
||||||
do
|
do
|
||||||
umount_settle $mountpoint/$submnt
|
umount $mountpoint/$submnt
|
||||||
done
|
done
|
||||||
umount_settle $mountpoint
|
umount $mountpoint
|
||||||
|
udevadm settle
|
||||||
|
|
||||||
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
||||||
# buildd's don't have /etc/mtab symlinked
|
# buildd's don't have /etc/mtab symlinked
|
||||||
@ -249,4 +249,11 @@ convert_to_qcow2() {
|
|||||||
qemu-img info "$destination"
|
qemu-img info "$destination"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
replace_grub_root_with_label() {
|
||||||
|
# When update-grub is run, it will detect the disks in the build system.
|
||||||
|
# Instead, we want grub to use the cloudimg-rootfs labelled disk
|
||||||
|
CHROOT_ROOT="$1"
|
||||||
|
|
||||||
|
sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \
|
||||||
|
"$CHROOT_ROOT/boot/grub/grub.cfg"
|
||||||
|
}
|
||||||
|
@ -3,6 +3,15 @@
|
|||||||
#
|
#
|
||||||
# Generate a squashfs root and manifest
|
# Generate a squashfs root and manifest
|
||||||
|
|
||||||
|
case $IMAGE_TARGETS in
|
||||||
|
""|*squashfs*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping squashfs build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -n "$SUBARCH" ]; then
|
if [ -n "$SUBARCH" ]; then
|
||||||
echo "Skipping rootfs build for subarch flavor build"
|
echo "Skipping rootfs build for subarch flavor build"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -105,7 +105,7 @@ EOF
|
|||||||
|
|
||||||
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
||||||
chroot mountpoint update-grub
|
chroot mountpoint update-grub
|
||||||
sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
|
replace_grub_root_with_label mountpoint
|
||||||
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
|
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
|
||||||
|
|
||||||
chroot mountpoint apt-get -y clean
|
chroot mountpoint apt-get -y clean
|
||||||
|
@ -52,7 +52,7 @@ EOF
|
|||||||
|
|
||||||
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
||||||
chroot mountpoint update-grub
|
chroot mountpoint update-grub
|
||||||
sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
|
replace_grub_root_with_label mountpoint
|
||||||
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
|
chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
|
||||||
|
|
||||||
umount_partition mountpoint
|
umount_partition mountpoint
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
case $IMAGE_TARGETS in
|
||||||
|
""|*qcow2*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping qcow2 image build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $ARCH:$SUBARCH in
|
case $ARCH:$SUBARCH in
|
||||||
# Not sure if any other cloud images use subarch for something that
|
# Not sure if any other cloud images use subarch for something that
|
||||||
# should take qcow2 format, so only skipping this on raspi2 for now.
|
# should take qcow2 format, so only skipping this on raspi2 for now.
|
||||||
|
@ -9,6 +9,15 @@ case $ARCH in
|
|||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case ${IMAGE_TARGETS:-} in
|
||||||
|
""|*vmdk*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping VMDK image build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
. /build/config/functions
|
. /build/config/functions
|
||||||
|
|
||||||
if [ -e binary/boot/disk-uefi.ext4 ]; then
|
if [ -e binary/boot/disk-uefi.ext4 ]; then
|
||||||
|
@ -9,11 +9,33 @@
|
|||||||
#
|
#
|
||||||
# For this step, we re-use the VMDK's made in 040-vmdk-image.binary
|
# For this step, we re-use the VMDK's made in 040-vmdk-image.binary
|
||||||
|
|
||||||
|
|
||||||
|
# Switch on $ARCH to determine which ID and description to use in the produced
|
||||||
|
# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
|
||||||
|
# well use them.
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
amd64|i386) ;;
|
amd64)
|
||||||
*) echo "OVA images are not supported for $ARCH yet.";
|
ovf_id=94
|
||||||
exit 0;;
|
ovf_os_type="ubuntu64Guest"
|
||||||
|
ovf_desc_bits=64 ;;
|
||||||
|
i386)
|
||||||
|
ovf_id=93
|
||||||
|
ovf_os_type="ubuntu32Guest"
|
||||||
|
ovf_desc_bits=32 ;;
|
||||||
|
*)
|
||||||
|
echo "OVA images are not supported for $ARCH yet.";
|
||||||
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case ${IMAGE_TARGETS:-} in
|
||||||
|
""|*vmdk*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping OVA image build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cur_d=${PWD}
|
cur_d=${PWD}
|
||||||
my_d=$(dirname $(readlink -f ${0}))
|
my_d=$(dirname $(readlink -f ${0}))
|
||||||
|
|
||||||
@ -57,7 +79,10 @@ sed -i "${ovf}" \
|
|||||||
-e "s/@@NUM_CPUS@@/2/g" \
|
-e "s/@@NUM_CPUS@@/2/g" \
|
||||||
-e "s/@@VERSION@@/${version}/g" \
|
-e "s/@@VERSION@@/${version}/g" \
|
||||||
-e "s/@@DATE@@/${serial_stamp}/g" \
|
-e "s/@@DATE@@/${serial_stamp}/g" \
|
||||||
-e "s/@@MEM_SIZE@@/1024/g"
|
-e "s/@@MEM_SIZE@@/1024/g" \
|
||||||
|
-e "s/@@OVF_ID@@/${ovf_id}/g" \
|
||||||
|
-e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
|
||||||
|
-e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
|
||||||
|
|
||||||
# Get the checksums
|
# Get the checksums
|
||||||
vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1)
|
vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1)
|
||||||
|
@ -15,14 +15,33 @@
|
|||||||
# some packages in it, convert it to a vmdk, and then assemble the vagrant
|
# some packages in it, convert it to a vmdk, and then assemble the vagrant
|
||||||
# box.
|
# box.
|
||||||
|
|
||||||
|
case $IMAGE_TARGETS in
|
||||||
|
""|*vagrant*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping Vagrant image build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cur_d=${PWD}
|
cur_d=${PWD}
|
||||||
my_d=$(dirname $(readlink -f ${0}))
|
my_d=$(dirname $(readlink -f ${0}))
|
||||||
|
|
||||||
|
# Switch on $ARCH to determine which ID and description to use in the produced
|
||||||
|
# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
|
||||||
|
# well use them.
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
amd64|i386) ;;
|
amd64)
|
||||||
*)
|
ovf_id=94
|
||||||
echo "Vagrant images are not supported for $ARCH"
|
ovf_os_type="ubuntu64Guest"
|
||||||
exit 0
|
ovf_desc_bits=64 ;;
|
||||||
|
i386)
|
||||||
|
ovf_id=93
|
||||||
|
ovf_os_type="ubuntu32Guest"
|
||||||
|
ovf_desc_bits=32 ;;
|
||||||
|
*)
|
||||||
|
echo "Vagrant images are not supported for $ARCH yet."
|
||||||
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
. /build/config/functions
|
. /build/config/functions
|
||||||
@ -172,7 +191,10 @@ sed -i "${ovf}" \
|
|||||||
-e "s/@@NUM_CPUS@@/2/g" \
|
-e "s/@@NUM_CPUS@@/2/g" \
|
||||||
-e "s/@@VERSION@@/${version}/g" \
|
-e "s/@@VERSION@@/${version}/g" \
|
||||||
-e "s/@@DATE@@/${serial_stamp}/g" \
|
-e "s/@@DATE@@/${serial_stamp}/g" \
|
||||||
-e "s/@@MEM_SIZE@@/1024/g"
|
-e "s/@@MEM_SIZE@@/1024/g" \
|
||||||
|
-e "s/@@OVF_ID@@/${ovf_id}/g" \
|
||||||
|
-e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
|
||||||
|
-e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
|
||||||
|
|
||||||
ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1)
|
ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1)
|
||||||
|
|
||||||
|
9
live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot
Executable file
9
live-build/ubuntu-cpc/hooks/061-open-iscsi.chroot
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Set InitiatorName to be runtime generated when iscsid first starts, so
|
||||||
|
# that each cloud image gets a unique value
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -f /etc/iscsi/initiatorname.iscsi ]; then
|
||||||
|
echo "GenerateName=yes" > /etc/iscsi/initiatorname.iscsi
|
||||||
|
fi
|
@ -18,8 +18,9 @@
|
|||||||
<VirtualSystem ovf:id="@@NAME@@">
|
<VirtualSystem ovf:id="@@NAME@@">
|
||||||
<Info>A virtual machine</Info>
|
<Info>A virtual machine</Info>
|
||||||
<Name>@@NAME@@</Name>
|
<Name>@@NAME@@</Name>
|
||||||
<OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest">
|
<OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
|
||||||
<Info>The kind of installed guest operating system</Info>
|
<Info>The kind of installed guest operating system</Info>
|
||||||
|
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
|
||||||
</OperatingSystemSection>
|
</OperatingSystemSection>
|
||||||
|
|
||||||
<ProductSection ovf:required="false">
|
<ProductSection ovf:required="false">
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
<VirtualSystem ovf:id="@@NAME@@">
|
<VirtualSystem ovf:id="@@NAME@@">
|
||||||
<Info>A virtual machine</Info>
|
<Info>A virtual machine</Info>
|
||||||
<Name>@@NAME@@</Name>
|
<Name>@@NAME@@</Name>
|
||||||
<OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest">
|
<OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
|
||||||
<Info>The kind of installed guest operating system</Info>
|
<Info>The kind of installed guest operating system</Info>
|
||||||
|
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
|
||||||
</OperatingSystemSection>
|
</OperatingSystemSection>
|
||||||
|
|
||||||
<ProductSection ovf:required="false">
|
<ProductSection ovf:required="false">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user