Merge lp:~rcj/livecd-rootfs/yakkety-proposed into lp:~ubuntu-core-dev/livecd-rootfs/yakkety-proposed

Proposed by Robert C Jennings
Status: Merged
Merged at revision: 1450
Proposed branch: lp:~rcj/livecd-rootfs/yakkety-proposed
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/yakkety-proposed
Diff against target: 196 lines (+66/-15)
8 files modified
debian/changelog (+13/-0)
live-build/ubuntu-cpc/functions (+7/-0)
live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary (+1/-1)
live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary (+1/-1)
live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary (+21/-5)
live-build/ubuntu-cpc/hooks/042-vagrant.binary (+19/-6)
live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl (+2/-1)
live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl (+2/-1)
To merge this branch: bzr merge lp:~rcj/livecd-rootfs/yakkety-proposed
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+320250@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert C Jennings (rcj) wrote :

A build is available in ppa:rcj/livecd-rootfs2 as well

Revision history for this message
Robert C Jennings (rcj) wrote :

Validated contents and ready for review

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-03-17 18:18:47 +0000
3+++ debian/changelog 2017-03-17 18:50:49 +0000
4@@ -1,3 +1,16 @@
5+livecd-rootfs (2.435.2) yakkety; urgency=medium
6+
7+ [ Chris Glass ]
8+ * Fix the manifest generation in OVA files so that ovf files don't have
9+ double extensions. (LP: #1627931)
10+ * Fix the OVF's metadata to include Ubuntu specific identifiers and
11+ descriptions instead of the generic Linux ones. (LP: #1656293)
12+ [ Daniel Watkins ]
13+ * Add replace_grub_root_with_label function thereby consolidating multiple
14+ uses of the same calls to sed.
15+
16+ -- Robert C Jennings <robert.jennings@ubuntu.com> Fri, 17 Mar 2017 13:46:47 -0500
17+
18 livecd-rootfs (2.435.1) yakkety; urgency=medium
19
20 [ Robert C Jennings ]
21
22=== modified file 'live-build/ubuntu-cpc/functions'
23--- live-build/ubuntu-cpc/functions 2016-02-07 05:26:04 +0000
24+++ live-build/ubuntu-cpc/functions 2017-03-17 18:50:49 +0000
25@@ -249,4 +249,11 @@
26 qemu-img info "$destination"
27 }
28
29+replace_grub_root_with_label() {
30+ # When update-grub is run, it will detect the disks in the build system.
31+ # Instead, we want grub to use the cloudimg-rootfs labelled disk
32+ CHROOT_ROOT="$1"
33
34+ sed -i -e "s,root=[^ ]\+,root=LABEL=cloudimg-rootfs," \
35+ "$CHROOT_ROOT/boot/grub/grub.cfg"
36+}
37
38=== modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary'
39--- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-03-17 18:18:47 +0000
40+++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-03-17 18:50:49 +0000
41@@ -105,7 +105,7 @@
42
43 chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
44 chroot mountpoint update-grub
45- sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
46+ replace_grub_root_with_label mountpoint
47 chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
48
49 chroot mountpoint apt-get -y clean
50
51=== modified file 'live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary'
52--- live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2016-06-09 14:48:38 +0000
53+++ live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2017-03-17 18:50:49 +0000
54@@ -52,7 +52,7 @@
55
56 chroot mountpoint dpkg-divert --local --rename /etc/grub.d/30_os-prober
57 chroot mountpoint update-grub
58- sed -i "s,root=.* ,root=LABEL=cloudimg-rootfs ,g" mountpoint/boot/grub/grub.cfg
59+ replace_grub_root_with_label mountpoint
60 chroot mountpoint dpkg-divert --remove --local --rename /etc/grub.d/30_os-prober
61
62 umount_partition mountpoint
63
64=== modified file 'live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary'
65--- live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary 2016-06-09 09:47:25 +0000
66+++ live-build/ubuntu-cpc/hooks/041-vmdk-ova-image.binary 2017-03-17 18:50:49 +0000
67@@ -9,11 +9,24 @@
68 #
69 # For this step, we re-use the VMDK's made in 040-vmdk-image.binary
70
71+
72+# Switch on $ARCH to determine which ID and description to use in the produced
73+# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
74+# well use them.
75 case $ARCH in
76- amd64|i386) ;;
77- *) echo "OVA images are not supported for $ARCH yet.";
78- exit 0;;
79+ amd64)
80+ ovf_id=94
81+ ovf_os_type="ubuntu64Guest"
82+ ovf_desc_bits=64 ;;
83+ i386)
84+ ovf_id=93
85+ ovf_os_type="ubuntu32Guest"
86+ ovf_desc_bits=32 ;;
87+ *)
88+ echo "OVA images are not supported for $ARCH yet.";
89+ exit 0;;
90 esac
91+
92 cur_d=${PWD}
93 my_d=$(dirname $(readlink -f ${0}))
94
95@@ -57,7 +70,10 @@
96 -e "s/@@NUM_CPUS@@/2/g" \
97 -e "s/@@VERSION@@/${version}/g" \
98 -e "s/@@DATE@@/${serial_stamp}/g" \
99- -e "s/@@MEM_SIZE@@/1024/g"
100+ -e "s/@@MEM_SIZE@@/1024/g" \
101+ -e "s/@@OVF_ID@@/${ovf_id}/g" \
102+ -e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
103+ -e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
104
105 # Get the checksums
106 vmdk_sha256=$(sha256sum ${vmdk_f} | cut -d' ' -f1)
107@@ -67,7 +83,7 @@
108 manifest="${scratch_d}/${prefix}.mf"
109 cat > "${manifest}" <<EOF
110 SHA256(${vmdk_f##*/})= ${vmdk_sha256}
111-SHA256(${ovf##*/}.ovf)= ${ovf_sha256}
112+SHA256(${ovf##*/})= ${ovf_sha256}
113 EOF
114
115 # Now create the OVA
116
117=== modified file 'live-build/ubuntu-cpc/hooks/042-vagrant.binary'
118--- live-build/ubuntu-cpc/hooks/042-vagrant.binary 2016-09-09 22:56:47 +0000
119+++ live-build/ubuntu-cpc/hooks/042-vagrant.binary 2017-03-17 18:50:49 +0000
120@@ -18,11 +18,21 @@
121 cur_d=${PWD}
122 my_d=$(dirname $(readlink -f ${0}))
123
124+# Switch on $ARCH to determine which ID and description to use in the produced
125+# OVF. We have fancy Ubuntu-specific IDs in the OVF specification, we might as
126+# well use them.
127 case $ARCH in
128- amd64|i386) ;;
129- *)
130- echo "Vagrant images are not supported for $ARCH"
131- exit 0
132+ amd64)
133+ ovf_id=94
134+ ovf_os_type="ubuntu64Guest"
135+ ovf_desc_bits=64 ;;
136+ i386)
137+ ovf_id=93
138+ ovf_os_type="ubuntu32Guest"
139+ ovf_desc_bits=32 ;;
140+ *)
141+ echo "Vagrant images are not supported for $ARCH yet."
142+ exit 0;;
143 esac
144
145 . /build/config/functions
146@@ -172,7 +182,10 @@
147 -e "s/@@NUM_CPUS@@/2/g" \
148 -e "s/@@VERSION@@/${version}/g" \
149 -e "s/@@DATE@@/${serial_stamp}/g" \
150- -e "s/@@MEM_SIZE@@/1024/g"
151+ -e "s/@@MEM_SIZE@@/1024/g" \
152+ -e "s/@@OVF_ID@@/${ovf_id}/g" \
153+ -e "s/@@OVF_OS_TYPE@@/${ovf_os_type}/g" \
154+ -e "s/@@OVF_DESC_BITS@@/${ovf_desc_bits}/g"
155
156 ovf_sha256=$(sha256sum ${ovf} | cut -d' ' -f1)
157
158@@ -181,7 +194,7 @@
159 cat > "${manifest}" <<EOF
160 SHA256(${vmdk_f##*/})= ${vmdk_sha256}
161 SHA256(${cdrom_vmdk_f##*/})= ${cdrom_sha256}
162-SHA256(${ovf##*/}.ovf)= ${ovf_sha256}
163+SHA256(${ovf##*/})= ${ovf_sha256}
164 EOF
165
166 # Now create the box
167
168=== modified file 'live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl'
169--- live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl 2015-11-12 21:49:25 +0000
170+++ live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-cloudcfg-vmdk.tmpl 2017-03-17 18:50:49 +0000
171@@ -18,8 +18,9 @@
172 <VirtualSystem ovf:id="@@NAME@@">
173 <Info>A virtual machine</Info>
174 <Name>@@NAME@@</Name>
175- <OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest">
176+ <OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
177 <Info>The kind of installed guest operating system</Info>
178+ <Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
179 </OperatingSystemSection>
180
181 <ProductSection ovf:required="false">
182
183=== modified file 'live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl'
184--- live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl 2015-11-12 21:49:25 +0000
185+++ live-build/ubuntu-cpc/hooks/ovf/ubuntu-ova-v1-vmdk.tmpl 2017-03-17 18:50:49 +0000
186@@ -16,8 +16,9 @@
187 <VirtualSystem ovf:id="@@NAME@@">
188 <Info>A virtual machine</Info>
189 <Name>@@NAME@@</Name>
190- <OperatingSystemSection ovf:id="100" vmw:osType="other3xLinux64Guest">
191+ <OperatingSystemSection ovf:id="@@OVF_ID@@" vmw:osType="@@OVF_OS_TYPE@@">
192 <Info>The kind of installed guest operating system</Info>
193+ <Description>Ubuntu Linux (@@OVF_DESC_BITS@@-bit)</Description>
194 </OperatingSystemSection>
195
196 <ProductSection ovf:required="false">

Subscribers

People subscribed via source and target branches