tools: util-linux: use --disable-all-programs

util-linux supports passing --disable-all-programs configure flag to
disable building anything that isnt then manually enabled.

So, lets switch to using that instead of manually having to disable all
tools we dont need.

However, current drawback is that there is no upstream support for enabling
building hexdump so I included a patch that is pending upstream[0].

[0] https://github.com/util-linux/util-linux/pull/3101

Link: https://github.com/openwrt/openwrt/pull/15806
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Robert Marko 2024-06-25 17:45:57 +02:00
parent 2b666bb827
commit 54115ec22d
3 changed files with 33 additions and 83 deletions

View File

@ -129,7 +129,7 @@ $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compil
$(curdir)/sdcc/compile := $(curdir)/bison/compile $(curdir)/sdcc/compile := $(curdir)/bison/compile
$(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/compile $(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/compile
$(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
$(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/automake/compile
$(curdir)/yafut/compile := $(curdir)/cmake/compile $(curdir)/yafut/compile := $(curdir)/cmake/compile
ifneq ($(HOST_OS),Linux) ifneq ($(HOST_OS),Linux)

View File

@ -14,93 +14,15 @@ PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.40
PKG_HASH:=8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7 PKG_HASH:=8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7
PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_CPE_ID:=cpe:/a:kernel:util-linux
PKG_FIXUP:=autoreconf
HOST_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
HOST_CONFIGURE_ARGS += \ HOST_CONFIGURE_ARGS += \
--disable-poman \ --disable-all-programs \
--disable-nls \ --enable-hexdump \
--disable-asciidoc \
--disable-poman \
--disable-libuuid \
--disable-libblkid \
--disable-libmount \
--disable-libsmartcols \
--disable-libfdisk \
--disable-fdisks \
--disable-mount \
--disable-losetup \
--disable-zramctl \
--disable-fsck \
--disable-partx \
--disable-uuidd \
--disable-uuidgen \
--disable-blkid \
--disable-wipefs \
--disable-mountpoint \
--disable-fallocate \
--disable-unshare \
--disable-nsenter \
--disable-setpriv \
--disable-hardlink \
--disable-eject \
--disable-agetty \
--disable-cramfs \
--disable-bfs \
--disable-minix \
--disable-hwclock \
--disable-mkfs \
--disable-fstrim \
--disable-swapon \
--disable-lscpu \
--disable-lsfd \
--disable-lslogins \
--disable-wdctl \
--disable-cal \
--disable-logger \
--disable-whereis \
--disable-pipesz \
--disable-waitpid \
--disable-switch_root \
--disable-pivot_root \
--disable-lsmem \
--disable-chmem \
--disable-ipcmk \
--disable-ipcrm \
--disable-ipcs \
--disable-irqtop \
--disable-lsirq \
--disable-lsns \
--disable-rfkill \
--disable-scriptutils \
--disable-tunelp \
--disable-kill \
--disable-last \
--disable-utmpdump \
--disable-line \
--disable-mesg \
--disable-raw \
--disable-rename \
--disable-vipw \
--disable-newgrp \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-sulogin \
--disable-su \
--disable-runuser \
--disable-ul \
--disable-more \
--disable-pg \
--disable-setterm \
--disable-schedutils \
--disable-wall \
--disable-write \
--disable-bash-completion \
--disable-pylibmount \
--disable-pg-bell \
--disable-liblastlog2 \
--without-util \ --without-util \
--without-selinux \ --without-selinux \
--without-audit \ --without-audit \

View File

@ -0,0 +1,28 @@
From 37641f246ee9df7289b4e3054b3ded3912773722 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Tue, 25 Jun 2024 17:32:08 +0200
Subject: [PATCH] hexdump: allow enabling with --disable-all-programs
Currently, if --disable-all-programs is used hexdump cannot be built
as --enable-hexdump is not recognized, so lets add support for it.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -2237,7 +2237,11 @@ UL_BUILD_INIT([column], [check])
UL_REQUIRES_BUILD([column], [libsmartcols])
AM_CONDITIONAL([BUILD_COLUMN], [test "x$build_column" = xyes])
-UL_BUILD_INIT([hexdump], [yes])
+AC_ARG_ENABLE([hexdump],
+ AS_HELP_STRING([--disable-hexdump], [do not build hexdump]),
+ [], [UL_DEFAULT_ENABLE([hexdump], [check])]
+)
+UL_BUILD_INIT([hexdump])
AM_CONDITIONAL([BUILD_HEXDUMP], [test "x$build_hexdump" = xyes])
UL_BUILD_INIT([rev], [yes])