From patchwork Wed Oct 4 15:43:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 821353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y6gD75wXHz9sRq for ; Thu, 5 Oct 2017 02:43:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2809F8863A; Wed, 4 Oct 2017 15:43:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qyw9FhnWDDek; Wed, 4 Oct 2017 15:43:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EB1EF872D0; Wed, 4 Oct 2017 15:43:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9FDD31CE750 for ; Wed, 4 Oct 2017 15:43:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 944412D02B for ; Wed, 4 Oct 2017 15:43:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W+Cg1AoHG152 for ; Wed, 4 Oct 2017 15:43:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by silver.osuosl.org (Postfix) with ESMTPS id CD9622CDE7 for ; Wed, 4 Oct 2017 15:43:28 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id DAB04160F083; Wed, 4 Oct 2017 12:42:41 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id C9722160F067; Wed, 4 Oct 2017 12:42:41 -0300 (BRT) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id a5vrnI7epX-D; Wed, 4 Oct 2017 12:42:41 -0300 (BRT) Received: from p7-1130br.casantos.org (unknown [201.86.223.244]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 28441160F05F; Wed, 4 Oct 2017 12:42:41 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Wed, 4 Oct 2017 12:43:13 -0300 Message-Id: <20171004154313.25762-1-casantos@datacom.ind.br> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171004124920.7358-1-casantos@datacom.ind.br> References: <20171004124920.7358-1-casantos@datacom.ind.br> Cc: Thomas Petazzoni , Maxime Hadjinlian Subject: [Buildroot] [PATCH v2] nmap: add option to build/install "ncat" X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Ncat is a much-improved reimplementation of the venerable Netcat and is compatible with uClibc. So far the "nc" options available to build with uClibc were the ancient GNU netcat and its Busybox double (the openbsd-netcat package cannot be used because it requires GLIBC). Both lack features available in modern netcats like IPv6, proxies, and Unix sockets. Signed-off-by: Carlos Santos --- Changes v1->v2: - Add dependens on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS, like netcat does - Remove forced dependence on busybox, since its installation script does not override existing programs. --- package/nmap/Config.in | 13 +++++++++++++ package/nmap/nmap.mk | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/package/nmap/Config.in b/package/nmap/Config.in index 79f587afd1..a2e330dacd 100644 --- a/package/nmap/Config.in +++ b/package/nmap/Config.in @@ -11,6 +11,19 @@ config BR2_PACKAGE_NMAP http://nmap.org +if BR2_PACKAGE_NMAP + +config BR2_PACKAGE_NMAP_NCAT + bool "nmap-ncat" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + Ncat is a feature-packed networking utility which reads and + writes data across networks from the command line. Ncat was + written for the Nmap Project as a much-improved + reimplementation of the venerable Netcat. + +endif + comment "nmap needs a toolchain w/ C++, threads" depends on BR2_USE_MMU depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk index 9db06d1455..fb16c2887d 100644 --- a/package/nmap/nmap.mk +++ b/package/nmap/nmap.mk @@ -10,7 +10,7 @@ NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2 NMAP_DEPENDENCIES = libpcap pcre NMAP_CONF_OPTS = --without-liblua --without-zenmap \ --with-libdnet=included --with-liblinear=included \ - --with-libpcre="$(STAGING_DIR)/usr" --without-ncat + --with-libpcre="$(STAGING_DIR)/usr" NMAP_LICENSE = GPL-2.0 NMAP_LICENSE_FILES = COPYING @@ -50,4 +50,17 @@ else NMAP_CONF_OPTS += --without-ndiff endif +ifeq ($(BR2_PACKAGE_NMAP_NCAT),y) + +define NMAP_INSTALL_NCAT_SYMLINK + ln -fs ncat $(TARGET_DIR)/usr/bin/nc +endef +NMAP_POST_INSTALL_TARGET_HOOKS += NMAP_INSTALL_NCAT_SYMLINK + +else + +NMAP_CONF_OPTS += --without-ncat + +endif + $(eval $(autotools-package))