324 Commits

Author SHA1 Message Date
Utkarsh Gupta
78a98c6835 Fix unminimize to correctly list packages (LP: #1996489)
Prior to dpkg/1.21.0, there was a bug where dpkg -V/--verify
couldn't list all the correct packages correctly but with
that being fix and in archive since Jammy, this works perfectly
but the syntax to report the missing files have changed. It
just prints 'missing' now. With that new format, we can now
fix the regex to simply list the packages.

With this patch, the unminimize script works flawlessly
on a minimized image.
2023-09-02 00:39:41 +05:30
Stefan Hammer
08db5c2418 fix(armhf): Fix armhf kernel file detection
Armhf images install the `generic-lpae` kernel, while other ARCHes use the
standard `generic` kernel when building the "virtual" image flavour.
Code was looking for a kernel binary ending with -generic in armhf
builds, and failed. Add a special condition to handle armhf builds'
kernel ending with `generic-lpae`

References:
[1] https://bugs.launchpad.net/cloud-images/+bug/2029527
2023-08-09 10:09:22 -05:00
Utkarsh Gupta
ca84320688 Avoid purging packages for ubuntu-cpc
With the switch to the ubuntu-cloud-minimal seed, we
don't really need to purge anything now. On the contrary,
the purging of packages if not installed, fails with the
exit code of 100.
2023-08-08 15:17:02 +05:30
Heinrich Schuchardt
af577c87b2 RISC-V: handle kernel flavour allwinner
Package linux-allwinner has a kernel with the generic flavour as
dependency. Add this translation to our code checking the correct
installation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-07-05 14:52:54 +02:00
Loïc Minier
ea8564afe2 Add channel override for ubuntu-image channel 2023-06-28 09:26:29 +00:00
Loïc Minier
8bf4d3500f Use image definition path rather than making a copy 2023-06-28 09:15:49 +00:00
Łukasz 'sil2100' Zemczak
9ef33dd59f Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into add-new-budgie 2023-06-07 11:27:55 +02:00
Łukasz 'sil2100' Zemczak
a027e767d2 Explicitly use the snap binary for ubuntu-image. 2023-05-31 15:14:55 +02:00
Łukasz 'sil2100' Zemczak
157e4b2ac2 Better support for ubuntu-image artifact handling. 2023-05-31 15:08:35 +02:00
Łukasz 'sil2100' Zemczak
fdf685fc5e Be more verbose when using ubuntu-image, use the ubuntu-image stable snap. 2023-05-31 14:38:53 +02:00
Łukasz 'sil2100' Zemczak
381a8febb2 Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into ui-by-default 2023-05-31 14:34:27 +02:00
Łukasz 'sil2100' Zemczak
8b6085bb67 Some initial work on getting Ubuntu Budgie building new installer images. 2023-05-24 15:31:04 +02:00
Łukasz 'sil2100' Zemczak
fba9d176a6 Add cinnamon, unity and edubuntu to the workaround list. 2023-04-18 10:24:07 +01:00
Steve Langasek
9fc5d2ce13 Update infinite_scream URL to mastodon 2023-04-12 09:38:00 -07:00
Łukasz 'sil2100' Zemczak
6a2cb2be27 Fix using the wrong branch name for ubuntu-image. 2023-04-06 16:05:32 +02:00
Łukasz 'sil2100' Zemczak
dc89df7ee2 Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into ui-by-default 2023-04-05 22:20:10 +02:00
Łukasz 'sil2100' Zemczak
2508d5add3 Use ubuntu-image from a snap (candidate for now). Only build raspi images with ubuntu-image 3.0 for now. 2023-04-05 22:14:30 +02:00
Łukasz 'sil2100' Zemczak
3ad215e3f1 Forward port some intel-iot changes. 2023-03-17 11:54:46 +01:00
Steve Langasek
4dbeba4ba3 Address the fact that debootstrap doesn't follow Recommends and as a result we're missing several Recommends that should be installed by default and are on upgrades but not on new installs. This is not applied to minimized images, which don't follow Recommends; but does get separately applied to the ubuntu-server full squashfs. 2023-02-24 17:47:51 -08:00
Dimitri John Ledkov
88f8976e64
Terrible hack workaround for clearing out the non-offline apt cache for desktop related images. 2023-02-24 12:19:26 +00:00
Łukasz 'sil2100' Zemczak
c56e7aab04 Minor code-duplication removal. 2022-12-16 11:13:42 +01:00
Łukasz 'sil2100' Zemczak
beada31662 Use ubuntu-image image definitions for riscv, raspi and ubuntu-base builds. 2022-12-15 10:22:06 +01:00
Sebastien Bacher
12846905fd Change the desktop build to let canary be the default 2022-11-23 17:15:15 +01:00
Samir Akarioh
105acdebc7 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>
2022-10-27 09:03:38 +02:00
Steve Langasek
e41c6f50df Drop use of deprecated apt-key. 2022-09-21 16:08:36 -07:00
Steve Langasek
abcfabdbc0 Drop support for building i386 images aside from the launchpad builder images. 2022-07-25 12:50:56 -07:00
Jean-Baptiste Lallement
80ccea8d63 Separate WSL from CPC
Create a separate WSL image than CPC so it can be managed independently.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2022-03-17 10:11:39 +01:00
Łukasz 'sil2100' Zemczak
e4c846199b Following Dave's changes to the classic pi gadget, switch to using the classic branch for desktop images as well. 2022-02-22 11:33:26 +01:00
Brian Murray
e5beee30fd Add the capability to build an ISO image for the Intel IoT project. Additionally, stop using universe with the project given that the kernel is now in main. 2021-11-16 17:00:38 -08:00
Thomas Bechtold
2b2f67c7fb Keep changelogs in minimized builds for native deb pkgs
Debian changelog.Debian.* files are already keept for minimized
builds. But those changelogs are from non-native .deb packages (see
man dh_installchangelogs). Native .deb packages name their changelog
just changelog.* . So keep them in a minimized build, too.

LP: #1943114
2021-09-20 13:43:27 +02:00
Michael Hudson-Doyle
5fda0bb2aa apply dpkg minimizations to minimal layer, and undo them for full layer 2021-08-03 16:36:02 +12:00
Steve Langasek
c7b751e401 Drop code for the 'ubuntu-core' project when not using image_format: ubuntu-image, as this is obsolete and not used to build core* snaps in recent series. 2021-05-11 17:12:20 -07:00
Dimitri John Ledkov
dc2a472871
magic-proxy: replace http.client with urllib calls
Initialize passwords from sources.list.
Use urllib everywhere.
This way authentication is added to all the required requests.
And incoming headers, are passed to the outgoing requests.
And all the response headers, are passed to the original client.
And all the TCP & HTTP errors are passed back to the client.
Thus should avoiding hanging requests upon failure.
Also rewrite the URI when requesting things.
This allows to use private-ppa.buildd outside of launchpad.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
2021-04-30 17:50:28 +01:00
Dimitri John Ledkov
1cd8fe14b7
Change iptables calls, to query rules and quickly check that connectivity works after transparent proxy has been installed. LP: #1917920 2021-04-30 17:48:09 +01:00
Thomas Bechtold
a81972a58b
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
2021-04-22 08:48:00 +02:00
Thomas Bechtold
ac4a95b931
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
2021-04-22 07:39:15 +02:00
Dimitri John Ledkov
109e6c6613
auto/build: use setup|teardown_mountpoint to reduce duplication 2020-07-24 20:59:57 +01:00
Robert C Jennings
84397b5098
Avoid rbind /sys for chroot snap pre-seeding (cgroups fail to unmount)
Builds in LP with the Xenial kernel were happy with the recursive mount of
/sys inside the chroot while performing snap-preseeding but autopkgtests
with the groovy kernel failed.  With the groovy kernel the build was
unable to unmount sys/kernel/slab/*/cgroup/* (Operation not permitted).

This patch mounts /sys and /sys/kernel/security in the chroot in the
same way we've added for binary hooks.  This provides the paths under
/sys needed for snap-preseed while avoiding issues unmounting other
paths.
2020-07-18 16:52:18 -05:00
Dimitri John Ledkov
31861fd40d
seccomp: mount more up-to-date seccomp features 2020-07-18 00:24:16 +01:00
Dimitri John Ledkov
a14a31b751
apparmor: mount more up-to-date apparmor features in the chroot. 2020-07-18 00:20:41 +01:00
Robert C Jennings
1ca11c9795
Apply snap-preseed optimizations after seeding snaps
The snap-preseed command can do a number of things during the build
that are currently performed at first boot (apparmor profiles, systemd
unit generation, etc).  This patch adds a call to reset the seeding and
apply these optimizations when adding a seeded snap.  As a prerequisite
to calling snap-preseed we need to make /dev/mem available as well as
mounts from the host to perform this work, so those are also added here.
2020-07-17 21:17:33 +01:00
Dimitri John Ledkov
56ac1865f7 Switch Ubuntu desktop to only hwe-20.04 kernel flavour. 2020-04-16 01:30:31 +01:00
Dimitri John Ledkov
cb574d4cb3 minimized: reinstall packages one by one, instead of all of them together, as otherwise apt fails to immediately configure libc6:amd64 & libgcc-s1. LP: #1867607 2020-03-16 10:42:30 +00:00
Łukasz 'sil2100' Zemczak
e9170e053b Rename the raspi3 SUBARCH to raspi 2020-02-21 12:46:43 +01:00
Dimitri John Ledkov
db0c7d68f2 Although the request flavour to install is oem-20.04, it really is called just oem on disk. Override the flavour name from oem-20.04 to oem when renaming built artefacts. This also means that ubuntu-cdimage needs to simply download 'oem' vmlinuz+initrd pairs, not 'oem-20.04'. 2020-01-30 11:13:51 +00:00
Łukasz 'sil2100' Zemczak
2870738f00 Merge the manually-pushed 2.636 from Laney. 2020-01-24 18:47:22 +01:00
Michael Hudson-Doyle
94c2d606ca Preserve apt preferences created by any package we install (i.e. ubuntu-advantage-tools) against live-build's attempt to delete them. (LP: #1855354) 2019-12-13 13:16:33 +13:00
Łukasz 'sil2100' Zemczak
474f232840 Snapd for uc20 model assertions does not support global channel overrides. 2019-12-12 16:58:42 +01:00
Robert C Jennings
8cb442c3e8
magic-proxy: dump proxy log to stdout on failure
When we encounter a failure in 'lb binary' the launchpad builders can
only surface the build output from stdout.  If the binary hook failure
implicates the archive we can not determine fault without the apt
proxy log.  This patch will dump the proxy log to stdout to aid in
debugging these failures.
2019-10-04 10:28:02 -05:00
Colin Watson
dc61b17db3 Use iptables-legacy on older kernel versions
Use iptables-legacy rather than iptables when running on older
(pre-4.15) kernel versions.  The newer nf_tables-based tools misbehave
at least on 4.4.
2019-09-03 15:23:06 +01:00