* [Buildroot] [PATCH] util-linux: disable installing binaries by default
@ 2012-04-25 13:15 Gustavo Zacarias
2012-04-25 14:26 ` Sven Neumann
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo Zacarias @ 2012-04-25 13:15 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 | 35 ++++++++++++++++++++++-------------
package/util-linux/util-linux.mk | 37 ++++++++++++++++++++++++++++++++++++-
2 files changed, 58 insertions(+), 14 deletions(-)
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 43a8444..65e90fb 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -11,6 +11,26 @@ config BR2_PACKAGE_UTIL_LINUX
if BR2_PACKAGE_UTIL_LINUX
+config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ bool "libblkid and blkid utilities"
+ default y
+
+config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
+ select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+ bool "libmount"
+
+config BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ bool "libuuid and uuid utilities"
+ default y
+
+config BR2_PACKAGE_UTIL_LINUX_BINARIES
+ bool "install utilities"
+ help
+ Install util-linux binaries.
+
+if BR2_PACKAGE_UTIL_LINUX_BINARIES
+
############################################
# default enabled and should be disabled by
# --disable-foo
@@ -24,22 +44,9 @@ 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\""
@@ -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 d8a3ac9..08dbdcd 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
@@ -11,7 +12,6 @@ UTIL_LINUX_AUTORECONF = YES
UTIL_LINUX_INSTALL_STAGING = YES
UTIL_LINUX_DEPENDENCIES = host-pkg-config
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
@@ -81,6 +81,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 $(call AUTOTARGETS))
$(eval $(call AUTOTARGETS,host))
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: disable installing binaries by default
2012-04-25 13:15 [Buildroot] [PATCH] util-linux: disable installing binaries by default Gustavo Zacarias
@ 2012-04-25 14:26 ` Sven Neumann
2012-04-25 14:45 ` Gustavo Zacarias
0 siblings, 1 reply; 6+ messages in thread
From: Sven Neumann @ 2012-04-25 14:26 UTC (permalink / raw)
To: buildroot
On Wed, 2012-04-25 at 10:15 -0300, Gustavo Zacarias wrote:
> +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> + bool "libblkid and blkid utilities"
> + default y
>
Actually it only installs libblkid. If you want the blkid utility you
also need to select BR2_PACKAGE_UTIL_LINUX_BINARIES.
Regards,
Sven
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: disable installing binaries by default
2012-04-25 14:26 ` Sven Neumann
@ 2012-04-25 14:45 ` Gustavo Zacarias
2012-04-25 15:25 ` Sven Neumann
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo Zacarias @ 2012-04-25 14:45 UTC (permalink / raw)
To: buildroot
On 2012-04-25 11:26, Sven Neumann wrote:
> On Wed, 2012-04-25 at 10:15 -0300, Gustavo Zacarias wrote:
>> +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
>> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
>> + bool "libblkid and blkid utilities"
>> + default y
>>
> Actually it only installs libblkid. If you want the blkid utility you
> also need to select BR2_PACKAGE_UTIL_LINUX_BINARIES.
>
>
> Regards,
> Sven
I know.
Problem is i can't (or don't know how to) make a bool in Kconfig depend
on some other option nicely.
And i'd rather avoid adding more options as i've said.
So i can leave it as is or just remove the blkid/uuid utilities mention
in Config.in
Regards.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: disable installing binaries by default
2012-04-25 14:45 ` Gustavo Zacarias
@ 2012-04-25 15:25 ` Sven Neumann
2012-04-25 15:33 ` Gustavo Zacarias
0 siblings, 1 reply; 6+ messages in thread
From: Sven Neumann @ 2012-04-25 15:25 UTC (permalink / raw)
To: buildroot
On Wed, 2012-04-25 at 11:45 -0300, Gustavo Zacarias wrote:
> On 2012-04-25 11:26, Sven Neumann wrote:
>
> > On Wed, 2012-04-25 at 10:15 -0300, Gustavo Zacarias wrote:
> >> +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
> >> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> >> + bool "libblkid and blkid utilities"
> >> + default y
> >>
> > Actually it only installs libblkid. If you want the blkid utility you
> > also need to select BR2_PACKAGE_UTIL_LINUX_BINARIES.
> >
> >
> > Regards,
> > Sven
>
> I know.
> Problem is i can't (or don't know how to) make a bool in Kconfig depend
> on some other option nicely.
> And i'd rather avoid adding more options as i've said.
> So i can leave it as is or just remove the blkid/uuid utilities mention
> in Config.in
Or add code that installs the blkid utility if
BR2_PACKAGE_UTIL_LINUX_LIBUUID is selected:
Author: Sven Neumann <s.neumann@raumfeld.com>
Date: Fri Apr 20 14:50:21 2012 +0200
util-linux: install the blkid binary if libblkid is selected
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
diff --git a/package/util-linux/util-linux.mk
b/package/util-linux/util-linux.mk
index a0101a3..3f2c4d6 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -87,6 +87,7 @@ ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
define UTIL_LINUX_INSTALL_LIBBLKID
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libblkid \
DESTDIR=$(TARGET_DIR) install
+ $(INSTALL) -D -m 0755 $(@D)/misc-utils/blkid $(TARGET_DIR)/sbin
endef
endif
Regards,
Sven
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] util-linux: disable installing binaries by default
2012-04-25 15:25 ` Sven Neumann
@ 2012-04-25 15:33 ` Gustavo Zacarias
0 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2012-04-25 15:33 UTC (permalink / raw)
To: buildroot
On 2012-04-25 12:25, Sven Neumann wrote:
> Or add code that installs the blkid utility if
> BR2_PACKAGE_UTIL_LINUX_LIBUUID is selected:
I sent v2 with the blkid/uuid utilities not mentioned any more in
Config.in
If utilities are enabled they'll be installed since lib* are now forced
on as per Thomas's suggestion on IRC when utilities are.
Looking forward we should probably make a "useful" and "useless" tools
options since mkfs.minixfs and tools such as that are mostly useless in
embedded systems.
Regards.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: disable installing binaries by default
@ 2011-09-15 15:52 Gustavo Zacarias
0 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2011-09-15 15:52 UTC (permalink / raw)
To: buildroot
Disable installing binaries by default based on a new "install basic
utilities" option.
This is to avoid installing unnecessary bloat when we just need
libblkid/libuuid for e2fsprogs for example.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/util-linux/Config.in | 5 +++++
package/util-linux/util-linux.mk | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 816130d..4cacfca 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -16,6 +16,11 @@ if BR2_PACKAGE_UTIL_LINUX
# --disable-foo
#
+config BR2_PACKAGE_UTIL_LINUX_BASIC
+ bool "install basic utilities"
+ help
+ Install the basic util-linux binaries.
+
config BR2_PACKAGE_UTIL_LINUX_MOUNT
bool "build mount utilties"
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 49c528a..acc9c93 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)
UTIL_LINUX_VERSION_MAJOR = 2.20
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.bz2
@@ -67,6 +68,41 @@ UTIL_LINUX_CONF_OPT += \
$(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-login-utils) \
$(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write)
+# Avoid the basic utilities if we just want the libraries
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_BASIC),y)
+define UTIL_LINUX_INSTALL_BASIC
+ $(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_BASIC)
+ $(UTIL_LINUX_INSTALL_LIBBLKID)
+ $(UTIL_LINUX_INSTALL_LIBMOUNT)
+ $(UTIL_LINUX_INSTALL_LIBUUID)
+endef
+
$(eval $(call AUTOTARGETS,package,util-linux))
# MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-25 15:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 13:15 [Buildroot] [PATCH] util-linux: disable installing binaries by default Gustavo Zacarias
2012-04-25 14:26 ` Sven Neumann
2012-04-25 14:45 ` Gustavo Zacarias
2012-04-25 15:25 ` Sven Neumann
2012-04-25 15:33 ` Gustavo Zacarias
-- strict thread matches above, loose matches on Subject: below --
2011-09-15 15:52 Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox