From 5cd6fa806c3a181c36d02c9de5a4d443a5f5e00b Mon Sep 17 00:00:00 2001 From: ebasov Date: Tue, 3 Dec 2024 19:52:26 +0300 Subject: [PATCH] Define reorganization --- SPECS/kernel-lt-6.1.spec | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/SPECS/kernel-lt-6.1.spec b/SPECS/kernel-lt-6.1.spec index 3c3ed28..d5f0ea2 100644 --- a/SPECS/kernel-lt-6.1.spec +++ b/SPECS/kernel-lt-6.1.spec @@ -707,32 +707,26 @@ popd > /dev/null popd > /dev/null %install -%ifarch x86_64 -%define __modsign_install_post \ -if [ "%{signmodules}" -eq "1" ]; then \ - if [ "%{with_std}" -ne "0" ]; then \ - %{SOURCE21} linux-%{version}-%{release}.x86_64/certs/signing_key.pem.sign linux-%{version}-%{release}.x86_64/certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ - fi \ -fi \ -if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -name '*.ko' -type f | xargs --no-run-if-empty -P%{zcpu} xz \ -fi \ -%{nil} +%define __modsign_install_post %{nil} +%ifarch x86_64 +%define __modsign_install_post_arch linux-%{version}-%{release}.x86_64 +%elifarch aarch64 +%define __modsign_install_post_arch linux-%{version}-%{release}.aarch64 +%else +%error "Unsupported architecture" %endif -%ifarch aarch64 %define __modsign_install_post \ if [ "%{signmodules}" -eq "1" ]; then \ if [ "%{with_std}" -ne "0" ]; then \ - %{SOURCE21} linux-%{version}-%{release}.aarch64/certs/signing_key.pem.sign linux-%{version}-%{release}.aarch64/certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ + %{SOURCE21} %{__modsign_install_post_arch}/certs/signing_key.pem.sign %{__modsign_install_post_arch}/certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ find $RPM_BUILD_ROOT/lib/modules/ -name '*.ko' -type f | xargs --no-run-if-empty -P%{zcpu} xz \ fi \ %{nil} -%endif # # Ensure modules are signed *after* all invocations of