Skip to content

Fix build pipeline: sandbox handling, source mirrors, cache pulls, prefix staging - #4

Open
marvin1099 wants to merge 9 commits into
DeckCheatz:mainfrom
marvin1099:fix/build-pipeline
Open

Fix build pipeline: sandbox handling, source mirrors, cache pulls, prefix staging#4
marvin1099 wants to merge 9 commits into
DeckCheatz:mainfrom
marvin1099:fix/build-pipeline

Conversation

@marvin1099

@marvin1099 marvin1099 commented Aug 21, 2026

Copy link
Copy Markdown

I let AI (Big Pickle - OpenCode Zen) try to find out why the building problems (sandbox problems) came from; this is the fix it came up with. Feel free to cherry-pick if need be.

What was actually broken

  • Sandboxing: bubblewrap cannot create user namespaces in plain docker/act containers. On GitHub runners only the AppArmor sysctls matter; locally --privileged is required. CI now tolerates missing sysctls and fail-fasts with a clear error when bwrap is unusable.
  • Source fetching: gcc.gnu.org / sourceware git clones return HTTP 429. The freedesktop-sdk mirror definitions are now included, and the mingw gcc refs are pinned to a tag commit that exists in the mirrors.
  • Total cache misses: the public fd-sdk cache has no bootstrap artifacts for 25.08.11, so everything rebuilt from scratch. Junction upreved to 25.08.16 (~134 elements now pull from cache).
  • rust-mingw build failure: fd-sdk 25.08.16 ships rustc 1.95.0; rust's bootstrap refuses newer hosts. Source bumped to 1.95.0 so std matches the host compiler.
  • Prefix staging was fatal (fatal-warnings: [overlaps]): the i686 cross-compilers deps staged the entire i686 userspace onto / (33k overlapping files). Nothing here compiles Linux code, so that block is replaced by exactly what Proton's 32-bit wine binaries need: standard-libs-i686 (glibc multiarch + ld-linux.so.2) and a new filter element i686-wine-libs (libgcc_s/libstdc++ without glibc closure).
  • trainer-monitor.exe silently dropped: ${prefix-root} is shell syntax and expands to nothing; fixed to %{prefix-root}.
  • Also: filled in GE-Proton10-4 config values, nix dev shell gets bubblewrap + buildstream-plugins, docs corrected.

Testing

  • Full bst build deploy/prefix.bst succeeds end-to-end: ~134 elements pulled from cache.freedesktop-sdk.io, mingw GCC + rust std built, wineboot + winetricks (sdl, vkd3d, dxvk2030, dotnet48) install headlessly, trainer-monitor.exe lands in C:\windows.
  • New smoke-test workflow validated green via act --privileged (all 8 steps).

Commits are split into logical chunks.
You don't have to use it of course i just felt like it.

@shymega

shymega commented Aug 21, 2026

Copy link
Copy Markdown
Member

@marvin1099 I'm just trying to resolve a circular dependency bug with the aliases, which I think I expected from my previous experience with that source, but let me check with my team...

@marvin1099

marvin1099 commented Aug 22, 2026

Copy link
Copy Markdown
Author

Was the "Fix: Force WINEARCH=win64" change a test as well, should i not have included ?
I personally thought the AI may have failed here, since we do build a 64 bit prefix i included those changes.
I think your "feat: Use aliases configuration from upstream freedesktop-sdk" broke the smoke test.
You probably know this I'm just writing because I was not sure if to re-base.
Can re-base if need be to include 75eeff2 holding off for now (exluding for now), depending on you answer (may change).

@marvin1099

Copy link
Copy Markdown
Author

Backed up 75eeff2 in fix/build-pipeline-s if you still need it.

@shymega

shymega commented Aug 22, 2026

Copy link
Copy Markdown
Member

Was the "Fix: Force WINEARCH=win64" change a test as well, should i not have included ? I personally thought the AI may have failed here, since we do build a 64 bit prefix i included those changes. I think your "feat: Use aliases configuration from upstream freedesktop-sdk" broke the smoke test. You probably know this I'm just writing because I was not sure if to re-base. Can re-base if need be to include 75eeff2 holding off for now (exluding for now), depending on you answer (may change).

The first thing was necessary for the timebeing, as I plan to use target-arch which will use win32/win64.

As for the smoke test breakage, I think I have a fix, but I need to wait until Monday when I can ask my colleague.

marvin1099 and others added 9 commits August 23, 2026 14:55
Include the freedesktop-sdk mirror definitions so git_repo sources on
gcc.gnu.org / sourceware.org fall back to the freedesktop-sdk GitLab
mirrors when upstream returns HTTP 429.

Pin the mingw gcc refs to the official releases/gcc-14.3.0 tag commit,
which exists in the mirror (the previous -704 snapshot commit does not).
The public artifact cache has no bootstrap artifacts for 25.08.11, so
every build had to compile the bootstrap from scratch. 25.08.16 pulls
cleanly from cache.freedesktop-sdk.io.

Bump the rust-mingw source to 1.95.0 to match the rustc shipped by the
new sdk; rust's bootstrap refuses hosts newer than its own version.
Depending on the i686 cross-compilers with build scope staged the whole
i686 userspace onto / (33k overlapping files), which is fatal under the
project's overlaps fatal-warning. Nothing in this element compiles
Linux code - Proton is prebuilt - so drop gnutls/gcc-i686 and keep
exactly what running Proton's 32-bit wine binaries needs:

- standard-libs-i686: i686 glibc multiarch dirs + ld-linux.so.2 loader
- new components/i686-wine-libs.bst: filter exposing only the gcc-libs
  runtime split (libgcc_s/libstdc++) of the i686 junction, without its
  runtime closure

Also fix trainer-monitor installation: ${prefix-root} is shell syntax
and expands to nothing, installing the exe outside install-root where
it was silently dropped from the artifact. Use %{prefix-root}.
Fill in version, SHA256 and download URL instead of empty strings so
the element graph resolves out of the box.
The AppArmor sysctls do not exist on older kernels or inside
unprivileged containers, so tolerate their failure instead of aborting.

Add a fail-fast step that runs a trivial bubblewrap bind before any
build starts and reports a clear error when user namespaces are
blocked (e.g. act/docker without --privileged).
Runs on push/PR/manual: installs the CI dependency set, lifts AppArmor
restrictions, verifies the bubblewrap sandbox, updates the Proton
config from pinned version+SHA256 (no large download), resolves the
element graph and builds the cheap winetricks element as a real
sandboxed fetch/build/cache round-trip.

Validated locally with act --privileged.
bubblewrap is required by BuildStream to sandbox builds;
buildstream-plugins provides the autotools element and git/patch
sources loaded via origin: pip in project.conf.
- WINEARCH is win32 and STEAM_COMPAT_CLIENT_INSTALL_PATH points to
  /tmp/steam-dummy
- build-prefix.yml was renamed build-matrix.yml long ago; list the
  reusable build-version.yml and the new smoke-test.yml
- document that building from an NTFS/fat checkout breaks artifact
  cache sharing: such mounts report mode 0777 for every file, which
  changes the CAS digests of local sources and diverges every
  subproject key from cache.freedesktop-sdk.io
@shymega
shymega force-pushed the fix/build-pipeline branch from f3fa1a1 to 4570368 Compare August 23, 2026 13:55
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.

2 participants