Name: uke-axion-rescue-mapper-check Version: 0.1.0 Release: 1%{?dist} Summary: Native ARM64 qualification of Uke's verified AxionOS rescue mapper License: MIT URL: https://github.com/MCC45TR/uke-fedora-builder Source0: %{name}-%{version}.tar.xz ExclusiveArch: aarch64 BuildRequires: gcc-c++ device-mapper-devel systemd-devel openssl-devel openssl json-devel kernel-headers BuildRequires: coreutils bash binutils jq sed grep diffutils findutils %global debug_package %{nil} %description Text receipts from the ARM64 compile and signed-metadata regression fixtures. The guest mapper executable and all keys are excluded from the binary RPM. %prep %setup -q -n witness sha256sum --strict -c SHA256SUMS %build %set_build_flags mkdir build g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -c src/image/axion-rescue-mapper.cpp -o build/mapper.o g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -c src/image/protected-physical-cohort.cpp -o build/physical.o g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -ffunction-sections -fdata-sections \ tests/axion-rescue-mapper.cpp src/image/protected-cohort-{auth,manifest}.cpp \ -o build/guest-fixture $LDFLAGS -Wl,--gc-sections -ldevmapper -lcrypto set +e build/guest-fixture fixture_status=$? set -e test "$fixture_status" = 2 g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -DUKE_COHORT_MANIFEST_CLI \ src/image/protected-cohort-{auth,manifest}.cpp -o build/cohort-manifest $LDFLAGS -lcrypto for candidate in build/mapper.o build/physical.o build/guest-fixture build/cohort-manifest; do readelf -h "$candidate" | grep -E 'Machine:.*AArch64' done bash tests/protected-cohort-manifest.sh build/cohort-manifest "$PWD/build/manifest.json" jq -e '.native_architecture=="aarch64" and .signed_invalid_cases_refused==64 and .axion_rescue_signature_and_extent_checked' build/manifest.json sha256sum build/{mapper.o,physical.o,guest-fixture,cohort-manifest} > build/native-bin.sha256 %install install -d "%{buildroot}%{_datadir}/%{name}" install -m0644 source-commit SHA256SUMS build/{manifest.json,native-bin.sha256} "%{buildroot}%{_datadir}/%{name}/" %files %license LICENSE %{_datadir}/%{name}/