Skip to content

Multi suite, multi distro#314

Draft
lool wants to merge 29 commits intoqualcomm-linux:mainfrom
lool:forky-noble
Draft

Multi suite, multi distro#314
lool wants to merge 29 commits intoqualcomm-linux:mainfrom
lool:forky-noble

Conversation

@lool
Copy link
Copy Markdown
Contributor

@lool lool commented Mar 8, 2026

This is still exploratory and in the short-term meant to help compare
SBOMs across distros and suites

  • feat(rootfs): Add suite and distro variables
  • feat(rootfs): Generate APT sources dynamically
  • feat(rootfs): Generate Debian backports APT config
  • feat(rootfs): Generate qsc-deb-releases APT config
  • feat(rootfs): Add hostname and username parameters
  • feat(rootfs): Per distro mirrors and components
  • feat(Makefile): Pass suite and distro to debos
  • ci(debos): Add suite and distro inputs, matrix build on PR
  • WIP: Add matrix build to build-on-push too

lool added 13 commits March 8, 2026 14:39
Add $suite (default: "trixie") and $distro (default: "debian") template
variables to the rootfs recipe. Use $suite in mmdebstrap's suite field
instead of the previously hardcoded value.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Replace the static overlays/apt-sources/ overlay with a shell run action
that generates /etc/apt/sources.list.d/{debian,ubuntu}.sources based on
the $distro and $suite template variables.

Debian uses deb.debian.org with main/contrib/non-free/non-free-firmware.
Ubuntu uses ports.ubuntu.com/ubuntu-ports with main/universe/restricted/
multiverse.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Replace the static overlays/backports/ overlay with a shell run action
that generates debian-backports.sources and debian-backports.pref using
the $suite variable. The backports files are only generated for
Debian.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Remove the static .sources and .pref files from the qsc-deb-releases
overlay, keeping only the keyring (.asc). Add a run action that
generates them dynamically using $suite-overlay as the suite name.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Add $username and $hostname template variables, both defaulting to
$distro ("debian" for Debian builds, "ubuntu" for Ubuntu). These can
also be overridden independently via -t username:... or -t hostname:...

Replace all hardcoded "debian" references in hostname setup, user
creation, password, sudoers, and docker group membership.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Select the correct mirror, components, and bootstrap packages based on
$distro in the mmdebstrap action:
- Debian: deb.debian.org/debian, main/contrib/non-free/non-free-firmware
- Ubuntu: ports.ubuntu.com/ubuntu-ports, main/universe/restricted/multiverse

Ubuntu builds also include ubuntu-keyring in the bootstrap to verify
archive signatures.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Add SUITE (default: trixie) and DISTRO (default: debian) Make variables,
passed as -t suite:... -t distro:... to all debos invocations.

This enables building for different distributions with e.g.:
    make SUITE=forky
    make DISTRO=ubuntu SUITE=noble

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Add suite and distro inputs to the reusable debos workflow, with
defaulting to debian+trixie. Use these for base container image and all
debos invocations.

Update just the PR build workflow to use a matrix strategy building both
trixie and forky suites.

Take this opportunity to rename build-pr to just build.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Create qsc-deb-releases .sources file with "Enabled: no" and only enable
it after verifying the suite exists via a wget probe of the Release
file.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Per distro and suite package installs:
- fastrpc-support: skipped for noble (not yet available)
- fastrpc-tests: only installed for trixie (only in trixie-overlay)
- debugcc: skipped for noble (not available in Ubuntu noble)
- Priority important/standard: use ?origin(Ubuntu) for Ubuntu builds
  instead of ?origin(Debian)

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Add wget to the mmdebstrap include list to make it available when the
qsc-deb-releases suite availability check runs. wget is already part of
the "comfortable" package set installed later; including it in the
bootstrap ensures it's available for the earlier probe step.
Expand the PR build matrix to explicit distro+suite pairs: debian/trixie,
debian/forky, ubuntu/noble, and ubuntu/resolute.

In debos workflow, use distro to determine container image
(public.ecr.aws/<distro>/<distro>:<suite>) and install the matching
archive keyring package (ubuntu-keyring for Ubuntu,
debian-archive-keyring for Debian).

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Rename build-daily to just build
@lool
Copy link
Copy Markdown
Contributor Author

lool commented Mar 8, 2026

A few thoughts on current implementation:

  • this lacks updates to docs, especially to remind ourselves and users of the overarching goals and what can reasonably be expected from qcom-deb-images; also general guidance on CI approach (build distro = target distro for instance)
  • it's painful when lists of packages are not in sync across target suites; I expect this will wash out over time
  • differences between Ubuntu and Debian are not as small as I wish, but not as large as I feared :)
  • will need to do something about the debian names in debos-recipes/qualcomm-linux-debian-*.yaml
  • debos as a deb is in various shapes: doesn't start in resolute (some issue with kernel modules), not installable in noble (no arm64 build); perhaps a different strategy is warranted, could be to use our own debos builds, or perhaps use a devel distro to build stable, not sure
  • I had snapshots and UX flavors in mind too, but didn't want to do these in the same PR

lool added 13 commits March 8, 2026 22:21
Set kernel package per matrix entry. Keep trixie on overlay kernel
(linux-image-6.16.7-qcom1++), use linux-image-arm64 for forky, use
linux-image-qcom for noble, and use linux-image-generic for resolute.
The new global default for the debos workflow is linux-image-arm64.

Only install firmware-atheros and firmware-qcom-soc on Debian; these
packages don't exist on Ubuntu and the kernel packages will pull the
corresponding firmware.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
mmdebstrap needs ubuntu-keyring to bootstrap Ubuntu.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
adbd is not available in Ubuntu noble; it was added in
android-platform-tools 34.0.5-4~exp1.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
fastrpc-support is not available in Ubuntu resolute either, so gate on
distro instead of suite for now.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
The fastrpc group is created by fastrpc-support which is only installed
on Debian. Check for the group with getent before adding it to the
useradd --groups list to avoid failures on Ubuntu.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
On Debian, the NM applet and connection editor are split into
network-manager-applet and nm-connection-editor. On Ubuntu noble, both
are provided by network-manager-gnome.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Call locale-gen without arguments so it reads /etc/locale.gen.
Previously the extra "UTF-8" argument was interpreted by Ubuntu's
locale-gen as a second (invalid) locale name:
    Error: 'UTF-8' is not a supported language or locale

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
On Ubuntu, DTBs are installed under /lib/firmware/<version>/device-tree/
while Debian uses /usr/lib/linux-image-<version>/. Detect which base
directory exists at build time and use it.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
u-boot-efi-dtb is not available in noble, so skip its installation and
the associated DTB copy to ESP.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
For consistency in docs and CI, use qcom as default user, password, and
hostname, no matter the distro.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
There is no need for the compressed assets except for upload, so just
compress them directly into the staging directory.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
lool added 2 commits March 9, 2026 11:32
Prefix all published artifact filenames with "$distro-$suite-" so
that builds for different distributions/suites can coexist in the same
S3 destination:
- debos.yml: use prefix for image artifacts going to staging directory
  including SBOMs
- lava-test.yml: add distro/suite inputs and expose them as DISTRO/SUITE
  env vars; add corresponding sed substitutions when rendering templates
- LAVA templates: reference {{DISTRO}}-{{SUITE}}-flash-*.tar.gz
- build-daily.yml, linux.yml: pass distro/suite when calling lava-test.yml

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
There is no need for the compressed SBOM assets except for upload, so
just compress them directly into the staging directory.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
@lool
Copy link
Copy Markdown
Contributor Author

lool commented Mar 9, 2026

Resolute image from CI running under QEMU
image

Current known issues:

  • build-url GH artifact has an unique name, so second upload-artifact call fails; we could prefix it, or we could upload it later, or we could just not use it at all – perhaps needs some bigger picture thinking with LAVA integration
  • qemu tests are failing, hostname is hardcoded to debian
  • need to update run-qemu script for new image names
  • Xfce desktop has no background

@lool
Copy link
Copy Markdown
Contributor Author

lool commented Mar 9, 2026

The noble image doesn't boot; it seems systemd-boot doesn't like the format of the linux kernel

@basak-qcom
Copy link
Copy Markdown
Contributor

AIUI, the kernel has stubble embedded into it now. Maybe an interaction with that?

# plus sign in the package name as a request to install the package, so
# use two plus signs
default: linux-image-6.16.7-qcom1++
default: linux-image-arm64
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that change is already pending in #277

@gagath
Copy link
Copy Markdown
Contributor

gagath commented Mar 10, 2026

As a global feedback I think that there is too much logic in the workflows and not enough outside of it. Github actions are well known for being hard to debug. I would like to have most of the logic inside of the Makefile instead, so users can reuse it, but it conflicts with the "one rootfs.tar, one image" policy a bit.

We could have .PHONY targets that generate Debian or Ubuntu images, but this is very hacky and I would like to have proper targets like rootfs-debian-unstable.tar instead. I think that @basak-qcom agrees, and that @lool disagrees. :)

@basak-qcom
Copy link
Copy Markdown
Contributor

I would like to have most of the logic inside of the Makefile instead...

Strongly agree to moving logic out of the GitHub Actions as much as possible :)

...I would like to have proper targets like rootfs-debian-unstable.tar instead...

I'd be OK with that, but would prefer not to end up with a proliferation of filenames. Maybe we could use dedicated build output directories instead?

Another approach would be to consider these things "build config" like the kernel does. Provide a config, expect exactly one build result, and arrange dependencies correctly so that if the config changes then the right things are rebuilt. That might be more complex that it's worth though, so a cut down version of that would be to use config parameters to make, and require a clean between builds.

Some combination of that might be possible. Define "build flavours" that set various parameters in config/flavour/* (checked in), then arrange build output in build/flavour/*. Initially make FLAVOUR=foo ... could then work easily enough. Developers could customise config parameters by duplicating config/flavour/foo/ into config/flavour/bar/ locally, then asking for that build.

@gagath
Copy link
Copy Markdown
Contributor

gagath commented Mar 24, 2026

Another though: we have Debian overlays for unstable and trixie, but nothing regarding Ubuntu. By adding Ubuntu support, are we also taking the responsibility to create such overlays (PPAs? QArtifactory?) and backport our preview changes (alsa-ucm-conf…) on noble and questing as well?

This would create additional work for DDs so we need to make sure we agree on what needs to be done, and how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants