mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-31 04:41:18 +00:00
Merge branch 'add-buildinfo-file' into ubuntu/master
* add-buildinfo-file: Drop the second parameter passed to configure_oci Add build_name metadata to build.info file for OCI and Base images
This commit is contained in:
commit
cebc2f85d5
@ -430,9 +430,16 @@ serial: $BUILDSTAMP
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$PROJECT" = "ubuntu-oci" ]; then
|
||||
if [ "${PROJECT}" = ubuntu-base ] || [ "${PROJECT}" = "ubuntu-oci" ]; then
|
||||
if [ -n "$BUILDSTAMP" ]; then
|
||||
configure_oci chroot "$BUILDSTAMP"
|
||||
mkdir -p chroot/etc/cloud
|
||||
cat > chroot/etc/cloud/build.info << EOF
|
||||
build_name: $PROJECT:${SUBPROJECT:}
|
||||
serial: $BUILDSTAMP
|
||||
EOF
|
||||
if [ "${PROJECT}" = "ubuntu-oci" ]; then
|
||||
configure_oci chroot
|
||||
fi
|
||||
else
|
||||
echo "The \$BUILDSTAMP variable is empty"
|
||||
exit 1
|
||||
|
@ -955,7 +955,6 @@ 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"
|
||||
@ -970,13 +969,6 @@ configure_oci() {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user