summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Marko2024-06-25 15:45:57 +0000
committerRobert Marko2024-06-26 09:21:03 +0000
commit54115ec22d155c5e45e6151aac82f99d89d069aa (patch)
treeafdc1b3e70f89b864ea8e95c68c66b0e23329a6b
parent2b666bb827603890ae6e57df07fd8848e5835ba3 (diff)
downloadopenwrt-54115ec22d155c5e45e6151aac82f99d89d069aa.tar.gz
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>
-rw-r--r--tools/Makefile2
-rw-r--r--tools/util-linux/Makefile86
-rw-r--r--tools/util-linux/patches/100-hexdump-allow-enabling-with-disable-all-programs.patch28
3 files changed, 33 insertions, 83 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 009778a495..4019f3ba5f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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)
diff --git a/tools/util-linux/Makefile b/tools/util-linux/Makefile
index 0f0722e2fe..cede793365 100644
--- a/tools/util-linux/Makefile
+++ b/tools/util-linux/Makefile
@@ -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
index 0000000000..c0c1f04d06
--- /dev/null
+++ b/tools/util-linux/patches/100-hexdump-allow-enabling-with-disable-all-programs.patch
@@ -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])