Subject: [PATCH] main/busybox: Added -dgb sugpackage

From: Marian Buschsieweke <[email-masked]>
Date: Wed, 24 Jul 2019 12:38:07 +0200

Added busybox-dgb to optionally provide debug symbols.
---
 main/busybox/APKBUILD             | 7 ++++---
 main/busybox/busyboxconfig        | 2 +-
 main/busybox/busyboxconfig-extras | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 05ce577f69..7c2ad49a70 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -15,7 +15,7 @@ checkdepends="zip"
 provides="/bin/sh"
 install="$pkgname.post-install $pkgname.post-upgrade
 	$pkgname-extras.post-install $pkgname-extras.pre-deinstall"
-subpackages="$pkgname-static $pkgname-suid $pkgname-extras ssl_client"
+subpackages="$pkgname-static $pkgname-suid $pkgname-extras $pkgname-dbg ssl_client"
 options="suid !check"
 triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*"
 source="https://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
@@ -69,6 +69,7 @@ prepare() {
 }
 
 build() {
+	export CFLAGS="$CFLAGS -g"
 	# build bbsuid
 	msg "Building bbsuid"
 	${CC:-${CROSS_COMPILE}gcc} ${CPPFLAGS} ${CFLAGS} \
@@ -214,8 +215,8 @@ f96d66ce5a0295a2459a2c49c281b64e016de675ebd31a49af18cb06f3498fe27dfbc8667324b439
 e78a10d460e9cef545621b7b6d9da604865dc04e3a8202bdce1db9d697255818acc1150397c18101a104bc84b87de61209687e1fdc52cc244fd4fe4642a03b4e  0012-udhcpc-Don-t-background-if-n-is-given.patch
 d8926f0e4ed7d2fe5af89ff2a944d781b45b109c9edf1ef2591e7bce2a8bbadd7c8ca814cb3c928ae09027d9603434fe70496f308d701f3d42260ebd1e9e9b29  0013-testsuite-fix-cpio-tests.patch
 aa93095e20de88730f526c6f463cef711b290b9582cdbd8c1ba2bd290019150cbeaa7007c2e15f0362d5b9315dd63f60511878f0ea05e893f4fdfb4a54af3fb1  acpid.logrotate
-ace97d165b80121968458f57d856d7f0b12ff342defe87c33ed5f994f7b00027b65f7389f6d23120a7d11449378e3d503552e87b17a3bb18337d74992b125b14  busyboxconfig
-5f9739b9d0c1ba5d77e3153c373593a1bcb813cf466f951b00a2a040262e5077fb13c1a7aa17d67d1533a473bfcacc1a22833b7f491b4dde9dcb5638ad585f9a  busyboxconfig-extras
+441d36b5be8f00746ae2697dc923864c140741c923536df92da9a4f3242075fc3541a8faf6237a6a44afd99f8f0068f8cad467135c86fb5466284279462d5962  busyboxconfig
+ed3bf54aea63dbd851a02e25e82a1b95ab747c09bd3c2df63b22af1c68d93b011e87db3add1c1498f49520e29aaa282ba4c0c89f2089d3f736dfc45540dabf10  busyboxconfig-extras
 0becc2186d6c32fb0c401cf7bc0e46268b38ce8892db33be1daf40273024c1c02d518283f44086a313a2ccef34230a1d945ec148cc173f26e6aa9d88a7426e54  bbsuid.c
 b993ce589685d5d1f806153d0b7f71657f2d37556654ec60884130a40f09acc4944a13e0a4d02914000bedd779e5a35da08c760fed5f7ca5b601243aff7ba2c9  dad.if-up
 646ad9aefe3596d0170d92c8506ca1846e43b5b83cbef97ae565f15ffa7b14665a8c7061bc69c608c043f834c134c5d63f042509f8999031e89163508a868e46  ssl_client.c"
diff --git a/main/busybox/busyboxconfig b/main/busybox/busyboxconfig
index 29f79cdb76..4dab452508 100644
--- a/main/busybox/busyboxconfig
+++ b/main/busybox/busyboxconfig
@@ -71,7 +71,7 @@ CONFIG_PREFIX="/home/ncopa/aports/main/busybox/pkg/busybox"
 #
 # Debugging Options
 #
-# CONFIG_DEBUG is not set
+CONFIG_DEBUG=y
 # CONFIG_DEBUG_PESSIMIZE is not set
 # CONFIG_DEBUG_SANITIZE is not set
 # CONFIG_UNIT_TEST is not set
diff --git a/main/busybox/busyboxconfig-extras b/main/busybox/busyboxconfig-extras
index 9c70c1f785..43ba46cd22 100644
--- a/main/busybox/busyboxconfig-extras
+++ b/main/busybox/busyboxconfig-extras
@@ -71,7 +71,7 @@ CONFIG_PREFIX="./_install"
 #
 # Debugging Options
 #
-# CONFIG_DEBUG is not set
+CONFIG_DEBUG=y
 # CONFIG_DEBUG_PESSIMIZE is not set
 # CONFIG_DEBUG_SANITIZE is not set
 # CONFIG_UNIT_TEST is not set
-- 
2.22.0