Compare commits

...

3 Commits

Author SHA1 Message Date
Utkarsh Gupta
bd40844d72 Update d/ch for 2.791.1 release 2022-12-09 21:21:31 +05:30
Utkarsh Gupta
a6ba8fe5d3 Clean up whitespaces 2022-12-09 21:19:42 +05:30
Samir Akarioh
a41369a5c1 feat: Add metadata on ubuntu-oci image
Add a file build.info on etc/cloud
with the serial information

Signed-off-by: Samir Akarioh <samir.akarioh@canonical.com>
(cherry picked from commit 105acdebc783291f740294b5c317f3e6d2da9de4)
2022-11-22 12:18:48 +01:00
3 changed files with 27 additions and 1 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
livecd-rootfs (2.791.1) kinetic; urgency=medium
[ Samir Akarioh ]
* feat: Add metadata on ubuntu-oci image. (LP: #1998229)
-- Utkarsh Gupta <utkarsh@ubuntu.com> Fri, 09 Dec 2022 21:19:45 +0530
livecd-rootfs (2.791) kinetic; urgency=medium
[ Brian Murray ]

View File

@ -462,7 +462,12 @@ EOF
fi
if [ "$PROJECT" = "ubuntu-oci" ]; then
configure_oci chroot
if [ -n "$BUILDSTAMP" ]; then
configure_oci chroot "$BUILDSTAMP"
else
echo "The \$BUILDSTAMP variable is empty"
exit 1
fi
fi
configure_network_manager

View File

@ -922,6 +922,12 @@ configure_oci() {
# at https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh
local chroot=$1
local serial=$2
if [ ! -d "${chroot}" ]; then
echo "The chroot does not exist"
exit 1
fi
echo "==== Configuring OCI ===="
@ -930,6 +936,14 @@ configure_oci() {
echo 'exit 101' >> ${chroot}/usr/sbin/policy-rc.d
Chroot ${chroot} "chmod +x /usr/sbin/policy-rc.d"
# Inject a build stamp into the image
mkdir -p ${chroot}/etc/cloud
cat > ${chroot}/etc/cloud/build.info << EOF
serial: $serial
EOF
# https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L54-L56
Chroot ${chroot} "dpkg-divert --local --rename --add /sbin/initctl"
cp -a ${chroot}/usr/sbin/policy-rc.d ${chroot}/sbin/initctl