All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] hostname: fix conflicting installs of /bin/hostname
@ 2014-08-20 21:02 Andrew Ruder
  2014-08-30 21:47 ` Arnout Vandecappelle
  2014-09-14 22:44 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Ruder @ 2014-08-20 21:02 UTC (permalink / raw)
  To: buildroot

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 <Vincent.Riera@imgtec.com>
Co-authored-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
---
 package/coreutils/coreutils.mk | 5 ++---
 package/net-tools/net-tools.mk | 5 -----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index af202b4..458a495 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 \
 		PERL=missing
 
 COREUTILS_CONF_OPT = --disable-rpath \
-		--disable-dependency-tracking \
-		--enable-install-program=hostname
+		--disable-dependency-tracking
 
 define COREUTILS_POST_INSTALL
 	# some things go in root rather than usr
diff --git a/package/net-tools/net-tools.mk b/package/net-tools/net-tools.mk
index 3538655..a2abf5b 100644
--- a/package/net-tools/net-tools.mk
+++ b/package/net-tools/net-tools.mk
@@ -17,11 +17,6 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 	NET_TOOLS_DEPENDENCIES += busybox
 endif
 
-# Install after util-linux since net-tools hostname is better
-ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),y)
-	NET_TOOLS_DEPENDENCIES += util-linux
-endif
-
 define NET_TOOLS_CONFIGURE_CMDS
 	(cd $(@D); yes "" | ./configure.sh config.in )
 endef
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] hostname: fix conflicting installs of /bin/hostname
  2014-08-20 21:02 [Buildroot] [PATCH] hostname: fix conflicting installs of /bin/hostname Andrew Ruder
@ 2014-08-30 21:47 ` Arnout Vandecappelle
  2014-09-14 22:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2014-08-30 21:47 UTC (permalink / raw)
  To: buildroot

On 08/20/14 23:02, Andrew Ruder wrote:
> 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 <Vincent.Riera@imgtec.com>
> Co-authored-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Regards,
 Arnout


-- 
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] [PATCH] hostname: fix conflicting installs of /bin/hostname
  2014-08-20 21:02 [Buildroot] [PATCH] hostname: fix conflicting installs of /bin/hostname Andrew Ruder
  2014-08-30 21:47 ` Arnout Vandecappelle
@ 2014-09-14 22:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2014-09-14 22:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Andrew" == Andrew Ruder <andrew.ruder@elecsyscorp.com> writes:

 > 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 <Vincent.Riera@imgtec.com>
 > Co-authored-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
 > Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-14 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 21:02 [Buildroot] [PATCH] hostname: fix conflicting installs of /bin/hostname Andrew Ruder
2014-08-30 21:47 ` Arnout Vandecappelle
2014-09-14 22:44 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.