Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/scripts/check-renovate-series.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
"https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git": (
ROOT / "elements" / "freedesktop-sdk.bst"
),
"https://gitlab.gnome.org/GNOME/gnome-build-meta.git": (
ROOT / "elements" / "gnome-build-meta.bst"
),
}

TRACK_RE = re.compile(r"^\s*track:\s*[\"']?([^\"'\s]+)[\"']?\s*$", re.MULTILINE)
Expand All @@ -54,7 +51,7 @@ def series_of(track):
"""The literal prefix of a track glob, with the trailing '*' removed.

`freedesktop-sdk-26.08*` -> `freedesktop-sdk-26.08`
`gnome-50` -> `gnome-50` (no glob; the whole value)
`stable` -> `stable` (no glob; the whole value)
"""
return track.split("*", 1)[0]

Expand Down
35 changes: 11 additions & 24 deletions .github/workflows/track-junctions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Track junction refs
# This deliberately has NO `pull_request` trigger. The job this replaces
# (`track-refs` in build.yml) ran on every `renovate/*` pull request and pushed
# re-resolved junction refs onto that PR's branch, so unrelated dependency PRs
# silently acquired freedesktop-sdk and gnome-build-meta bumps that appeared in
# no title, body or Renovate table. Moving the work onto a schedule with its own
# silently acquired freedesktop-sdk bumps that appeared in no title, body or
# Renovate table. Moving the work onto a schedule with its own
# branch also removes the need for the old `startsWith(github.head_ref,
# 'renovate/')` gate: a branch name is not an identity, and on a scheduled
# trigger there is no PR-controlled head to gate in the first place.
Expand Down Expand Up @@ -57,24 +57,19 @@ jobs:
with:
tool: just@1.58.0

- name: Track and resolve BuildStream junction refs
- name: Track and resolve the BuildStream junction ref
run: |
set -euo pipefail
# No `|| true` here. The job this replaces swallowed both exit codes,
# No `|| true` here. The job this replaces swallowed the exit code,
# which made an upstream outage indistinguishable from "nothing to
# track" and let the run report success having resolved nothing.
#
# gnome-build-meta.bst carries `overrides: freedesktop-sdk.bst`, so
# the pair is only valid together and is tracked and committed as one
# atomic change — same rationale as dakota's track-core-junctions.
just bst source track freedesktop-sdk.bst
just bst source track gnome-build-meta.bst

- name: Sync release-version to the tracked FSDK point release
- name: Sync installer-version to the tracked FSDK point release
run: |
set -euo pipefail
# project.conf's release-version names every published OS asset and
# must equal the FSDK point release; check-release-version.py fails
# project.conf's installer-version must equal the FSDK point
# release; check-release-version.py fails
# closed on drift and is the first thing `just validate` runs. Without
# this step an FSDK bump would open a PR that dies in seconds at
# "Validate Element Graph" — exactly the failure the old job produced.
Expand All @@ -83,7 +78,7 @@ jobs:
echo "ERROR: tracked freedesktop-sdk.bst ref carries no X.Y.Z point release" >&2
exit 1
fi
sed -i -E "s|^([[:space:]]*release-version:[[:space:]]*).*|\1\"${pinned}\"|" project.conf
sed -i -E "s|^([[:space:]]*installer-version:[[:space:]]*).*|\1\"${pinned}\"|" project.conf
# Assert before opening the PR; a failure here means the sync broke.
python3 .github/scripts/check-release-version.py

Expand All @@ -98,12 +93,10 @@ jobs:
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

old_fsdk=$(git show "HEAD:elements/freedesktop-sdk.bst" | awk '/^[[:space:]]*ref:/ { print $2; exit }')
old_gbm=$(git show "HEAD:elements/gnome-build-meta.bst" | awk '/^[[:space:]]*ref:/ { print $2; exit }')
new_fsdk=$(awk '/^[[:space:]]*ref:/ { print $2; exit }' elements/freedesktop-sdk.bst)
new_gbm=$(awk '/^[[:space:]]*ref:/ { print $2; exit }' elements/gnome-build-meta.bst)

git checkout -B "$BRANCH"
git add elements/freedesktop-sdk.bst elements/gnome-build-meta.bst project.conf
git add elements/freedesktop-sdk.bst project.conf
if git diff --cached --quiet; then
echo "Junction refs already current — nothing to propose."
exit 0
Expand All @@ -112,27 +105,21 @@ jobs:
title="chore(deps): update BuildStream junctions"
if [ "$old_fsdk" != "$new_fsdk" ]; then
title="${title} (freedesktop-sdk $(echo "$old_fsdk" | sed 's/^freedesktop-sdk-//;s/-[0-9]*-g[0-9a-f]*$//') -> $(echo "$new_fsdk" | sed 's/^freedesktop-sdk-//;s/-[0-9]*-g[0-9a-f]*$//'))"
elif [ "$old_gbm" != "$new_gbm" ]; then
title="${title} (gnome-build-meta)"
fi

{
echo "Scheduled resolution of the BuildStream junction refs to their"
echo "Scheduled resolution of the BuildStream junction ref to its"
echo "\`git-describe\` form. Opened by the tracker so the bump arrives as its own"
echo "reviewable change instead of being pushed into an unrelated pull request."
echo ""
echo "| Junction | From | To |"
echo "| --- | --- | --- |"
echo "| \`elements/freedesktop-sdk.bst\` | \`${old_fsdk}\` | \`${new_fsdk}\` |"
echo "| \`elements/gnome-build-meta.bst\` | \`${old_gbm}\` | \`${new_gbm}\` |"
echo ""
echo "\`project.conf\`'s \`release-version\` is synced to the pinned FSDK point"
echo "\`project.conf\`'s \`installer-version\` is synced to the pinned FSDK point"
echo "release in the same commit, because \`check-release-version.py\` fails closed"
echo "on drift between the two."
echo ""
echo "The two junctions move together: \`gnome-build-meta.bst\` overrides"
echo "\`freedesktop-sdk.bst\`, so a half-applied pair is not a valid graph."
echo ""
echo "---"
echo "*Generated by [Track junction refs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})*"
} > /tmp/pr-body.md
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
entry: python .github/scripts/check-renovate-series.py
language: system
pass_filenames: false
files: ^(renovate\.json|elements/(freedesktop-sdk|gnome-build-meta)\.bst|\.github/scripts/check-renovate-series\.py)$
files: ^(renovate\.json|elements/freedesktop-sdk\.bst|\.github/scripts/check-renovate-series\.py)$
- id: check-k0s-version
name: k0s version derived from include/k0s.yml, not restated
entry: python .github/scripts/check-k0s-version.py
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ This policy covers everything this repository produces and its build pipeline:
- Release signing and the `systemd-sysupdate` update/verification flow.

**Out of scope:** vulnerabilities in upstream components such as
freedesktop-sdk, GNOME build metadata, systemd, or k0s itself. Report those to
freedesktop-sdk, systemd, or k0s itself. Report those to
the respective upstream project; report to this repository only when the issue
is introduced by our integration, build, signing, or packaging of the
component.
7 changes: 5 additions & 2 deletions docs/skills/bump-fsdk-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ Before merging a bump:

- Bumping across a minor line (for example, 25.08 → 26.08) may rename/relocate components or restructure runtime stacks:
- In FSDK 26.08, `public-stacks/runtime-minimal.bst` drops bash and coreutils, which moved to `public-stacks/runtime-gnu.bst`. Stacks whose components carry shell integration commands (like `elements/base/base-stack.bst` for `ldconfig` and `ca-certificates`) need `public-stacks/runtime-gnu.bst` in `depends:`.
- `components/systemd-base.bst` was dropped in FSDK 26.08, and FSDK now ships its own systemd directly, so the previous `gnome-build-meta` systemd overrides were removed from `elements/freedesktop-sdk.bst`.
- `components/systemd-base.bst` was dropped in FSDK 26.08, and FSDK now ships its own systemd directly.
- `freedesktop-sdk.bst` is the only junction. `project.conf` takes FSDK's
`include/runtime.yml` and the `collect_initial_scripts` plugin straight from
it; there is no gnome-build-meta junction to keep in step.
- A point-release tag is immutable: once a GitHub Release for a given
`image-version` is published, never republish different bits under it.
- **Six patches live under `patches/freedesktop-sdk/`.** `0001` adds the GNOME
Expand All @@ -87,7 +90,7 @@ Before merging a bump:

Point releases are delivered by the scheduled `track-junctions.yml` workflow.
- **Trigger:** `track-junctions.yml` runs daily and resolves the junction's own `track: freedesktop-sdk-26.08*` glob; it does not wait on a Renovate PR.
- **Mechanism:** `track-junctions.yml` runs `just bst source track freedesktop-sdk.bst` (alongside `gnome-build-meta.bst`, which overrides it), syncs `project.conf`'s `installer-version` to the tracked point release, and opens its own PR on `auto/track-junctions`. It never runs on `pull_request`, so a junction bump can never be injected into an unrelated dependency PR.
- **Mechanism:** `track-junctions.yml` runs `just bst source track freedesktop-sdk.bst`, syncs `project.conf`'s `installer-version` to the tracked point release, and opens its own PR on `auto/track-junctions`. It never runs on `pull_request`, so a junction bump can never be injected into an unrelated dependency PR.
- **Build Loop:** When the PR is merged to `main`, GitHub Actions compiles the image set (OS DDI, UKIs, netboot ESP) and sysexts, and publishes them to a new GitHub Release tagged `v<image-version>`.

## See also
Expand Down
6 changes: 3 additions & 3 deletions docs/skills/ci-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sudo_cmd := if `podman info >/dev/null 2>&1 && echo 1 || echo 0` == "1" { "" } e

| Job | Workflow | Trigger | Purpose |
|-----|----------|---------|---------|
| `track-junctions` | `track-junctions.yml` | `schedule` (08:00 UTC), `workflow_dispatch` | Resolves the `freedesktop-sdk.bst` + `gnome-build-meta.bst` junction refs, syncs `project.conf`'s `installer-version`, and opens/updates its own PR on `auto/track-junctions`. `contents: write` + `pull-requests: write`, never on `pull_request`. |
| `track-junctions` | `track-junctions.yml` | `schedule` (08:00 UTC), `workflow_dispatch` | Resolves the `freedesktop-sdk.bst` junction ref, syncs `project.conf`'s `installer-version`, and opens/updates its own PR on `auto/track-junctions`. `contents: write` + `pull-requests: write`, never on `pull_request`. |
| `changes` | `build.yml` | `pull_request`, `push/main`, `workflow_dispatch` | Decides whether `build` and `boot-test` run: always outside pull requests; on a pull request only if `.github/scripts/image-build-needed.py`, checked out from the PR's base revision, finds a changed path that can reach the image set or the boot test (see [Build time and caches](#build-time-and-caches)). `contents: read` + `pull-requests: read`. |
| `build` | `build.yml` | `pull_request`, `push/main`, `workflow_dispatch` | Resolves the element graph, sets `image-version`, and runs the full BuildStream compile of the image set (OS DDI, signed UKIs, netboot ESP, k0s/KubeStellar/OpenZFS sysext assets), which also writes and signs the combined `SHA256SUMS` inside `oci/bluefin-server-image.bst`. On `main` it installs the `BOOT_KEYS_TARBALL` and `SYSUPDATE_SIGNING_KEY` secrets; both are required there. Off `main` it also exports two higher-versioned sets (`1.<run>.1`, `1.<run>.2`) for the update test. Read-only token. |
| `boot-test` | `build.yml` | `pull_request`, `push/main`, `workflow_dispatch` | Runs the Secure Boot QEMU checks on the exported sets (see Core Process step 4). Read-only token. |
Expand All @@ -132,8 +132,8 @@ uploaded to a GitHub Release tagged `v<image-version>` (`YY.MM.<run>` on main).
## Core Process

1. **Renovate tracking:** `renovate.json` is configured with a custom regex
manager to scan BuildStream junction files (`freedesktop-sdk.bst` and
`gnome-build-meta.bst`) using the `git-refs` datasource.
manager to scan the BuildStream junction (`freedesktop-sdk.bst`) using the
`git-refs` datasource.
2. **Auto-resolution:** The scheduled `track-junctions` workflow executes
`just bst source track` to resolve raw tags to full `git-describe` refs,
syncs `installer-version` to the tracked FSDK point release, and proposes the
Expand Down
7 changes: 0 additions & 7 deletions elements/freedesktop-sdk.bst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ config:
# Our public module signing certificate; FSDK's kernel trusts it and
# turns on lockdown (see bluefin-server/keys/linux-module-cert.bst).
components/linux-module-cert.bst: bluefin-server/keys/linux-module-cert.bst

# FSDK 26.08 dropped components/systemd-base.bst, and gnome-build-meta
# (gnome-50 / master) is still pinned to FSDK 25.08 and still depends on it,
# so overriding FSDK's systemd onto gnome-build-meta's fails to load.
# Use FSDK 26.08's own systemd until gnome-build-meta tracks 26.08.
# NOTE: re-evaluate for brew-deps.bst (nspawn machine image), which wanted
# gnome-build-meta's nspawn/container patches.
21 changes: 0 additions & 21 deletions elements/gnome-build-meta.bst

This file was deleted.

1 change: 0 additions & 1 deletion include/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ aliases:
github: https://github.com/
k8s_dl: https://dl.k8s.io/
gitlab: https://gitlab.com/
gnome: https://gitlab.gnome.org/GNOME/
crates: https://static.crates.io/
sourceforge_download: https://downloads.sourceforge.net/
28 changes: 0 additions & 28 deletions patches/gnome-build-meta/disable-lorry-mirrors.patch

This file was deleted.

12 changes: 0 additions & 12 deletions patches/gnome-build-meta/upgrade-systemd-v261.patch

This file was deleted.

4 changes: 2 additions & 2 deletions project.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ min-version: 2.5
element-path: elements

(@):
- gnome-build-meta.bst:freedesktop-sdk.bst:include/runtime.yml
- freedesktop-sdk.bst:include/runtime.yml
- include/aliases.yml

options:
Expand Down Expand Up @@ -65,7 +65,7 @@ plugins:
- patch_queue
- cargo2
- origin: junction
junction: gnome-build-meta.bst
junction: freedesktop-sdk.bst
elements:
- collect_initial_scripts

Expand Down
6 changes: 0 additions & 6 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
"matchPackageNames": ["https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git"],
"extractVersion": "^freedesktop-sdk-(?<version>26\\.08\\.[0-9]+)$",
"versioning": "semver"
},
{
"matchDatasources": ["git-refs"],
"matchPackageNames": ["https://gitlab.gnome.org/GNOME/gnome-build-meta.git"],
"extractVersion": "^(?<version>50\\.[0-9]+)$",
"versioning": "semver"
}
]
}
4 changes: 2 additions & 2 deletions tests/unit/test_build_depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_manual_and_script_elements_depend_on_base_stack():
"""Ensure all manual/script elements have base/base-stack.bst in build-depends."""
for bst_path in ELEMENTS_DIR.rglob("*.bst"):
# Skip external junction declarations
if bst_path.name in ("freedesktop-sdk.bst", "gnome-build-meta.bst"):
if bst_path.name == "freedesktop-sdk.bst":
continue

content = bst_path.read_text(encoding="utf-8")
Expand Down Expand Up @@ -55,7 +55,7 @@ def test_compose_elements_declare_integration_explicitly():
integration (the ld.so cache, hwdb) opt in with integrate: True.
"""
for bst_path in ELEMENTS_DIR.rglob("*.bst"):
if bst_path.name in ("freedesktop-sdk.bst", "gnome-build-meta.bst"):
if bst_path.name == "freedesktop-sdk.bst":
continue

content = bst_path.read_text(encoding="utf-8")
Expand Down
20 changes: 7 additions & 13 deletions tests/unit/test_check_renovate_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def run_against(tmp_path, renovate, junctions):


FSDK = "https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git"
GBM = "https://gitlab.gnome.org/GNOME/gnome-build-meta.git"


def rule(dep, extract):
Expand All @@ -53,9 +52,8 @@ def junction(track):
return f"kind: junction\n\nsources:\n- kind: git_repo\n track: {track}\n ref: x\n"


BOTH_JUNCTIONS = {
JUNCTIONS = {
"freedesktop-sdk.bst": junction("freedesktop-sdk-26.08*"),
"gnome-build-meta.bst": junction("gnome-50"),
}


Expand All @@ -65,13 +63,12 @@ def test_passes_when_series_agree(tmp_path):
{
"packageRules": [
rule(FSDK, r"^freedesktop-sdk-(?<version>26\.08\.[0-9]+)$"),
rule(GBM, r"^(?<version>50\.[0-9]+)$"),
]
},
BOTH_JUNCTIONS,
JUNCTIONS,
)
assert result.returncode == 0, result.stderr
assert "OK: 2" in result.stdout
assert "OK: 1" in result.stdout


def test_fails_on_the_real_regression(tmp_path):
Expand All @@ -81,10 +78,9 @@ def test_fails_on_the_real_regression(tmp_path):
{
"packageRules": [
rule(FSDK, r"^freedesktop-sdk-(?<version>25\.08\.[0-9]+)$"),
rule(GBM, r"^(?<version>50\.[0-9]+)$"),
]
},
BOTH_JUNCTIONS,
JUNCTIONS,
)
assert result.returncode == 1
assert "matches no tag" in result.stderr
Expand All @@ -94,8 +90,8 @@ def test_fails_on_the_real_regression(tmp_path):
def test_fails_when_a_junction_has_no_rule(tmp_path):
result = run_against(
tmp_path,
{"packageRules": [rule(GBM, r"^(?<version>50\.[0-9]+)$")]},
BOTH_JUNCTIONS,
{"packageRules": []},
JUNCTIONS,
)
assert result.returncode == 1
assert "no packageRule" in result.stderr
Expand All @@ -107,12 +103,10 @@ def test_fails_when_the_junction_declares_no_track(tmp_path):
{
"packageRules": [
rule(FSDK, r"^freedesktop-sdk-(?<version>26\.08\.[0-9]+)$"),
rule(GBM, r"^(?<version>50\.[0-9]+)$"),
]
},
{
"freedesktop-sdk.bst": "kind: junction\n\nsources:\n- kind: git_repo\n ref: x\n",
"gnome-build-meta.bst": junction("gnome-50"),
},
)
assert result.returncode == 1
Expand All @@ -121,7 +115,7 @@ def test_fails_when_the_junction_declares_no_track(tmp_path):

def test_series_helpers_ignore_the_renovate_placeholder():
assert check_renovate_series.series_of("freedesktop-sdk-26.08*") == "freedesktop-sdk-26.08"
assert check_renovate_series.series_of("gnome-50") == "gnome-50"
assert check_renovate_series.series_of("stable") == "stable"
assert check_renovate_series.digits(r"^freedesktop-sdk-(?<version>26\.08\.[0-9]+)$") == ["26", "08"]
assert check_renovate_series.digits("freedesktop-sdk-26.08") == ["26", "08"]

Expand Down