fix: trim busybox to archive-focused config
busybox static musl build / build-and-release (push) Successful in 38s

This commit is contained in:
Hermes Agent
2026-05-08 00:18:12 +00:00
parent 9d69535ad9
commit 6959684d63
+30 -6
View File
@@ -7,22 +7,30 @@ PREFIX_NAME="busybox-${VERSION}-linux-amd64-musl-static"
mkdir -p "$OUTPUT_DIR"
apk add --no-cache build-base bzip2 curl file linux-headers tar xz
apk add --no-cache \
build-base \
bzip2 \
curl \
file \
linux-headers \
tar \
xz
SRCDIR="${TMPDIR:-/tmp}/busybox-src-${VERSION}"
rm -rf "$SRCDIR"
mkdir -p "$SRCDIR"
curl -fsSL "https://busybox.net/downloads/busybox-${VERSION}.tar.bz2" | tar -xj -C "$SRCDIR" --strip-components=1
curl -fsSL "https://busybox.net/downloads/busybox-${VERSION}.tar.bz2" \
| tar -xj -C "$SRCDIR" --strip-components=1
cd "$SRCDIR"
make defconfig >/dev/null
make allnoconfig >/dev/null
set_kconfig() {
key="$1"
value="$2"
if grep -q "^${key}=" .config; then
sed -i "s#^${key}=.*#${key}=${value}#" .config
sed -i "s|^${key}=.*|${key}=${value}|" .config
elif grep -q "^# ${key} is not set$" .config; then
sed -i "s|^# ${key} is not set$|${key}=${value}|" .config
else
@@ -31,11 +39,27 @@ set_kconfig() {
}
set_kconfig CONFIG_STATIC y
set_kconfig CONFIG_FEATURE_SEAMLESS_XZ y
set_kconfig CONFIG_LONG_OPTS y
set_kconfig CONFIG_FEATURE_VERBOSE_USAGE y
set_kconfig CONFIG_FEATURE_COMPRESS_USAGE y
set_kconfig CONFIG_FEATURE_SEAMLESS_GZ y
set_kconfig CONFIG_FEATURE_SEAMLESS_BZ2 y
set_kconfig CONFIG_FEATURE_SEAMLESS_XZ y
set_kconfig CONFIG_GUNZIP y
set_kconfig CONFIG_ZCAT y
set_kconfig CONFIG_BUNZIP2 y
set_kconfig CONFIG_BZCAT y
set_kconfig CONFIG_UNLZMA y
set_kconfig CONFIG_LZCAT y
set_kconfig CONFIG_UNXZ y
set_kconfig CONFIG_XZ y
set_kconfig CONFIG_BZIP2 y
set_kconfig CONFIG_XZCAT y
set_kconfig CONFIG_GZIP y
set_kconfig CONFIG_TAR y
set_kconfig CONFIG_FEATURE_TAR_CREATE y
set_kconfig CONFIG_FEATURE_TAR_FROM y
set_kconfig CONFIG_FEATURE_TAR_GNU_EXTENSIONS y
set_kconfig CONFIG_FEATURE_TAR_AUTODETECT y
set_kconfig CONFIG_UNZIP y
yes '' | make oldconfig >/dev/null