aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-13 14:37:28 +0200
committerDanilo M. <danix@danix.xyz>2026-07-13 14:37:28 +0200
commitf273077105877e2b0558702e0eaa47f34a36c01a (patch)
tree3b63be7139ca1c9a1cbb14ba46db06531f52a0a3
parente513a3ea2bdd722735a2e453fb9653137c52f5b9 (diff)
downloadsbo-slackbuilds-f273077105877e2b0558702e0eaa47f34a36c01a.tar.gz
sbo-slackbuilds-f273077105877e2b0558702e0eaa47f34a36c01a.zip
image-builder: accept any Slackware pkg extension (*.t?z) not just .txz
Upstream sbopkg ships as .tgz, not .txz. The require_pkgs guard, txz_hash find, cp staging, and Dockerfile COPY all hard-coded *.txz, so a .tgz package failed the presence check and was excluded from the rebuild hash. Widen every glob to *.t?z (matches .txz/.tgz/.tbz/.tlz); stage the whole pkgs dir into the image and installpkg the lot, dropping the in-image extension coupling entirely. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-rwxr-xr-x.extras/image-builder/build-sbo-testbuild.sh16
-rw-r--r--.extras/image-builder/lib.sh5
2 files changed, 11 insertions, 10 deletions
diff --git a/.extras/image-builder/build-sbo-testbuild.sh b/.extras/image-builder/build-sbo-testbuild.sh
index e71e146..4364cd5 100755
--- a/.extras/image-builder/build-sbo-testbuild.sh
+++ b/.extras/image-builder/build-sbo-testbuild.sh
@@ -28,13 +28,13 @@ else
BUILD_VARIANTS=("${VARIANTS[@]}")
fi
-# Verify the required .txz are present before doing anything.
+# Verify the required packages (*.t?z) are present before doing anything.
require_pkgs() {
[[ -d "${PKGDIR}" ]] || _err "PKGDIR missing: ${PKGDIR}"
- compgen -G "${PKGDIR}/sbopkg-*.txz" >/dev/null \
- || _err "no sbopkg-*.txz in ${PKGDIR}"
- compgen -G "${PKGDIR}/sbo-maintainer-tools-*.txz" >/dev/null \
- || _err "no sbo-maintainer-tools-*.txz in ${PKGDIR}"
+ compgen -G "${PKGDIR}/sbopkg-*.t?z" >/dev/null \
+ || _err "no sbopkg-*.t?z in ${PKGDIR}"
+ compgen -G "${PKGDIR}/sbo-maintainer-tools-*.t?z" >/dev/null \
+ || _err "no sbo-maintainer-tools-*.t?z in ${PKGDIR}"
}
# needs_rebuild FULL_TAG TB_TAG PKGS_HASH -> 0 if rebuild needed
@@ -85,13 +85,13 @@ build_variant() {
# shellcheck disable=SC2064
trap "rm -rf '${WORKDIR}'" EXIT
mkdir -p "${WORKDIR}/pkgs"
- cp "${PKGDIR}"/sbopkg-*.txz "${PKGDIR}"/sbo-maintainer-tools-*.txz "${WORKDIR}/pkgs/"
+ cp "${PKGDIR}"/sbopkg-*.t?z "${PKGDIR}"/sbo-maintainer-tools-*.t?z "${WORKDIR}/pkgs/"
cat > "${WORKDIR}/Dockerfile" <<DOCKERFILE
FROM ${FULL_TAG}
LABEL maintainer="danix <danix@danix.xyz>"
-COPY pkgs/*.txz /tmp/pkgs/
-RUN installpkg /tmp/pkgs/*.txz && rm -rf /tmp/pkgs
+COPY pkgs/ /tmp/pkgs/
+RUN installpkg /tmp/pkgs/* && rm -rf /tmp/pkgs
RUN /sbin/ldconfig
LABEL org.opencontainers.image.created="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
LABEL org.opencontainers.image.title="SBo test-build env ${VERSION} (x86_64)"
diff --git a/.extras/image-builder/lib.sh b/.extras/image-builder/lib.sh
index 6cd9e4e..da12fd0 100644
--- a/.extras/image-builder/lib.sh
+++ b/.extras/image-builder/lib.sh
@@ -46,12 +46,13 @@ fetch() {
}
# txz_hash DIR
-# Stable hash of the set of .txz files in DIR (names + contents), order
+# Stable hash of the set of Slackware package files (*.t?z) in DIR (names +
+# contents), order
# independent. Empty/absent dir -> empty string.
txz_hash() {
local dir="$1"
[[ -d "$dir" ]] || { printf ''; return 0; }
- local files; files=$(find "$dir" -maxdepth 1 -name '*.txz' -type f | sort)
+ local files; files=$(find "$dir" -maxdepth 1 -name '*.t?z' -type f | sort)
[[ -n "$files" ]] || { printf ''; return 0; }
# Hash sorted "name sha256" lines so reordering does not change output.
while IFS= read -r f; do