diff --git a/README.md b/README.md index ae4c8e7..a830db6 100644 --- a/README.md +++ b/README.md @@ -44,41 +44,11 @@ Applications are pinned to tested versions, which we try to keep up with. Pinned - POTACAT: POTA spot aggregator with CAT control and logging - JS8Call (JS8Call-improved): keyboard-to-keyboard HF messaging - Graywolf: APRS transceiver and gateway, run as a systemd service -- xara: VARA-compatible HF/FM modem that runs natively on Linux (see below) -- xara: VARA-compatible HF/FM modem that runs natively on Linux (see below) **Pre-built downloads** (`binaries.conf`, each checked against its SHA-256): ardopcf (ARDOP modem), Paracon (packet terminal) and dx.py (DX cluster client). **Others:** not1mm (contest logger, installed with `uv`), and VARA HF, VARA FM, VARA Terminal and Winlink Express under Wine. The Windows installers need you to click through them, so they run only when one of these is missing and you're at the desktop. -### xara: VARA without Wine - -[xara](https://github.com/x0rro/xara) is an open source (MIT) modem that is compatible with VARA HF and FM over the air, so it can connect to VARA RMS gateways and other VARA stations. It listens on VARA's ports (8300 and 8301), so Pat, which HamPack also installs, uses it like VARA. HamPack installs it alongside VARA under Wine so you can try it; both use port 8300, so run one at a time. - -xara is new (0.1.x), so keep VARA around until it has worked well for you. HamPack builds it without the "registered" feature, which would unlock the speeds of paid VARA without a VARA license. - -To set it up: - -1. Edit `~/.config/xara/xara.conf`: set `call`, `hf` (or `fm`), your sound card (`xara --list-devices` lists them), and `radio` and `ptt` to transmit. The comments in the file explain each setting. -2. Start it by hand with `xara`, or as a user service with `systemctl --user enable --now xara`. -3. In Pat, use the VARA HF transport, e.g. `pat connect varahf:///GATEWAYCALL`, or pick VARA HF in `pat http`. Pat's VARA transports point at localhost:8300 by default, so there's nothing to configure. - -`xara-monitor` is also installed: a passive VARA HF monitor with its own web UI. - -### xara: VARA without Wine - -[xara](https://github.com/x0rro/xara) is an open source (MIT) modem that is compatible with VARA HF and FM over the air, so it can connect to VARA RMS gateways and other VARA stations. It listens on VARA's ports (8300 and 8301), so Pat, which HamPack also installs, uses it like VARA. HamPack installs it alongside VARA under Wine so you can try it; both use port 8300, so run one at a time. - -xara is new (0.1.x), so keep VARA around until it has worked well for you. HamPack builds it without the "registered" feature, which would unlock the speeds of paid VARA without a VARA license. - -To set it up: - -1. Edit `~/.config/xara/xara.conf`: set `call`, `hf` (or `fm`), your sound card (`xara --list-devices` lists them), and `radio` and `ptt` to transmit. The comments in the file explain each setting. -2. Start it by hand with `xara`, or as a user service with `systemctl --user enable --now xara`. -3. In Pat, use the VARA HF transport, e.g. `pat connect varahf:///GATEWAYCALL`, or pick VARA HF in `pat http`. Pat's VARA transports point at localhost:8300 by default, so there's nothing to configure. - -`xara-monitor` is also installed: a passive VARA HF monitor with its own web UI. - ### Graywolf's web UI Graywolf's web UI is at http://localhost:8080 and, by default, can only be reached from the machine it runs on. To reach it from other machines, run `sudo systemctl edit graywolf` and override `ExecStart` with `-http 0.0.0.0:8080`. Changes made that way survive HamPack updates; edits to `/etc/systemd/system/graywolf.service` itself don't. diff --git a/compile.conf b/compile.conf index 971a810..017d564 100644 --- a/compile.conf +++ b/compile.conf @@ -98,14 +98,3 @@ version=0.14.14 git=https://github.com/chrissnell/graywolf.git install=$HOME/.local/bin/graywolf steps=make all, install -m 755 bin/graywolf $HOME/.local/bin/graywolf, install -m 755 bin/graywolf-modem $HOME/.local/bin/graywolf-modem - -# VARA-compatible HF/FM modem, native on Linux; an alternative to VARA under -# Wine (both use port 8300, so run one at a time). Built without the -# "registered" feature, which unlocks paid-VARA speeds without a license. -# Installs the user service but doesn't enable it: set up -# ~/.config/xara/xara.conf first (see the README) -[xara] -version=0.1.3 -git=https://github.com/x0rro/xara.git -install=$HOME/.local/bin/xara -steps=cargo build --release --locked -p xara, mkdir -p stage$HOME/.local/bin stage$HOME/.local/share/man/man1 stage$HOME/.config/systemd/user stage/etc/udev/rules.d, install -m 755 target/release/xara target/release/xara-monitor stage$HOME/.local/bin/, install -m 644 dist/man/xara.1 dist/man/xara-monitor.1 stage$HOME/.local/share/man/man1/, sed "s|/usr/bin/xara|$HOME/.local/bin/xara|" dist/systemd/xara.service > stage$HOME/.config/systemd/user/xara.service, install -m 644 dist/udev/60-xara-ptt.rules stage/etc/udev/rules.d/, install_staged stage, sudo udevadm control --reload-rules, systemctl --user daemon-reload || true, mkdir -p $HOME/.config/xara, cp -n dist/xara.conf.example $HOME/.config/xara/xara.conf diff --git a/hampackremove b/hampackremove index e8c2bca..67bb9af 100755 --- a/hampackremove +++ b/hampackremove @@ -215,6 +215,8 @@ start_sudo_keepalive || exit 1 echo "Removing graywolf systemd service..." remove_graywolf_service +# HamPack no longer installs xara (discontinued upstream), but earlier versions +# did; its files are in a manifest, which remove_manifests removes below if [ -f "$HOME/.config/systemd/user/xara.service" ]; then echo "Stopping xara..." systemctl --user disable --now xara 2> /dev/null diff --git a/packages.conf b/packages.conf index 815fa31..f6e1603 100644 --- a/packages.conf +++ b/packages.conf @@ -3,7 +3,6 @@ # Ham utilities UTILITIES=( - alsa-lib # xara alsa-utils aria2 at-spi2-core @@ -24,7 +23,6 @@ UTILITIES=( libkiwix libtorrent-rasterbar libnotify - libpulse # xara libsecret libxcrypt-compat libxtst @@ -53,12 +51,6 @@ UTILITIES=( zimwriterfs ) -# Builds xara. Installed only if there's no cargo yet: rustup users already -# have one, and Arch's rust package conflicts with rustup -RUST_TOOLCHAIN=( - rust -) - # Ham applications APPLICATIONS=( chattervox-bin diff --git a/tests/update.bats b/tests/update.bats index 30258f1..86ca2e2 100644 --- a/tests/update.bats +++ b/tests/update.bats @@ -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" -} diff --git a/tests/xara.bats b/tests/xara.bats deleted file mode 100644 index cd34fa2..0000000 --- a/tests/xara.bats +++ /dev/null @@ -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" -} diff --git a/update.sh b/update.sh index d08c0d0..0975645 100644 --- a/update.sh +++ b/update.sh @@ -65,9 +65,6 @@ install_hampack_packages() { source "$SELF/packages.conf" local pkg missing=() added=() status=0 - command -v cargo &> /dev/null && RUST_TOOLCHAIN=() - UTILITIES+=("${RUST_TOOLCHAIN[@]}") - for pkg in "${UTILITIES[@]}" "${APPLICATIONS[@]}"; do is_installed "$pkg" || missing+=("$pkg") done