%global debug_package %{nil} Name: uke-control-fastrpc-rust-check Version: 1.0.1 Release: 1%{?dist} Summary: ARM64 Rust notification and session witness with original Fedora FastRPC License: MIT ExclusiveArch: aarch64 Source0: %{name}-%{version}.tar.gz Source1: fastrpc-1.0.8-1.fc46.aarch64.rpm Source2: fastrpc-devel-1.0.8-1.fc46.aarch64.rpm BuildRequires: cargo-rpm-macros cargo rust gcc-c++ coreutils pkgconfig(libsystemd) crate(libc/default) BuildRequires: fedora-gpg-keys jq cpio binutils libyaml libbsd %description Exercises the native session and notification adapter against the exact retained Fedora listener and the signed Uke Control hardware-free fixtures. %prep %autosetup sha256sum -c --strict rust-package-sources.sha256 (cd notify; sha256sum -c --strict SHA256SUMS) (cd session; sha256sum -c --strict SHA256SUMS) mkdir -p fedora/root fedora/trust rpmkeys --dbpath "$PWD/fedora/trust" --import /usr/share/pki/rpm-gpg/RPM-GPG-KEY-fedora-46-primary sha256sum -c --strict <<'FEDORA_PINS' 099b47aa0601322a6d872fb908f553b220b5899713485e6f9084e8819b28d5bd %{SOURCE1} 0178e291ddd6b15e9d1b071a61fecd594734fb3aadefd21e45aad1273e28fa4e %{SOURCE2} FEDORA_PINS for package in %{SOURCE1} %{SOURCE2}; do rpmkeys --dbpath "$PWD/fedora/trust" --checksig -v "$package" > fedora/signature.txt grep -Fq 'key fingerprint: d924b10d3e810dabdd8b56b596e7e91491211fce: OK' fedora/signature.txt ! grep -Eq 'NOKEY|BAD|NOT OK' fedora/signature.txt rpm2cpio "$package" | (cd fedora/root; cpio -idm --quiet --no-absolute-filenames) done %cargo_prep %build %set_build_flags cargo build --offline --release sdk=$PWD/fedora/root %{__cxx} $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -UNDEBUG -I"$sdk%{_includedir}" -Wl,--export-dynamic notify/fastrpc-notify-test.cpp -ldl $LDFLAGS -o notify-fixture %{__cxx} $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -UNDEBUG session/fastrpc-session-test.cpp $LDFLAGS -o session-fixture %{__cxx} $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -UNDEBUG -Isession/reference session/fastrpc-session-abi.cpp $LDFLAGS -o session-abi %{__cxx} $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -UNDEBUG -fPIC -shared -I"$sdk%{_includedir}" session/fastrpc-session-mocks.cpp $LDFLAGS -o session-mocks.so %install install -Dm644 rust-package-sources.sha256 %{buildroot}%{_docdir}/%{name}/rust-package-sources.sha256 %check test ! -e /etc/senemos/kernel-update.conf original="$PWD/fedora/root%{_libdir}/libadsp_default_listener.so.1.0.1" printf '%%s %%s\n' "$(jq -er .fedora.listener_elf_sha256 notify/fastrpc-notify.json)" "$original" | sha256sum --check --strict - export LD_LIBRARY_PATH="$PWD/fedora/root%{_libdir}" adapter="$PWD/target/release/libuke_fastrpc_notify.so" worker="$PWD/target/release/uke-fastrpc-session" ./session-abi bash notify/fastrpc-notify-test.sh "$PWD/notify-fixture" "$adapter" bash session/fastrpc-session-test.sh "$PWD/session-fixture" "$worker" "$adapter" "$PWD/session-mocks.so" for binary in "$adapter" "$worker"; do readelf -h "$binary" | grep -F AArch64 readelf -d "$binary" > dynamic.txt ! grep -F 'libstdc++' dynamic.txt done nm -D --defined-only "$adapter" | awk '{print $3}' | sort > adapter.exports printf '%s\n' adsp_default_listener1_register adsp_default_listener_register > expected.exports cmp adapter.exports expected.exports printf 'Native FastRPC session and notification use the exact original listener ABI on ARM64\n' %files %license LICENSE %{_docdir}/%{name}/rust-package-sources.sha256 %changelog * Mon Nov 30 2026 Uke Linux Maintainers - 1.0.1-1 - Check Rust adapters with the original signed Fedora FastRPC listener.