337 Commits

Author SHA1 Message Date
Steve Langasek
4a44b56857 Drop support for building armhf+raspi images; as of noble these are arm64-only. 2023-12-08 18:38:40 -08:00
Steve Langasek
df83a7afed Set C.UTF-8 locale in /etc/default/locale for all images; originally intended to be landed in the cosmic cycle.. 2023-12-03 21:07:54 -08:00
Steve Langasek
99d2064f32 Drop a few remaining 'legacy' references. 2023-11-05 15:58:23 +02:00
Steve Langasek
0a3babb81a call ubuntu-image classic with --debug, because --verbose doesn't give us anything useful in the livefs build logs. 2023-10-11 18:03:30 -07:00
Steve Langasek
fdf0091580 Merge remote-tracking branch 'philroche/bugfix/ubuntu-cpc-project-images-not-producing-all-expected-filelists-LP-2033751' into ubuntu/master 2023-10-02 17:00:28 -07:00
Dimitri John Ledkov
f3a33b7dce Add support for X13s subarch
Add mapping to use laptop-23.10 kernel. Ensure that
enhanced-secureboot is only setup on amd64 arch.

LP: #2037099

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-09-26 18:54:39 +01:00
Utkarsh Gupta
12a2109c22 fix: install LXD snap from stable/ubuntu-<version> channel (LP: #2036725)
In the past, we'd directly snap install lxd which defaults to
the latest/stable channel. However, whilst working on enhancing
unminimize, it was observed that we install this snap from
the stable/ubuntu-<version> channel instead.

This was also noted as a failure when running the CTF tests:
`lxd installed from latest/stable, not stable/ubuntu-23.10`
2023-09-22 13:05:29 +05:30
Philip Roche
a5c5883712 fix: Fix the missing fi with the recent changes in the unminimize script for ubuntu-cpc project (LP: #2036591)
Fixes bug introduced in commit 75db56ce

The missing if statement end `fi` caused build failures due to syntax errors.
2023-09-19 17:02:56 +01:00
Utkarsh Gupta
75db56ce61 Merge branch 'enhance-minimize' into ubuntu/master
* enhance-minimize:
  Install linux-virtual to restore the stripped headers
  Enhance unminimize to transform into a base image for ubuntu-cpc
2023-09-19 14:05:13 +05:30
Philip Roche
8333dbac7a fix: armhf flavour for 6.5+ kernel is now generic (LP: #2033677)
With the introduction of the 6.5 kernel for mantic on 13th September ago we are seeing image build failures
on the armhf builds. The build failure was `No kernel output for generic-lpae!`.

Introduced in the 6.4 kernel and therefore now also in 6.5 there is no generic-lpae flavor anymore. it's just generic now.

As such this commit updates the expected flavour for armhf to generic.
2023-09-15 12:00:15 +01:00
Utkarsh Gupta
940df6e060 Install linux-virtual to restore the stripped headers
In a minimized image, the linux headers are stripped, so when
unminimizing it, we should restore those stripped headers
by installing the linux-virtual package.
2023-09-12 12:29:25 +05:30
Utkarsh Gupta
4400dd37c6 Enhance unminimize to transform into a base image for ubuntu-cpc
The unminimize script previously just restored the system documentation
and translations, man pages, and installed ubuntu-minimal and ubuntu-standard
packages to provide the familiar Ubuntu minimal system. But such an image
never became an equivalent of base image.

Upon investigation and looking at how the base image is constructed -
https://git.launchpad.net/livecd-rootfs/tree/live-build/auto/config#n1108 -
we use the following things:
 - minimal task
 - standard task
 - cloud-image task (which involves ubuntu-server)
 - ubuntu-minimal package
 - server task if arch != amd64

OTOH, in the unminimize script, we use the following:
(https://git.launchpad.net/livecd-rootfs/tree/live-build/auto/build#n286)
 - ubuntu-minimal package
 - ubuntu-standard package

So upon running some tests, it was found that if we install ubuntu-server
(with --fix-policy flag), we get the resulting image equivalent to that
of a base image.

cf: https://warthogs.atlassian.net/browse/CPC-3033
2023-09-12 12:29:17 +05:30
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
Philip Roche
c72d1a7f2b fix: Ensure any created .filelist is symlinked with expected prefix and correct permissions (LP: #2033751)
If a .filelist is present, use it as the filelist for the image by
symlinking with expected name and updating permissions
2023-09-01 12:21:12 +01:00
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