Files
marfrit-packages/debian/claude-his-agent/build-deb.sh
T
marfrit dfdee75668 debian/*/build-deb.sh: add curl timeouts (10s connect, 600s total, 3 retries)
Without timeouts, a slow/dead-TCP upstream (e.g. github tarballs)
hangs the runner indefinitely.  Today run 15185 mpv-fourier-debian
sat 6+ min on "curl -sSLfo mpv.tar.gz https://github.com/.../mpv-0.41.0.tar.gz"
with no progress visible — fermis act_runner blocked, slot unusable
for parallel work.

--connect-timeout 10  fails fast if upstream is unreachable
--max-time 600        caps worst-case at 10 min per fetch
--retry 3             handles transient flakes
--retry-delay 5       gives transient outages a moment

Patched in: claude-his-agent, daedalus-v4l2, daedalus-v4l2-dkms,
libva-v4l2-request-fourier, lmcp, mpv-fourier.  ffmpeg-v4l2-request-fourier
has no curl call.
2026-05-20 16:32:36 +02:00

55 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Build claude-his-agent_<ver>_all.deb from this directory using dpkg-deb.
# Mirrors the lmcp/build-deb.sh pattern.
set -euo pipefail
PKGVER=0.2.0
PKGREL=1
HIS_TARBALL_SHA256=c39dd1a956d303ac2417498dde05ac923bf686f1fc978f78f0d63ca42432b8b8
HERE=$(dirname "$(readlink -f "$0")")
# Reproducible build: pin mtimes + ar member timestamps to a fixed epoch
# tied to this release (v0.2.0, 2026-05-02 11:00 UTC).
export SOURCE_DATE_EPOCH=1778763600
work=$(mktemp -d)
trap "rm -rf $work" EXIT
cd "$work"
curl --connect-timeout 10 --max-time 600 --retry 3 --retry-delay 5 -sSLfo his.tar.gz \
"https://git.reauktion.de/marfrit/claude-his-agent/archive/v${PKGVER}.tar.gz"
echo "$HIS_TARBALL_SHA256 his.tar.gz" | sha256sum -c
tar xzf his.tar.gz
ROOT="$work/pkgroot"
mkdir -p "$ROOT/DEBIAN" \
"$ROOT/usr/bin" \
"$ROOT/usr/share/doc/claude-his-agent"
install -m 755 claude-his-agent/bin/claude-his-fetch "$ROOT/usr/bin/claude-his-fetch"
install -m 755 claude-his-agent/bin/claude-his-install "$ROOT/usr/bin/claude-his-install"
install -m 644 claude-his-agent/README.md "$ROOT/usr/share/doc/claude-his-agent/README.md"
install -m 644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/claude-his-agent/copyright"
# Render control from the source debian/control, filling in version
CONTROL_SRC="$HERE/debian/control"
{
echo "Package: claude-his-agent"
echo "Version: ${PKGVER}-${PKGREL}"
echo "Architecture: all"
echo "Maintainer: Markus Fritsche <mfritsche@reauktion.de>"
echo "Homepage: https://git.reauktion.de/marfrit/claude-his-agent"
echo "Section: utils"
echo "Priority: optional"
echo "Depends: bash, rsync, openssh-client"
# Trailing description from the source control (indented multi-line block)
awk '/^Description:/{p=1} p' "$CONTROL_SRC"
} > "$ROOT/DEBIAN/control"
# Normalize mtimes for reproducibility
find "$ROOT" -exec touch -d "@$SOURCE_DATE_EPOCH" {} +
OUT_DEB="$HERE/claude-his-agent_${PKGVER}-${PKGREL}_all.deb"
dpkg-deb --build --root-owner-group "$ROOT" "$OUT_DEB"
ls -la "$OUT_DEB"