lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_7DE03EC9AEAFF374BDAB9CCCF4C047EF2305@qq.com>
Date: Mon, 23 Sep 2024 19:57:09 +0800
From: 1127955419@...com
To: linux@...ssschuh.net
Cc: christian@...sel.eu,
	nathan@...nel.org,
	masahiroy@...nel.org,
	nicolas@...sle.eu,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	zachwade.k@...il.com,
	Li XingYang <1127955419@...com>
Subject: [PATCH] kbuild: add package-dbg to pacman packages

From: Li XingYang <1127955419@...com>

The current pacman package does not include the debuginfo package
add debuginfo package that include vmlinux
vmlinux is very useful when debugging the kernel using crash

Signed-off-by: Li XingYang <1127955419@...com>
---
 scripts/package/PKGBUILD | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
index 663ce300dd06..4b5c435e5eaa 100644
--- a/scripts/package/PKGBUILD
+++ b/scripts/package/PKGBUILD
@@ -5,7 +5,7 @@
 pkgbase=${PACMAN_PKGBASE:-linux-upstream}
 pkgname=("${pkgbase}" "${pkgbase}-api-headers")
 if grep -q CONFIG_MODULES=y include/config/auto.conf; then
-	pkgname+=("${pkgbase}-headers")
+	pkgname+=("${pkgbase}-headers" "${pkgbase}-dbg")
 fi
 pkgver="${KERNELRELEASE//-/_}"
 # The PKGBUILD is evaluated multiple times.
@@ -100,6 +100,18 @@ _package-api-headers() {
 	${MAKE} headers_install INSTALL_HDR_PATH="${pkgdir}/usr"
 }
 
+_package-dbg() {
+	pkgdesc="debuginfo for the ${pkgdesc} kernel"
+
+	export MAKEFLAGS="${KBUILD_MAKEFLAGS}"
+	cd "${objtree}"
+	local builddir="${pkgdir}/usr/${MODLIB}/build"
+	mkdir -p "${builddir}"
+
+	echo "Installing vmlinux..."
+	cp vmlinux "${builddir}/vmlinux"
+}
+
 for _p in "${pkgname[@]}"; do
 	eval "package_$_p() {
 		$(declare -f "_package${_p#$pkgbase}")
-- 
2.46.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ