Skip to content

Commit dbf6b04

Browse files
committed
Make real debug packages with makepkg
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
1 parent 5b73f13 commit dbf6b04

File tree

20 files changed

+32
-339
lines changed

20 files changed

+32
-339
lines changed

linux-cachyos-bmq/PKGBUILD

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@
127127
# Use this only if you have Turing+ GPU
128128
: "${_build_nvidia_open:=no}"
129129

130-
# Build a debug package with non-stripped vmlinux
131-
: "${_build_debug:=no}"
132-
133130
# ATTENTION: Do not modify after this line
134131
_is_lto_kernel() {
135132
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
@@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}"
162159
arch=('x86_64')
163160
url="https://github.com/CachyOS/linux-cachyos"
164161
license=('GPL-2.0-only')
165-
options=('!strip' '!debug' '!lto')
162+
options=('!lto' 'zipkmod')
166163
makedepends=(
167164
bc
168165
cpio
@@ -605,38 +602,11 @@ _package-headers() {
605602
echo "Removing loose objects..."
606603
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
607604

608-
echo "Stripping build tools..."
609-
local file
610-
while read -rd '' file; do
611-
case "$(file -Sib "$file")" in
612-
application/x-sharedlib\;*) # Libraries (.so)
613-
strip -v $STRIP_SHARED "$file" ;;
614-
application/x-archive\;*) # Libraries (.a)
615-
strip -v $STRIP_STATIC "$file" ;;
616-
application/x-executable\;*) # Binaries
617-
strip -v $STRIP_BINARIES "$file" ;;
618-
application/x-pie-executable\;*) # Relocatable binaries
619-
strip -v $STRIP_SHARED "$file" ;;
620-
esac
621-
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
622-
623-
echo "Stripping vmlinux..."
624-
strip -v $STRIP_STATIC "$builddir/vmlinux"
625-
626605
echo "Adding symlink..."
627606
mkdir -p "$pkgdir/usr/src"
628607
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
629608
}
630609

631-
_package-dbg(){
632-
pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"
633-
depends=("${pkgbase}-headers")
634-
635-
cd "${_srcname}"
636-
mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
637-
install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
638-
}
639-
640610
_package-zfs(){
641611
pkgdesc="zfs module for the $pkgdesc kernel"
642612
depends=('pahole' "${pkgbase}=${_kernver}")
@@ -689,7 +659,6 @@ _package-nvidia-open(){
689659
}
690660

691661
pkgname=("$pkgbase")
692-
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
693662
pkgname+=("$pkgbase-headers")
694663
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
695664
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")

linux-cachyos-bmq/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512"
10941094
CONFIG_MODULE_COMPRESS=y
10951095
# CONFIG_MODULE_COMPRESS_GZIP is not set
10961096
# CONFIG_MODULE_COMPRESS_XZ is not set
1097-
CONFIG_MODULE_COMPRESS_ZSTD=y
1098-
CONFIG_MODULE_COMPRESS_ALL=y
1097+
# CONFIG_MODULE_COMPRESS_ZSTD is not set
1098+
# CONFIG_MODULE_COMPRESS_ALL is not set
10991099
CONFIG_MODULE_DECOMPRESS=y
11001100
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
11011101
CONFIG_MODPROBE_PATH="/sbin/modprobe"

linux-cachyos-bore/PKGBUILD

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@
127127
# Use this only if you have Turing+ GPU
128128
: "${_build_nvidia_open:=no}"
129129

130-
# Build a debug package with non-stripped vmlinux
131-
: "${_build_debug:=no}"
132-
133130
# ATTENTION: Do not modify after this line
134131
_is_lto_kernel() {
135132
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
@@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}"
162159
arch=('x86_64')
163160
url="https://github.com/CachyOS/linux-cachyos"
164161
license=('GPL-2.0-only')
165-
options=('!strip' '!debug' '!lto')
162+
options=('!lto' 'zipkmod')
166163
makedepends=(
167164
bc
168165
cpio
@@ -605,38 +602,11 @@ _package-headers() {
605602
echo "Removing loose objects..."
606603
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
607604

608-
echo "Stripping build tools..."
609-
local file
610-
while read -rd '' file; do
611-
case "$(file -Sib "$file")" in
612-
application/x-sharedlib\;*) # Libraries (.so)
613-
strip -v $STRIP_SHARED "$file" ;;
614-
application/x-archive\;*) # Libraries (.a)
615-
strip -v $STRIP_STATIC "$file" ;;
616-
application/x-executable\;*) # Binaries
617-
strip -v $STRIP_BINARIES "$file" ;;
618-
application/x-pie-executable\;*) # Relocatable binaries
619-
strip -v $STRIP_SHARED "$file" ;;
620-
esac
621-
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
622-
623-
echo "Stripping vmlinux..."
624-
strip -v $STRIP_STATIC "$builddir/vmlinux"
625-
626605
echo "Adding symlink..."
627606
mkdir -p "$pkgdir/usr/src"
628607
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
629608
}
630609

631-
_package-dbg(){
632-
pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"
633-
depends=("${pkgbase}-headers")
634-
635-
cd "${_srcname}"
636-
mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
637-
install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
638-
}
639-
640610
_package-zfs(){
641611
pkgdesc="zfs module for the $pkgdesc kernel"
642612
depends=('pahole' "${pkgbase}=${_kernver}")
@@ -689,7 +659,6 @@ _package-nvidia-open(){
689659
}
690660

691661
pkgname=("$pkgbase")
692-
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
693662
pkgname+=("$pkgbase-headers")
694663
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
695664
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")

linux-cachyos-bore/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512"
10941094
CONFIG_MODULE_COMPRESS=y
10951095
# CONFIG_MODULE_COMPRESS_GZIP is not set
10961096
# CONFIG_MODULE_COMPRESS_XZ is not set
1097-
CONFIG_MODULE_COMPRESS_ZSTD=y
1098-
CONFIG_MODULE_COMPRESS_ALL=y
1097+
# CONFIG_MODULE_COMPRESS_ZSTD is not set
1098+
# CONFIG_MODULE_COMPRESS_ALL is not set
10991099
CONFIG_MODULE_DECOMPRESS=y
11001100
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
11011101
CONFIG_MODPROBE_PATH="/sbin/modprobe"

linux-cachyos-deckify/PKGBUILD

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ _kernuname="${pkgver}-${_pkgsuffix}"
161161
arch=('x86_64')
162162
url="https://github.com/CachyOS/linux-cachyos"
163163
license=('GPL-2.0-only')
164-
options=('!strip' '!debug' '!lto')
164+
options=('!lto' 'zipkmod')
165165
makedepends=(
166166
bc
167167
cpio
@@ -606,38 +606,11 @@ _package-headers() {
606606
echo "Removing loose objects..."
607607
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
608608

609-
echo "Stripping build tools..."
610-
local file
611-
while read -rd '' file; do
612-
case "$(file -Sib "$file")" in
613-
application/x-sharedlib\;*) # Libraries (.so)
614-
strip -v $STRIP_SHARED "$file" ;;
615-
application/x-archive\;*) # Libraries (.a)
616-
strip -v $STRIP_STATIC "$file" ;;
617-
application/x-executable\;*) # Binaries
618-
strip -v $STRIP_BINARIES "$file" ;;
619-
application/x-pie-executable\;*) # Relocatable binaries
620-
strip -v $STRIP_SHARED "$file" ;;
621-
esac
622-
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
623-
624-
echo "Stripping vmlinux..."
625-
strip -v $STRIP_STATIC "$builddir/vmlinux"
626-
627609
echo "Adding symlink..."
628610
mkdir -p "$pkgdir/usr/src"
629611
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
630612
}
631613

632-
_package-dbg(){
633-
pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"
634-
depends=("${pkgbase}-headers")
635-
636-
cd "${_srcname}"
637-
mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
638-
install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
639-
}
640-
641614
_package-zfs(){
642615
pkgdesc="zfs module for the $pkgdesc kernel"
643616
depends=('pahole' "${pkgbase}=${_kernver}")
@@ -690,7 +663,6 @@ _package-nvidia-open(){
690663
}
691664

692665
pkgname=("$pkgbase")
693-
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
694666
pkgname+=("$pkgbase-headers")
695667
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
696668
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")

linux-cachyos-deckify/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512"
10941094
CONFIG_MODULE_COMPRESS=y
10951095
# CONFIG_MODULE_COMPRESS_GZIP is not set
10961096
# CONFIG_MODULE_COMPRESS_XZ is not set
1097-
CONFIG_MODULE_COMPRESS_ZSTD=y
1098-
CONFIG_MODULE_COMPRESS_ALL=y
1097+
# CONFIG_MODULE_COMPRESS_ZSTD is not set
1098+
# CONFIG_MODULE_COMPRESS_ALL is not set
10991099
CONFIG_MODULE_DECOMPRESS=y
11001100
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
11011101
CONFIG_MODPROBE_PATH="/sbin/modprobe"

linux-cachyos-eevdf/PKGBUILD

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@
127127
# Use this only if you have Turing+ GPU
128128
: "${_build_nvidia_open:=no}"
129129

130-
# Build a debug package with non-stripped vmlinux
131-
: "${_build_debug:=no}"
132-
133130
# ATTENTION: Do not modify after this line
134131
_is_lto_kernel() {
135132
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
@@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}"
162159
arch=('x86_64')
163160
url="https://github.com/CachyOS/linux-cachyos"
164161
license=('GPL-2.0-only')
165-
options=('!strip' '!debug' '!lto')
162+
options=('!lto' 'zipkmod')
166163
makedepends=(
167164
bc
168165
cpio
@@ -605,38 +602,11 @@ _package-headers() {
605602
echo "Removing loose objects..."
606603
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
607604

608-
echo "Stripping build tools..."
609-
local file
610-
while read -rd '' file; do
611-
case "$(file -Sib "$file")" in
612-
application/x-sharedlib\;*) # Libraries (.so)
613-
strip -v $STRIP_SHARED "$file" ;;
614-
application/x-archive\;*) # Libraries (.a)
615-
strip -v $STRIP_STATIC "$file" ;;
616-
application/x-executable\;*) # Binaries
617-
strip -v $STRIP_BINARIES "$file" ;;
618-
application/x-pie-executable\;*) # Relocatable binaries
619-
strip -v $STRIP_SHARED "$file" ;;
620-
esac
621-
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
622-
623-
echo "Stripping vmlinux..."
624-
strip -v $STRIP_STATIC "$builddir/vmlinux"
625-
626605
echo "Adding symlink..."
627606
mkdir -p "$pkgdir/usr/src"
628607
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
629608
}
630609

631-
_package-dbg(){
632-
pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"
633-
depends=("${pkgbase}-headers")
634-
635-
cd "${_srcname}"
636-
mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
637-
install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
638-
}
639-
640610
_package-zfs(){
641611
pkgdesc="zfs module for the $pkgdesc kernel"
642612
depends=('pahole' "${pkgbase}=${_kernver}")
@@ -689,7 +659,6 @@ _package-nvidia-open(){
689659
}
690660

691661
pkgname=("$pkgbase")
692-
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
693662
pkgname+=("$pkgbase-headers")
694663
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
695664
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")

linux-cachyos-eevdf/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512"
10941094
CONFIG_MODULE_COMPRESS=y
10951095
# CONFIG_MODULE_COMPRESS_GZIP is not set
10961096
# CONFIG_MODULE_COMPRESS_XZ is not set
1097-
CONFIG_MODULE_COMPRESS_ZSTD=y
1098-
CONFIG_MODULE_COMPRESS_ALL=y
1097+
# CONFIG_MODULE_COMPRESS_ZSTD is not set
1098+
# CONFIG_MODULE_COMPRESS_ALL is not set
10991099
CONFIG_MODULE_DECOMPRESS=y
11001100
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
11011101
CONFIG_MODPROBE_PATH="/sbin/modprobe"

linux-cachyos-hardened/PKGBUILD

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@
127127
# Use this only if you have Turing+ GPU
128128
: "${_build_nvidia_open:=no}"
129129

130-
# Build a debug package with non-stripped vmlinux
131-
: "${_build_debug:=no}"
132-
133130
# ATTENTION: Do not modify after this line
134131
_is_lto_kernel() {
135132
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
@@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}"
162159
arch=('x86_64')
163160
url="https://github.com/CachyOS/linux-cachyos"
164161
license=('GPL-2.0-only')
165-
options=('!strip' '!debug' '!lto')
162+
options=('!lto' 'zipkmod')
166163
makedepends=(
167164
bc
168165
cpio
@@ -604,38 +601,11 @@ _package-headers() {
604601
echo "Removing loose objects..."
605602
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
606603

607-
echo "Stripping build tools..."
608-
local file
609-
while read -rd '' file; do
610-
case "$(file -Sib "$file")" in
611-
application/x-sharedlib\;*) # Libraries (.so)
612-
strip -v $STRIP_SHARED "$file" ;;
613-
application/x-archive\;*) # Libraries (.a)
614-
strip -v $STRIP_STATIC "$file" ;;
615-
application/x-executable\;*) # Binaries
616-
strip -v $STRIP_BINARIES "$file" ;;
617-
application/x-pie-executable\;*) # Relocatable binaries
618-
strip -v $STRIP_SHARED "$file" ;;
619-
esac
620-
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
621-
622-
echo "Stripping vmlinux..."
623-
strip -v $STRIP_STATIC "$builddir/vmlinux"
624-
625604
echo "Adding symlink..."
626605
mkdir -p "$pkgdir/usr/src"
627606
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
628607
}
629608

630-
_package-dbg(){
631-
pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"
632-
depends=("${pkgbase}-headers")
633-
634-
cd "${_srcname}"
635-
mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
636-
install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
637-
}
638-
639609
_package-zfs(){
640610
pkgdesc="zfs module for the $pkgdesc kernel"
641611
depends=('pahole' "${pkgbase}=${_kernver}")
@@ -688,7 +658,6 @@ _package-nvidia-open(){
688658
}
689659

690660
pkgname=("$pkgbase")
691-
[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg")
692661
pkgname+=("$pkgbase-headers")
693662
[ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs")
694663
[ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia")

linux-cachyos-hardened/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,8 +1067,8 @@ CONFIG_MODULE_SIG_HASH="sha512"
10671067
CONFIG_MODULE_COMPRESS=y
10681068
# CONFIG_MODULE_COMPRESS_GZIP is not set
10691069
# CONFIG_MODULE_COMPRESS_XZ is not set
1070-
CONFIG_MODULE_COMPRESS_ZSTD=y
1071-
CONFIG_MODULE_COMPRESS_ALL=y
1070+
# CONFIG_MODULE_COMPRESS_ZSTD is not set
1071+
# CONFIG_MODULE_COMPRESS_ALL is not set
10721072
CONFIG_MODULE_DECOMPRESS=y
10731073
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
10741074
CONFIG_MODPROBE_PATH="/sbin/modprobe"

0 commit comments

Comments
 (0)