Use when creating, evaluating, or removing BuildStream junction element overrides - ensures agents follow GNOME OS upstream-first principle and maintain recognizable patterns
81
76%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./.opencode/skills/managing-bst-overrides/SKILL.mdBluefin-egg extends gnome-build-meta via junction. By default, all gnome-build-meta elements (and its freedesktop-sdk transitive dependency) are used as-is from upstream. Overrides replace specific upstream elements with local versions. Overrides should be rare and justified - the upstream-first principle means we align with GNOME OS patterns unless there's a compelling Bluefin-specific reason.
Guiding principle: A GNOME OS maintainer should recognize this as a standard GNOME-based image. Overrides break that recognition and create maintenance burden.
Overrides are declared in the junction element using config.overrides:
# elements/gnome-build-meta.bst
kind: junction
sources:
- kind: git_repo
url: gnome:gnome-build-meta.git
ref: <pinned-ref>
- kind: patch_queue
path: patches/gnome-build-meta
config:
overrides:
oci/os-release.bst: oci/os-release.bst
core/meta-gnome-core-apps.bst: core/meta-gnome-core-apps.bstWhat this does:
gnome-build-meta.bst:oci/os-release.bst, it loads elements/oci/os-release.bst (local) instead of gnome-build-meta:oci/os-release.bst (upstream)✅ Valid reasons:
❌ Invalid reasons (use patching instead):
| Goal | Mechanism | Why |
|---|---|---|
| Change os-release to say "Bluefin" | Override | Bluefin-specific branding |
| Enable a compiler flag on openssh | Patch | Behavioral tweak, stays aligned |
| Remove GNOME Maps from core apps | Override | Significant app selection change |
| Bump bootc to v1.2.0 | Patch | Version bump, aligns with upstream workflow |
| Fix bootc build failure | Patch | Bug fix, upstream can adopt |
| Replace bootc with identical copy | NEVER | Pointless divergence, pure maintenance burden |
# Copy from upstream as starting point (optional but recommended):
just bst source checkout gnome-build-meta.bst --directory /tmp/gbm-checkout
cp /tmp/gbm-checkout/elements/path/to/element.bst elements/path/to/element.bstEdit the local file to make Bluefin-specific changes. Add a comment at the top documenting why this is an override:
# Override: Bluefin branding - replaces GNOME OS release info with Bluefin identity
kind: manualEdit elements/gnome-build-meta.bst:
config:
overrides:
path/to/element.bst: path/to/element.bstThe syntax is upstream-path: local-path (usually identical).
just bst show oci/bluefin.bst | grep 'path/to/element.bst'
# Should show elements/path/to/element.bst NOT gnome-build-meta.bst:path/to/element.bstIf the element tracks upstream sources, add it to .github/workflows/track-bst-sources.yml:
elements:
auto-update:
- path/to/element.bstChecklist (mandatory - follow every step):
# Check out upstream at current junction ref
just bst source checkout gnome-build-meta.bst --directory /tmp/gbm-checkout
cat /tmp/gbm-checkout/elements/path/to/element.bstCompare carefully:
patching-upstream-junctions skillEdit elements/gnome-build-meta.bst, delete the line from config.overrides::
config:
overrides:
path/to/element.bst: path/to/element.bst # DELETE THIS LINEFind all references to the override:
rg --type=bst 'path/to/element.bst'For each non-junction reference (path/to/element.bst instead of gnome-build-meta.bst:path/to/element.bst), update to the junction path:
# Before:
build-depends:
- core/bootc.bst
# After:
build-depends:
- gnome-build-meta.bst:gnomeos-deps/bootc.bstException: If the reference is FROM a local override element, you may need to keep the local path (but re-evaluate whether that override should exist).
Search .github/workflows/track-bst-sources.yml for the element name and remove it from tracking groups (auto-update, manual-merge, etc.).
Skills reference overrides as examples. Update:
.opencode/skills/patching-upstream-junctions/SKILL.md.opencode/skills/oci-layer-composition/SKILL.md.opencode/skills/packaging-*/SKILL.md (for package-type-specific examples).opencode/skills/updating-upstream-refs/SKILL.md (tracking groups)Search for the element filename across all skill files:
rg 'element-name' .opencode/skills/rm elements/path/to/element.bst# Verify dependency graph resolves:
just bst show oci/bluefin.bst
# Verify build succeeds (or fails for unrelated reasons):
just buildCritical: The junction path (e.g., gnome-build-meta.bst:path/to/element.bst) must appear in bst show output. If it says "element not found" or "reference not found", you broke something in steps 2-3.
Periodically (quarterly or when bumping upstream refs), audit existing overrides:
yq '.config.overrides' elements/gnome-build-meta.bst# Check out current upstream:
just bst source checkout gnome-build-meta.bst --directory /tmp/gbm-checkout
# Compare local vs upstream:
diff -u /tmp/gbm-checkout/elements/path/to/element.bst elements/path/to/element.bstAsk:
Create a plan in docs/plans/YYYY-MM-DD-override-audit.md listing:
| Override | Justification | Status |
|---|---|---|
oci/os-release.bst | Bluefin branding (NAME, ID, PRETTY_NAME, etc.) | ✅ Justified |
core/meta-gnome-core-apps.bst | Custom GNOME app selection (removes unwanted apps) | ✅ Justified |
bluefin/plymouth-bluefin-theme.bst | Replaces gnomeos-deps/plymouth-gnome-theme.bst | ✅ Justified (branding) |
Removed overrides:
core/bootc.bstoci/gnomeos.bstThese patterns indicate override misuse:
🚩 Identical override: Local element is byte-for-byte identical to upstream
🚩 Version-only override: Only difference is ref: field pointing to newer version
🚩 Override without comment: No explanation of why it exists
🚩 Override of freedesktop-sdk element: Overriding FDO SDK elements is almost never justified
🚩 Override that could be a patch: Element diff only changes build flags, configure options, or sources
patching-upstream-junctions skillpatching-upstream-junctions to see if a patch sufficesremoving-packages for dependency cleanupverification-before-completion with local build evidenceupdating-upstream-refs for junction ref bumpslocal-e2e-testing for full verification workflowThis is the exact process used to remove core/bootc.bst on 2026-02-16:
Discovery:
# Check upstream version
just bst source checkout gnome-build-meta.bst --directory /tmp/gbm
diff -u /tmp/gbm/elements/gnomeos-deps/bootc.bst elements/core/bootc.bst
# Output: Files are identical (1358 lines, both v1.12.1, same cargo deps)Removal:
# 1. Remove override declaration
# Edit elements/gnome-build-meta.bst, delete line 20 from config.overrides
# 2. Update reference in oci/bluefin.bst
# Change build-depends from 'core/bootc.bst' to 'gnome-build-meta.bst:gnomeos-deps/bootc.bst'
# 3. Remove tracking
# Edit .github/workflows/track-bst-sources.yml, remove 'core/bootc.bst' from manual-merge group
# 4. Update skills (5 files)
rg 'core/bootc' .opencode/skills/
# Update references in packaging-rust-cargo-projects, updating-upstream-refs, etc.
# 5. Delete local file
rm elements/core/bootc.bst
# 6. Verify
just bst show oci/bluefin.bst | grep bootc
# Output: gnome-build-meta.bst:gnomeos-deps/bootc.bst (SUCCESS - using upstream)Result: 1358 lines of dead weight removed, BuildStream now pulls cached artifacts from GNOME's CAS, zero functional change.
# Check diff
diff -u /tmp/gbm/elements/oci/os-release.bst elements/oci/os-release.bstOutput shows Bluefin-specific branding:
- NAME: "GNOME OS"
- ID: gnomeos
+ NAME: "Bluefin"
+ ID: bluefin
- PRETTY_NAME: "GNOME OS (46.0)"
+ PRETTY_NAME: "Bluefin Egg ($(rpm --eval '%{os_version}'))"Conclusion: Override is justified - this is fundamental Bluefin branding. Keep it, add comment documenting it.
The goal is not to avoid overrides entirely - it's to use them only when necessary for Bluefin-specific needs. Every override creates divergence from GNOME OS:
Litmus test: If a GNOME OS maintainer looked at our element tree, would they say "this is clearly GNOME-based with Bluefin branding" or "what is this custom mess?" Overrides push us toward the latter.
Cause: Forgot to update references to use junction path.
Fix:
rg 'old/element/path.bst' elements/
# For each match, change to gnome-build-meta.bst:old/element/path.bstLikely causes:
Debug:
# Compare local (before removal) vs upstream:
git show HEAD~1:elements/path/to/element.bst > /tmp/local.bst
just bst source checkout gnome-build-meta.bst --directory /tmp/gbm
diff -u /tmp/local.bst /tmp/gbm/elements/path/to/element.bstCause: BuildStream caches by strong cache key (hash of element content + dependencies). If you changed only comments or whitespace, the cache key is unchanged.
Fix: Make a functional change (add/remove a dependency, change a variable) or bust the cache:
just bst artifact delete path/to/element.bstf062bf8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.