From 643baa18726111492792ddf20a61c141f9e46e9d Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Wed, 20 Aug 2014 16:02:46 -0500 Subject: hostname: fix conflicting installs of /bin/hostname Surprisingly long-standing issue with conflicting /bin/hostname installs. Reported as early as November 2005 by Joseph Dupre. All together at one point or another there are at least 4 possible sources of /bin/hostname: busybox util-linux coreutils net-tools Buildroot depends on the -F flag being available in the default /etc/inittab. Out of the 4 listed projects only net-tools and buildroot for sure support the -F flag. I'm a little unclear on util-linux as it has been removed entirely (in favor of net-tools) for some time. As of coreutils 6.9.90 (2007-12-01), coreutils does not install its /bin/hostname by default. The following commit reenabled its build: d6e58cb coreutils: fixed missing hostname (Sep 2010) This was done to fix a build error in coreutils regarding help2man. A later patch: 30c5105 coreutils: bump to version 8.21 disabled the help2man functionality entirely but left hostname being installed. On a very related note, net-tools now contains an obsolete check to add util-linux as a dependency to force it to build first (so that net-tools ends up with /bin/hostname). This patch fixes both of these issues so that hostname always comes from one of two places: busybox net-tools Tested-by: Vicente Olivert Riera Co-authored-by: Vicente Olivert Riera Signed-off-by: Andrew Ruder Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/coreutils/coreutils.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'package/coreutils') diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index e6af7e297..a2b809944 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -20,7 +20,7 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y) COREUTILS_DEPENDENCIES = busybox endif -COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostname \ +COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \ ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \ uname join @@ -61,8 +61,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ utils_cv_localtime_cache=no \ PERL=missing -COREUTILS_CONF_OPT = --disable-rpath \ - --enable-install-program=hostname +COREUTILS_CONF_OPT = --disable-rpath define COREUTILS_POST_INSTALL # some things go in root rather than usr -- cgit v1.2.3-70-g09d2