Features: - Introduce a Backend trait + System impl so flow/status/watch can be unit tested against a fake; add 11 connect-state-machine tests. - Captive-portal detection: status::connectivity returns Online/Portal/Offline; surfaced in status, JSON, connect notes, and a dedicated watch state. - `status --json` for bars/scripts; `profile add`/`profile remove`; detect now scores by number of in-range markers. Robustness: - Pin LC_ALL=C/LANG=C on child processes for locale-independent parsing. - Atomic config/state writes (temp + rename); 0600 config never world-readable. - Transient PSK file written to $XDG_RUNTIME_DIR when available. Fixes (from prior audit): - Feed Wi-Fi PSK to nmcli via stdin/passwd-file, never argv. - mask() no longer panics on multi-byte passwords. - Connectivity check requires HTTP 204 (no captive-portal false positives). - nmcli NAME,TYPE parsing handles escaped colons. - Strip CIDR suffix from displayed IP; PKGBUILD/Cargo version aligned (2.1.0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015iGKg2EEqRuw6HyWd4tnmL
36 lines
1,018 B
Bash
36 lines
1,018 B
Bash
# Maintainer: Breadway <rileyhorsham@gmail.com>
|
|
|
|
pkgname=breadcrumbs
|
|
pkgver=2.1.0
|
|
pkgrel=1
|
|
pkgdesc="Profile-aware Wi-Fi state machine with Tailscale integration"
|
|
arch=('x86_64')
|
|
url="https://github.com/Breadway/breadcrumbs"
|
|
license=('MIT')
|
|
# Some Rust deps (ring/mlua) build vendored C/asm into static archives; makepkg's
|
|
# default -flto=auto emits GCC LTO bitcode the Rust (lld) link cannot read,
|
|
# causing undefined-symbol errors. Disable LTO.
|
|
options=(!lto !debug)
|
|
depends=('networkmanager')
|
|
optdepends=(
|
|
'tailscale: Tailscale VPN profile integration'
|
|
)
|
|
makedepends=('rust' 'cargo')
|
|
source=("${pkgname}-${pkgver}.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
cargo build --release --locked
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
cargo test --release --locked
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
install -Dm755 target/release/breadcrumbs "${pkgdir}/usr/bin/breadcrumbs"
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|