util-linux: allow programs to be disabled by default
PATCH 1/1 util-linux: allow programs to be disabled by default
When even a single extra util-linux utility is enabled, the default build and install will install many more programs, including many that overlap with those offered by busybox. Finer control of util-linux can be realized by disabling everything by default (with --disable-all-programs) and then overriding the default with specific enables (--enable-<name>). This patch adds a config switch to disable everything by default.
--- package/util-linux/Config.in | 6 ++++++ package/util-linux/util-linux.mk | 4 ++++ 2 files changed, 10 insertions(+)
package/util-linux/Config.in +6 -0
@@ -47,6 +47,12 @@ config BR2_PACKAGE_UTIL_LINUX_BINARIES if BR2_PACKAGE_UTIL_LINUX_BINARIES +config BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT + bool "Disable programs by default" + help + Disable programs by default; only explicitly enabled utilities + and libraries will be built. + config BR2_PACKAGE_UTIL_LINUX_AGETTY bool "agetty" help
package/util-linux/util-linux.mk +4 -0
@@ -25,6 +25,10 @@ UTIL_LINUX_CONF_OPTS += \ --disable-rpath \ --disable-makeinstall-chown \ --without-python + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT),y) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endif ifeq ($(BR2_PACKAGE_BASH),) UTIL_LINUX_CONF_OPTS += \
Signature · 1 line
1.9.1
PATCH 1/1 util-linux: allow programs to be disabled by default
Dear Danomi Manchego,
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 31
Quoted 3 lines · Danomi Manchego
package/util-linux/util-linux.mk +3
-0+ifeq ($(BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT),y) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endif
I understand the idea, but it's a bit weird to have an option to enable to say that you want to disable everything.
Also, we are already passing --disable-all-programs when BR2_PACKAGE_UTIL_LINUX_BINARIES is not enabled. Maybe we should instead pass --disable-all-programs unconditionally. However this would change the visible behavior for users, since programs that used to be built would no longer be built. But it seems the most correct solution nonetheless.
Any opinions from other Buildroot developers?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 util-linux: allow programs to be disabled by default
Thomas,
Quoted 11 lines · Thomas Petazzoni
Dear Danomi Manchego,
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 31
Quoted 3 lines · Danomi Manchego
package/util-linux/util-linux.mk +3
-0+ifeq ($(BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT),y) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endifI understand the idea, but it's a bit weird to have an option to enable to say that you want to disable everything.
Quoted 8 lines
Also, we are already passing --disable-all-programs when
BR2_PACKAGE_UTIL_LINUX_BINARIESis not enabled. Maybe we should instead pass --disable-all-programs unconditionally. However this would change the visible behavior for users, since programs that used to be built would no longer be built. But it seems the most correct solution nonetheless.Any opinions from other Buildroot developers?
I use util-linux only as a last resort for when busybox does not have what I need - so I'm totally on-board with that idea, as my interest is for minimal impact on the target. The only reason that I didn't do that is for precisely what you said - that it would change the current behavior. Also, I supposed that we would still need an option to *not* set --disable-all-programs anyway, to support enabling all the programs that are currently enabled by default (and don't have existing buildroot switches), to be able to get back to the previous behavior. (For those who need it.)
An alternative might be to add --enable/--disable switches for all the apps that are enabled by default. But that's a lot of new switches, and a maintenance hassle on package upgrades, so I was afraid that this option might not be well received by the community. (I'm willing to give that a go if that seems like a good idea.)
Danomi -
PATCH 1/1 util-linux: allow programs to be disabled by default
Quoted 24 lines · Danomi Manchego
Thomas,
Quoted 11 lines · Thomas Petazzoni
Dear Danomi Manchego,
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 31
Quoted 3 lines · Danomi Manchego
package/util-linux/util-linux.mk +3
-0+ifeq ($(BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT),y) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endifI understand the idea, but it's a bit weird to have an option to enable to say that you want to disable everything.
Quoted 8 lines
Also, we are already passing --disable-all-programs when
BR2_PACKAGE_UTIL_LINUX_BINARIESis not enabled. Maybe we should instead pass --disable-all-programs unconditionally. However this would change the visible behavior for users, since programs that used to be built would no longer be built. But it seems the most correct solution nonetheless.Any opinions from other Buildroot developers?
Quoted 9 lines
I use util-linux only as a last resort for when busybox does not have what I need - so I'm totally on-board with that idea, as my interest is for minimal impact on the target. The only reason that I didn't do that is for precisely what you said - that it would change the current behavior. Also, I supposed that we would still need an option to *not* set --disable-all-programs anyway, to support enabling all the programs that are currently enabled by default (and don't have existing buildroot switches), to be able to get back to the previous behavior. (For those who need it.)
I think it should be --disable-all-programs by default, and a newBR2_PACKAGE_UTIL_LINUX_ALL_BINARIES that does --enable-all-programs and that hides all the individual tool options.
I'm also not really worried about changing the default, since it will affect
only a single program (see below).
Quoted 5 lines
An alternative might be to add --enable/--disable switches for all the apps that are enabled by default. But that's a lot of new switches, and a maintenance hassle on package upgrades, so I was afraid that this option might not be well received by the community. (I'm willing to give that a go if that seems like a good idea.)
Indeed, too much hassle.
However, unless I'm mistaken, pg is the only one missing at the moment... All
the other configure options seem to be covered, and Makefile.in has a condition in front of each installed program. So it doesn't look like so much of a hassle after all.
Regards,
Arnout
Signature · 6 lines
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: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 util-linux: allow programs to be disabled by default
In reply to Danomi ManchegoQuoted 24 lines · Danomi Manchego
Thomas,
Quoted 11 lines · Thomas Petazzoni
Dear Danomi Manchego,
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 31
Quoted 3 lines · Danomi Manchego
package/util-linux/util-linux.mk +3
-0+ifeq ($(BR2_PACKAGE_UTIL_LINUX_DISABLE_BY_DEFAULT),y) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endifI understand the idea, but it's a bit weird to have an option to enable to say that you want to disable everything.
Quoted 8 lines
Also, we are already passing --disable-all-programs when
BR2_PACKAGE_UTIL_LINUX_BINARIESis not enabled. Maybe we should instead pass --disable-all-programs unconditionally. However this would change the visible behavior for users, since programs that used to be built would no longer be built. But it seems the most correct solution nonetheless.Any opinions from other Buildroot developers?
Quoted 9 lines
I use util-linux only as a last resort for when busybox does not have what I need - so I'm totally on-board with that idea, as my interest is for minimal impact on the target. The only reason that I didn't do that is for precisely what you said - that it would change the current behavior. Also, I supposed that we would still need an option to *not* set --disable-all-programs anyway, to support enabling all the programs that are currently enabled by default (and don't have existing buildroot switches), to be able to get back to the previous behavior. (For those who need it.)
I think it should be --disable-all-programs by default, and a newBR2_PACKAGE_UTIL_LINUX_ALL_BINARIES that does --enable-all-programs and that hides all the individual tool options.
As to changing the default, I'm not too worried about it, since only the pg
tool is "new".
Quoted 5 lines
An alternative might be to add --enable/--disable switches for all the apps that are enabled by default. But that's a lot of new switches, and a maintenance hassle on package upgrades, so I was afraid that this option might not be well received by the community. (I'm willing to give that a go if that seems like a good idea.)
Indeed, too much hassle.
However, unless I'm mistaken, pg is the only one missing at the moment... So it
doesn't seem to be *that* much hassle.
Regards,
Arnout
Signature · 6 lines
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: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF