Skip to content

Commit f4e1b2a

Browse files
committed
fix(linux): include Git LFS and validate linked-worktree payloads
1 parent 96def79 commit f4e1b2a

11 files changed

Lines changed: 76 additions & 3 deletions

‎.github/workflows/measure-classic-check.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- tools/build-sdl3-mixer.sh
1616
- tools/measure-classic-check-images.sh
1717
- tools/smoke-classic-check.sh
18+
- tools/smoke-git-lfs.sh
1819
- tools/tests/**
1920
- tools/validate-toolchains.sh
2021
- tools/verify-classic-check-package.py

‎.github/workflows/validate.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
tools/build-sdl3-mixer.sh | \
4646
tools/install_classic_vulkan_toolchain.py | \
4747
tools/require-image-checks.sh | \
48+
tools/smoke-git-lfs.sh | \
4849
tools/test-require-image-checks.sh | \
4950
tools/validate-toolchains.sh | \
5051
tools/validate-vulkan-toolchain.sh)
@@ -63,6 +64,7 @@ jobs:
6364
classic-vulkan-packages.lock | \
6465
tools/audio/* | tools/build-sdl3-mixer.sh | \
6566
tools/require-image-checks.sh | \
67+
tools/smoke-git-lfs.sh | \
6668
tools/test-require-image-checks.sh | \
6769
tools/validate-classic-check.sh | \
6870
tools/validate-classic-image.sh | \

‎AGENTS.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
revision, shader-toolchain inventory, GPU runtime, smoke/SBOM checks, and
2121
published tags synchronized. Do not make it inherit the broad
2222
replacement/development toolchain.
23+
- The broad Linux and `classic-final` images include the snapshot-pinned Git LFS
24+
client. Keep the Linux tool manifests, Classic package lock, non-root version
25+
checks, and isolated worktree/payload smoke synchronized when changing this
26+
prerequisite.
2327
- The public Classic image's shader contract is defined by
2428
`classic-shader-toolchain.json`: retain the exact DXC/SPIRV-Cross archive and
2529
source checksums, upstream licenses, and `/usr/local/bin` tool paths. Its

‎README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ docker build --file windows/Dockerfile \
8484
--tag atrinik-windows-check .
8585

8686
docker run --rm atrinik-linux-build clang --version
87+
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
88+
atrinik-linux-build git lfs version
89+
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
90+
atrinik-linux-build atrinik-git-lfs-smoke
8791
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
8892
atrinik-linux-build gh version
8993
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
@@ -107,6 +111,10 @@ docker run --rm atrinik-linux-build node --version
107111
docker run --rm atrinik-linux-build pnpm --version
108112
docker run --rm atrinik-classic-build gcc --version
109113
docker run --rm atrinik-classic-build cmake --version
114+
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
115+
atrinik-classic-build git lfs version
116+
docker run --rm --user ubuntu --env HOME=/home/ubuntu \
117+
atrinik-classic-build atrinik-git-lfs-smoke
110118
docker run --rm atrinik-classic-build ccache --version
111119
docker run --rm atrinik-classic-build dxc --version
112120
docker run --rm atrinik-classic-build spirv-cross --help

‎classic-packages.lock‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ g++=4:15.2.0-5ubuntu1
99
gcc=4:15.2.0-5ubuntu1
1010
gcovr=7.2+really-2
1111
git=1:2.53.0-1ubuntu1
12+
git-lfs=3.7.1-1
1213
jq=1.8.1-4ubuntu2
1314
libcurl4-openssl-dev=8.18.0-1ubuntu2.3
1415
libdrm2=2.4.131-1

‎classic-toolchain.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"cmake": "4.2.3",
1515
"gcc": "15.2.0",
1616
"gcovr": "7.2",
17+
"git-lfs": "3.7.1",
1718
"ninja": "1.13.2",
1819
"python": "3.14.4"
1920
},

‎linux/Dockerfile‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
140140
fzf \
141141
gdb \
142142
git \
143+
git-lfs \
143144
iproute2 \
144145
jq \
145146
libasound2-plugins \
@@ -210,6 +211,7 @@ ARG GH_STACK_SHA256_AMD64=358552dd7dce0a46ce153fe196270cec482b84f080947890aad406
210211
ARG GH_STACK_SOURCE_COMMIT=a1b4a3d4d0bcde9ec3a78ab99b2d63af121857a9
211212
ARG GH_STACK_LICENSE_SHA256=2510b446bc1f0cf9702453075d20cd88631e20e5642658edb7325d9c1eb534f7
212213
ARG GIT_VERSION=2.53.0
214+
ARG GIT_LFS_VERSION=3.7.1
213215
ARG GO_VERSION=1.26.5
214216
ARG GO_SHA256=5c2c3b16caefa1d968a94c1daca04a7ca301a496d9b086e17ad77bb81393f053
215217
ARG NODE_VERSION=24.18.1
@@ -386,7 +388,9 @@ RUN HOME="/home/${USERNAME}" runuser -u "${USERNAME}" -- \
386388
&& rm -rf "/home/${USERNAME}/.cache/gh" \
387389
"/home/${USERNAME}/.local/state/gh"
388390

389-
RUN clang --version \
391+
COPY tools/smoke-git-lfs.sh /usr/local/bin/atrinik-git-lfs-smoke
392+
RUN chmod 0755 /usr/local/bin/atrinik-git-lfs-smoke \
393+
&& clang --version \
390394
&& test "$(go env GOVERSION)" = "go${GO_VERSION}" \
391395
&& test "$(rustc --version | cut -d' ' -f2)" = "${RUST_VERSION}" \
392396
&& test "$(node --version)" = "v${NODE_VERSION}" \
@@ -401,6 +405,9 @@ RUN clang --version \
401405
= "${GH_VERSION}" \
402406
&& test "$(runuser -u "${USERNAME}" -- env HOME="/home/${USERNAME}" \
403407
git version)" = "git version ${GIT_VERSION}" \
408+
&& test "$(runuser -u "${USERNAME}" -- env HOME="/home/${USERNAME}" \
409+
git lfs version | sed -n '1s|^git-lfs/\([^ ]*\).*$|\1|p')" \
410+
= "${GIT_LFS_VERSION}" \
404411
&& test "$(runuser -u "${USERNAME}" -- env HOME="/home/${USERNAME}" \
405412
gh stack --version)" = "gh stack version ${GH_STACK_VERSION}" \
406413
&& runuser -u "${USERNAME}" -- env HOME="/home/${USERNAME}" \
@@ -417,7 +424,9 @@ RUN clang --version \
417424
&& command -v xvfb-run \
418425
&& ssh -V \
419426
&& zip -v >/dev/null \
420-
&& unzip -v >/dev/null
427+
&& unzip -v >/dev/null \
428+
&& runuser -u "${USERNAME}" -- env HOME="/home/${USERNAME}" \
429+
bash /usr/local/bin/atrinik-git-lfs-smoke
421430

422431
COPY toolchains.json /usr/local/share/atrinik/toolchains.json
423432
COPY audio-toolchain.json /usr/local/share/atrinik/audio-toolchain.json
@@ -439,6 +448,7 @@ COPY audio-toolchain.spdx.json /workspace/audio-toolchain.spdx.json
439448
COPY classic-vulkan-toolchain.json /workspace/classic-vulkan-toolchain.json
440449
COPY classic-vulkan-toolchain.spdx.json /workspace/classic-vulkan-toolchain.spdx.json
441450
COPY tools/validate-toolchains.sh /workspace/tools/validate-toolchains.sh
451+
COPY tools/smoke-git-lfs.sh /workspace/tools/smoke-git-lfs.sh
442452
COPY tools/validate-vulkan-toolchain.sh \
443453
/workspace/tools/validate-vulkan-toolchain.sh
444454

@@ -552,6 +562,11 @@ RUN test "${TARGETARCH}" = amd64 \
552562
&& rm -f /etc/apt/apt.conf.d/80-snapshot-retries \
553563
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb
554564

565+
COPY tools/smoke-git-lfs.sh /usr/local/bin/atrinik-git-lfs-smoke
566+
RUN chmod 0755 /usr/local/bin/atrinik-git-lfs-smoke \
567+
&& runuser -u ubuntu -- env HOME=/home/ubuntu \
568+
bash /usr/local/bin/atrinik-git-lfs-smoke
569+
555570
COPY --from=mesa-dozen \
556571
/usr/lib/x86_64-linux-gnu/libvulkan_dzn.so \
557572
/usr/lib/x86_64-linux-gnu/libvulkan_dzn.so
@@ -648,6 +663,7 @@ COPY classic-vulkan-toolchain.spdx.json /workspace/classic-vulkan-toolchain.spdx
648663
COPY audio-toolchain.json /workspace/audio-toolchain.json
649664
COPY linux/Dockerfile /workspace/linux/Dockerfile
650665
COPY tools/validate-classic-image.sh /workspace/tools/validate-classic-image.sh
666+
COPY tools/smoke-git-lfs.sh /workspace/tools/smoke-git-lfs.sh
651667
COPY tools/validate-vulkan-toolchain.sh \
652668
/workspace/tools/validate-vulkan-toolchain.sh
653669

‎toolchains.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"platform": "linux/amd64",
55
"tools": {
66
"buf": "1.72.0",
7+
"git-lfs": "3.7.1",
78
"go": "1.26.5",
89
"node": "24.18.1",
910
"pnpm": "11.20.0",

‎tools/smoke-git-lfs.sh‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if [[ $# -ne 0 ]]; then
5+
echo "usage: $0" >&2
6+
exit 2
7+
fi
8+
9+
work=$(mktemp -d)
10+
trap 'rm -rf -- "${work}"' EXIT
11+
repo="${work}/repo"
12+
checkout="${work}/worktree"
13+
payload='Atrinik Git LFS smoke payload'
14+
15+
git init --quiet "${repo}"
16+
git -C "${repo}" config user.email 'image-smoke@example.invalid'
17+
git -C "${repo}" config user.name 'Atrinik image smoke'
18+
git -C "${repo}" lfs install --local >/dev/null
19+
git -C "${repo}" lfs track '*.payload' >/dev/null
20+
printf '%s\n' "${payload}" > "${repo}/sample.payload"
21+
git -C "${repo}" add .gitattributes sample.payload
22+
git -C "${repo}" commit --quiet -m 'smoke Git LFS payload'
23+
git -C "${repo}" worktree add --quiet "${checkout}" HEAD
24+
25+
test "$(git -C "${checkout}" lfs ls-files --name-only)" = 'sample.payload'
26+
test "$(cat "${checkout}/sample.payload")" = "${payload}"
27+
test "$(git -C "${checkout}" check-attr filter -- sample.payload)" = \
28+
'sample.payload: filter: lfs'
29+
test "$(git -C "${repo}" show HEAD:sample.payload | sed -n '1p')" = \
30+
'version https://git-lfs.github.com/spec/v1'
31+
32+
echo 'git-lfs smoke: passed'

‎tools/validate-classic-image.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ while IFS='=' read -r package version; do
180180
test "$(dpkg-query --show --showformat='${Version}' "${package}")" = "${version}"
181181
done < "${package_lock}"
182182

183+
test "$(git lfs version | sed -n '1s|^git-lfs/\([^ ]*\).*$|\1|p')" = \
184+
"$(jq -r '.tools["git-lfs"]' "${expected}")"
185+
bash "$(dirname -- "${BASH_SOURCE[0]}")/smoke-git-lfs.sh"
186+
183187
test "$(ccache --version | sed -n '1s/^ccache version //p')" = \
184188
"$(jq -r '.tools.ccache' "${expected}")"
185189
test "$(cmake --version | sed -n '1s/^cmake version //p')" = \

0 commit comments

Comments
 (0)