Message ID | 1513429309-16761-1-git-send-email-sergio.prado@e-labworks.com |
---|---|
State | Accepted |
Headers | show |
Series | traceroute: new package | expand |
Hello, On Sat, 16 Dec 2017 11:01:49 -0200, Sergio Prado wrote: > +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. > + $(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
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Hello, > On Sat, 16 Dec 2017 11:01:49 -0200, Sergio Prado wrote: >> +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. 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.
Hello, On Sat, 16 Dec 2017 22:47:08 +0100, Peter Korsgaard wrote: > 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
diff --git a/DEVELOPERS b/DEVELOPERS index de600f5276d0..af221bd8a375 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1547,6 +1547,7 @@ N: Sergio Prado <sergio.prado@e-labworks.com> F: package/libgdiplus/ F: package/mongodb/ F: package/stella/ +F: package/traceroute/ F: package/tunctl/ F: package/ubus/ diff --git a/package/Config.in b/package/Config.in index a81408db68df..4fa5762ef476 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/traceroute/Config.in b/package/traceroute/Config.in new file mode 100644 index 000000000000..42ae5a3075d4 --- /dev/null +++ b/package/traceroute/Config.in @@ -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/ diff --git a/package/traceroute/traceroute.hash b/package/traceroute/traceroute.hash new file mode 100644 index 000000000000..b9525487417f --- /dev/null +++ b/package/traceroute/traceroute.hash @@ -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 diff --git a/package/traceroute/traceroute.mk b/package/traceroute/traceroute.mk new file mode 100644 index 000000000000..19d378d5b482 --- /dev/null +++ b/package/traceroute/traceroute.mk @@ -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))
Tested on Beaglebone Black. Build-tested with test-pkg. Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com> --- 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