Skip to content

Commit b478906

Browse files
authored
feat(next): update bootc to v1.16.1 matching main branch (#983)
* feat(next): update bootc to v1.16.1 matching main branch Fixes composefs splitstream format mismatch that prevented bootc upgrade on :next. composefs-rs added repr(C) to SplitstreamHeader between v1.15.x and v1.16.x, moving the magic bytes from offset 18 to offset 0. Users on :next with bootc 1.15.2 could not upgrade to images built with the new format. Syncs :next to the same bootc version as :main. Closes projectbluefin/dakota issue 981 Assisted-by: Claude Sonnet 4.6 via GitHub Copilot * fix(next): restore bootc override + fix sync workflow to preserve only junction refs The sync-next-from-main workflow used -X ours which protected entire junction files including config/overrides. When main added the bootc override back, the -X ours strategy kept next's deletion of it, causing :next to silently run gnome-build-meta's older bootc instead of the pinned v1.16.1. Two fixes: 1. Restore gnomeos-deps/bootc.bst override in gnome-build-meta.bst so the local v1.16.1 element is actually used by the :next build. 2. Rewrite sync workflow: merge -X theirs (main wins on conflict), then surgically restore only the ref:/track: lines for the two junction files. This ensures next = main config + next junction refs. Assisted-by: Claude Sonnet 4.6 via GitHub Copilot
1 parent ca69ed5 commit b478906

3 files changed

Lines changed: 489 additions & 308 deletions

File tree

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
name: Sync next branch from main
22

3-
# Keeps next up to date with all non-junction changes from main:
4-
# Renovate action pins, BST source bumps for Tailscale/fonts/etc., CI fixes.
3+
# Keeps next identical to main except for junction refs.
4+
# next = main + (track: master, GNOME master ref, freedesktop-sdk ref).
55
#
6-
# Strategy: git merge -X ours
7-
# - All non-conflicting main changes land on next automatically.
8-
# - Conflicts (only expected in junction ref files) resolve in favour of
9-
# next — keeping the gnome-build-meta master ref intact.
10-
#
11-
# If the merge fails (e.g. structural conflict beyond junction files), the
12-
# workflow fails visibly — no silent corruption.
6+
# Strategy: merge main normally, then restore next's junction ref/track lines.
7+
# This ensures ALL config/overrides/CI changes from main land on next
8+
# automatically — including bootc override additions, new elements, etc.
9+
# Only the ref: and track: lines for gnome-build-meta and freedesktop-sdk
10+
# are pinned to next's values.
1311

1412
on:
1513
push:
@@ -30,19 +28,39 @@ jobs:
3028
fetch-depth: 0
3129
token: ${{ secrets.GITHUB_TOKEN }}
3230

33-
- name: Merge main into next (keep junction refs)
31+
- name: Merge main into next (restore junction refs after merge)
3432
run: |
3533
git config user.name "github-actions[bot]"
3634
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3735
36+
# Save next's junction-specific values before merging.
37+
GNOME_TRACK=$(grep -m1 '^\s*track:' elements/gnome-build-meta.bst | awk '{print $2}')
38+
GNOME_REF=$(grep -m1 '^\s*ref:' elements/gnome-build-meta.bst | awk '{print $2}')
39+
FDO_TRACK=$(grep -m1 '^\s*track:' elements/freedesktop-sdk.bst | awk '{print $2}')
40+
FDO_REF=$(grep -m1 '^\s*ref:' elements/freedesktop-sdk.bst | awk '{print $2}')
41+
42+
echo "Preserving gnome-build-meta: track=$GNOME_TRACK ref=$GNOME_REF"
43+
echo "Preserving freedesktop-sdk: track=$FDO_TRACK ref=$FDO_REF"
44+
3845
git fetch origin main
39-
# -X ours: on conflict keep next's version (protects junction refs).
40-
# --no-edit: use the default merge commit message.
41-
if git merge origin/main -X ours --no-edit; then
42-
git push origin next
43-
echo "Synced main → next"
44-
else
45-
echo "ERROR: merge conflict beyond junction files — manual intervention required"
46+
47+
# Merge main — accept everything from main on conflict (-X theirs).
48+
# Junction config/overrides should now always match main.
49+
if ! git merge origin/main -X theirs --no-edit; then
50+
echo "ERROR: merge failed — manual intervention required"
4651
git merge --abort
4752
exit 1
4853
fi
54+
55+
# Restore next's junction ref/track (the only intentional divergence).
56+
sed -i "0,/track:/{s|track:.*|track: $GNOME_TRACK|}" elements/gnome-build-meta.bst
57+
sed -i "0,/^\s*ref:/{s|ref:.*|ref: $GNOME_REF|}" elements/gnome-build-meta.bst
58+
sed -i "0,/track:/{s|track:.*|track: $FDO_TRACK|}" elements/freedesktop-sdk.bst
59+
sed -i "0,/^\s*ref:/{s|ref:.*|ref: $FDO_REF|}" elements/freedesktop-sdk.bst
60+
61+
# Amend the merge commit to include the ref restoration.
62+
git add elements/gnome-build-meta.bst elements/freedesktop-sdk.bst
63+
git commit --amend --no-edit
64+
65+
git push origin next
66+
echo "Synced main → next (junction refs preserved)"

elements/gnome-build-meta.bst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ config:
2222
# Replace the element so the OCI image doesn't have any apps
2323
core/meta-gnome-core-apps.bst: core/meta-gnome-core-apps.bst
2424

25+
# Override to track bootc ahead of gnome-build-meta upstream
26+
gnomeos-deps/bootc.bst: gnomeos-deps/bootc.bst
27+
2528
gnomeos-deps/plymouth-gnome-theme.bst: bluefin/plymouth-bluefin-theme.bst
2629

2730
# Replace the element so the OCI image generates Bluefin's os-release file

0 commit comments

Comments
 (0)