tools: util-linux: use --disable-all-programs
authorRobert Marko <robimarko@gmail.com>
Tue, 25 Jun 2024 15:45:57 +0000 (17:45 +0200)
committerRobert Marko <robimarko@gmail.com>
Wed, 26 Jun 2024 09:21:03 +0000 (11:21 +0200)
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>
tools/Makefile
tools/util-linux/Makefile
tools/util-linux/patches/100-hexdump-allow-enabling-with-disable-all-programs.patch [new file with mode: 0644]

index 009778a4956c20f24f2d928455318ab83e56dd5d..4019f3ba5f11b45c96a8649bab91cb3db9c363f5 100644 (file)
@@ -129,7 +129,7 @@ $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compil
 $(curdir)/sdcc/compile := $(curdir)/bison/compile
 $(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/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
 
 ifneq ($(HOST_OS),Linux)
index 0f0722e2fedf2de1a6b586fd55cc392c3c0d52ad..cede793365024f49ab4087abfc74cfa31a35a66f 100644 (file)
@@ -14,93 +14,15 @@ PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.40
 PKG_HASH:=8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7
 PKG_CPE_ID:=cpe:/a:kernel:util-linux
 
+PKG_FIXUP:=autoreconf
+
 HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 
 HOST_CONFIGURE_ARGS += \
-       --disable-poman \
-       --disable-nls \
-       --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 \
+       --disable-all-programs \
+       --enable-hexdump \
        --without-util \
        --without-selinux \
        --without-audit \
diff --git a/tools/util-linux/patches/100-hexdump-allow-enabling-with-disable-all-programs.patch b/tools/util-linux/patches/100-hexdump-allow-enabling-with-disable-all-programs.patch
new file mode 100644 (file)
index 0000000..c0c1f04
--- /dev/null
@@ -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])