%define gitcommit 0eef3b552b1ada848f22bad38ab2e40407307c5b %define gitshort 0eef3b5 Name: qtestsign Version: 0.1 Release: 0.%{gitshort}.%autorelease Summary: A simple tool to sign ELF Qualcomm firmware images License: GPL-2.0 URL: https://github.com/msm8916-mainline/qtestsign Source0: %url/archive/%{gitcommit}.tar.gz#/%{name}-%{gitcommit}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools %description qtestsign is a simple tool to "sign" ELF Qualcomm firmware images using a dummy certificate chain ("test keys"). It partially implements the image format described in Qualcomm's whitepaper "Secure Boot and Image Authentication" (both v1.0 and v2.0) by extending ELF images with a Qualcomm-specific "hash segment", consisting of: * A special MBN Header * Hashes for each ELF segment * A stub signature (actual signatures are not generated at the moment) * A dummy certificate chain %prep %autosetup -p1 -n %{name}-%{gitcommit} sed -i 's/0.0/0.1/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files mbn %files -f %{pyproject_files} %license COPYING %doc README.md %{_bindir}/qtestsign.py %{_bindir}/merge.py %{_bindir}/patchxbl.py %{_bindir}/region.py %{_bindir}/strip.py %changelog %autochangelog