Parallel agent work: bandwidth fix, CPU platforms, packaging
All checks were successful
CI / test (push) Successful in 2m8s
All checks were successful
CI / test (push) Successful in 2m8s
5 agents ran in parallel: 1. Fix bandwidth limit (-b): new advance_next_send() prevents drift bursts by resetting when >2x interval behind (bandwidth.rs, client.rs, server.rs) 2. Windows + FreeBSD CPU support (cpu.rs): - Windows: GetSystemTimes via raw FFI - FreeBSD: sysctl kern.cp_time parsing 3. Ubuntu .deb packaging (deploy/deb/): - build-deb.sh: creates .deb from pre-built binary - test-deb.sh: tests in Ubuntu Docker container 4. Fedora/RHEL RPM packaging (deploy/rpm/): - btest-rs.spec: full RPM spec with systemd unit - build-rpm.sh + test-rpm.sh 5. Alpine Linux apk packaging (deploy/alpine/): - APKBUILD with OpenRC init script - test-alpine.sh 58 tests pass, zero warnings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
73
deploy/rpm/btest-rs.spec
Normal file
73
deploy/rpm/btest-rs.spec
Normal file
@@ -0,0 +1,73 @@
|
||||
Name: btest-rs
|
||||
Version: 0.6.0
|
||||
Release: 1%{?dist}
|
||||
Summary: MikroTik Bandwidth Test (btest) server and client with EC-SRP5 auth
|
||||
|
||||
License: MIT AND Apache-2.0
|
||||
URL: https://github.com/manawenuz/btest-rs
|
||||
Source0: https://github.com/manawenuz/btest-rs/archive/refs/tags/v%{version}.tar.gz
|
||||
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
%description
|
||||
A Rust reimplementation of the MikroTik Bandwidth Test (btest) protocol,
|
||||
providing both server and client functionality with EC-SRP5 authentication.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --release
|
||||
|
||||
%install
|
||||
install -Dm755 target/release/btest %{buildroot}%{_bindir}/btest
|
||||
install -Dm644 docs/man/btest.1 %{buildroot}%{_mandir}/man1/btest.1
|
||||
install -Dm644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
||||
|
||||
# systemd service unit
|
||||
install -d %{buildroot}%{_unitdir}
|
||||
cat > %{buildroot}%{_unitdir}/btest.service << 'EOF'
|
||||
[Unit]
|
||||
Description=MikroTik Bandwidth Test Server (btest-rs)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/btest -s
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
DynamicUser=yes
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
PrivateTmp=yes
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
LimitNOFILE=65535
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_bindir}/btest
|
||||
%{_mandir}/man1/btest.1*
|
||||
%{_unitdir}/btest.service
|
||||
|
||||
%post
|
||||
%systemd_post btest.service
|
||||
|
||||
%preun
|
||||
%systemd_preun btest.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart btest.service
|
||||
|
||||
%changelog
|
||||
* Mon Mar 30 2026 Siavash Sameni <manwe@manko.yoga> - 0.6.0-1
|
||||
- Initial RPM package
|
||||
Reference in New Issue
Block a user