From patchwork Sun Oct 5 19:48:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 396698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id DBF721400E7 for ; Mon, 6 Oct 2014 06:48:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2EEE3A1CE4; Sun, 5 Oct 2014 19:48:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dkj8drokAy57; Sun, 5 Oct 2014 19:48:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8C550A1D03; Sun, 5 Oct 2014 19:48:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4054C1C27CA for ; Sun, 5 Oct 2014 19:48:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3A05491F02 for ; Sun, 5 Oct 2014 19:48:08 +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 2ZKDsGQeg8NH for ; Sun, 5 Oct 2014 19:48:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id B36AA91EFF for ; Sun, 5 Oct 2014 19:48:06 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id m15so4987055wgh.26 for ; Sun, 05 Oct 2014 12:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=gYPKK51MaHMwIGZJn1OuqXgYOLp3Nxk4zBzQo0S+YFo=; b=gCYX5NtZg8QRJ+BbY6nk5JaVjfsWB2uPBOLmkxzG7eAW+sWa4ooEe1Apqs/mW038U4 NnCKWm3c8MbLvgUYMWSWt5zySU+ad6VrQGerbPZJbjUaUeC1zFddmr/b2MuQgdvn2qX7 uRmB/rbEuu1Y+TKQ7DxtGzTBl6kbc8AtylG7QFrO87l4Gyyk9PW+zWjAgHGvihMFBqfO Hi0PDDK7Mfqg3c2zm/zjDZ+sFOwTdnV1T42phJrWOvJ/32FyqxauUS1Vg1cIbsdRr3Rq qDXd+KokgNamSNqpOxE+leTJqMWySRyijcDx4jxpmVSNMzhXiK2bVo/H9f6oFZlA/T76 nHuw== X-Received: by 10.180.39.234 with SMTP id s10mr13943589wik.23.1412538485155; Sun, 05 Oct 2014 12:48:05 -0700 (PDT) Received: from localhost.localdomain (13-105-190-109.dsl.ovh.fr. [109.190.105.13]) by mx.google.com with ESMTPSA id l10sm8924485wif.20.2014.10.05.12.48.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Oct 2014 12:48:04 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sun, 5 Oct 2014 21:48:02 +0200 Message-Id: <1412538482-5116-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.1.1 Subject: [Buildroot] [PATCH v4] netcat-openbsd: new package 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" The OpenBSD implementations of netcat. The main difference from netcat is the support for IPv6, proxies, and Unix sockets. Signed-off-by: Maxime Hadjinlian --- v3 -> v4: - Propagage libbsd dependencies - Add host-pkgconf as dependencies v2 -> v3: - Use the debian git tree - Remove the patch and uses a hook to apply them - Set the license_file v1 -> v2: - Add missing license --- package/Config.in | 1 + package/netcat-openbsd/Config.in | 24 ++++++++++++++++++++++++ package/netcat-openbsd/netcat-openbsd.mk | 29 +++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 package/netcat-openbsd/Config.in create mode 100644 package/netcat-openbsd/netcat-openbsd.mk diff --git a/package/Config.in b/package/Config.in index f488728..de10d4f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1025,6 +1025,7 @@ endif source "package/netatalk/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/netcat/Config.in" + source "package/netcat-openbsd/Config.in" endif source "package/netplug/Config.in" source "package/netsnmp/Config.in" diff --git a/package/netcat-openbsd/Config.in b/package/netcat-openbsd/Config.in new file mode 100644 index 0000000..16be610 --- /dev/null +++ b/package/netcat-openbsd/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_NETCAT_OPENBSD + bool "netcat-openbsd" + select BR2_PACKAGE_LIBBSD + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + A simple Unix utility which reads and writes data across network + connections using TCP or UDP protocol. It is designed to be a + reliable "back-end" tool that can be used directly or easily driven + by other programs and scripts. At the same time it is a feature-rich + network debugging and exploration tool, since it can create almost + any kind of connection you would need and has several interesting + built-in capabilities. + + This package contains the OpenBSD rewrite of netcat, including + support for IPv6, proxies, and Unix sockets. + + https://packages.debian.org/sid/netcat-openbsd + +comment "netcat-openbsd needs an (e)glibc toolchain w/ threads" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC +~ diff --git a/package/netcat-openbsd/netcat-openbsd.mk b/package/netcat-openbsd/netcat-openbsd.mk new file mode 100644 index 0000000..fc60b13 --- /dev/null +++ b/package/netcat-openbsd/netcat-openbsd.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# netcat-openbsd +# +################################################################################ + +NETCAT_OPENBSD_VERSION = debian/1.105-7 +NETCAT_OPENBSD_SITE = git://anonscm.debian.org/collab-maint/netcat-openbsd +NETCAT_OPENBSD_LICENSE = BSD-3c +NETCAT_OPENBSD_LICENSE_FILE = debian/copyright +NETCAT_OPENBSD_DEPENDENCIES = host-pkgconf libbsd + +define NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches *.dpatch; \ + fi +endef + +NETCAT_OPENBSD_POST_PATCH_HOOKS += NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES + +define NETCAT_OPENBSD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define NETCAT_OPENBSD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/nc $(TARGET_DIR)/usr/bin/nc +endef + +$(eval $(generic-package))