Stop installing xara, which its author has discontinued
On 2026-11-08 xara's author replaced its repository with a README saying development and distribution have stopped, so it no longer builds and every update failed trying (report CD-NTEU79). Remove its build entry, the Rust toolchain and the libraries it alone needed, its tests and its README section, which was also there twice. hampackremove still stops xara's service and points to its settings, for machines where an earlier HamPack built it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d5a64243d6
commit
354a4cbe03
@@ -96,22 +96,3 @@ setup() {
|
||||
[[ "$output" == *"errors in: Installing Flatpak applications"* ]]
|
||||
grep -qx "uv tool install not1mm" "$STUB_LOG"
|
||||
}
|
||||
|
||||
@test "rust is installed for xara only when there's no cargo" {
|
||||
stub cargo 'exit 0'
|
||||
run bash "$REPO/update.sh"
|
||||
[ ! -e "$FAKE_PACMAN_DB/rust" ]
|
||||
|
||||
# A PATH with everything but cargo
|
||||
local nocargo="$BATS_TEST_TMPDIR/nocargo" dir f
|
||||
mkdir -p "$nocargo"
|
||||
rm "$STUB_DIR/cargo"
|
||||
for dir in /usr/local/bin /usr/bin; do
|
||||
for f in "$dir"/*; do
|
||||
[ "$(basename "$f")" = cargo ] || ln -sf "$f" "$nocargo/" 2> /dev/null
|
||||
done
|
||||
done
|
||||
PATH="$STUB_DIR:$nocargo" run bash "$REPO/update.sh"
|
||||
[ -e "$FAKE_PACMAN_DB/rust" ]
|
||||
grep -qx rust "$HAMPACK_STATE/installed-packages"
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
#
|
||||
# The xara entry in compile.conf, built from a fake upstream with cargo stubbed
|
||||
|
||||
load helpers
|
||||
|
||||
setup() {
|
||||
setup_fake_home
|
||||
# A fake xara repo with the files the build steps use, tagged like upstream
|
||||
UPSTREAM="$BATS_TEST_TMPDIR/xara"
|
||||
mkdir -p "$UPSTREAM"/dist/{man,systemd,udev}
|
||||
touch "$UPSTREAM"/dist/man/xara.1 "$UPSTREAM"/dist/man/xara-monitor.1
|
||||
printf '[Service]\nExecStart=/usr/bin/xara --config %%E/xara/xara.conf\n' > "$UPSTREAM/dist/systemd/xara.service"
|
||||
echo '# udev' > "$UPSTREAM/dist/udev/60-xara-ptt.rules"
|
||||
echo '#call = YOURCALL' > "$UPSTREAM/dist/xara.conf.example"
|
||||
git -C "$UPSTREAM" init -q
|
||||
git -C "$UPSTREAM" add -A
|
||||
git -C "$UPSTREAM" -c user.email=t@t -c user.name=t commit -q -m init
|
||||
git -C "$UPSTREAM" tag v0.1.3
|
||||
|
||||
# The real compile.conf entry, pointed at the fake repo
|
||||
export HAMPACK_COMPILE_CONF="$BATS_TEST_TMPDIR/compile.conf"
|
||||
sed -n '/^\[xara\]/,/^$/p' "$REPO/compile.conf" \
|
||||
| sed "s|^git=.*|git=file://$UPSTREAM|" > "$HAMPACK_COMPILE_CONF"
|
||||
|
||||
stub cargo 'mkdir -p target/release && echo xara > target/release/xara && echo monitor > target/release/xara-monitor'
|
||||
}
|
||||
|
||||
@test "xara is built without the registered feature" {
|
||||
! sed -n '/^\[xara\]/,/^$/p' "$REPO/compile.conf" | grep '^steps=' | grep -q registered
|
||||
}
|
||||
|
||||
@test "first install builds xara and installs it, its service and its config" {
|
||||
run bash "$REPO/install-compiled.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
grep -qx "cargo build --release --locked -p xara" "$STUB_LOG"
|
||||
[ -x "$HOME/.local/bin/xara" ]
|
||||
[ -x "$HOME/.local/bin/xara-monitor" ]
|
||||
[ -f "$HOME/.local/share/man/man1/xara.1" ]
|
||||
grep -qx "ExecStart=$HOME/.local/bin/xara --config %E/xara/xara.conf" "$HOME/.config/systemd/user/xara.service"
|
||||
grep -q "^sudo cp -P --remove-destination .*/etc/udev/rules.d/60-xara-ptt.rules /etc/udev/rules.d/60-xara-ptt.rules$" "$STUB_LOG"
|
||||
[ "$(cat "$HOME/.config/xara/xara.conf")" = "#call = YOURCALL" ]
|
||||
grep -qx "$HOME/.local/bin/xara" "$HAMPACK_STATE/manifests/xara"
|
||||
grep -qx "/etc/udev/rules.d/60-xara-ptt.rules" "$HAMPACK_STATE/manifests/xara"
|
||||
grep -qx "xara=0.1.3" "$HAMPACK_STATE/.installed_versions"
|
||||
# The service is installed but not enabled: it needs a callsign first
|
||||
! grep -q "systemctl --user enable" "$STUB_LOG"
|
||||
}
|
||||
|
||||
@test "a rebuild keeps the user's xara.conf" {
|
||||
bash "$REPO/install-compiled.sh"
|
||||
echo "call = N0CALL" > "$HOME/.config/xara/xara.conf"
|
||||
sed -i 's/^version=.*/version=0.1.4/' "$HAMPACK_COMPILE_CONF"
|
||||
git -C "$UPSTREAM" tag v0.1.4
|
||||
run bash "$REPO/install-compiled.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
grep -qx "xara=0.1.4" "$HAMPACK_STATE/.installed_versions"
|
||||
[ "$(cat "$HOME/.config/xara/xara.conf")" = "call = N0CALL" ]
|
||||
}
|
||||
|
||||
@test "a later update with xara current doesn't rebuild it" {
|
||||
bash "$REPO/install-compiled.sh"
|
||||
: > "$STUB_LOG"
|
||||
run bash "$REPO/install-compiled.sh"
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"xara 0.1.3 is up to date"* ]]
|
||||
! grep -q "^cargo " "$STUB_LOG"
|
||||
}
|
||||
Reference in New Issue
Block a user