Files
marfrit-packages/debian/claude-his-agent/build-deb.sh
T
marfrit beebeb6c65
build and publish packages / distcc-avahi-aarch64 (push) Successful in 45s
build and publish packages / lmcp-any (push) Successful in 8s
build and publish packages / lmcp-debian (push) Successful in 4s
build and publish packages / claude-his-any (push) Successful in 7s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 14m43s
build and publish packages / claude-his-debian (push) Successful in 7s
claude-his-agent v0.2.0: split — public framework only, private runbook fetched at install
The previous package bundled the agent prompt + skill cheatsheet, which leaked
home-infra topology (specific hosts/IPs, plug AINs, /opt/herding cred file
paths, kid/2FA context) to anyone with the public APT/pacman repo URL.

v0.2.0 ships only the plumbing:
- /usr/bin/claude-his-fetch     (rsync runbook from $HIS_CONTEXT_HOST over SSH)
- /usr/bin/claude-his-install   (symlinks cache -> ~/.claude/)
- /usr/share/doc/claude-his-agent/README.md

Runbook content lives at $HIS_CONTEXT_HOST:/opt/his-context/ (default hertz)
and gets fetched into ~/.cache/claude-his-agent/ on install. SSH key auth is
the trust boundary.

Adds rsync + openssh-client as runtime deps. Upstream sha256:
c39dd1a956d303ac2417498dde05ac923bf686f1fc978f78f0d63ca42432b8b8
2026-05-02 15:48:04 +00: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 -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"