From patchwork Sat Jul 2 08:47:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 643406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rhRl03R9gz9sBg for ; Sat, 2 Jul 2016 18:48:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=U/gfknYS; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 95AD12E65C; Sat, 2 Jul 2016 08:48:23 +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 FxyMpwyZtJwC; Sat, 2 Jul 2016 08:48:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5D46B2E8F6; Sat, 2 Jul 2016 08:48:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 696C01C101F for ; Sat, 2 Jul 2016 08:48:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 656B187D2F for ; Sat, 2 Jul 2016 08:48:20 +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 tjBOqttY7Uut for ; Sat, 2 Jul 2016 08:48:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 6582B823FA for ; Sat, 2 Jul 2016 08:48:18 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id a66so10229094wme.2 for ; Sat, 02 Jul 2016 01:48:18 -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=aaudVSTBKMG/8ofCzl8Vcl0WuLOm1Ah8lps8bm5v6DQ=; b=U/gfknYS4213/JH+Sp1QAldS1JYUjqnYQ+l0p7riYqYMl3J+3Ee2z74iu+F+izGju6 4TSMw7MEqfNax6Gfr4hYMwmWctWyCmWRhEUiTBUsXEKMfuByoMe6n1LbV/si1C1eR1e6 BAhoOQc76p4OWak9Bs6xoWxzhdJjpMG1i/WfSezqly5ZY8lVEgKE3nz19rBOO9MO6Q8s /RLWx/tgvYEAuZ57TN+9EpXfx9rS5M7XxqDBLPSTOnoSI0LK09pF+MvexJqKw+q6Ddok j01QtB0Yy7Lsohp/V37Inu6UtCn+iZyfqVJz2GLzHHd5x2FcUJkBPmickuaAEWUVk636 ucvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aaudVSTBKMG/8ofCzl8Vcl0WuLOm1Ah8lps8bm5v6DQ=; b=Fko54egrvyAlhhsrLzoGzVvWEDdEz2J6kVbk6B1DT6zrtVRbq8OgDGTgdR9xJWadff 5WXcOyr4GMzlsaFswMpI0n0eTP9AC++DZOByBoJ/aqmqxaUiDUWIYyiT4Gf/caHTEtbh n8HGKYRa4Mdlg8NyRLy8Vy991cUYSbTk6xr2IyiW3i5HaRMy7A3rKuEjIdSB3EeyjZf3 wU3ua6/+bA/nwtHgEDh9K1BQgvOpMd7hMf8DhUc3man8ciYflg1tZyV1b9F4bxxZnxQV 5h4/EcUO5HumzbMSEvIggeJvKpOvEMZcirMKDj/qcmkXn02Oj0yiugGmQIW/9EQupJok dUgw== X-Gm-Message-State: ALyK8tKGkwEN5aATj3UPd+9a4U+NCnixSrOeDwx9VxMg37av3or6A+nOUzxsPYtGPafz4Q== X-Received: by 10.194.178.167 with SMTP id cz7mr2379393wjc.66.1467449296633; Sat, 02 Jul 2016 01:48:16 -0700 (PDT) Received: from cerise.home ([2a01:cb19:84c0:6b00:408e:9653:c255:83a4]) by smtp.gmail.com with ESMTPSA id w76sm1276517wmd.11.2016.07.02.01.48.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jul 2016 01:48:15 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@buildroot.org Date: Sat, 2 Jul 2016 10:47:58 +0200 Message-Id: <1467449278-3166-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 2.8.1 Subject: [Buildroot] [PATCH] dante: 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" Signed-off-by: Maxime Hadjinlian --- package/Config.in | 1 + package/dante/Config.in | 9 +++++++++ package/dante/S50dante | 40 ++++++++++++++++++++++++++++++++++++++++ package/dante/dante.hash | 2 ++ package/dante/dante.mk | 32 ++++++++++++++++++++++++++++++++ package/dante/dante.service | 15 +++++++++++++++ 6 files changed, 99 insertions(+) create mode 100644 package/dante/Config.in create mode 100644 package/dante/S50dante create mode 100644 package/dante/dante.hash create mode 100644 package/dante/dante.mk create mode 100644 package/dante/dante.service diff --git a/package/Config.in b/package/Config.in index 5779d04..0840ef2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1416,6 +1416,7 @@ menu "Networking applications" source "package/crda/Config.in" source "package/ctorrent/Config.in" source "package/cups/Config.in" + source "package/dante/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dhcp/Config.in" endif diff --git a/package/dante/Config.in b/package/dante/Config.in new file mode 100644 index 0000000..4aa30bc --- /dev/null +++ b/package/dante/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DANTE + bool "dante" + help + Dante is a product developed by Inferno Nettverk A/S. It consists of a + SOCKS server and a SOCKS client, implementing RFC 1928 and related + standards. It is a flexible product that can be used to provide + convenient and secure network connectivity. + + http://www.inet.no/dante/ diff --git a/package/dante/S50dante b/package/dante/S50dante new file mode 100644 index 0000000..3613991 --- /dev/null +++ b/package/dante/S50dante @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Starts dante +# + +# Allow a few customizations from a config file +test -r /etc/default/dante && . /etc/default/dante + +start() { + printf "Starting dante: " + start-stop-daemon -S -q -p /run/dante.pid \ + --exec /usr/sbin/dante -- $DAEMON_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping dante: " + start-stop-daemon -K -q -p /run/dante.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/dante/dante.hash b/package/dante/dante.hash new file mode 100644 index 0000000..38dea61 --- /dev/null +++ b/package/dante/dante.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b6d232bd6fefc87d14bf97e447e4fcdeef4b28b16b048d804b50b48f261c4f53 dante-1.4.1.tar.gz diff --git a/package/dante/dante.mk b/package/dante/dante.mk new file mode 100644 index 0000000..3aa04b4 --- /dev/null +++ b/package/dante/dante.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# dante +# +################################################################################ + +DANTE_VERSION = 1.4.1 +DANTE_SITE = http://www.inet.no/dante/files +DANTE_LICENSE = BSD-3c +DANTE_LICENSE_FILES = LICENSE + +# Dante uses a *VERY* old configure.ac +DANTE_LIBTOOL_PATCH = NO +DANTE_INSTALL_STAGING = YES + +DANTE_CONF_OPTS += --disable-client --disable-preload + +ifeq ($(BR2_ENABLE_DEBUG),y) + DANTE_CONF_OPTS += --enable-debug +endif + +define DANTE_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/dante/dante.service \ + $(TARGET_DIR)/usr/lib/systemd/system/dante.service +endef + +define DANTE_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/dante/S50dante \ + $(TARGET_DIR)/etc/init.d/S50dante +endef + +$(eval $(autotools-package)) diff --git a/package/dante/dante.service b/package/dante/dante.service new file mode 100644 index 0000000..b783cee --- /dev/null +++ b/package/dante/dante.service @@ -0,0 +1,15 @@ +[Unit] +Description=SOCKS v4 and v5 compatible proxy server and client +Requires=network.target +After=network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/default/dante +PIDFile=/run/dante.pid +ExecStart=/usr/sbin/sockd -D -p /run/dante.pid $DAEMON_ARGS +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target