traceroute: new package
PATCH 1/1 traceroute: new package
Tested on Beaglebone Black.
Build-tested with test-pkg.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/traceroute/Config.in | 8 ++++++++ package/traceroute/traceroute.hash | 6 ++++++ package/traceroute/traceroute.mk | 30 ++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 package/traceroute/Config.in create mode 100644 package/traceroute/traceroute.hash create mode 100644 package/traceroute/traceroute.mk
DEVELOPERS +1 -0
@@ -1547,6 +1547,7 @@ N: Sergio Prado <[email protected]> F: package/libgdiplus/ F: package/mongodb/ F: package/stella/ +F: package/traceroute/ F: package/tunctl/ F: package/ubus/
package/Config.in +1 -0
@@ -1805,6 +1805,7 @@ endif source "package/tinyhttpd/Config.in" source "package/tn5250/Config.in" source "package/tor/Config.in" + source "package/traceroute/Config.in" source "package/transmission/Config.in" source "package/tunctl/Config.in" source "package/tvheadend/Config.in"
package/traceroute/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_TRACEROUTE + bool "traceroute" + help + A new modern implementation of the traceroute(8) utility for + Linux systems. It tracks the route packets taken from an IP + network on their way to a given host. + + http://traceroute.sourceforge.net/
package/traceroute/traceroute.hash new file +6 -0
@@ -0,0 +1,6 @@ +# Locally computed: +sha256 3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6 traceroute-2.1.0.tar.gz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
package/traceroute/traceroute.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# traceroute +# +################################################################################ + +TRACEROUTE_VERSION = 2.1.0 +TRACEROUTE_SOURCE = traceroute-$(TRACEROUTE_VERSION).tar.gz +TRACEROUTE_SITE = http://downloads.sourceforge.net/traceroute/traceroute/traceroute-$(TRACEROUTE_VERSION) + +TRACEROUTE_LICENSE = GPL-2.0+, LGPL-2.1+ +TRACEROUTE_LICENSE_FILES = COPYING COPYING.LIB + +# Prefer full-featured traceroute over busybox's version +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +TRACEROUTE_DEPENDENCIES += busybox +endif + +define TRACEROUTE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" -C $(@D) +endef + +define TRACEROUTE_INSTALL_TARGET_CMDS + $(RM) -f $(TARGET_DIR)/usr/bin/traceroute + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + prefix=$(TARGET_DIR)/usr install -C $(@D) +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH 1/1 traceroute: new package
Hello,
package/traceroute/traceroute.mk line 25
Quoted 2 lines · Sergio Prado
package/traceroute/traceroute.mk new file +2
-0+define TRACEROUTE_INSTALL_TARGET_CMDS + $(RM) -f $(TARGET_DIR)/usr/bin/traceroute
I didn't see why this is needed. The package does a simple "cp", so reinstallation works fine. So I've dropped this.
Review
Quoted 2 lines
(quoted diff) +2
-0+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + prefix=$(TARGET_DIR)/usr install -C $(@D)
This value of prefix is not really correct. A more correct approach is DESTDIR=$(TARGET_DIR) prefix=/usr. Even though it changes nothing in practice for this package, it is more consistent with what we do in other packages (and what is technically correct).
Applied with those changes. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 traceroute: new package
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello,
package/traceroute/traceroute.mk line 25
Quoted 2 lines · Sergio Prado
package/traceroute/traceroute.mk new file +2
-0+define TRACEROUTE_INSTALL_TARGET_CMDS + $(RM) -f $(TARGET_DIR)/usr/bin/tracerouteI didn't see why this is needed. The package does a simple "cp", so reinstallation works fine. So I've dropped this.
Yes, but plain cp follows symlinks, so it ends up overwriting the bin/busybox binary, breaking the build.
So we either need this workaround or pass INSTALL=$(INSTALL) to make to get it to use install instead of cp.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 traceroute: new package
Hello,
Quoted 5 lines · Peter Korsgaard
Yes, but plain cp follows symlinks, so it ends up overwriting the bin/busybox binary, breaking the build.
So we either need this workaround or pass INSTALL=$(INSTALL) to make to get it to use install instead of cp.
Good point. I've pushed a change that passes INSTALL=$(INSTALL), I've verified that it fixes the issue. Thanks for spotting this!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com