Name: uke-axion-rescue-mapper-check Version: 0.4.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: android-tools gawk coreutils bash binutils jq sed grep diffutils findutils %global debug_package %{nil} %description Text receipts from the ARM64 compile, signed-metadata and Super layout 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 -ffunction-sections -fdata-sections src/image/axion-rescue-{init,mapper,layout}.cpp src/image/protected-{cohort-auth,cohort-manifest,physical-cohort}.cpp -o build/axion-rescue-init $LDFLAGS -Wl,--gc-sections -ldevmapper -lsystemd -lcrypto g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror tests/axion-rescue-init-fixture.cpp -o build/new-root-init-fixture $LDFLAGS readelf -d build/axion-rescue-init | grep -F "(NEEDED)" > build/runtime-needed.txt g++ $CXXFLAGS -std=c++20 -Wall -Wextra -Werror -DUKE_AXION_RESCUE_LAYOUT_TEST src/image/axion-rescue-layout.cpp -o build/layout $LDFLAGS 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/axion-rescue-layout.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=$? build/axion-rescue-init entry_status=$? build/new-root-init-fixture new_root_status=$? set -e test "$fixture_status" = 2 test "$entry_status" = 2 test "$new_root_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 build/layout build/axion-rescue-init build/new-root-init-fixture; do readelf -h "$candidate" | grep -E 'Machine:.*AArch64' done bash tests/protected-cohort-manifest.sh build/cohort-manifest "$PWD/build/manifest.json" bash tests/axion-rescue-layout.sh build/layout 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,layout,axion-rescue-init,new-root-init-fixture} > build/native-bin.sha256 %install install -d "%{buildroot}%{_datadir}/%{name}" install -m0644 source-commit SHA256SUMS build/{manifest.json,native-bin.sha256,runtime-needed.txt} "%{buildroot}%{_datadir}/%{name}/" %files %license LICENSE %{_datadir}/%{name}/