gentoo-overlay/sys-kernel/linux-hardened-sources/files/mkspec_script_local.patch

41 lines
1.7 KiB
Diff

diff -ur linux-5.4.21.a-hardened/scripts/package/mkspec linux-5.4.21.a-hardened.new/scripts/package/mkspec
--- linux-5.4.21.a-hardened/scripts/package/mkspec 2019-11-25 03:32:01.000000000 +0300
+++ linux-5.4.21.a-hardened.new/scripts/package/mkspec 2020-03-28 17:07:06.136236182 +0300
@@ -85,9 +85,11 @@
mkdir -p %{buildroot}/boot
%ifarch ia64
mkdir -p %{buildroot}/boot/efi
+ /usr/local/bin/sbsign_local.sh \$($MAKE image_name)
cp \$($MAKE image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
%else
+ /usr/local/bin/sbsign_local.sh \$($MAKE image_name)
cp \$($MAKE image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
%endif
$M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
@@ -98,11 +100,11 @@
mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source
-$S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE
-$S$M tar cf - $EXCLUDES . | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
+$S$M mkdir -p %{buildroot}/usr/src/$KERNELRELEASE
+$S$M tar cf - $EXCLUDES . | tar xf - -C %{buildroot}/usr/src/$KERNELRELEASE
$S$M cd %{buildroot}/lib/modules/$KERNELRELEASE
-$S$M ln -sf /usr/src/kernels/$KERNELRELEASE build
-$S$M ln -sf /usr/src/kernels/$KERNELRELEASE source
+$S$M ln -sf /usr/src/$KERNELRELEASE build
+$S$M ln -sf /usr/src/$KERNELRELEASE source
%clean
rm -rf %{buildroot}
@@ -141,7 +143,7 @@
$S$M
$S$M %files devel
$S$M %defattr (-, root, root)
-$S$M /usr/src/kernels/$KERNELRELEASE
+$S$M /usr/src/$KERNELRELEASE
$S$M /lib/modules/$KERNELRELEASE/build
$S$M /lib/modules/$KERNELRELEASE/source
EOF