~toabctl/livecd-rootfs:sru-bionic-lp1926732

Last commit made on 2021-04-30
Get this branch:
git clone -b sru-bionic-lp1926732 https://git.launchpad.net/~toabctl/livecd-rootfs
Only Thomas Bechtold can upload to this branch. If you are Thomas Bechtold please log in for upload directions.

Branch merges

Branch information

Name:
sru-bionic-lp1926732
Repository:
lp:~toabctl/livecd-rootfs

Recent commits

fa07937... by Thomas Bechtold

add debian/changelog entry

387ae19... by Thomas Bechtold

add configure_oci function and use it in ubuntu-oci

With that, the Dockerfile modifications[0] currently done externally
are done now here. That means that the created rootfs tarball can be
directly used within a Dockerfile to create a container from scratch:

FROM scratch
ADD livecd.ubuntu-oci.rootfs.tar.gz /
CMD ["/bin/bash"]

[0]
https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh

(cherry picked from commit a81972a58b004897bf3e5c14ff371bc2f6b5e4b8)

bc6ae91... by Thomas Bechtold

Add new ubuntu-oci project

This is a copy of the ubuntu-base project.
Currently ubuntu-base is used as a base for the docker/OCI container
images. The rootfs tarball that is created with ubuntu-base is
published under [0]. That tarball is used in the FROM statement of the
Dockerfile as base and then a couple of modifications are done inside
of the Dockerfile[1].
The ubuntu-oci project will include the changes that are currently
done in the Dockerfile. With that:

1) a Dockerfile using that tarball will be just a 2 line thing:

   FROM scratch
   ADD ubuntu-hirsute-core-cloudimg-amd64-root.tar.gz /
   CMD ["/bin/bash"]

2) Ubuntu has the full control about the build process of the
docker/OCI container. No external sources (like [1]) need to be
modified anymore.
3) Ubuntu can publish containers without depending on the official
dockerhub containers[2]. Currently the containers for the AWS ECR
registry[3] use as a base[4] the official dockerhub containers. That's
no longer needed because a container just needs a Dockerfile described
in 1)

When the ubuntu-oci project has the modifications from [1] included,
we'll also update [1] to use the ubuntu-oci rootfs tarball as a base
and drop the modifications done at [1].

Note: Creating a new ubuntu-oci project instead of using ubuntu-base
will make sure that we don't break users who are currently using
ubuntu-base rootfs tarballs for doing their own thing.

[0] https://partner-images.canonical.com/core/
[1]
https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh
[2] https://hub.docker.com/_/ubuntu
[3] https://gallery.ecr.aws/ubuntu/ubuntu
[4]
https://launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+oci/ubuntu/+recipe/ubuntu-20.04

(cherry picked from commit ac4a95b9314cf1f8ce01f42016c271c0a6078372)

f1b2098... by Robert C Jennings

releasing package livecd-rootfs version 2.525.52

8039471... by Gauthier Jolly

ubuntu-cpc: secure esp mountpoint (LP: #1881006)

Change mount option for ubuntu-cpc images from "defaults" to
"umask=0077". ESP partitions might contain sensitive data and
non-root users shouldn't have read access on it.

6c2b581... by Dimitri John Ledkov

releasing package livecd-rootfs version 2.525.51

09da74e... by Dimitri John Ledkov

functions: stop removing systemd-detect-virt unconditionally in undivert_grub

One can call divert_grub; replace_kernel; undivert_grub. And
replace_kernel will call into force_boot_without_initramfs, which
under certain conditions can call divert_grub &
undivert_grub. Resulting in undivert_grub called twice in a row.

When undivert_grub is called twice in a row it wipes
systemd-detect-virt binary from disk, as the rm call is unguarded to
check that there is something to divert if systemd package is
installed. And if the systemd package is not installed, it does not
check that systemd-detect-virt file is in-fact what divert_grub has
created.

Add a guard to check that systemd-detect-virt is the placeholder one,
before removing it.

LP: #1902260
(cherry picked from commit 096a00f40459187719840ccad99e86c7ade2ec12)

d447d16... by Dimitri John Ledkov

Perform fsck on all rootfs.

LP: #1912835
(cherry picked from commit 33b7272a2331279b4c7aa8de73ed8a9069d0bd39)

bcb48c1... by Dimitri John Ledkov

esp: perform fsck.

LP: #1912835
(cherry picked from commit 53b28d5f58284657ee8efd08a633d557af1fcd97)

319341b... by Dimitri John Ledkov

esp: install grub in ubuntu bootloader id path, instead of removable.

Do not use removable uefi bootloader path in the cloud-images by
default, as that prevents upgrades of the bootloader.

LP: #1912830
(cherry picked from commit 7c760864fdcb278ca37396f06f5e3f297428d63d)