%global debug_package %{nil} Name: uke-control-rust-selinux-compose-check Version: 1.0.0 Release: 1%{?dist} Summary: ARM64 witness for Rust SELinux kernel ABI composition License: GPL-2.0-or-later ExclusiveArch: aarch64 Source0: %{name}-%{version}.tar.gz Source1: original-fedora-motion-policy.rpm BuildRequires: cargo-rpm-macros cargo rust binutils coreutils rpm cpio gawk bzip2 checkpolicy grep %description Compares the native composer against the retained rules using the Fedora policy store and generated negative cases. Does not install or load policy. %prep %autosetup sha256sum --check --strict --quiet rust-package-sources.sha256 %cargo_prep %build cargo build --offline --release %install install -D -m644 rust-package-sources.sha256 %{buildroot}%{_docdir}/%{name}/rust-package-sources.sha256 %check cargo test --offline --release readelf -h target/release/uke-compose-kernel-abi | grep -F AArch64 mkdir -m700 policy rpm2cpio %{SOURCE1} | (cd policy; cpio -idm --quiet --no-absolute-filenames './var/lib/selinux/targeted/active/modules/100/base/cil' './var/lib/selinux/targeted/active/policy.kern') test -f policy/var/lib/selinux/targeted/active/policy.kern base=policy/var/lib/selinux/targeted/active/modules/100/base/cil if [[ $(head -c 3 "$base") == BZh ]]; then bzip2 -dc "$base" > base.cil; else cp "$base" base.cil; fi checkpolicy -b -M -C -o linked.cil policy/var/lib/selinux/targeted/active/policy.kern gawk -f reference/compose-kernel-abi.awk base.cil linked.cil > original.cil target/release/uke-compose-kernel-abi base.cil linked.cil > native.cil cmp original.cil native.cil printf 'Native SELinux ABI composition matches the original Fedora policy byte for byte.\n' %files %license LICENSE %{_docdir}/%{name}/rust-package-sources.sha256 %changelog * Mon Nov 30 2026 Uke Linux Maintainers - 1.0.0-1 - Compare native ABI composition with the retained Fedora policy workflow.