[{"id":1778618,"web_url":"http://patchwork.ozlabs.org/comment/1778618/","msgid":"<87fub1clk4.fsf@dell.be.48ers.dk>","list_archive_url":null,"date":"2017-10-02T21:00:11","subject":"Re: [Buildroot] [PATCH] wireguard: add new package","submitter":{"id":42365,"url":"http://patchwork.ozlabs.org/api/people/42365/","name":"Peter Korsgaard","email":"peter@korsgaard.com"},"content":">>>>> \"Aurélien\" == Aurélien Chabot <aurelien@chabot.fr> writes:\n\n > Signed-off-by: Aurélien Chabot <aurelien@chabot.fr>\n\nSorry for the slow response. Committed after doing quite some changes\n(see below), thanks.\n\n\n > diff --git a/package/wireguard/0001-build-Add-a-tools-install-target.patch b/package/wireguard/0001-build-Add-a-tools-install-target.patch\n > new file mode 100644\n > index 000000000..b265322bc\n > --- /dev/null\n > +++ b/package/wireguard/0001-build-Add-a-tools-install-target.patch\n > @@ -0,0 +1,34 @@\n > +From 5b940d6c65b0c1f58b4637f5b2300b65f46bbca3 Mon Sep 17 00:00:00 2001\n > +From: =?UTF-8?q?Aur=C3=A9lien=20Chabot?= <aurelien@chabot.fr>\n > +Date: Fri, 1 Sep 2017 11:46:51 +0100\n > +Subject: [PATCH 1/2] build: Add a tools-install target\n\nThis patch doesn't seem to have been accepted upstream, and it isn't\nreally needed as we can just directly call the Makefile in src/tools, so\nI've dropped it.\n\n\n> diff --git a/package/wireguard/0002-build-Allow-to-configure-the-used-depmod.patch b/package/wireguard/0002-build-Allow-to-configure-the-used-depmod.patch\n > new file mode 100644\n > index 000000000..36764c590\n > --- /dev/null\n > +++ b/package/wireguard/0002-build-Allow-to-configure-the-used-depmod.patch\n > @@ -0,0 +1,39 @@\n > +From ceb789b729d62433a8ab6e07dbfabc1eebeaf430 Mon Sep 17 00:00:00 2001\n > +From: =?UTF-8?q?Aur=C3=A9lien=20Chabot?= <aurelien@chabot.fr>\n > +Date: Thu, 31 Aug 2017 22:26:37 +0100\n > +Subject: [PATCH 2/2] build: Allow to configure the used depmod\n\nWe already have kernel-module infrastructure in Buildroot, and if we use\nthat then this patch also isn't needed, so I've dropped this as well.\n\n > +config BR2_PACKAGE_WIREGUARD\n > +    bool \"wireguard\"\n > +    help\n\nbool/help/.. should be indented with a <tab>.\n\n> +      WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPSec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it plans to be cross-platform and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.\n\nThe lines are way too long, please keep to ~70 chars. Even better,\nconsider running tools/check-package on your patches before submitting.\n\n\n > +      https://www.wireguard.com\n > +\n > +if BR2_PACKAGE_WIREGUARD\n > +\n > +config BR2_PACKAGE_WIREGUARD_MODULE\n > +    bool \"Kernel Module\"\n > +    default y\n > +    depends on BR2_LINUX_KERNEL\n > +    help\n > +      Wireguard kernel module\n > +\n > +comment \"wireguard module needs a Linux kernel to be built\"\n > +    depends on !BR2_LINUX_KERNEL\n > +\n > +config BR2_PACKAGE_WIREGUARD_TOOLS\n > +    bool \"User Tools\"\n > +    default y\n > +    select BR2_PACKAGE_LIBMNL\n > +    help\n > +      Command-line tools to interact with the WireGuard kernel module. Currently, it provides only a single tool:\n > +        wg: set and retrieve configuration of WireGuard interfaces\n > +\n > +endif\n\nThese explicit options IMHO doesn't make any sense. We always build a\nrootfs, so the user space part should be unconditionally built if\nwireguard is enabled.\n\nFor the kernel module we could either make the package depend on\nBR2_LINUX_KERNEL or only build the module if we are also building a\nkernel. I went with the last option for flexibility.\n\nThe kernel module needs a number of kernel options to be enabled, so\nI've added the needed logic in linux.mk to do that.\n\n\n > diff --git a/package/wireguard/wireguard.hash b/package/wireguard/wireguard.hash\n > new file mode 100644\n > index 000000000..5bd1163d3\n > --- /dev/null\n > +++ b/package/wireguard/wireguard.hash\n > @@ -0,0 +1,2 @@\n > +# Locally calculated\n > +sha256 ab96230390625aad6f4816fa23aef6e9f7fee130f083d838919129ff12089bf7 WireGuard-0.0.20170810.tar.xz\n > diff --git a/package/wireguard/wireguard.mk b/package/wireguard/wireguard.mk\n > new file mode 100644\n > index 000000000..bbabd4143\n > --- /dev/null\n > +++ b/package/wireguard/wireguard.mk\n > @@ -0,0 +1,49 @@\n > +################################################################################\n > +#\n > +## wireguard\n > +#\n > +#################################################################################\n\nThe file header is wrong (80x # and a single # before the package name).\n\n> +\n > +WIREGUARD_VERSION = 0.0.20170810\n > +WIREGUARD_SOURCE = WireGuard-$(WIREGUARD_VERSION).tar.xz\n > +WIREGUARD_SITE = https://git.zx2c4.com/WireGuard/snapshot\n > +WIREGUARD_DEPENDENCIES =\n\nThe src/tools Makefile uses pkg-config so we need to pull in\nhost-pkgconf.\n\n> +WIREGUARD_LICENSE = GPL-2.0\n > +WIREGUARD_LICENSE_FILES = COPYING\n > +WIREGUARD_MAKE_OPTS = \\\n > +    $(LINUX_MAKE_FLAGS) \\\n > +    KERNELDIR=$(LINUX_DIR) \\\n > +    KERNELVERSION=$(LINUX_VERSION) \\\n\nThese are not needed when using the kernel-module infrastructure.\n\n > +    DESTDIR=$(TARGET_DIR) \\\n > +    WITH_WGQUICK=yes\n\nwgquick is a bash script, so this should only be enabled if\nBR2_PACKAGE_BASH is enabled. Same for the bash completion logic.\n\n> +\n > +ifeq ($(BR2_INIT_SYSTEMD),y)\n > +    WIREGUARD_MAKE_OPTS += WITH_SYSTEMDUNITS=yes\n > +else\n > +    WIREGUARD_MAKE_OPTS += WITH_SYSTEMDUNITS=no\n > +endif\n > +\n > +WIREGUARD_TARGET_BUILD=\n > +WIREGUARD_TARGET_INSTALL=\n > +\n > +ifeq ($(BR2_PACKAGE_WIREGUARD_MODULE),y)\n > +    TARGET_BUILD += module\n > +    TARGET_INSTALL += module-install\n > +    WIREGUARD_DEPENDENCIES += linux\n > +endif\n > +\n > +ifeq ($(BR2_PACKAGE_WIREGUARD_TOOLS),y)\n > +    TARGET_BUILD += tools\n > +    TARGET_INSTALL += tools-install\n > +    WIREGUARD_DEPENDENCIES += libmnl\n > +endif\n\nBuildroot uses a global variable name space, so the variables should be\nprefixed with the package name (E.G. WIREGUARD_TARGET_BUILD). With the\nsimplifications mentioned above none of this is needed though.\n\n> +\n > +define WIREGUARD_BUILD_CMDS\n > +    $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(WIREGUARD_MAKE_OPTS) $(MAKE) -C $(@D)/src $(TARGET_BUILD)\n\nIt would make more sense to pass WIREGUARD_MAKE_OPTS as arguments to\nmake instead of in the environment, so I've changed this.\n\nYou didn't add an entry for wireguard in the DEVELOPERS file. Could you\nplease send a patch doing so?","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"k1eii8Em\"; dkim-atps=neutral"],"Received":["from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5ZLd1j9jz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  3 Oct 2017 08:00:23 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id D074F87FEC;\n\tMon,  2 Oct 2017 21:00:20 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id yUc50zeqf6GS; Mon,  2 Oct 2017 21:00:19 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 234D887FB6;\n\tMon,  2 Oct 2017 21:00:19 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6A79F1C0000\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 21:00:17 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6441A2FBA7\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 21:00:17 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Doy0+MOg+Ys9 for <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 21:00:15 +0000 (UTC)","from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 3B70026977\n\tfor <buildroot@buildroot.org>; Mon,  2 Oct 2017 21:00:15 +0000 (UTC)","by mail-wm0-f67.google.com with SMTP id l10so1441655wmg.1\n\tfor <buildroot@buildroot.org>; Mon, 02 Oct 2017 14:00:15 -0700 (PDT)","from dell.be.48ers.dk (d51A5BC31.access.telenet.be.\n\t[81.165.188.49]) by smtp.gmail.com with ESMTPSA id\n\tm25sm9064891edj.17.2017.10.02.14.00.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 02 Oct 2017 14:00:12 -0700 (PDT)","from peko by dell.be.48ers.dk with local (Exim 4.88)\n\t(envelope-from <peter@korsgaard.com>)\n\tid 1dz7ox-0003zS-Sm; Mon, 02 Oct 2017 23:00:11 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:references:date:in-reply-to:message-id\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=png345mN0+tVuKSDvPUWvKxn8nF+vUqsiX1BmoX04u4=;\n\tb=k1eii8EmfRqXBxiqB73uMTeSQldY5xDMTR1GZTBLmua+bV3L2WOHRJeqmZwaU0QDcU\n\tjRzyaO9k+l2HJTCIV1G6LevCkxgBEIFT9WiZzO7djwm5jv24GZzFMKWF+dgtLsv8mkXG\n\tPmeqKYzsQIFhpqoa3edHn3q5t/5hJaA9NHL0ly6qi2BgH8wmqFLAFKswqQnY1kbo1U7/\n\tHfkNBlUz5oXLAGengcDZoucwIIo5UHyoKA190kKxqm6elCQMrnwJ1OAyoKNElB02umnw\n\tZVefT9atg+nljhTJ4bVYj9fH9w0g6RhnT3jogsp8HQJfn+YgxEf5z6V5zNSB37Ehmn+f\n\tA8FQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:references:date\n\t:in-reply-to:message-id:user-agent:mime-version\n\t:content-transfer-encoding;\n\tbh=png345mN0+tVuKSDvPUWvKxn8nF+vUqsiX1BmoX04u4=;\n\tb=iJdh2uq4jfq4fRYORqMFbTvd8VwlN9YT4hF8e2w+P9NEN7nuQh65hXOLxErrPBpVW6\n\t0exV+mA2NhHNnZ+HKO8BNs5DD2Qp2cRmmn4R8g+0o3SS3EX7pXk3M/dD//pB8MQLp42I\n\tBKD5on/ht8xib2y5Nf48AhfLTv7wyn26qQMdzj9AQseZuTQzpvISLYV2jgqD7l85GzlH\n\th2NzA6aU+a/fEagMORHIi8uCjagXauMZcSLa4lzSPFi3VUADpmv/k9V6cZfPdlw7vbaT\n\tilITHkJ8mut/liDSVchx30KmOtT40UWt2FQeE1PvWB+l3EcB8qmERZyGzkr111GuxBcO\n\t+XtQ==","X-Gm-Message-State":"AHPjjUjXXPMZFlvDI55YjABl3J7ulUGVEezNwAR//T5sr7HQQIs9Tam7\n\tAccDaFFem3I10ZqAe4/ssy9lJCRX","X-Google-Smtp-Source":"AOwi7QBy9P4wDoMcZFS8AuuQIe4ASr6gS+xiJGnIFtkrWGg99qAVYMjca9SBj9rhFYxbmSMrQXYwyA==","X-Received":"by 10.80.136.165 with SMTP id d34mr21472537edd.296.1506978013607;\n\tMon, 02 Oct 2017 14:00:13 -0700 (PDT)","From":"Peter Korsgaard <peter@korsgaard.com>","To":"=?utf-8?b?QXVyw6lsaWVu?= Chabot <aurelien@chabot.fr>","References":"<20170906202208.23404-1-aurelien@chabot.fr>\n\t<20170906202208.23404-2-aurelien@chabot.fr>","Date":"Mon, 02 Oct 2017 23:00:11 +0200","In-Reply-To":"<20170906202208.23404-2-aurelien@chabot.fr> ( =?utf-8?b?IkF1?=\n\t=?utf-8?q?r=C3=A9lien?= Chabot\"'s\n\tmessage of \"Wed, 6 Sep 2017 21:22:08 +0100\")","Message-ID":"<87fub1clk4.fsf@dell.be.48ers.dk>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)","MIME-Version":"1.0","Cc":"buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH] wireguard: add new package","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1798242,"web_url":"http://patchwork.ozlabs.org/comment/1798242/","msgid":"<20171102214424.1f808662@windsurf>","list_archive_url":null,"date":"2017-11-02T20:44:24","subject":"Re: [Buildroot] [PATCH] wireguard: add new package","submitter":{"id":2230,"url":"http://patchwork.ozlabs.org/api/people/2230/","name":"Thomas Petazzoni","email":"thomas.petazzoni@free-electrons.com"},"content":"Hello,\n\nOn Mon, 02 Oct 2017 23:00:11 +0200, Peter Korsgaard wrote:\n\n> You didn't add an entry for wireguard in the DEVELOPERS file. Could you\n> please send a patch doing so?\n\nUnless I missed it, we never received a patch from Aurélien to add him\nin the DEVELOPERS file for the wireguard package.\n\nAurélien, could you send such a patch? This way, you would receive\ne-mail notifications when there are build issues with this package.\n\nThanks a lot!\n\nThomas","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yScX142dWz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  3 Nov 2017 07:44:33 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D2F7E86237;\n\tThu,  2 Nov 2017 20:44:31 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 8JO65vbU9jaX; Thu,  2 Nov 2017 20:44:30 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 474DE85585;\n\tThu,  2 Nov 2017 20:44:30 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2B4381C3F97\n\tfor <buildroot@lists.busybox.net>;\n\tThu,  2 Nov 2017 20:44:28 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2534122EE9\n\tfor <buildroot@lists.busybox.net>;\n\tThu,  2 Nov 2017 20:44:28 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id l5E45JeOMFzx for <buildroot@lists.busybox.net>;\n\tThu,  2 Nov 2017 20:44:27 +0000 (UTC)","from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54])\n\tby silver.osuosl.org (Postfix) with ESMTP id 479EC22E34\n\tfor <buildroot@buildroot.org>; Thu,  2 Nov 2017 20:44:27 +0000 (UTC)","by mail.free-electrons.com (Postfix, from userid 110)\n\tid BC9B5208CF; Thu,  2 Nov 2017 21:44:25 +0100 (CET)","from windsurf (132.230.147.77.rev.sfr.net [77.147.230.132])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 5EBED207C5;\n\tThu,  2 Nov 2017 21:44:25 +0100 (CET)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","Date":"Thu, 2 Nov 2017 21:44:24 +0100","From":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>","To":"Peter Korsgaard <peter@korsgaard.com>","Message-ID":"<20171102214424.1f808662@windsurf>","In-Reply-To":"<87fub1clk4.fsf@dell.be.48ers.dk>","References":"<20170906202208.23404-1-aurelien@chabot.fr>\n\t<20170906202208.23404-2-aurelien@chabot.fr>\n\t<87fub1clk4.fsf@dell.be.48ers.dk>","Organization":"Free Electrons","X-Mailer":"Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu)","MIME-Version":"1.0","Subject":"Re: [Buildroot] [PATCH] wireguard: add new package","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Cc":"=?utf-8?b?QXVyw6lsaWVu?= Chabot <aurelien@chabot.fr>,\n\tbuildroot@buildroot.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}}]