diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-16 12:49:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-16 12:49:08 +0200 |
| commit | 64b849ba8b0aa20b128ae317d35e27e0a71f9e16 (patch) | |
| tree | ade412f447297c39ab03a7e62bacc7eb515021fb | |
| parent | 0b9bbe2e5aafb69ddb069fed1819bee5eb0571bf (diff) | |
| download | sbo-dockerbuild-64b849ba8b0aa20b128ae317d35e27e0a71f9e16.tar.gz sbo-dockerbuild-64b849ba8b0aa20b128ae317d35e27e0a71f9e16.zip | |
test-build: exclude symlinks when copying into the container
A host-side sbodl source cache leaves a symlink (<src> -> ~/sbodl-cache/...)
in the SlackBuild dir. Copied into the container it dangled (the cache path
does not exist there), and wget -c choked on it, reporting DOWNLOAD-FAILED.
Copy the dir with rsync -a --no-links instead of cp -a, excluding all
symlinks so the build downloads the source fresh. A host-side WARN names each
ignored symlink.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rw-r--r-- | CLAUDE.md | 7 | ||||
| -rwxr-xr-x | test-build | 19 |
2 files changed, 24 insertions, 2 deletions
@@ -93,6 +93,13 @@ SlackBuild, `installpkg`s it, and runs `sbopkglint` **in-container** (it shells out to sudo, which only works as root here; never lint on the host). The host reads a `LINT-CLEAN`/`LINT-FINDINGS` marker from the log. +The SlackBuild dir is copied from the read-only mount into `/sbo/build` with +`rsync -a --no-links`, which **excludes symlinks**. A host-side `sbodl` source +cache leaves a symlink (`<src> -> ~/sbodl-cache/...`) that is absent in the +container; copying it in (dangling, or dereferenced to the cached file) would +make `wget -c` fail or skip the download. Excluding it lets the build download +the source fresh; the host prints a `WARN` naming each ignored symlink. + ### Dep cache Host dir (`PKG_CACHE`), namespaced `<variant>-<image-digest>/`. An image rebuild @@ -23,7 +23,7 @@ # # No em dashes in prose by author convention. -PROJECT_VERSION="1.1.0" # bump via sed across all scripts; see CLAUDE.md Releases +PROJECT_VERSION="1.1.1" # bump via sed across all scripts; see CLAUDE.md Releases # ============================================================================= # CONFIG (do not edit here; real values live in the external config file) @@ -535,6 +535,17 @@ build_one() { local statf="$BUILD_OUT/$prog.status" rm -f "$statf" + # Warn about symlinks in the SlackBuild dir (typically a host-side sbodl source + # cache: <src> -> ~/sbodl-cache/...). They are not copied into the container + # (rsync --no-links below), so the build re-downloads the source. Surfaced on + # the host so it is visible, not just in the per-package log. + local l + for l in "$dir"/*; do + if [[ -L "$l" ]]; then + echo " ${C_YEL}WARN${C_RST}: symlink not copied to container (source re-downloaded): $(basename "$l") -> $(readlink "$l")" >&2 + fi + done + # fetch deps (removed from -current tree): let the container's sbopkg build # them first. FETCH_DEPS is the set collected during resolution. local fetch_list="" @@ -568,7 +579,11 @@ for f in $FETCH_LIST; do done # copy the SlackBuild out of the read-only mount so it can write there. -cp -a /sbo/pkg /sbo/build +# --no-links skips symlinks (e.g. a host-side sbodl source cache: <src> -> +# ~/sbodl-cache/... absent here), so the build downloads the source fresh +# instead of choking on a dangling link or reusing a cached one. +mkdir -p /sbo/build +rsync -a --no-links /sbo/pkg/ /sbo/build/ cd /sbo/build || { echo BUILD-FAILED > "$statf"; exit 1; } . ./"$prog".info |
