From patchwork Tue Apr 14 08:25:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1270179 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ZnUT/aw3; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491dqb4Xvkz9sPF for ; Tue, 14 Apr 2020 18:26:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 219B586DAC; Tue, 14 Apr 2020 08:26:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uaV0nyKhBI3Z; Tue, 14 Apr 2020 08:26:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 477DF86DB0; Tue, 14 Apr 2020 08:26:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AD9781BF2AE for ; Tue, 14 Apr 2020 08:26:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AA32D855FF for ; Tue, 14 Apr 2020 08:26:15 +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 YThjZqBBJtph for ; Tue, 14 Apr 2020 08:26:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 56CDC82146 for ; Tue, 14 Apr 2020 08:26:13 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id h2so12004827wmb.4 for ; Tue, 14 Apr 2020 01:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZhKcWT+L1UBOThpfuve9D9rMRO0tftIsQKAA/ONcsFM=; b=ZnUT/aw3XiJjsXr2Iwcg3L58GLwDGdLiR2rNGONAJvRdliBaGKT3Ic7/em3Z0jNBUS G9Rj//MRBkliAJVZWMaml+j6lUK2Y0x0jIMthtmMps/nhHMzRDJXkwI1M4GLYjR202HL 8BJxxxa2Zzdd0/IonUikLP0KZunlQRhxuOdWwVsPvq+Od53aiPs8TfjMERC0RnlA0L5E evhafNbiHbzZzjDtHqT9Kx4GYv9KFBoecrQVndmK9iDa7aVM0iEX9B59RxzI7BkiRrj8 iZh5k89sh9h/SblZXXJY8v0Py5ZkrWJPXUDPEk9+SIZOVXt21vaScCF4dPW+JqiP+LSG Orew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZhKcWT+L1UBOThpfuve9D9rMRO0tftIsQKAA/ONcsFM=; b=FYHazPzxPlgfdAKGW6MFtAEn4rjSX/fT9ELNa8l9sk17nhjwkAdUMZikWtC+ocKDAI a5At43rQCtoj979i8D9h6VMFWR/fyX2havUgOjjuKi8zzD3fm7H26NPi0XDqlqbtJKIw iyBT0yC2dzeDdUucnpWenBZAOO/dFKnTPHucCex2T2G2cny4+RsqExzH8WKAE7ZmPA8W UOs4aDQ5gmLVOUzTVac3XC+2w1i2GqdsKIhOqzGPzK8LC1tp1CaE+i1lwhP1Rfz6aVVt hCs00S2hGAZlFvt6aC9sz1wuaEoxh+nAIzVE+hCYyFL1600WSTpWXcKscFa+aFITToYT cRKg== X-Gm-Message-State: AGi0PuZ9yJ+zGwIgHDaeC7EM/xmX1/Se7n+aaoZ6BezBU1R5QNVLJedd I/Xvac9ZmjzWoOGuV4uPtc3O3Tjc X-Google-Smtp-Source: APiQypIk7si5qB3Dn8SCgxZOVdv7EntAP2AtW9YCb7DTC7Q77vLzTFlNxfOvOGFp7RjqPO730LZfTA== X-Received: by 2002:a1c:6a0b:: with SMTP id f11mr22145697wmc.123.1586852771453; Tue, 14 Apr 2020 01:26:11 -0700 (PDT) Received: from t450s.fritz.box (ip5b426f84.dynamic.kabel-deutschland.de. [91.66.111.132]) by smtp.gmail.com with ESMTPSA id k184sm17486413wmf.9.2020.04.14.01.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 01:26:10 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Tue, 14 Apr 2020 10:25:50 +0200 Message-Id: <20200414082548.8625-2-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414082548.8625-1-heiko.thiery@gmail.com> References: <20200414082548.8625-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/netopeer2-server: add package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF Protocol. This is the second generation of the toolset, originally available as the Netopeer project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries - libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation. Signed-off-by: Heiko Thiery --- DEVELOPERS | 1 + package/Config.in | 1 + package/netopeer2-server/Config.in | 49 ++++++++++++++++++ package/netopeer2-server/S52netopeer2-server | 50 +++++++++++++++++++ .../netopeer2-server/netopeer2-server.hash | 3 ++ package/netopeer2-server/netopeer2-server.mk | 21 ++++++++ 6 files changed, 125 insertions(+) create mode 100644 package/netopeer2-server/Config.in create mode 100644 package/netopeer2-server/S52netopeer2-server create mode 100644 package/netopeer2-server/netopeer2-server.hash create mode 100644 package/netopeer2-server/netopeer2-server.mk diff --git a/DEVELOPERS b/DEVELOPERS index 375ab07092..79980863c7 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1106,6 +1106,7 @@ F: package/python-sip/ N: Heiko Thiery F: package/libnetconf2/ F: package/libyang/ +F: package/netopeer2-server/ F: package/sysrepo/ N: Henrique Camargo diff --git a/package/Config.in b/package/Config.in index ccf54f2417..78c0d4b7ce 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1736,6 +1736,7 @@ menu "Networking" source "package/mongoose/Config.in" source "package/nanomsg/Config.in" source "package/neon/Config.in" + source "package/netopeer2-server/Config.in" source "package/nghttp2/Config.in" source "package/norm/Config.in" source "package/nss-mdns/Config.in" diff --git a/package/netopeer2-server/Config.in b/package/netopeer2-server/Config.in new file mode 100644 index 0000000000..77d8172a14 --- /dev/null +++ b/package/netopeer2-server/Config.in @@ -0,0 +1,49 @@ +comment "netopeer2server needs a toolchain w/ C++, threads, dynamic library, host gcc >= 4.8" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_HOST_GCC_AT_LEAST_4_8 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # host-protobuf + +config BR2_PACKAGE_NETOPEER2_SERVER + bool "netopeer2-server" + depends on BR2_USE_MMU # sysrepo + depends on !BR2_STATIC_LIBS # sysrepo + depends on BR2_INSTALL_LIBSTDCPP # sysrepo + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + # host-protobuf only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_PACKAGE_LIBAVL # sysrepo + select BR2_PACKAGE_LIBEV # sysrepo + select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_LIBNETCONF2 + select BR2_PACKAGE_PCRE # sysrepo + select BR2_PACKAGE_PCRE_UCP # syrepo + select BR2_PACKAGE_PROTOBUF_C # sysrepo + select BR2_PACKAGE_SYSREPO + # at least one transport mechanism is mandatory + select BR2_PACKAGE_NETOPEER2_SERVER_SSH if !BR2_PACKAGE_NETOPEER2_SERVER_TLS + + help + Netopeer2 is a set of tools implementing network + configuration tools based on the NETCONF Protocol. + + This is the server part. + + https://github.com/CESNET/Netopeer2 + +if BR2_PACKAGE_NETOPEER2_SERVER + +config BR2_PACKAGE_NETOPEER2_SERVER_TLS + bool "TLS transport" + select BR2_PACKAGE_OPENSSL + help + Enable TLS transport layer support. + +config BR2_PACKAGE_NETOPEER2_SERVER_SSH + bool "SSH transport" + select BR2_PACKAGE_LIBSSH + select BR2_PACKAGE_LIBSSH_SERVER + help + Enable SSH transport layer support. + +endif diff --git a/package/netopeer2-server/S52netopeer2-server b/package/netopeer2-server/S52netopeer2-server new file mode 100644 index 0000000000..cf53a8f109 --- /dev/null +++ b/package/netopeer2-server/S52netopeer2-server @@ -0,0 +1,50 @@ +#!/bin/sh + +DAEMON="netopeer2-server" +PIDFILE="/var/run/$DAEMON.pid" + +NETOPEER2_SERVER_ARGS="" + +start() { + printf 'Starting %s: ' "$DAEMON" + + start-stop-daemon -S -b -q -p $PIDFILE -x "/usr/bin/$DAEMON" \ + -- $NETOPEER2_SERVER_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p $PIDFILE + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +reload() { + # we do not support real reload .. just restart + restart +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" +esac diff --git a/package/netopeer2-server/netopeer2-server.hash b/package/netopeer2-server/netopeer2-server.hash new file mode 100644 index 0000000000..e1d2886847 --- /dev/null +++ b/package/netopeer2-server/netopeer2-server.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 6c5fc09aed76e0bd7b1b5751dc408966ae9985d2a48109c3f622746e49999b16 netopeer2-1.1.7.tar.gz +sha256 b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b LICENSE diff --git a/package/netopeer2-server/netopeer2-server.mk b/package/netopeer2-server/netopeer2-server.mk new file mode 100644 index 0000000000..b6a1f4dae8 --- /dev/null +++ b/package/netopeer2-server/netopeer2-server.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# netopeer2-server +# +################################################################################ + +NETOPEER2_SERVER_VERSION = 1.1.7 +NETOPEER2_SERVER_SOURCE = netopeer2-$(NETOPEER2_SERVER_VERSION).tar.gz +NETOPEER2_SERVER_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_SERVER_VERSION)) +NETOPEER2_SERVER_DL_SUBDIR = netopeer2 +NETOPEER2_SERVER_LICENSE = BSD-3-Clause +NETOPEER2_SERVER_LICENSE_FILES = LICENSE +NETOPEER2_SERVER_SUBDIR = server +NETOPEER2_SERVER_DEPENDENCIES = libnetconf2 libyang sysrepo + +define NETOPEER2_SERVER_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/netopeer2-server/S52netopeer2-server \ + $(TARGET_DIR)/etc/init.d/S52netopeer2-server +endef + +$(eval $(cmake-package))