Compare commits

...

39 Commits

Author SHA1 Message Date
Olivier Gayot
383a1206cc releasing package livecd-rootfs version 26.04.12 2025-12-17 17:29:46 -07:00
Olivier Gayot
2f918331fb ubuntu: use the same for in construct when getting snap args
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-16 16:14:53 +01:00
Olivier Gayot
e6558e2541 ubuntu: add a filter for snaps too
We now filter snaps using jq rather than grep. The change has a slight impact
because snapd-desktop-integration was filtered out by "grep snapd" but isn't
filtered out anymore with jq.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-16 16:14:53 +01:00
Olivier Gayot
01c80d8d0a ubuntu: fix snap components pulled from the wrong model
We have a mechanism in place to override a snap when building an image.
Unfortunately, we didn't factor this in when forcing optional components to be
included in the image.

This was okay before because the stable model and the dangerous model had the
same components declared.

But now that pc-kernel has different components in the stable and the dangerous
model, things are broken.

Indeed, when building the stable image, we tried to include the pc-kernel from
the stable model with the pc-kernel components from the dangerous model. But
they are not compatible.

Fixed by including components from the right model. If we're overriding a snap
with a definition from a different model, then pull the components from that
same model.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-16 16:14:53 +01:00
Olivier Gayot
72511a0381 ubuntu: declare variables from stable & dangerous models
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-16 14:56:13 +01:00
Dan Bungert
c147c15291 releasing package livecd-rootfs version 26.04.11 2025-12-11 17:24:44 -07:00
Olivier Gayot
856f14edee changelog
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-11 17:24:44 -07:00
Olivier Gayot
caf4f1030a ubuntu: when building stable image, don't take pc-kernel from beta
The pc-kernel version in 26.04/beta is kernel 6.17, which uses different
components from what is currently declared in the model.

This used to be necessary when there was no kernel in 26.04/stable, but now
there is a 6.8 version in 26.04/stable. The available components match what's
in the model.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-11 17:24:40 -07:00
Olivier Gayot
49e1ab15cd ubuntu: use a local variable where possible
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-11 16:52:22 +01:00
Olivier Gayot
5cbea9f677 ubuntu: add --comp for each optional component from the model
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-11 16:52:22 +01:00
Valentin Haudiquet
a19f30b9d6 changelog
Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
2025-12-11 09:29:06 +01:00
Valentin Haudiquet
44c14b799f refactor: added a function to generate grub config for netboot
Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
2025-12-11 09:27:56 +01:00
Valentin Haudiquet
9fdbaf8d6d riscv/server: add grub efi bootloader in netboot tarballs
This allows netboot tarballs to be PXE booted on QEMU; previously, the tarball was missing bootloader.

Signed-off-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
2025-12-11 09:27:56 +01:00
Michael Hudson-Doyle
ae1e5005aa
releasing package livecd-rootfs version 26.04.10 2025-12-09 21:08:13 +13:00
Michael Hudson-Doyle
c327ab7bd7
Build Ubuntu Server images with the 'restricted' component enabled. 2025-12-09 12:18:25 +13:00
Michael Hudson-Doyle
ab943acf44
Merge branch 'README.parameters' into ubuntu/master 2025-12-09 12:02:48 +13:00
Michael Hudson-Doyle
827d87bd7f
document format of EXTRA_PPAS a bit 2025-12-09 12:00:55 +13:00
Michael Hudson-Doyle
562e589cd1
include more information about how the parameters get from request to build 2025-12-09 09:50:33 +13:00
Michael Hudson-Doyle
65dad6ccc0
be a bit more accurate about IMAGEFORMAT 2025-12-02 18:47:55 +13:00
Dan Bungert
0fc035c8ba changelog 2025-12-01 12:52:00 -07:00
Olivier Gayot
e5ef47f7dd ubuntu: fix typo in comment
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-12-01 12:51:10 -07:00
Didier Roche
69ee041674
releasing package livecd-rootfs version 26.04.9 2025-11-26 08:53:00 +01:00
Didier Roche
e78505a5f3
Refresh new signed models with mesa
This mesa snap is needed starting with core24 apps.
2025-11-26 08:52:16 +01:00
Didier Roche
544aa0299e
releasing package livecd-rootfs version 26.04.8 2025-11-25 11:40:15 +01:00
Didier Roche
98c75ef41b
Switch to new GNOME platform snap 2025-11-25 11:38:49 +01:00
Michael Hudson-Doyle
5e00e3ecb2
add some kind of documentation of the parameters livecd-rootfs takes 2025-11-25 16:46:36 +13:00
Olivier Gayot
d280d58a7d Releasing 26.04.7
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-19 10:41:30 +01:00
Olivier Gayot
e2c8b4b1ad changelog
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-19 10:38:49 +01:00
Olivier Gayot
b3ddf6a78a ubuntu: use snapd, desktop-security-center and firmware-updater from edge for TPM/FDE
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-19 10:32:21 +01:00
Dan Bungert
218ad9af27 releasing package livecd-rootfs version 26.04.6 2025-11-18 15:42:58 -07:00
Olivier Gayot
befd8ddadf changelog
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-18 18:24:10 +01:00
Olivier Gayot
21372df0f9 ubuntu: update the models for 26.04
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-18 18:24:10 +01:00
Olivier Gayot
001aed3b3b ubuntu: use an array for prepare_args
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-18 18:24:09 +01:00
Olivier Gayot
9164e58d83 ubuntu: build with grade: dangerous but keep most snaps from stable
Because some snaps are not yet in their respective stable channel in 26.04, the
build fails. When preparing the image we can add --snap options to override the
channel of the different snaps. But we can only do that if we're building with
grade: dangerous. As a workaround this issue, we build with the non-dangerous
ISO with the dangerous model, but keep the snaps on their original channel
defined in the non dangerous model.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2025-11-18 18:23:27 +01:00
Sebastien Bacher
18c3471930
releasing package livecd-rootfs version 26.04.5 2025-11-17 12:05:43 +01:00
Dan Bungert
466d9683c5 changelog 2025-11-14 08:20:14 -07:00
Dan Bungert
ec74e75597 desktop: handle unset SUBPROJECT 2025-11-14 08:19:17 -07:00
Dan Bungert
432785a2fe releasing package livecd-rootfs version 26.04.4 2025-10-31 16:35:56 +01:00
Dan Bungert
596d6d8464 desktop: update dangerous model for 26.04 2025-10-31 11:14:42 +01:00
8 changed files with 545 additions and 64 deletions

236
README.parameters Normal file
View File

@ -0,0 +1,236 @@
Understanding the parameters used by livecd-rootfs
==================================================
livecd-rootfs is a confusing codebase. One of the confusing things is
how information flows into and around the image build process. There
is IMAGEFORMAT and IMAGE_TARGETS and PROJECT and many other
variables. It is not obvious when looking at the code if a given
variable is something passed as a parameter or something derived from
it.
All (or almost all) production use of livecd-rootfs is via
launchpad-buildd so the set of potential parameters is limited by the
set of environment variables launchpad-build can set in response to
the build request.
The process from build request to environment live-build is run is a
little convoluted. The build request takes:
an archive -- where to get livecd-rootfs from
a distro_arch_series -- the series to get livecd-rootfs and build
a pocket -- pocket to get livecd-rootfs from, also influences if proposed is
used as a package source for the image being built
unique_key -- you cannot have more than one pending livefs build with the same
unique_key. does not affect the build at all.
version -- optional version string, see below. often a serial like 20250525.1
metadata_override -- combined with the metadata on the livefs itself to make
the metadata for this build.
(ref: https://launchpad.net/+apidoc/devel.html#livefs-requestBuild)
These parameters are stored on the livefsbuild object (ref:
https://git.launchpad.net/launchpad/tree/lib/lp/soyuz/model/livefsbuild.py#n372)
and converted into a set of args passed to launchpad-build by the
LiveFSBuildBehaviour class (ref:
https://git.launchpad.net/launchpad/tree/lib/lp/soyuz/model/livefsbuildbehaviour.py#n99).
Inside launchpad-build, these arguments are inspected by the
LiveFilesystemBuildManager.initiate method (ref:
https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/livefs.py#n24)
which turns them into arguments for the BuildLiveFS lpbuild
"operation" which is what creates the environment live-build runs in
(ref:
https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/target/build_livefs.py#n167).
These variables can be set for both lb config and lb build:
PROJECT (mandatory, comes from "project" in the metadata)
ARCH (set to the abi tag of the distroarchseries being built for)
SUBPROJECT (optional, comes from "subproject" in the metadata)
SUBARCH (optional, comes from "subarch" in the metadata)
CHANNEL (optional, comes from "subarch" in the metadata)
IMAGE_TARGETS (optional, comes from "image_targets" in the metadata
"image_targets" is a list. IMAGE_TARGETS is set to " ".join(image_targets))
REPO_SNAPSHOT_STAMP
(optional, comes from "repo_snapshot_stamp" in the metadata)
SNAPSHOT_SERVICE_TIMESTAMP
(optional, comes from "snapshot_snapshot_stamp" in the metadata)
COHORT_KEY
(optional, comes from "cohort-key" in the metadata)
launchpad-buildd also contains code to set http_proxy / HTTP_PROXY /
LB_APT_HTTP_PROXY but there does not appear to be any way to trigger
this when requesting a build.
In addition the following variables can be set for lb config only (why
are some things set for lb config only? no idea):
SUITE (set to the name of the distroarchseries being built for)
NOW (set to value of the 'version' argument to the build request,
defaults to strftime("%Y%m%d-%H%M%S"))
IMAGEFORMAT (optional, comes from "image_format" in the metadata)
PROPOSED (set to "1" if the pocket passed to the build request is proposed)
EXTRA_PPAS (optional, comes from "extra_ppas" in the metadata
"extra_ppas" is a list. EXTRA_PPAS is set to " ".join(extra_ppas))
EXTRA_SNAPS (optional, comes from "extra_snaps" in the metadata
"extra_snaps" is a list. EXTRA_SNAPS is set to " ".join(extra_snaps))
Here is an opinionated and slightly angry attempt to describe what
each of these is for:
PROJECT
-------
This is the big one, the main variable that defines what is being
built. It can be ubuntu, ubuntu-server, xubuntu, ubuntu-mini-iso, that
sort of thing. Generally PROJECT determines the set of packages
installed but it (unfortunately?) has a bit more impact than that.
It's unarguable that we need a parameter like this.
ARCH
----
The architecture being built for. This is always the same as `dpkg
--print-architecture` for us, we don't do any cross builds.
It's kind of redundant but it's not really a problem that this exists.
SUBPROJECT
----------
This is used for some builds to build a different sort of build of the
project. It can be set to:
* "minimized" for ubuntu-cpc builds to make a minimal cloud image
* "minimal" for xubuntu builds to make a smaller ISO
* "desktop-preinstalled" for ubuntu builds to make a preinstalled
image instead of the parts for an installer.
* "buildd" for images to be used as build images by craft tools, and also
buildd chroots used on launchpad builders?
* "live" for ubuntu-server builds, historically to distinguish d-i
style installers from subiquity style installers
* "desktop" for ubuntu-core-installer builds, to influence which
model is use to build the ubuntu core system that will be
installed.
_This_ parameter is a total mess. The desktop-preinstalled use feels
particularly egregious.
SUBARCH
-------
This identifies the target machine more specifically than ARCH,
e.g. "tegra-jetson" or "licheerv". Used mostly but not exclusively for
preinstalled builds.
We probably do need something like this.
CHANNEL
-------
Influences which channel snaps included in the build are taken from
(via a few different mechanisms).
IMAGE_TARGETS
-------------
Passed for CPC (and ubuntu-oem, for some reason) builds to
`config/hooks.d/make-hooks` which uses it to select which binary hooks
to run (and so determines which artifacts get produced).
It is probably reasonable that this exists.
REPO_SNAPSHOT_STAMP
-------------------
Currently unused.
SNAPSHOT_SERVICE_TIMESTAMP
--------------------------
Also currently unused, and unclear how it differs from
REPO_SNAPSHOT_STAMP.
COHORT_KEY
----------
Used to make sure that different builds run at the same time don't get
different versions of snaps due to phasing differences.
This is a totally valid thing to need to supply.
http_proxy / HTTP_PROXY / LB_APT_HTTP_PROXY
-------------------------------------------
Nothing complex here!
SUITE
-----
This is the series being built (e.g. noble, questing). It is misnamed
really -- a suite is usually a combination of a series and a pocket
(noble-proposed, questing-security).
As with ARCH this is sort of redundant as we do builds in a chroot of
the series being built but OTOH it is definitely information the
build needs to know!
NOW
---
The serial for the build, e.g. 20250519 or 20240418.4.
It is a totally reasonable parameter.
IMAGEFORMAT
-----------
This is one of the more incoherently handled parameters. In rough
outline it is the filesystem of the image we produce.
Installer builds do not produce raw images, so this ends up being set
to 'plain' (which causes live-build to just leave the rootfs as a
directory tree) or 'none' (which causes live-build to do roughly the
same thing but in a different way?).
Image builds that use ubuntu-image set it to "ubuntu-image". These
builds do not call 'lb build' or 'lb binary'.
Other preinstalled images (mostly cpc images) set it to ext4 (but then
use live-build/ubuntu-cpc/hooks.d/remove-implicit-artifacts to remove
the output file that this causes live-build to produce...). Some
projects rely on this being set via metadata when building the project
it seems.
It can be set when starting an image build, but most builds do not and
the behavior when it is not set explicitly is pretty confusing.
This place is not a place of honor.
PROPOSED
--------
Should packages from proposed by included?
This is not really as useful as it used to be for a bunch of reasons
but it conceptually makes sense.
EXTRA_PPAS
----------
Extra archives to get packages from.
This is a space separated list by the time it gets to
livecd-rootfs. Each element of the list is of the form USER/NAME[:PIN]
where user is a Launchpad user/team name, NAME is the name of the ppa
to add and the optional colon-PIN at the end is the value to pin (in
the "man 5 apt_preferences: sense) packages from this PPA at.
Production builds shouldn't really use this but it's definitely useful
for development.
EXTRA_SNAPS
-----------
Extra snaps to include (but only for ubuntu-image based builds).

79
debian/changelog vendored
View File

@ -1,3 +1,82 @@
livecd-rootfs (26.04.12) resolute; urgency=medium
* desktop: add variables pointing to the different models (stable & dangerous).
* desktop: fix snap components taken from original model when overriding a
snap with another model.
- if we decide to override the definition of a snap (i.e., by taking in
from a different model), we also need to override the definition of its
components.
* desktop: refactor how we filter the snaps when overriding
* desktop: update the dangerous model so that it includes core26 and the 6.17
kernel and components.
-- Olivier Gayot <olivier.gayot@canonical.com> Tue, 16 Dec 2025 14:54:17 +0100
livecd-rootfs (26.04.11) resolute; urgency=medium
[ Valentin Haudiquet ]
* refactor: added a function to generate grub config for netboot
* riscv/server: add grub efi bootloader in netboot tarballs
[ Olivier Gayot ]
* desktop: build with optional components included
* desktop: don't build the stable image with pc-kernel from 26.04/beta
- This was needed before because there was pc-kernel in 26.04/stable but
now there is one and it matches the components definition from the model.
-- Valentin Haudiquet <valentin.haudiquet@canonical.com> Thu, 11 Dec 2025 09:28:37 +0100
livecd-rootfs (26.04.10) resolute; urgency=medium
[ Olivier Gayot ]
* desktop: fix a comment typo
[ Michael Hudson-Doyle ]
* Build Ubuntu Server images with the 'restricted' component enabled.
-- Dan Bungert <daniel.bungert@canonical.com> Tue, 09 Dec 2025 21:07:54 +1300
livecd-rootfs (26.04.9) resolute; urgency=medium
* desktop: Add mesa to the hybrid model required by core24 apps.
-- Didier Roche-Tolomelli <didrocks@ubuntu.com> Wed, 26 Nov 2025 08:51:24 +0100
livecd-rootfs (26.04.8) resolute; urgency=medium
* desktop: update TPM/FDE ubuntu model to use a GNOME platform snap
compatible with core24.
-- Didier Roche-Tolomelli <didrocks@ubuntu.com> Tue, 25 Nov 2025 11:38:59 +0100
livecd-rootfs (26.04.7) resolute; urgency=medium
* desktop: build both ISOs with snapd, firmware-updater and
desktop-security-center from edge for TPM/FDE.
-- Olivier Gayot <olivier.gayot@canonical.com> Wed, 19 Nov 2025 10:41:17 +0100
livecd-rootfs (26.04.6) resolute; urgency=medium
* desktop: build classic ISO with "grade: dangerous" and pull pc-kernel from
edge to workaround unavailability of pc-kernel in the stable 26.04 channel.
* desktop: refresh models to 26.04
-- Olivier Gayot <olivier.gayot@canonical.com> Tue, 18 Nov 2025 17:01:47 +0100
livecd-rootfs (26.04.5) resolute; urgency=medium
[ Dan Bungert ]
* desktop: fix build error when SUBPROJECT is unset
-- Sebastien Bacher <seb128@ubuntu.com> Mon, 17 Nov 2025 12:05:26 +0100
livecd-rootfs (26.04.4) resolute; urgency=medium
* desktop: update dangerous model for 26.04
-- Dan Bungert <daniel.bungert@canonical.com> Fri, 31 Oct 2025 11:13:53 +0100
livecd-rootfs (26.04.3) resolute; urgency=medium livecd-rootfs (26.04.3) resolute; urgency=medium
* desktop: use dangerous model for TPMFDE bits until snaps are available on * desktop: use dangerous model for TPMFDE bits until snaps are available on

1
debian/control vendored
View File

@ -25,6 +25,7 @@ Depends: ${misc:Depends},
git, git,
gnupg, gnupg,
grep-dctrl, grep-dctrl,
jq,
kpartx, kpartx,
live-build (>= 3.0~a57-1ubuntu31~), live-build (>= 3.0~a57-1ubuntu31~),
lsb-release, lsb-release,

View File

@ -636,7 +636,7 @@ case $PROJECT in
esac esac
case $PROJECT in case $PROJECT in
ubuntu-server|ubuntu-mini-iso) ubuntu-mini-iso)
COMPONENTS='main' COMPONENTS='main'
;; ;;
edubuntu|ubuntu-budgie|ubuntucinnamon|ubuntukylin) edubuntu|ubuntu-budgie|ubuntucinnamon|ubuntukylin)
@ -1097,6 +1097,9 @@ case $PROJECT in
arm64) arm64)
add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor.netboot shim-signed add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor.netboot shim-signed
;; ;;
riscv64)
add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor.netboot grub-efi-riscv64 grub-efi-riscv64-unsigned
;;
*) *)
add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor.netboot add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor.netboot
;; ;;

View File

@ -1,5 +1,18 @@
#!/bin/sh #!/bin/sh
generate_grub_config ()
{
# Generate the grub config file for netboot tarballs
# $1 Generated file path
cat > "${1}" <<EOF
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux linux iso-url=#ISOURL# ip=dhcp ---
initrd initrd
}
EOF
}
case $PASS in case $PASS in
ubuntu-server-minimal.ubuntu-server.installer.generic*.netboot) ubuntu-server-minimal.ubuntu-server.installer.generic*.netboot)
;; ;;
@ -46,13 +59,7 @@ case $ARCH in
mv chroot/usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed tarball/amd64/grubx64.efi mv chroot/usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed tarball/amd64/grubx64.efi
mkdir tarball/amd64/grub tarball/amd64/pxelinux.cfg mkdir tarball/amd64/grub tarball/amd64/pxelinux.cfg
cat > tarball/amd64/grub/grub.cfg.in <<EOF generate_grub_config tarball/amd64/grub/grub.cfg.in
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux linux iso-url=#ISOURL# ip=dhcp ---
initrd initrd
}
EOF
cat > tarball/amd64/pxelinux.cfg/default.in <<EOF cat > tarball/amd64/pxelinux.cfg/default.in <<EOF
DEFAULT install DEFAULT install
LABEL install LABEL install
@ -72,13 +79,7 @@ EOF
mv chroot/usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed tarball/arm64/grubaa64.efi mv chroot/usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed tarball/arm64/grubaa64.efi
mkdir tarball/arm64/grub mkdir tarball/arm64/grub
cat > tarball/arm64/grub/grub.cfg.in <<EOF generate_grub_config tarball/arm64/grub/grub.cfg.in
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux linux iso-url=#ISOURL# ip=dhcp ---
initrd initrd
}
EOF
;; ;;
s390x) s390x)
@ -125,6 +126,13 @@ LABEL install
append=ip=dhcp iso-url=#ISOURL# --- append=ip=dhcp iso-url=#ISOURL# ---
EOF EOF
;; ;;
riscv64)
mv chroot/usr/lib/grub/riscv64-efi/monolithic/grubnetriscv64.efi tarball/riscv64/grubriscv64.efi
mkdir tarball/riscv64/grub
generate_grub_config tarball/riscv64/grub/grub.cfg.in
;;
esac esac
tar -C tarball -czf livecd.${PROJECT}.netboot.tar.gz . tar -C tarball -czf livecd.${PROJECT}.netboot.tar.gz .

View File

@ -15,6 +15,100 @@ esac
. config/binary . config/binary
. config/functions . config/functions
# Naive conversion from YAML to JSON. This is needed because yq is in universe
# (but jq is not).
yaml_to_json()
{
python3 -c '
import json
import sys
import yaml
json.dump(yaml.safe_load(sys.stdin), sys.stdout, default=str)
'
}
# Use jq to retrieve a list of --snap options from a given *signed* model.
get_snaps_args_excluding()
{
local model=$1
local jq_filter='
# Find all snaps that are not filtered out.
# The filtered out snaps are passed as positional arguments so they end up in
# the $ARGS.positional array.
.snaps[] | select(.name | IN($ARGS.positional[]) | not)
# Then forge the --snap option.
| "--snap=" + .name + "=" + .["default-channel"]'
shift
# The model is signed and is not valid YAML unless we get rid of the
# signature. Here we assume the only blank line is before the signature.
sed '/^$/,$d' -- "$model" \
| yaml_to_json \
| jq --raw-output "$jq_filter" --args "$@"
}
# Use jq to retrieve a list of --snap options from a given *signed* model.
get_snaps_args()
{
local model=$1
get_snaps_args_excluding "$model"
}
_get_components_filtered()
{
local excluded=$1
local model=$2
local jq_filter='
# Find all snaps that are either filtered in or filtered out
# The filtered in (or out) snaps are passed as positional arguments so they end up in
# the $ARGS.positional array. The excluded variable is passed separately and
# tells if we want to filter in (i.e., excluded=false) or filter out (i.e.,
# excluded=true).
.snaps[] | select(.name | IN($ARGS.positional[]) | if $excluded then not else . end)
# and have components
| select(.components)
# Then save the name of each snap in a variable
| .name as $snap
# Then for each entry that has "optional"
| .components | to_entries | map(select(.value.presence == "optional"))
# Output its name with the snap name prepended
| "\($snap)" + "+" + .[].key'
shift 2
sed '/^$/,$d' -- "$model" \
| yaml_to_json \
| jq --raw-output "$jq_filter" --argjson excluded "$excluded" --args "$@"
}
# Get list of all components for all snaps
get_all_components()
{
local model=$1
# Provide an exclusion list but empty
_get_components_filtered true "$model"
}
# Get list of all components for all snaps except the ones specified.
get_components_excluding()
{
local model=$1
shift
_get_components_filtered true "$model" "$@"
}
# Get list of all components for the snaps specified.
get_components()
{
local model=$1
shift
_get_components_filtered false "$model" "$@"
}
# Generation of the model: # Generation of the model:
# * At https://github.com/canonical/models one can find a repo of raw, # * At https://github.com/canonical/models one can find a repo of raw,
# unsigned, input .json files, and their signed .model equivalents. # unsigned, input .json files, and their signed .model equivalents.
@ -32,25 +126,56 @@ esac
# env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-classic-2410-amd64 > config/classic-model.model # env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-classic-2410-amd64 > config/classic-model.model
# #
# model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64.model dangerous_model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64-dangerous.model
# Normally we use the non-dangerous model here. Use the dangerous one for now stable_model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64.model
# until we get snaps on stable 26.04 tracks and channels.
model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64-dangerous.model
prepare_args= prepare_args=()
components=()
# for the dangerous subproject, we need the dangerous model! # for the dangerous subproject, we need the dangerous model!
if [ $SUBPROJECT = "dangerous" ]; then if [ "$SUBPROJECT" = "dangerous" ]; then
# As with the "classically" seeded snaps, snaps from the edge channel may # As with the "classically" seeded snaps, snaps from the edge channel may
# require different content snaps to be installed, so they must be # require different content snaps to be installed, so they must be
# included in the system as well. We just use the same list as was # included in the system as well. We just use the same list as was
# computed in snap_validate_seed. # computed in snap_validate_seed.
model=/usr/share/livecd-rootfs/live-build/${PROJECT}/ubuntu-classic-amd64-dangerous.model model="${dangerous_model}"
while read snap; do while read snap; do
prepare_args="$prepare_args --snap=${snap}=edge" prepare_args+=("--snap=${snap}=edge")
done < config/missing-providers done < config/missing-providers
for comp in $(get_all_components "$model"); do
components+=("$comp")
done
else
# Normally we use the stable model here. Use the dangerous one for now
# until we get snaps on stable 26.04 tracks and channels.
#model="${stable_model}"
model="${dangerous_model}"
# We're currently using the dangerous model for the stable image because it
# allows us to override snaps. But we don't want all snaps from edge like
# the dangerous model has, we want most of them from stable excluding:
# * snapd (for TPM/FDE)
# * snapd-desktop-integration (for TPM/FDE)
# * firmware-updater (for TPM/FDE)
# * desktop-security-center (for TPM/FDE)
snaps_from_dangerous=(snapd snapd-desktop-integration firmware-updater desktop-security-center)
for snap_arg in $(get_snaps_args_excluding "$stable_model" "${snaps_from_dangerous[@]}"); do
prepare_args+=("$snap_arg")
done
for comp in $(get_components_excluding "$stable_model" "${snaps_from_dangerous[@]}"); do
components+=("$comp")
done
for comp in $(get_components "$dangerous_model" "${snaps_from_dangerous[@]}"); do
components+=("$comp")
done
fi fi
for comp in "${components[@]}"; do
prepare_args+=(--comp "$comp")
done
channel="" channel=""
if [ -n "${CHANNEL:-}" ]; then if [ -n "${CHANNEL:-}" ]; then
channel="--channel $CHANNEL" channel="--channel $CHANNEL"
@ -60,7 +185,7 @@ fi
# snap versions regardless of phasing status # snap versions regardless of phasing status
env SNAPPY_STORE_NO_CDN=1 UBUNTU_STORE_COHORT_KEY="+" snap prepare-image \ env SNAPPY_STORE_NO_CDN=1 UBUNTU_STORE_COHORT_KEY="+" snap prepare-image \
--classic $model $channel ${prepare_args:+$prepare_args} chroot --classic $model $channel "${prepare_args[@]}" chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop
rsync -av chroot/system-seed/{systems,snaps} chroot/var/lib/snapd/seed rsync -av chroot/system-seed/{systems,snaps} chroot/var/lib/snapd/seed

View File

@ -2,7 +2,7 @@ type: model
authority-id: canonical authority-id: canonical
series: 16 series: 16
brand-id: canonical brand-id: canonical
model: ubuntu-classic-2510-amd64-dangerous model: ubuntu-classic-2604-amd64-dangerous
architecture: amd64 architecture: amd64
base: core24 base: core24
classic: true classic: true
@ -10,12 +10,17 @@ distribution: ubuntu
grade: dangerous grade: dangerous
snaps: snaps:
- -
default-channel: classic-25.10/edge default-channel: classic-26.04/edge
id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH
name: pc name: pc
type: gadget type: gadget
- -
default-channel: 25.10/beta components:
nvidia-580-uda-ko:
presence: optional
nvidia-580-uda-user:
presence: optional
default-channel: 26.04/beta
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
name: pc-kernel name: pc-kernel
type: kernel type: kernel
@ -29,6 +34,11 @@ snaps:
id: dwTAh7MZZ01zyriOZErqd1JynQLiOGvM id: dwTAh7MZZ01zyriOZErqd1JynQLiOGvM
name: core24 name: core24
type: base type: base
-
default-channel: latest/edge
id: cUqM61hRuZAJYmIS898Ux66VY61gBbZf
name: core26
type: base
- -
default-channel: latest/edge default-channel: latest/edge
id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4 id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
@ -39,6 +49,11 @@ snaps:
id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR
name: bare name: bare
type: base type: base
-
default-channel: latest/edge
id: HyhSEBPv3vHsW6uOHkQR384NgI7S6zpj
name: mesa-2404
type: app
- -
default-channel: 1/edge default-channel: 1/edge
id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP
@ -71,24 +86,24 @@ snaps:
type: app type: app
- -
default-channel: latest/edge default-channel: latest/edge
id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 id: ew7OxpbRTxfK7ImpIygRR85lkxvU7Pzt
name: gnome-42-2204 name: gnome-46-2404
type: app type: app
- -
default-channel: latest/edge default-channel: latest/edge
id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu
name: snapd-desktop-integration name: snapd-desktop-integration
type: app type: app
timestamp: 2025-05-01T12:00:00.0Z timestamp: 2025-12-09T12:00:00.0Z
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
AcLBXAQAAQoABgUCaL9OoAAKCRDgT5vottzAEnYyD/9CfnhmFu+aiOSDMf14Ws6xgxlwJ24wKbR9 AcLBXAQAAQoABgUCaUFt7QAKCRDgT5vottzAEhdnD/92LBcQm3iw/kPao4KqGE0OhfXDFd7Z6+Qv
DHLlO5LO47pgA46Yt3NO8ev8ZAvnMZmypiNnDE9o0m2cPpdEsg5nFZ4y8DTjedj7J2islGbFKrZk A1Dlzz6Cw0tuj0r5aZH7vJQCx4kC1Eaoi8apg3XhqAyhr74/MsIwMhPPL8qcSNv8ZWruoGwFp/rx
o7oejqGYWtwHGV4D5RAEgBAwlo/dOkKkG/7r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ZQqA== MjEqfWn4lL16xW2Zzr6e8xWwUrM7T3Gp4WTA7/xOeA==

View File

@ -2,7 +2,7 @@ type: model
authority-id: canonical authority-id: canonical
series: 16 series: 16
brand-id: canonical brand-id: canonical
model: ubuntu-classic-2510-amd64 model: ubuntu-classic-2604-amd64
architecture: amd64 architecture: amd64
base: core24 base: core24
classic: true classic: true
@ -10,12 +10,21 @@ distribution: ubuntu
grade: signed grade: signed
snaps: snaps:
- -
default-channel: classic-25.10/stable default-channel: classic-26.04/stable
id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH id: UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH
name: pc name: pc
type: gadget type: gadget
- -
default-channel: 25.10/stable components:
nvidia-550-erd-ko:
presence: optional
nvidia-550-erd-user:
presence: optional
nvidia-570-erd-ko:
presence: optional
nvidia-570-erd-user:
presence: optional
default-channel: 26.04/stable
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
name: pc-kernel name: pc-kernel
type: kernel type: kernel
@ -40,55 +49,60 @@ snaps:
name: bare name: bare
type: base type: base
- -
default-channel: 1/stable/ubuntu-25.10 default-channel: latest/stable/ubuntu-26.04
id: HyhSEBPv3vHsW6uOHkQR384NgI7S6zpj
name: mesa-2404
type: app
-
default-channel: 1/stable/ubuntu-26.04
id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP
name: firmware-updater name: firmware-updater
type: app type: app
- -
default-channel: 1/stable/ubuntu-25.10 default-channel: 1/stable/ubuntu-26.04
id: FppXWunWzuRT2NUT9CwoBPNJNZBYOCk0 id: FppXWunWzuRT2NUT9CwoBPNJNZBYOCk0
name: desktop-security-center name: desktop-security-center
type: app type: app
- -
default-channel: 1/stable/ubuntu-25.10 default-channel: 1/stable/ubuntu-26.04
id: aoc5lfC8aUd2VL8VpvynUJJhGXp5K6Dj id: aoc5lfC8aUd2VL8VpvynUJJhGXp5K6Dj
name: prompting-client name: prompting-client
type: app type: app
- -
default-channel: 2/stable/ubuntu-25.10 default-channel: 2/stable/ubuntu-26.04
id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg id: gjf3IPXoRiipCu9K0kVu52f0H56fIksg
name: snap-store name: snap-store
type: app type: app
- -
default-channel: latest/stable/ubuntu-25.10 default-channel: latest/stable/ubuntu-26.04
id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit id: jZLfBRzf1cYlYysIjD2bwSzNtngY0qit
name: gtk-common-themes name: gtk-common-themes
type: app type: app
- -
default-channel: latest/stable/ubuntu-25.10 default-channel: latest/stable/ubuntu-26.04
id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
name: firefox name: firefox
type: app type: app
- -
default-channel: latest/stable/ubuntu-25.10 default-channel: latest/stable/ubuntu-26.04
id: lATO8HzwVvrAPrlZRAWpfyrJKlAJrZS3 id: ew7OxpbRTxfK7ImpIygRR85lkxvU7Pzt
name: gnome-42-2204 name: gnome-46-2404
type: app type: app
- -
default-channel: latest/stable/ubuntu-25.10 default-channel: latest/stable/ubuntu-26.04
id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu id: IrwRHakqtzhFRHJOOPxKVPU0Kk7Erhcu
name: snapd-desktop-integration name: snapd-desktop-integration
type: app type: app
timestamp: 2025-08-06T12:00:00.0Z timestamp: 2025-11-06T12:00:00.0Z
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
AcLBXAQAAQoABgUCaJuDnwAKCRDgT5vottzAEqjkD/4+SAjC0APhGmSh73ewaUe57Nbs4qDfrUJZ AcLBXAQAAQoABgUCaSatwAAK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