|
| 1 | +# UMU Sniper Source Builder |
| 2 | + |
| 3 | +This repository builds a UMU-owned Steam Runtime 3 (`sniper`) derivative **without downloading Valve's prebuilt runtime image or runtime tarball**. |
| 4 | + |
| 5 | +Instead, it follows the same broad public pipeline Valve documents for Steam Runtime 3: |
| 6 | + |
| 7 | +1. fetch SteamRT metadata and source package references, |
| 8 | +2. optionally fetch and patch source packages, |
| 9 | +3. optionally rebuild selected packages, |
| 10 | +4. assemble a base runtime from the SteamRT apt repositories plus any locally rebuilt packages, |
| 11 | +5. export that filesystem into a `FROM scratch` OCI image, |
| 12 | +6. optionally run a second Dockerfile-based overlay stage that matches the old `umu-sdk` customization model, |
| 13 | +7. attach artifacts to a tagged GitHub release. |
| 14 | + |
| 15 | +Valve says the official container runtimes and SDKs are built with `flatdeb-steam`, not with the scripts in `steam-runtime`, and that all software making up the Steam Runtime is available in source and binary form in `repo.steampowered.com/steamrt`. The public `sniper` snapshot also publishes `manifest.dpkg`, `source-required.txt`, `Sources.gz`, build IDs, and the sysroot Dockerfile. This project uses those public inputs and never downloads `SteamLinuxRuntime_sniper.tar.xz` or `Platform-...-runtime.tar.gz`. |
| 16 | + |
| 17 | +## What this gives you |
| 18 | + |
| 19 | +- A source-visible pipeline. |
| 20 | +- A patch point before package rebuilds. |
| 21 | +- A package-assembled base image rather than a downloaded runtime image. |
| 22 | +- Your previous `umu-sdk` style of customization preserved as an optional final overlay stage. |
| 23 | + |
| 24 | +## Important scope note |
| 25 | + |
| 26 | +This is the **closest public equivalent** to Valve's pipeline that can be run in GitHub Actions with public artifacts. It is not a byte-for-byte clone of Valve's internal build farm, and it does not call Valve's private or undocumented infrastructure. The assembly step here uses the published SteamRT apt repository and the published package manifest to reconstruct the runtime package set. |
| 27 | + |
| 28 | +## Repository layout |
| 29 | + |
| 30 | +- `config/sniper.env` — snapshot pinning and repo settings. |
| 31 | +- `scripts/fetch-metadata.sh` — downloads build metadata, manifests, source lists, and `Sources.gz`. |
| 32 | +- `scripts/fetch-sources.sh` — mirrors the source packages listed in `source-required.txt`. |
| 33 | +- `scripts/unpack-sources.sh` — expands `.dsc` source packages for inspection and patching. |
| 34 | +- `patches/<source-package>/*.patch` — optional patches, applied in lexical order. |
| 35 | +- `scripts/rebuild-patched-packages.sh` — rebuilds only the source packages you patched, into a local apt repo. |
| 36 | +- `scripts/assemble-base.sh` — assembles the base runtime image from packages, exports it, and emits a `FROM scratch` OCI image. |
| 37 | +- `docker/overlay.Dockerfile` — optional old-style “take base image and layer our changes on top” stage. |
| 38 | +- `overlays/rootfs/` — optional file overlay copied into the exported rootfs before the final image is built. |
| 39 | +- `scripts/hooks/post-extract.sh` — optional shell customization hook after rootfs export. |
| 40 | + |
| 41 | +## How the old `umu-sdk` model fits in |
| 42 | + |
| 43 | +Your old flow was: |
| 44 | + |
| 45 | +1. pull a prebuilt image, |
| 46 | +2. apply changes, |
| 47 | +3. publish a new image. |
| 48 | + |
| 49 | +This repo keeps the same *shape* for the last step, but changes the upstream stage: |
| 50 | + |
| 51 | +1. build the UMU base image from SteamRT package metadata and sources, |
| 52 | +2. tag that as the local base image, |
| 53 | +3. run `docker/overlay.Dockerfile` on top of it, |
| 54 | +4. export artifacts. |
| 55 | + |
| 56 | +So the “apply changes on top of an image” part survives, but the image you are extending is one you built locally from public SteamRT inputs. |
| 57 | + |
| 58 | +## Releasing |
| 59 | + |
| 60 | +Push a tag such as: |
| 61 | + |
| 62 | +```bash |
| 63 | +git tag -a v0.1.0 -m "v0.1.0" |
| 64 | +git push origin v0.1.0 |
| 65 | +``` |
| 66 | + |
| 67 | +The workflow will create release artifacts including: |
| 68 | + |
| 69 | +- source metadata bundle, |
| 70 | +- mirrored source package bundle, |
| 71 | +- assembled base rootfs tarball, |
| 72 | +- OCI archive for the base runtime image, |
| 73 | +- OCI archive for the final overlaid runtime image, |
| 74 | +- `SHA256SUMS`. |
| 75 | + |
| 76 | +## Using patches |
| 77 | + |
| 78 | +Drop patch files in: |
| 79 | + |
| 80 | +```text |
| 81 | +patches/bash/*.patch |
| 82 | +patches/libdecor-0/*.patch |
| 83 | +patches/steam-runtime-tools/*.patch |
| 84 | +``` |
| 85 | + |
| 86 | +Only patched source packages are rebuilt locally. Everything else is installed from the pinned SteamRT apt repository, which keeps the pipeline practical for CI while still letting you inspect and modify sources where needed. |
0 commit comments