From 4fcf0712e88c8e7533220b3dae7da41af4be3661 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok Date: Wed, 10 Jul 2024 22:09:46 +0300 Subject: [PATCH] Make real debug packages with makepkg --- linux-cachyos-bore/PKGBUILD | 33 +------------------------------- linux-cachyos-deckify/PKGBUILD | 33 +------------------------------- linux-cachyos-echo/PKGBUILD | 33 +------------------------------- linux-cachyos-eevdf/PKGBUILD | 33 +------------------------------- linux-cachyos-hardened/PKGBUILD | 33 +------------------------------- linux-cachyos-lts/PKGBUILD | 33 +------------------------------- linux-cachyos-rc/PKGBUILD | 33 +------------------------------- linux-cachyos-rt-bore/PKGBUILD | 33 +------------------------------- linux-cachyos-sched-ext/PKGBUILD | 33 +------------------------------- linux-cachyos-server/PKGBUILD | 33 +------------------------------- linux-cachyos/PKGBUILD | 33 +------------------------------- 11 files changed, 11 insertions(+), 352 deletions(-) diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD index 7e2c7613..08cd38d8 100644 --- a/linux-cachyos-bore/PKGBUILD +++ b/linux-cachyos-bore/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-deckify/PKGBUILD b/linux-cachyos-deckify/PKGBUILD index 5972922f..b6cd13b1 100644 --- a/linux-cachyos-deckify/PKGBUILD +++ b/linux-cachyos-deckify/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-deckify-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -668,38 +665,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -741,7 +711,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-echo/PKGBUILD b/linux-cachyos-echo/PKGBUILD index bdad93c1..9d576e26 100644 --- a/linux-cachyos-echo/PKGBUILD +++ b/linux-cachyos-echo/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD index 4313f01d..419ecd8c 100644 --- a/linux-cachyos-eevdf/PKGBUILD +++ b/linux-cachyos-eevdf/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-hardened/PKGBUILD b/linux-cachyos-hardened/PKGBUILD index 9fabdc84..8d39a9fa 100644 --- a/linux-cachyos-hardened/PKGBUILD +++ b/linux-cachyos-hardened/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -665,38 +662,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -738,7 +708,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-lts/PKGBUILD b/linux-cachyos-lts/PKGBUILD index 75b76f30..5ef33688 100644 --- a/linux-cachyos-lts/PKGBUILD +++ b/linux-cachyos-lts/PKGBUILD @@ -161,9 +161,6 @@ _bcachefs=${_bcachefs-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-lts-lto pkgbase=linux-$pkgsuffix @@ -188,7 +185,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -734,38 +731,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -807,7 +777,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD index 7e509b65..200b6889 100644 --- a/linux-cachyos-rc/PKGBUILD +++ b/linux-cachyos-rc/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-rc-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -742,7 +712,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD index f9f924d6..2e06cf04 100644 --- a/linux-cachyos-rt-bore/PKGBUILD +++ b/linux-cachyos-rt-bore/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-sched-ext/PKGBUILD b/linux-cachyos-sched-ext/PKGBUILD index 5b980c91..145edf9b 100644 --- a/linux-cachyos-sched-ext/PKGBUILD +++ b/linux-cachyos-sched-ext/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-${_cpusched}-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-server/PKGBUILD b/linux-cachyos-server/PKGBUILD index dd447650..6644fc45 100644 --- a/linux-cachyos-server/PKGBUILD +++ b/linux-cachyos-server/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-server-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD index 3fa56eef..b1ae5636 100644 --- a/linux-cachyos/PKGBUILD +++ b/linux-cachyos/PKGBUILD @@ -141,9 +141,6 @@ _build_nvidia=${_build_nvidia-} # Use this only if you have Turing+ GPU _build_nvidia_open=${_build_nvidia_open-} -# Build a debug package with non-stripped vmlinux -_build_debug=${_build_debug-} - if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then pkgsuffix=cachyos-lto pkgbase=linux-$pkgsuffix @@ -168,7 +165,7 @@ _kernver=$pkgver-$pkgrel arch=('x86_64' 'x86_64_v3') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto') makedepends=('bc' 'libelf' 'pahole' 'cpio' 'perl' 'tar' 'xz' 'zstd' 'gcc' 'gcc-libs' 'glibc' 'binutils' 'make' 'patch' 'python') # LLVM makedepends if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then @@ -666,38 +663,11 @@ _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" } -_package-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=(linux-${pkgsuffix}-headers) - - cd "${srcdir}/${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/linux-${pkgsuffix}" - install -Dt "$pkgdir/usr/src/debug/linux-${pkgsuffix}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' $pkgbase=$_kernver) @@ -739,7 +709,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ -n "$_build_debug" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ -n "$_build_zfs" ] && pkgname+=("$pkgbase-zfs") [ -n "$_build_nvidia" ] && pkgname+=("$pkgbase-nvidia")