coreutils: Do not install uptime
PATCH 1/2 coreutils: Do not install uptime
coreutils' uptime doesn't work and its execution fails with a message like this one:
uptime: couldn't get boot time: No such file or directory
busybox and procps-ng provide a working alternative.
This is a common old problem as we can see here:
https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/010006.html
--- package/coreutils/coreutils.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
package/coreutils/coreutils.mk +2 -1
@@ -61,7 +61,8 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ PERL=missing COREUTILS_CONF_OPT = --disable-rpath \ - --enable-install-program=hostname + --enable-install-program=hostname \ + --enable-no-install-program=uptime define COREUTILS_POST_INSTALL # some things go in root rather than usr
Signature · 1 line
1.7.1
PATCH 2/2 procps-ng: Fix installation and take precedence over busybox
Currently procps-ng binaries are installed under $(TARGET_DIR)/usr/usr instead of $(TARGET_DIR)/usr, which would be the expected. This is caused because the default value of the --exec-prefix configure option is /usr, and Buildroot always adds --prefix=/usr to the configure option. We fix this by setting --exec-prefix to an empty value.
At the same time we make sure the procps-ng binaries have precedence over the busybox ones.
--- package/procps-ng/procps-ng.mk | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
package/procps-ng/procps-ng.mk +10 -0
@@ -13,9 +13,19 @@ PROCPS_NG_INSTALL_STAGING = YES PROCPS_NG_DEPENDENCIES = ncurses +# If both procps-ng and busybox are selected, make certain procps-ng +# wins the fight over who gets to have their utils actually installed. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +PROCPS_NG_DEPENDENCIES += busybox +endif + ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) PROCPS_NG_DEPENDENCIES += gettext PROCPS_NG_CONF_OPT += LIBS=-lintl endif +# We need this to make procps-ng binaries installed in $(TARGET_DIR)/usr +# instead of $(TARGET_DIR)/usr/usr +PROCPS_NG_CONF_OPT += --exec-prefix= + $(eval $(autotools-package))
Signature · 1 line
1.7.1
PATCH 2/2 procps-ng: Fix installation and take precedence over busybox
Dear Vicente Olivert Riera,
Quoted 6 lines · Vicente Olivert Riera
Currently procps-ng binaries are installed under $(TARGET_DIR)/usr/usr instead of $(TARGET_DIR)/usr, which would be the expected. This is caused because the default value of the --exec-prefix configure option is /usr, and Buildroot always adds --prefix=/usr to the configure option. We fix this by setting --exec-prefix to an empty value.
Quoted 8 lines
At the same time we make sure the procps-ng binaries have precedence over the busybox ones.
Signed-off-by Vicente Olivert Riera <[email protected]>Reviewed-by Markos.Chandras <[email protected]>--- package/procps-ng/procps-ng.mk | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/2 procps-ng: Fix installation and take precedence over busybox
In reply to Vicente Olivert RieraQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Vicente" == Vicente Olivert Riera <[email protected]> writes:
Currently procps-ng binaries are installed under $(TARGET_DIR)/usr/usr instead of $(TARGET_DIR)/usr, which would be the expected. This is caused because the default value of the --exec-prefix configure option is /usr, and Buildroot always adds --prefix=/usr to the configure option. We fix this by setting --exec-prefix to an empty value.
Quoted 5 lines
At the same time we make sure the procps-ng binaries have precedence over the busybox ones.
Signed-off-by Vicente Olivert Riera <[email protected]>Reviewed-by Markos.Chandras <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 coreutils: Do not install uptime
In reply to Vicente Olivert RieraDear Vicente Olivert Riera,
Quoted 22 lines · Vicente Olivert Riera
coreutils' uptime doesn't work and its execution fails with a message like this one:
uptime: couldn't get boot time: No such file or directory
busybox and procps-ng provide a working alternative.
This is a common old problem as we can see here:
https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/010006.html
Signed-off-by Vicente Olivert Riera <[email protected]>Reviewed-by Markos.Chandras <[email protected]>--- package/coreutils/coreutils.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)package/coreutils/coreutils.mk +0
-0
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 6 lines
package/coreutils/coreutils.mk +2
-1@@ -61,7 +61,8 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ PERL=missing COREUTILS_CONF_OPT = --disable-rpath \ - --enable-install-program=hostname + --enable-install-program=hostname \ + --enable-no-install-program=uptime
I think this is not the proper fix. A more appropriate fix is to actually get uptime to work, which is a oneliner. See my patch posted at http://patchwork.ozlabs.org/patch/387971/.
I'll mark your patch as Rejected in patchwork. Of course, if you disagree, feel free to turn back your patch to the "New" state with an explanation.
Thanks a lot for noticing this issue in the first place!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 coreutils: Do not install uptime
Quoted 27 lines · Thomas Petazzoni
Dear Vicente Olivert Riera,
Quoted 24 lines · Vicente Olivert Riera
coreutils' uptime doesn't work and its execution fails with a message like this one:
uptime: couldn't get boot time: No such file or directory
busybox and procps-ng provide a working alternative.
This is a common old problem as we can see here:
https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/010006.htmlSigned-off-by Vicente Olivert Riera <[email protected]>Reviewed-by Markos.Chandras <[email protected]>--- package/coreutils/coreutils.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)package/coreutils/coreutils.mk +0
-0@@ -61,7 +61,8 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ PERL=missing
Quoted 8 lines
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 4 lines
package/coreutils/coreutils.mk +2
-1COREUTILS_CONF_OPT = --disable-rpath \ - --enable-install-program=hostname + --enable-install-program=hostname \ + --enable-no-install-program=uptimeI think this is not the proper fix. A more appropriate fix is to actually get uptime to work, which is a oneliner. See my patch posted at http://patchwork.ozlabs.org/patch/387971/.
I have tested it and it works fine.
Quoted 3 lines
I'll mark your patch as Rejected in patchwork. Of course, if you disagree, feel free to turn back your patch to the "New" state with an explanation.
I don't disagree. I also think it's better to have a working coreutils' uptime instead of disabling it.
Quoted 1 line
Thanks a lot for noticing this issue in the first place!
You are welcome.
Quoted 1 line
Thomas
Signature · 1 line
Vincent