mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-22 07:48:26 +00:00
macOS platform: - Platform-native TUN interface management with shutdown pipe - Raw Ethernet transport with macOS socket backend (socket_macos.rs) - EthernetTransport and TransportHandle::Ethernet ungated from Linux-only - macOS .pkg packaging (build-pkg.sh, launchd plist, uninstall script) - CI: macOS build and unit test jobs; x86_64 cross-compiled from macos-latest via rustup target add x86_64-apple-darwin Gateway feature flag: - New opt-in `gateway` Cargo feature activates optional `rustables` dep - `pub mod gateway` and `Config.gateway` gated behind the feature so macOS builds never pull in Linux-only nftables bindings - `fips-gateway` bin has `required-features = ["gateway"]` - All Linux/OpenWrt/AUR packaging passes `--features gateway` CI / packaging: - package-linux, package-macos, package-openwrt now trigger on push to master/maint/next and on pull requests; release uploads remain tag-gated - Bloom filter routing fix: fall through to tree routing when no candidate is strictly closer - MMP intervals: raise MIN to 1s / MAX to 5s with 5-sample cold-start phase
66 lines
2.5 KiB
Bash
66 lines
2.5 KiB
Bash
# Maintainer: Johnathan Corgan <jcorgan@corganlabs.com>
|
|
pkgname=fips
|
|
pkgver=0.1.0
|
|
pkgrel=1
|
|
pkgdesc="Distributed, decentralized network routing protocol for mesh nodes"
|
|
url="https://github.com/jmcorgan/fips"
|
|
license=('MIT')
|
|
arch=('x86_64')
|
|
depends=('gcc-libs' 'glibc')
|
|
makedepends=('cargo')
|
|
optdepends=('systemd-resolved: .fips DNS resolution')
|
|
conflicts=('fips-git')
|
|
backup=('etc/fips/fips.yaml' 'etc/fips/hosts')
|
|
install=fips.install
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/jmcorgan/fips/archive/v$pkgver.tar.gz"
|
|
"fips.sysusers"
|
|
"fips.tmpfiles")
|
|
b2sums=('SKIP' # tarball hash computed by CI via updpkgsums on release
|
|
'25a0552f3d67d12f48dfd40fe4776ad7c46afeeab76bd2674b48e234db3c145810a24569a8c1a7f4c186eb546f0fae2ebe1550080c0e91d8eb72ba9934c752a6'
|
|
'844257cb8e09cd935d0d6345922d0f3ec777411daca20e24175b346a7b3cb95ebce12631a9466c4d94f1588ed8d62d92514ff24025ccfd0efb358e542b454b00')
|
|
options=('!lto')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
export CARGO_TARGET_DIR=target
|
|
export SOURCE_DATE_EPOCH=$(stat -c %Y Cargo.toml)
|
|
cargo build --frozen --release --features gateway
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname-$pkgver"
|
|
export CARGO_TARGET_DIR=target
|
|
cargo test --frozen --lib --features gateway
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
# Binaries
|
|
install -Dm0755 target/release/fips "$pkgdir/usr/bin/fips"
|
|
install -Dm0755 target/release/fipsctl "$pkgdir/usr/bin/fipsctl"
|
|
install -Dm0755 target/release/fipstop "$pkgdir/usr/bin/fipstop"
|
|
install -Dm0755 target/release/fips-gateway "$pkgdir/usr/bin/fips-gateway"
|
|
|
|
# Systemd service files (from packaging/debian/ -- correct /usr/bin/ paths)
|
|
install -Dm0644 packaging/debian/fips.service "$pkgdir/usr/lib/systemd/system/fips.service"
|
|
install -Dm0644 packaging/debian/fips-dns.service "$pkgdir/usr/lib/systemd/system/fips-dns.service"
|
|
install -Dm0644 packaging/debian/fips-gateway.service "$pkgdir/usr/lib/systemd/system/fips-gateway.service"
|
|
|
|
# Config files (from packaging/common/)
|
|
install -Dm0600 packaging/common/fips.yaml "$pkgdir/etc/fips/fips.yaml"
|
|
install -Dm0644 packaging/common/hosts "$pkgdir/etc/fips/hosts"
|
|
|
|
# System integration (from local source files in $srcdir)
|
|
install -Dm0644 "$srcdir/fips.sysusers" "$pkgdir/usr/lib/sysusers.d/fips.conf"
|
|
install -Dm0644 "$srcdir/fips.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/fips.conf"
|
|
|
|
# License
|
|
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|