mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-01-03 01:13:28 +00:00
Compare commits
29 Commits
26.04.6
...
ubuntu/mas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
383a1206cc | ||
|
|
2f918331fb | ||
|
|
e6558e2541 | ||
|
|
01c80d8d0a | ||
|
|
72511a0381 | ||
|
|
c147c15291 | ||
|
|
856f14edee | ||
|
|
caf4f1030a | ||
|
|
49e1ab15cd | ||
|
|
5cbea9f677 | ||
|
|
a19f30b9d6 | ||
|
|
44c14b799f | ||
|
|
9fdbaf8d6d | ||
|
|
ae1e5005aa | ||
|
|
c327ab7bd7 | ||
|
|
ab943acf44 | ||
|
|
827d87bd7f | ||
|
|
562e589cd1 | ||
|
|
65dad6ccc0 | ||
|
|
0fc035c8ba | ||
|
|
e5ef47f7dd | ||
|
|
69ee041674 | ||
|
|
e78505a5f3 | ||
|
|
544aa0299e | ||
|
|
98c75ef41b | ||
|
|
5e00e3ecb2 | ||
|
|
d280d58a7d | ||
|
|
e2c8b4b1ad | ||
|
|
b3ddf6a78a |
236
README.parameters
Normal file
236
README.parameters
Normal 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).
|
||||||
58
debian/changelog
vendored
58
debian/changelog
vendored
@ -1,3 +1,61 @@
|
|||||||
|
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
|
livecd-rootfs (26.04.6) resolute; urgency=medium
|
||||||
|
|
||||||
* desktop: build classic ISO with "grade: dangerous" and pull pc-kernel from
|
* desktop: build classic ISO with "grade: dangerous" and pull pc-kernel from
|
||||||
|
|||||||
@ -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
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -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 .
|
||||||
|
|||||||
@ -31,15 +31,82 @@ 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.
|
# Use jq to retrieve a list of --snap options from a given *signed* model.
|
||||||
get_snaps_args()
|
get_snaps_args_excluding()
|
||||||
{
|
{
|
||||||
model=$1
|
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
|
# 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.
|
# signature. Here we assume the only blank line is before the signature.
|
||||||
sed '/^$/,$d' -- "$model" \
|
sed '/^$/,$d' -- "$model" \
|
||||||
| yaml_to_json \
|
| yaml_to_json \
|
||||||
| jq --raw-output '.snaps[] | "--snap=" + .name + "=" + .["default-channel"]'
|
| 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:
|
||||||
@ -59,33 +126,56 @@ get_snaps_args()
|
|||||||
|
|
||||||
# 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+=("--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
|
else
|
||||||
# We're currently using the dangerous model for the non-dangerous ISO
|
# Normally we use the stable model here. Use the dangerous one for now
|
||||||
# because it allows us to override snaps. But we don't want all snaps from
|
# until we get snaps on stable 26.04 tracks and channels.
|
||||||
# edge like the dangerous model has, we want most of them from stable
|
#model="${stable_model}"
|
||||||
# (excluding pc-kernel).
|
model="${dangerous_model}"
|
||||||
while read -r snap_arg; do
|
# 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")
|
prepare_args+=("$snap_arg")
|
||||||
done < <(get_snaps_args /usr/share/livecd-rootfs/live-build/"${PROJECT}"/ubuntu-classic-amd64.model | grep -v -F pc-kernel)
|
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"
|
||||||
|
|||||||
@ -16,13 +16,9 @@ snaps:
|
|||||||
type: gadget
|
type: gadget
|
||||||
-
|
-
|
||||||
components:
|
components:
|
||||||
nvidia-550-erd-ko:
|
nvidia-580-uda-ko:
|
||||||
presence: optional
|
presence: optional
|
||||||
nvidia-550-erd-user:
|
nvidia-580-uda-user:
|
||||||
presence: optional
|
|
||||||
nvidia-570-erd-ko:
|
|
||||||
presence: optional
|
|
||||||
nvidia-570-erd-user:
|
|
||||||
presence: optional
|
presence: optional
|
||||||
default-channel: 26.04/beta
|
default-channel: 26.04/beta
|
||||||
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
|
id: pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza
|
||||||
@ -38,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
|
||||||
@ -48,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
|
||||||
@ -80,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-11-06T12:00:00.0Z
|
timestamp: 2025-12-09T12:00:00.0Z
|
||||||
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
|
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
|
||||||
|
|
||||||
AcLBXAQAAQoABgUCaQypDAAKCRDgT5vottzAEmmMD/0ZwVMEu6bzSCzB2kapPqSIDs/cQRUacgGE
|
AcLBXAQAAQoABgUCaUFt7QAKCRDgT5vottzAEhdnD/92LBcQm3iw/kPao4KqGE0OhfXDFd7Z6+Qv
|
||||||
rh2hgegTodsJsHu8+pnOmjvOl1F27Ynk8jGBhW0ncgPJ1+QzJDuHKbdUStOA9nrdLLSUG25QR7Dm
|
A1Dlzz6Cw0tuj0r5aZH7vJQCx4kC1Eaoi8apg3XhqAyhr74/MsIwMhPPL8qcSNv8ZWruoGwFp/r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xYS2fOS4qFUJlvyVwsSoJMXU+6YfA6tgEQ4Dbh6zp6r78
|
||||||
S3ULJVM1R1NTRQm5QCCL81ULaSr3lKZmBJ8bPxnt6A==
|
MjEqfWn4lL16xW2Zzr6e8xWwUrM7T3Gp4WTA7/xOeA==
|
||||||
|
|||||||
@ -48,6 +48,11 @@ snaps:
|
|||||||
id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR
|
id: EISPgh06mRh1vordZY9OZ34QHdd7OrdR
|
||||||
name: bare
|
name: bare
|
||||||
type: base
|
type: base
|
||||||
|
-
|
||||||
|
default-channel: latest/stable/ubuntu-26.04
|
||||||
|
id: HyhSEBPv3vHsW6uOHkQR384NgI7S6zpj
|
||||||
|
name: mesa-2404
|
||||||
|
type: app
|
||||||
-
|
-
|
||||||
default-channel: 1/stable/ubuntu-26.04
|
default-channel: 1/stable/ubuntu-26.04
|
||||||
id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP
|
id: EI0D1KHjP8XiwMZKqSjuh6W8zvcowUVP
|
||||||
@ -80,8 +85,8 @@ snaps:
|
|||||||
type: app
|
type: app
|
||||||
-
|
-
|
||||||
default-channel: latest/stable/ubuntu-26.04
|
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-26.04
|
default-channel: latest/stable/ubuntu-26.04
|
||||||
@ -91,13 +96,13 @@ snaps:
|
|||||||
timestamp: 2025-11-06T12:00:00.0Z
|
timestamp: 2025-11-06T12:00:00.0Z
|
||||||
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7ZS4K5cyFDhYDcPzhS7uyEkDxdUjg9g08BtNn
|
sign-key-sha3-384: 9tydnLa6MTJ-jaQTFUXEwHl1yRx7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qjVV43UNkJGF
|
WivlBgo3fKjRZg/sPyZX3FwhggglmuCRiiYK9xu1b4wsplv090fAF3q33o9wLB+G6A4DE9QDzhfu
|
||||||
Etb3k6zzOXMo2R8vYWfd0l0NM41yuxz0P3ggSUnkalFsOh71UqDQwz7AbGWc2osv3TVFM2Wluck7
|
7y5ABm/cG15nKDkanpbCFWwYEq7ANlzz3y6/KctQnFms3+qa5p5bdd+Q4mpqcJcNXMWFnb3b+lSp
|
||||||
NmC747+5pjiYjiiLpIvTJnTs+F/A7lxkHo1N8qMil/eTgqDRd5M53cEaLJEyPaZoJy6MLJ1T4pDd
|
TITMdTf9afNKHFTbwBABoNVLDYelkNCYD99ukuSIS8MeiIHEXxUV9lNaEPTKoXgv3LETI8Wd43Qs
|
||||||
FSjOXcBWhi6RT15vlgx7XQenzUooVrnSwwWsgcIJHw==
|
Msb1UuoDShZo2gfDOlb8P0W7gxz79QbjMcSBBoqVew==
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user