Files
marfrit-packages/debian/sicd/build-deb.sh
T
Claude (noether) 522f9c0364
build and publish packages / distcc-avahi-aarch64 (push) Successful in 6s
build and publish packages / mesa-panvk-bifrost-aarch64 (push) Successful in 5s
build and publish packages / mesa-panvk-bifrost-video-aarch64 (push) Successful in 5s
build and publish packages / lmcp-any (push) Successful in 5s
build and publish packages / lmcp-debian (push) Successful in 4s
build and publish packages / claude-his-any (push) Successful in 4s
build and publish packages / aish-any (push) Successful in 4s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 4s
build and publish packages / claude-his-debian (push) Successful in 4s
build and publish packages / aish-debian (push) Successful in 5s
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Successful in 4s
build and publish packages / reauktion-home-ca-any (push) Successful in 4s
build and publish packages / mpv-fourier-aarch64 (push) Successful in 5s
build and publish packages / reauktion-home-ca-debian (push) Successful in 5s
build and publish packages / ffmpeg-v4l2-request-debian (push) Has been cancelled
build and publish packages / libva-v4l2-request-fourier-debian (push) Has been cancelled
build and publish packages / mpv-fourier-debian (push) Has been cancelled
build and publish packages / daedalus-v4l2-debian (push) Has been cancelled
build and publish packages / daedalus-v4l2-dkms-debian (push) Has been cancelled
build and publish packages / sicd-arch (push) Has been cancelled
build and publish packages / sic-agent-arch (push) Has been cancelled
build and publish packages / sicd-debian (push) Has been cancelled
build and publish packages / sic-agent-debian (push) Has been cancelled
sic 0.2.0: nested targets + v2 argv-boundary wire (dual-read, backward compatible)
Bumps sicd + sic-agent (arch PKGBUILDs, debian build-deb.sh, both changelogs) to
0.2.0-1 against sic tag v0.2.0 (tarball sha fe0569013da5...). New tarball verified
building all four packages locally (debian amd64 debs + arch verifysource) before push.

What 0.2.0 ships (source git.reauktion.de/marfrit/sic @ 4fcd851):
  * Nested targets: sic host/hop1/hop2 cmd peels incus/docker/pct container hops,
    resolved via /etc/sic/hosts.toml, built as a netstring onion.
  * argv boundaries preserved end to end (length-framed [][]byte, never space-split)
    -- the founding guarantee: sic host touch 'a b' stays ONE file.
  * Daemon dual-reads v1 and v2 (first-byte dispatch), so pre-0.2.0 clients keep
    working during the staged rollout.
  * Client forwards stdin AFTER the frame (fixes the v0.1.0 zero-byte trap), ssh -T
    binary-safe, exit status inherited.
  * Hardened + reviewed (bullpen 964/970): outer-length cap before alloc, per-element
    and byte caps, explicit canonical argc (empty "" args representable).

Also removes continue-on-error from the four sic CI jobs (sicd/sic-agent x arch/debian)
so a broken build fails the workflow loudly instead of silently producing nothing --
the reason the sic jobs went unnoticed as never-succeeding since 2026-07-19.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 12:15:46 +02:00

62 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Build sicd_<ver>_<arch>.deb using dpkg-deb. Mirrors the lmcp/claude-his-agent
# pattern, plus a Go cross-build step (sicd is a compiled binary).
#
# Usage: ./build-deb.sh [amd64|arm64] (default: host dpkg architecture)
# Needs: go, dpkg-deb, curl.
set -euo pipefail
PKGVER=0.2.0
PKGREL=1
SIC_TARBALL_SHA256=fe0569013da5bfa248743cd04bc2f09da8217b04432aa69827ed5287a133a37c
HERE=$(dirname "$(readlink -f "$0")")
DEB_ARCH="${1:-$(dpkg --print-architecture)}"
case "$DEB_ARCH" in
amd64) GOARCH=amd64 ;;
arm64) GOARCH=arm64 ;;
*) echo "unsupported arch: $DEB_ARCH (use amd64 or arm64)" >&2; exit 1 ;;
esac
# Reproducible build: pin mtimes + ar timestamps (v0.1.0, 2026-07-19 12:00 UTC).
export SOURCE_DATE_EPOCH=1784808000
work=$(mktemp -d)
trap "rm -rf $work" EXIT
cd "$work"
curl -sSLfo sic.tar.gz \
"https://git.reauktion.de/marfrit/sic/archive/v${PKGVER}.tar.gz"
echo "$SIC_TARBALL_SHA256 sic.tar.gz" | sha256sum -c
tar xzf sic.tar.gz
( cd sic && GOOS=linux GOARCH="$GOARCH" CGO_ENABLED=0 \
GOFLAGS='-buildvcs=false -trimpath' go build -ldflags='-s -w' -o sicd ./cmd/sicd )
ROOT="$work/pkgroot"
mkdir -p "$ROOT/DEBIAN" "$ROOT/usr/bin" "$ROOT/usr/share/doc/sicd"
install -m755 sic/sicd "$ROOT/usr/bin/sicd"
install -m644 sic/gateway/sicd "$ROOT/usr/share/doc/sicd/sicd-reference.py"
install -m644 sic/docs/design.md "$ROOT/usr/share/doc/sicd/design.md"
install -m644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/sicd/copyright"
{
echo "Package: sicd"
echo "Version: ${PKGVER}-${PKGREL}"
echo "Architecture: ${DEB_ARCH}"
echo "Maintainer: Markus Fritsche <mfritsche@reauktion.de>"
echo "Section: net"
echo "Priority: optional"
echo "Recommends: openssh-server"
echo "Homepage: https://git.reauktion.de/marfrit/sic"
echo "Description: sic daemon — netstring argv over stdin, execvp'd"
echo " sicd reads netstring-framed argv from stdin and runs it with execvp,"
echo " so no shell re-parses the arguments. Deploy on target hosts and run"
echo " it over ssh (as the remote command, or command=\"sicd\" on a key)."
} > "$ROOT/DEBIAN/control"
OUT="$HERE/sicd_${PKGVER}-${PKGREL}_${DEB_ARCH}.deb"
rm -f "$OUT"
dpkg-deb --root-owner-group --build "$ROOT" "$OUT"
echo "built $OUT"