%global debug_package %{nil} Name: uke-control-rust-super-topology-check Version: 1.1.0 Release: 1%{?dist} Summary: ARM64 witness for the Rust Uke super topology inspector License: MIT ExclusiveArch: aarch64 Source0: %{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros cargo rust crate(libc/default) BuildRequires: crate(serde_json/default) crate(serde_json/float_roundtrip) crate(serde_json/preserve_order) BuildRequires: pkgconfig(openssl) binutils coreutils jq grep gcc kernel-headers %description Compares a real Android-tools super prefix with the retained Linux seed4 admission and ensures malformed or foreign layouts fail before use. %prep %autosetup sha256sum --check --strict --quiet rust-package-sources.sha256 %cargo_prep %build cargo build --offline --release --bin uke-super-swap %install install -D -m644 rust-package-sources.sha256 %{buildroot}%{_docdir}/%{name}/rust-package-sources.sha256 %check gcc -std=gnu11 -Wextra -Werror -fsyntax-only fixtures/block_layout.c cargo test --offline --release binary="$PWD/target/release/uke-super-swap" readelf -h "$binary" | grep -F AArch64 capacity=4294967296 truncate -s "$capacity" fixture.raw dd if=fixtures/super-prefix.bin of=fixture.raw conv=notrunc status=none test "$(stat -c %%b fixture.raw)" -lt 4096 "$binary" inspect --image "$capacity" fixture.raw | jq -eS . > actual-inspect.json jq -eS . fixtures/inspect.json > expected-inspect.json cmp actual-inspect.json expected-inspect.json "$binary" layout "$capacity" | jq -eS . > actual-layout.json jq -eS . fixtures/layout.json > expected-layout.json cmp actual-layout.json expected-layout.json if "$binary" inspect --image "$capacity" fixtures/super-prefix.bin; then exit 1; fi if "$binary" inspect --image "$capacity" fixture.raw seed; then exit 1; fi ln -s fixture.raw fixture-link.raw if "$binary" inspect --image "$capacity" fixture-link.raw; then exit 1; fi printf 'Native super inspection matches retained JSON for a real Android-tools seed4 image on ARM64.\n' test "$(id -u)" != 0 ln "$binary" prepare.sh status=0 ./prepare.sh --prepare > privilege.log 2>&1 || status=$? test "$status" = 1 grep -Fx "UKE_SUPER_SWAP_REJECTED: root required" privilege.log ln "$binary" map-fastboot-swap.sh status=0 ./map-fastboot-swap.sh fixture.raw > privilege.log 2>&1 || status=$? test "$status" = 1 grep -Fx "UKE_SWAP_REJECTED: run as root with [--verify] and one super block device" privilege.log %files %license LICENSE %{_docdir}/%{name}/rust-package-sources.sha256 %changelog * Mon Nov 30 2026 Uke Linux Maintainers - 1.1.0-1 - Compare native seed4 admission and legacy stock firmware layout checks on ARM64.