Revert "Create real debug package"

zipkmod removes module signatures, meaning anyone who has `sig_enforce`
enabled can no longer boot.

This reverts commit 71457588fa.
This commit is contained in:
Jan Alexander Steffens (heftig)
2025-12-13 19:14:50 +01:00
parent 295d76b82a
commit 4cac753243
3 changed files with 29 additions and 9 deletions

View File

@@ -29,7 +29,8 @@ makedepends=(
texlive-latexextra
)
options=(
zipkmod
!debug
!strip
)
_srcname=linux-${pkgver%.*}
_srctag=v${pkgver%.*}-${pkgver##*.}
@@ -48,12 +49,12 @@ sha256sums=('d0a78bf3f0d12aaa10af3b5adcaed5bc767b5b78705e5ef885d5e930b72e25d5'
'SKIP'
'e0de7a4ccf2636993b2f49081399efaa63c0bf1c0db5cf1cbbdd6f8bfbede241'
'SKIP'
'16d11242c0b0e8845d9735d3bd0a8d81bf1083f5a928b5372008ee9ad3e21792')
'3061f542f99dd8dec161029e31dce15281cd99ec68e8403312d135ed13787dfd')
b2sums=('6ea6a7235ee59f876b015c6fda0f2772980c6ea58240689ce581182262387cbef3aed3c95ced66cdb56479cbd83961fbcbdfdff09f049941c3daf047710adb61'
'SKIP'
'48a0b27d9c7ede9141fa581c2415f48d73e155d5afb515f9f10e0cd95947027464b3e2335bb5c275527007d9170889961858909520f2e6049ef2701cf4df9095'
'SKIP'
'fec0a19ab81a52c95694e2c1a8375c155512b451f0d8d513eb4e9d5ed8c7f66d2e0ea6cf1b5ab2e7bf2c0497a6baea082706c815f9071d25766882e6a48a18e5')
'dc5ebe64a439595311311f25f8d765e1b6abfc4a0ce3e8c13b521d900fb231b287c0e7b18fc2f6534300322aac9a360d79fdfcfd81ae4824547477ea0e49a1fe')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -127,8 +128,8 @@ _package() {
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
# Suppress depmod
make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/doesnt/exist modules_install
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build link
rm "$modulesdir"/build
@@ -202,6 +203,24 @@ _package-headers() {
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"