* [Buildroot] [PATCHv3] util-linux: disable installing binaries by default
@ 2013-02-06 13:50 Gustavo Zacarias
2013-02-06 17:42 ` Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Zacarias @ 2013-02-06 13:50 UTC (permalink / raw)
To: buildroot
Disable installing binaries by default.
This is to avoid installing unnecessary bloat when we just need
libblkid/libuuid for some packages like e2fsprogs.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/util-linux/Config.in | 41 ++++++++++++++++++++++++----------------
package/util-linux/util-linux.mk | 37 +++++++++++++++++++++++++++++++++++-
2 files changed, 61 insertions(+), 17 deletions(-)
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 5eab956..424474d 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -11,6 +11,29 @@ config BR2_PACKAGE_UTIL_LINUX
if BR2_PACKAGE_UTIL_LINUX
+config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ bool "libblkid"
+ default y
+
+config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
+ select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ bool "libmount"
+
+config BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ bool "libuuid"
+ default y
+
+config BR2_PACKAGE_UTIL_LINUX_BINARIES
+ bool "install utilities"
+ select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ help
+ Install util-linux binaries.
+
+if BR2_PACKAGE_UTIL_LINUX_BINARIES
+
############################################
# default enabled and should be disabled by
# --disable-foo
@@ -18,28 +41,13 @@ if BR2_PACKAGE_UTIL_LINUX
config BR2_PACKAGE_UTIL_LINUX_MOUNT
bool "build mount utilties"
- select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
config BR2_PACKAGE_UTIL_LINUX_FSCK
- select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
bool "build \"fsck\""
-config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
- select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
- bool "build libmount"
-
-config BR2_PACKAGE_UTIL_LINUX_LIBUUID
- bool "build libuuid and uuid utilities"
- default y
-
config BR2_PACKAGE_UTIL_LINUX_UUIDD
bool "build \"uuidd\""
-config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
- select BR2_PACKAGE_UTIL_LINUX_LIBUUID
- bool "build libblkid and blkid utilities"
- default y
-
config BR2_PACKAGE_UTIL_LINUX_AGETTY
bool "build \"agetty\""
@@ -69,7 +77,6 @@ config BR2_PACKAGE_UTIL_LINUX_WALL
config BR2_PACKAGE_UTIL_LINUX_PARTX
bool "build \"addpart, delpart, partx\""
- select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
############################################
# default disabled and should be enabled by
@@ -104,5 +111,7 @@ config BR2_PACKAGE_UTIL_LINUX_WRITE
endif
+endif
+
comment "util-linux requires a toolchain with LARGEFILE + WCHAR support"
depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 73ae174..3ab6e31 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -3,6 +3,7 @@
# util-linux
#
#############################################################
+
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1
UTIL_LINUX_VERSION_MAJOR = 2.20
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.bz2
@@ -17,7 +18,6 @@ UTIL_LINUX_AUTORECONF = YES
UTIL_LINUX_INSTALL_STAGING = YES
UTIL_LINUX_DEPENDENCIES = host-pkgconf
UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no
-
UTIL_LINUX_CONF_OPT += --disable-rpath --disable-makeinstall-chown
# We don't want the host-busybox dependency to be added automatically
@@ -87,6 +87,41 @@ HOST_UTIL_LINUX_CONF_OPT += \
--disable-fallocate --disable-unshare --disable-rename \
--disable-schedutils --disable-wall --disable-partx
+# Avoid the basic utilities if we just want the libraries
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),y)
+define UTIL_LINUX_INSTALL_BINARIES
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
+define UTIL_LINUX_INSTALL_LIBBLKID
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libblkid \
+ DESTDIR=$(TARGET_DIR) install
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
+define UTIL_LINUX_INSTALL_LIBMOUNT
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libmount \
+ DESTDIR=$(TARGET_DIR) install
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+define UTIL_LINUX_INSTALL_LIBUUID
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libuuid \
+ DESTDIR=$(TARGET_DIR) install
+endef
+endif
+
+define UTIL_LINUX_INSTALL_TARGET_CMDS
+ $(UTIL_LINUX_INSTALL_BINARIES)
+ $(UTIL_LINUX_INSTALL_LIBBLKID)
+ $(UTIL_LINUX_INSTALL_LIBMOUNT)
+ $(UTIL_LINUX_INSTALL_LIBUUID)
+endef
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCHv3] util-linux: disable installing binaries by default
2013-02-06 13:50 [Buildroot] [PATCHv3] util-linux: disable installing binaries by default Gustavo Zacarias
@ 2013-02-06 17:42 ` Arnout Vandecappelle
2013-02-06 19:24 ` Gustavo Zacarias
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2013-02-06 17:42 UTC (permalink / raw)
To: buildroot
On 06/02/13 14:50, Gustavo Zacarias wrote:
[snip]
> +config BR2_PACKAGE_UTIL_LINUX_BINARIES
> + bool "install utilities"
> + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
> + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
Why is libmount selected? It wasn't selected before when you built just
one binary, e.g. mount. Same for the other two, actually. Of course, it's
possible that configure adds them implicitly anyway, I don't know that.
> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> + help
> + Install util-linux binaries.
Maybe it's worth mentioning that selecting this option installs some
binaries even if nothing is selected below.
[snip]
> @@ -87,6 +87,41 @@ HOST_UTIL_LINUX_CONF_OPT += \
> --disable-fallocate --disable-unshare --disable-rename \
> --disable-schedutils --disable-wall --disable-partx
>
> +# Avoid the basic utilities if we just want the libraries
> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),y)
> +define UTIL_LINUX_INSTALL_BINARIES
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
> +endif
Shouldn't there be an else here instead of endif? If you do a top-level
install, there is no need to explicitly go into the subdirectories as well.
Regards,
Arnout
> +
> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
> +define UTIL_LINUX_INSTALL_LIBBLKID
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libblkid \
> + DESTDIR=$(TARGET_DIR) install
> +endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
> +define UTIL_LINUX_INSTALL_LIBMOUNT
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libmount \
> + DESTDIR=$(TARGET_DIR) install
> +endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
> +define UTIL_LINUX_INSTALL_LIBUUID
> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libuuid \
> + DESTDIR=$(TARGET_DIR) install
> +endef
> +endif
> +
> +define UTIL_LINUX_INSTALL_TARGET_CMDS
> + $(UTIL_LINUX_INSTALL_BINARIES)
> + $(UTIL_LINUX_INSTALL_LIBBLKID)
> + $(UTIL_LINUX_INSTALL_LIBMOUNT)
> + $(UTIL_LINUX_INSTALL_LIBUUID)
> +endef
> +
> $(eval $(autotools-package))
> $(eval $(host-autotools-package))
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCHv3] util-linux: disable installing binaries by default
2013-02-06 17:42 ` Arnout Vandecappelle
@ 2013-02-06 19:24 ` Gustavo Zacarias
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2013-02-06 19:24 UTC (permalink / raw)
To: buildroot
On 02/06/2013 02:42 PM, Arnout Vandecappelle wrote:
>> +config BR2_PACKAGE_UTIL_LINUX_BINARIES
>> + bool "install utilities"
>> + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
>> + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
>
> Why is libmount selected? It wasn't selected before when you built just
> one binary, e.g. mount. Same for the other two, actually. Of course,
> it's possible that configure adds them implicitly anyway, I don't know
> that.
Because i'm explicitly disabling it otherwise in util-linux.mk
Don't want to hit build breakages by guessing what configure wants/needs
and if it's handled properly (maybe it is with this version and maybe
not in newer ones).
>> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
>> + help
>> + Install util-linux binaries.
>
> Maybe it's worth mentioning that selecting this option installs some
> binaries even if nothing is selected below.
"Install the basic set of util-linux binaries" ?
I'm not quite original making up a more verbose description at the moment.
> [snip]
>> @@ -87,6 +87,41 @@ HOST_UTIL_LINUX_CONF_OPT += \
>> --disable-fallocate --disable-unshare --disable-rename \
>> --disable-schedutils --disable-wall --disable-partx
>>
>> +# Avoid the basic utilities if we just want the libraries
>> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),y)
>> +define UTIL_LINUX_INSTALL_BINARIES
>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
>> +endef
>> +endif
>
> Shouldn't there be an else here instead of endif? If you do a top-level
> install, there is no need to explicitly go into the subdirectories as well.
Noted for the next rev.
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-06 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06 13:50 [Buildroot] [PATCHv3] util-linux: disable installing binaries by default Gustavo Zacarias
2013-02-06 17:42 ` Arnout Vandecappelle
2013-02-06 19:24 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox