ksigner/ksigner.spec.in
2025-09-23 19:03:16 -05:00

71 lines
1.9 KiB
RPMSpec

Name: ksigner
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: Secure Boot kernel signing utility
License: MIT
URL: https://git.radon.win/radon/ksigner
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
Requires: openssl
Requires: mokutil
Requires: sbsigntools
Requires: hmaccalc
Requires: sudo
Requires: bash >= 4.0
%description
A utility for signing Linux kernels with custom keys for Secure Boot.
Supports signing individual kernels or all kernels.
%prep
%setup -q
%build
# Nothing to build - shell script
%install
# Create directories
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_sysconfdir}/ksigner
install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_sysconfdir}/kernel/postinst.d
install -d %{buildroot}%{_mandir}/man8
# Install main script
install -m 755 ksigner %{buildroot}%{_bindir}/ksigner
# Install configuration file
install -m 644 ksigner.conf %{buildroot}%{_sysconfdir}/ksigner/ksigner.conf
# Install kernel update hook
install -m 755 ksigner-update-hook %{buildroot}%{_sysconfdir}/kernel/postinst.d/zz-ksigner
# Install man page
install -m 644 ksigner.8 %{buildroot}%{_mandir}/man8/ksigner.8
%post
echo "==========================================="
echo "Kernel Signer has been installed."
echo "To set up kernel signing:"
echo " 1. Run: sudo ksigner setup"
echo " 2. Reboot your system"
echo " 3. In MOK Manager: Enroll MOK Continue Yes Enter password"
echo "==========================================="
%files
%license LICENSE
%doc README.md
%{_bindir}/ksigner
%config(noreplace) %{_sysconfdir}/ksigner/ksigner.conf
%{_sysconfdir}/kernel/postinst.d/zz-ksigner
%{_mandir}/man8/ksigner.8*
%changelog
* Tue Sep 23 2025 RadioactivePb <radioactivepb@gmail.com> - @VERSION@-@RELEASE@
- Initial RPM release
- Added automatic kernel signing on updates
- Added configuration file support