build: make build_kernel.sh work from a git worktree - #118
Conversation
vamOS System ProfileChanges vs master
Added packages: MesaLib-devel-26.0.6_2, ModemManager-1.24.2_1, ModemManager-devel-1.24.2_1, NetworkManager-1.56.0_1, OpenCL-Headers-2026.05.29_1, brotli-1.2.0_2, brotli-devel-1.2.0_2, ca-certificates-20250419+3.125_1, dnsmasq-2.93_1, elfutils-devel-0.195_1, expat-2.8.1_1, expat-devel-2.8.1_1, fftw-devel-3.3.11_1, foot-terminfo-1.27.0_1, fuse3-3.18.2_2, gdb-17.2_1, gdb-common-17.2_1, jq-1.8.2_1, kitty-terminfo-0.47.4_1, lcms2-2.19.1_1, libcrypto3-3.6.3_1, libdebuginfod-0.195_1, libdrm-2.4.134_1, libdrm-devel-2.4.134_1, libedit-20260512.3.1_1, libelf-0.195_1, libfftw-3.3.11_1, libgbm-26.0.6_2, libgbm-devel-26.0.6_2, libharfbuzz-14.2.1_1, libicu78-78.3_1, libldns-1.9.2_1, libmm-glib-1.24.2_1, libnm-1.56.0_1, libpciaccess-0.19_1, libpciaccess-devel-0.19_1, libpipewire-1.6.6_1, libssh2-1.11.1_2, libssh2-devel-1.11.1_2, libssl3-3.6.3_1, libtdb-1.4.15_1, libunbound-1.25.1_1, libxkbcommon-1.13.2_1, libxkbcommon-devel-1.13.2_1, libxkbcommon-x11-1.13.2_1, libxkbregistry-1.13.2_1, mesa-26.0.6_2, mesa-dri-26.0.6_2, mesa-libgallium-26.0.6_2, mesa-opencl-26.0.6_2, nghttp2-1.69.0_1, nghttp2-devel-1.69.0_1, nghttp3-1.16.0_1, nghttp3-devel-1.16.0_1, ngtcp2-1.23.0_1, ngtcp2-devel-1.23.0_1, nspr-4.39_1, nss-3.125_1, openssl-3.6.3_1, openssl-devel-3.6.3_1, pipewire-devel-1.6.6_1, pv-1.11.0_1, python3-3.14.6_1, python3-Markdown-3.10.2_1, python3-setuptools-80.10.2_2, removed-packages-0.1.20260619_1, rsync-3.4.4_1, sqlite-3.53.2_1, sqlite-devel-3.53.2_1, stress-ng-0.21.03_1, tmux-3.6b_1, vim-9.2.0506_1, vim-common-9.2.0506_1, wayland-protocols-1.49_1, wireless-regdb-2026.05.30_1, xbps-triggers-0.131_1, xkbcomp-1.5.0_1, xkeyboard-config-2.47_1, xxd-9.2.0506_1 Removed packages: MesaLib-devel-26.0.6_1, ModemManager-1.24.0_1, ModemManager-devel-1.24.0_1, NetworkManager-1.50.0_1, OpenCL-Headers-2025.07.22_1, brotli-1.2.0_1, brotli-devel-1.2.0_1, ca-certificates-20250419+3.121_1, dnsmasq-2.92_1, elfutils-devel-0.194_1, expat-2.8.0_1, expat-devel-2.8.0_1, fftw-devel-3.3.10_3, foot-terminfo-1.26.1_1, fuse3-3.18.2_1, gdb-16.3_2, gdb-common-16.3_2, jq-1.8.1_1, kitty-terminfo-0.46.2_1, lcms2-2.18_1, libcrypto3-3.6.2_1, libdebuginfod-0.194_1, libdrm-2.4.131_1, libdrm-devel-2.4.131_1, libedit-20251016.3.1_1, libelf-0.194_1, libfftw-3.3.10_3, libgbm-26.0.6_1, libgbm-devel-26.0.6_1, libharfbuzz-14.2.0_1, libicu78-78.2_2, libldns-1.9.0_1, libmm-glib-1.24.0_1, libnm-1.50.0_1, libpciaccess-0.18.1_1, libpciaccess-devel-0.18.1_1, libpipewire-1.6.4_1, libssh2-1.11.1_1, libssh2-devel-1.11.1_1, libssl3-3.6.2_1, libtdb-1.4.10_3, libunbound-1.25.0_1, libxkbcommon-1.13.1_2, libxkbcommon-devel-1.13.1_2, libxkbcommon-x11-1.13.1_2, libxkbregistry-1.13.1_2, mesa-26.0.6_1, mesa-dri-26.0.6_1, mesa-libgallium-26.0.6_1, mesa-opencl-26.0.6_1, nghttp2-1.68.1_1, nghttp2-devel-1.68.1_1, nghttp3-1.15.0_1, nghttp3-devel-1.15.0_1, ngtcp2-1.22.1_1, ngtcp2-devel-1.22.1_1, nspr-4.38.2_1, nss-3.123_1, openssl-3.6.2_1, openssl-devel-3.6.2_1, pipewire-devel-1.6.4_1, pv-1.10.5_1, python3-3.14.4_1, python3-Markdown-3.6_3, python3-setuptools-80.10.2_1, removed-packages-0.1.20260503_1, rsync-3.4.2_1, sqlite-3.53.0_1, sqlite-devel-3.53.0_1, stress-ng-0.21.01_1, tmux-3.6a_1, vim-9.2.0280_1, vim-common-9.2.0280_1, wayland-protocols-1.48_1, wireless-regdb-2025.07.10_1, xbps-triggers-0.130_1, xkbcomp-1.4.7_1, xkeyboard-config-2.45_1, xxd-9.2.0280_1 Directory size changes (>1MB)
Top 10 Directories
Category Breakdown
Top 10 Packages by Size
|
| File | Size |
|---|---|
| /usr/lib/llvm/21/lib/libLLVM.so.21.1 | 124.3MB |
| /usr/lib/llvm/21/lib/libMLIR.so.21.1 | 89.7MB |
| /usr/lib/llvm/21/bin/mlir-transform-opt | 82.9MB |
| /usr/lib/llvm/21/lib/libclang-cpp.so.21.1 | 56MB |
| /usr/lib/llvm/21/bin/mlir-translate | 53.2MB |
| /usr/lib/llvm/21/bin/llvm-exegesis | 52MB |
| /usr/lib/llvm/21/bin/llvm-bolt-binary-analysis | 50.6MB |
| /usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/lib/libavcodec.a | 50.6MB |
| /usr/bin/uv | 50MB |
| /usr/lib/gcc/aarch64-linux-gnu/14.2/gnat1 | 40.1MB |
| /usr/bin/gdb | 39.1MB |
| /usr/lib/gcc/aarch64-linux-gnu/14.2/cc1plus | 37.3MB |
| /usr/lib/libgallium-26.0.6.so | 37MB |
| /usr/lib/libllvm-qcom.so | 35.2MB |
| /usr/lib/gcc/aarch64-linux-gnu/14.2/cc1 | 35.2MB |
| /usr/lib/gcc/aarch64-linux-gnu/14.2/lto1 | 33.9MB |
| /usr/bin/lto-dump | 33.9MB |
| /usr/lib/libRusticlOpenCL.so.1.0.0 | 33.7MB |
| /usr/local/venv/bin/ruff | 31.8MB |
| /usr/share/icu/78.3/icudt78l.dat | 31.5MB |
| /usr/lib/llvm/21/lib/libclang.so.21.1.7 | 30.2MB |
| /usr/lib/llvm/21/bin/c-index-test | 28.6MB |
| /usr/local/venv/lib/python3.12/site-packages/gcc_arm_none_eabi/toolchain/libexec/gcc/arm-none-eabi/13.2.1/cc1 | 28.2MB |
| /usr/lib/libz3.so | 27.9MB |
| /usr/bin/run | 26.7MB |
| /usr/local/venv/lib/python3.12/site-packages/numpy.libs/libscipy_openblas64_-71e1b124.so | 23.6MB |
| /usr/comma/updater | 23.5MB |
| /usr/comma/setup | 23.5MB |
| /usr/comma/reset | 23.5MB |
| /usr/local/uv/python/cpython-3.12.13-linux-aarch64-gnu/bin/python3.12 | 22.2MB |
The Linux build path ran git inside the Docker container (for LOCALVERSION, and via the patch-apply/reset helpers), but the container only mounts $DIR. In a git worktree, $DIR/.git is a file pointing into the main repo's .git/worktrees/<name>/ (the kernel submodule's gitdir lives there too), so in-container git failed with "fatal: not a git repository: .../.git/worktrees/...". - Compute GIT_REV on the host and pass it into the container heredoc instead of running git there. - When $DIR/.git is a worktree pointer, also bind-mount the shared git common dir at its real absolute path so the gitdir links resolve in-container. No-op for a normal checkout (where .git is a directory inside $DIR) and for the macOS path (which seeds a docker volume). Verified by building Linux 7.1 from this worktree end to end.
55e05c1 to
d6a7101
Compare
The Linux build path ran git inside the Docker container (for LOCALVERSION, and via the patch-apply/reset helpers), but the container only mounts $DIR. In a git worktree, $DIR/.git is a file pointing into the main repo's .git/worktrees/<name>/ (the kernel submodule's gitdir lives there too), so in-container git failed with "fatal: not a git repository: .../.git/worktrees/...". - Compute GIT_REV on the host and pass it into the container heredoc instead of running git there. - When $DIR/.git is a worktree pointer, also bind-mount the shared git common dir at its real absolute path so the gitdir links resolve in-container. No-op for a normal checkout (where .git is a directory inside $DIR) and for the macOS path (which seeds a docker volume). Verified by building Linux 7.1 from this worktree end to end.
No description provided.