Files
maggesandClaude Sonnet 5 c3b8ae8ed9
Build Packages / Build .txz packages (push) Failing after 7m21s
Lint / ShellCheck (push) Successful in 10s
Lint / Validate .plg XML (push) Successful in 9s
Lint / EditorConfig (push) Successful in 5s
Fix CI: json-c for crun, and fetch crun's git submodules as pinned tarballs
Verified end-to-end with a full local build of all 8 packages on the
actual runner host (docker exec against vbatts/slackware:15.0, bind-
mounted repo on the cache pool) instead of round-tripping through
Gitea Actions for each fix — much faster for a chain of issues this
deep. All 8 packages now build successfully from a clean checkout.

Three fixes, all in crun (the last package still failing):

1. "Package requirements (json-c >= 0.14) were not met" — added
   json-c to the toolchain bootstrap.

2. crun depends on the libocispec git submodule, which in turn depends
   on the image-spec and runtime-spec git submodules. GitHub's source
   archive tarball never includes submodule content (no .git directory
   for `git submodule update` to work against — the existing `|| true`
   masked this failing silently). Fetched all three as their own
   pinned tarballs instead, at the exact commits crun 1.28 references
   (cross-checked via the GitHub contents API), matching how every
   other dependency in this project is already pinned.

3. crun.c unconditionally #includes git-version.h, which crun's own
   Makefile only generates via `git describe` (again, no .git) or from
   a pre-existing .tarball-git-version.h — the file crun's own `make
   dist` would have written, which we never run. Write that file
   ourselves in the exact format the Makefile already expects; this is
   the documented fallback path bundled release tarballs rely on, not
   a workaround around it.

Also includes the podman go-md2man pre-seed fix and setup-slackware-
buildenv.sh python3 addition from the previous commit's follow-up
testing (both already verified working in this same local build run).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 22:17:02 +00:00

87 lines
3.5 KiB
Bash
Executable File

#!/bin/bash
# =============================================================================
# packages/podman/podman.SlackBuild
#
# Builds the podman .txz package from upstream source (Go). Version and
# checksum are pinned centrally in versions.env — see
# scripts/lib/slackbuild-common.sh for the shared fetch/verify/package
# helpers used below, and docs/ARCHITECTURE.md section 5 for why the
# graphdriver build tags below are what they are (this project only ever
# uses the overlay storage driver, see docs/ARCHITECTURE.md section 10).
#
# Requires (in the build environment): go >= 1.22, make, gcc, pkg-config,
# libseccomp-dev. GPG signature verification support is intentionally left
# out to keep the dependency footprint minimal for a from-scratch Slackware
# build.
# =============================================================================
set -eu
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
# shellcheck source=/dev/null
. "$REPO_ROOT/scripts/lib/slackbuild-common.sh"
# shellcheck source=/dev/null
. "$REPO_ROOT/versions.env"
VERSION="$PODMAN_VERSION"
ARCH="$PKG_ARCH"
BUILD="$PKG_BUILD"
TAG="$PKG_TAG"
sb_init "podman"
tarball=$(sb_fetch_and_verify "$PODMAN_SRC_URL" "$PODMAN_SRC_SHA256" "podman-$VERSION.tar.gz")
srcdir=$(sb_extract "$tarball")
# Apply any local patches (none currently — see packages/podman/patches/).
for patch in "$CWD"/patches/*.patch; do
[ -e "$patch" ] || continue
echo "==> [podman] applying $(basename "$patch")"
patch -d "$srcdir" -p1 < "$patch"
done
cd "$srcdir"
# Build tags: exclude storage backends this project doesn't use (btrfs,
# devicemapper — see docs/ARCHITECTURE.md section 10, overlay-only), exclude
# systemd integration (Unraid has no systemd — see docs/ARCHITECTURE.md
# "Rahmenbedingungen"), keep seccomp support.
export BUILDTAGS="seccomp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containers_image_openpgp"
export CGO_ENABLED=1
export GOFLAGS="${GOFLAGS:--mod=mod}"
# podman's own Makefile wants to build ITS bundled copy of go-md2man from
# test/tools/vendor/ for doc generation, but that vendor tree isn't
# consistent enough to build standalone outside podman's own module scope
# ("without -mod=vendor, directory ... has no package path"). Its Makefile
# only attempts that build if test/tools/build/go-md2man doesn't already
# exist — pre-seed it with our own system go-md2man (installed in
# scripts/ci/setup-slackware-buildenv.sh) to skip the broken vendor build
# entirely; it's the same tool doing the same job.
mkdir -p test/tools/build
cp "$(command -v go-md2man)" test/tools/build/go-md2man
chmod +x test/tools/build/go-md2man
echo "==> [podman] make (BUILDTAGS=$BUILDTAGS)"
make BUILDTAGS="$BUILDTAGS" GO_BUILD_FLAGS="-ldflags -s"
echo "==> [podman] make install into \$PKG"
make install \
DESTDIR="$PKG" \
PREFIX=/usr \
ETCDIR="$PKG/etc" \
BUILDTAGS="$BUILDTAGS"
# We ship our own containers.conf/storage.conf/registries.conf/policy.json
# templates (see config/) staged via plugin/podman.plg instead of upstream's
# defaults, so drop the ones `make install` places under $PKG/etc to avoid
# ambiguity about which file is authoritative on a running system.
rm -rf "$PKG/etc/containers"
# No systemd units — Unraid has no systemd (see docs/ARCHITECTURE.md,
# "Rahmenbedingungen"); process lifecycle is entirely owned by rc.podman.
rm -rf "$PKG/usr/lib/systemd" "$PKG/lib/systemd"
sb_install_docs "$srcdir/LICENSE" "$srcdir/README.md"
sb_make_package "$VERSION" "$ARCH" "$BUILD" "$TAG"