mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-14 06:38:28 +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
|
||||
|
||||
* 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
|
||||
|
||||
kernel=uboot.bin
|
||||
device_tree_address=0x02000000
|
||||
|
||||
# enable i2c
|
||||
dtparam=i2c_arm=on
|
||||
|
@ -115,7 +115,6 @@ umount_settle() {
|
||||
# Unmount device, and let it settle
|
||||
umount $1
|
||||
udevadm settle
|
||||
sleep 3
|
||||
}
|
||||
|
||||
umount_partition() {
|
||||
@ -123,9 +122,10 @@ umount_partition() {
|
||||
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
|
||||
for submnt in proc sys dev/pts dev tmp;
|
||||
do
|
||||
umount_settle $mountpoint/$submnt
|
||||
umount $mountpoint/$submnt
|
||||
done
|
||||
umount_settle $mountpoint
|
||||
umount $mountpoint
|
||||
udevadm settle
|
||||
|
||||
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then
|
||||
# buildd's don't have /etc/mtab symlinked
|
||||
@ -249,4 +249,11 @@ convert_to_qcow2() {
|
||||
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
|
||||
|
||||
case $IMAGE_TARGETS in
|
||||
""|*squashfs*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping squashfs build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$SUBARCH" ]; then
|
||||
echo "Skipping rootfs build for subarch flavor build"
|
||||
exit 0
|
||||
|
@ -105,7 +105,7 @@ EOF
|
||||
|
||||
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
||||
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 apt-get -y clean
|
||||
|
@ -52,7 +52,7 @@ EOF
|
||||
|
||||
chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
|
||||
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
|
||||
|
||||
umount_partition mountpoint
|
||||
|
@ -1,5 +1,14 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
case $IMAGE_TARGETS in
|
||||
""|*qcow2*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping qcow2 image build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
case $ARCH:$SUBARCH in
|
||||
# Not sure if any other cloud images use subarch for something that
|
||||
# should take qcow2 format, so only skipping this on raspi2 for now.
|
||||
|
@ -9,6 +9,15 @@ case $ARCH in
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
case ${IMAGE_TARGETS:-} in
|
||||
""|*vmdk*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping VMDK image build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /build/config/functions
|
||||
|
||||
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
|
||||
|
||||
|
||||
# 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
|
||||
amd64|i386) ;;
|
||||
*) echo "OVA images are not supported for $ARCH yet.";
|
||||
exit 0;;
|
||||
amd64)
|
||||
ovf_id=94
|
||||
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
|
||||
|
||||
case ${IMAGE_TARGETS:-} in
|
||||
""|*vmdk*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping OVA image build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
cur_d=${PWD}
|
||||
my_d=$(dirname $(readlink -f ${0}))
|
||||
|
||||
@ -57,7 +79,10 @@ sed -i "${ovf}" \
|
||||
-e "s/@@NUM_CPUS@@/2/g" \
|
||||
-e "s/@@VERSION@@/${version}/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
|
||||
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
|
||||
# box.
|
||||
|
||||
case $IMAGE_TARGETS in
|
||||
""|*vagrant*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping Vagrant image build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
cur_d=${PWD}
|
||||
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
|
||||
amd64|i386) ;;
|
||||
*)
|
||||
echo "Vagrant images are not supported for $ARCH"
|
||||
exit 0
|
||||
amd64)
|
||||
ovf_id=94
|
||||
ovf_os_type="ubuntu64Guest"
|
||||
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
|
||||
|
||||
. /build/config/functions
|
||||
@ -172,7 +191,10 @@ sed -i "${ovf}" \
|
||||
-e "s/@@NUM_CPUS@@/2/g" \
|
||||
-e "s/@@VERSION@@/${version}/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)
|
||||
|
||||
|
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@@">
|
||||
<Info>A virtual machine</Info>
|
||||
<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>
|
||||
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
|
||||
</OperatingSystemSection>
|
||||
|
||||
<ProductSection ovf:required="false">
|
||||
|
@ -16,8 +16,9 @@
|
||||
<VirtualSystem ovf:id="@@NAME@@">
|
||||
<Info>A virtual machine</Info>
|
||||
<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>
|
||||
<Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
|
||||
</OperatingSystemSection>
|
||||
|
||||
<ProductSection ovf:required="false">
|
||||
|
Loading…
x
Reference in New Issue
Block a user