%global debug_package %{nil} Name: uke-control-charge-records-check Version: 1.4.0 Release: 1%{?dist} Summary: ARM64 receipt for the Uke charge state record parser License: MIT ExclusiveArch: aarch64 Source0: %{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros cargo rust gcc-c++ coreutils crate(serde/default) crate(serde_json/float_roundtrip) crate(serde_json/preserve_order) crate(libc/default) pkgconfig(libsystemd) pkgconfig(libcrypto) jq binutils %description Checks the existing charge, protection and adapter metadata records against the currently published C++ source. Both implementations use synthetic inputs. %prep %autosetup sha256sum --check --strict --quiet rust-package-sources.sha256 %cargo_prep %install install -D -m644 rust-package-sources.sha256 %{buildroot}%{_docdir}/%{name}/rust-package-sources.sha256 %check ulimit -c 0 g++ -std=c++20 -O2 -UNDEBUG -Wall -Wextra -Werror reference/tests/charge-control.cpp reference/src/battery/control.cpp -o charge-control-reference ./charge-control-reference echo 'Published synthetic charge control contract passed' g++ -std=c++20 -O2 -UNDEBUG -Wall -Wextra -Werror reference/tests/charge-profile-review.cpp reference/src/battery/control-profile.cpp reference/src/battery/record.cpp $(pkg-config --cflags --libs libsystemd libcrypto) -o charge-profile-reference UKE_CHARGE_PROFILE_REFERENCE="$PWD/charge-profile-reference" cargo test --offline --release --lib -- --nocapture cargo build --offline --release --bin uke-charge-control g++ -std=c++20 -O2 -UNDEBUG -Wall -Wextra -Werror -pthread reference/src/battery/control-main.cpp reference/src/battery/control.cpp reference/src/battery/control-profile.cpp reference/src/battery/record.cpp $(pkg-config --cflags --libs libsystemd libcrypto) -o charge-control-command-reference readelf -h target/release/uke-charge-control | grep -E "Machine:.*AArch64" readelf -d target/release/uke-charge-control > charge-linkage if grep -Fq libstdc++ charge-linkage; then exit 1; fi bash tests/command-parity.sh ./charge-control-command-reference ./target/release/uke-charge-control %files %license LICENSE-MIT %{_docdir}/%{name}/rust-package-sources.sha256 %changelog * Mon Nov 30 2026 Uke Linux Maintainers - 1.4.0-1 - Compare the Rust command and guarded sysfs transport with the published implementation.