Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] package/wireguard-linux-compat: new package
Date: Thu,  9 Jan 2020 10:16:19 +0100	[thread overview]
Message-ID: <20200109091620.21008-3-peter@korsgaard.com> (raw)
In-Reply-To: <20200109091620.21008-1-peter@korsgaard.com>

With the kernel support for WireGuard getting mainlined, the upstream repo
has been split in a wireguard-tools repo for the userspace tooling and
wireguard-linux-compat for the kernel side (for 3.10+ legacy kernels).

Add a wireguard-linux-compat for the compatibility out-of-tree kernel
module, and update the Config.in.legacy handling to use it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
Changes since v1:
- Add Config.in.legacy handling

 Config.in.legacy                              |  6 +++--
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/wireguard-linux-compat/Config.in      | 23 +++++++++++++++++++
 .../wireguard-linux-compat.hash               |  4 ++++
 .../wireguard-linux-compat.mk                 | 15 ++++++++++++
 6 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 package/wireguard-linux-compat/Config.in
 create mode 100644 package/wireguard-linux-compat/wireguard-linux-compat.hash
 create mode 100644 package/wireguard-linux-compat/wireguard-linux-compat.mk

diff --git a/Config.in.legacy b/Config.in.legacy
index b9bb1aa57d..1801ec06da 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -150,10 +150,12 @@ config BR2_PACKAGE_WIREGUARD
 	bool "wireguard package renamed"
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
 	select BR2_LEGACY
+	select BR2_PACKAGE_WIREGUARD_LINUX_COMPAT if BR2_LINUX_KERNEL
 	select BR2_PACKAGE_WIREGUARD_TOOLS
 	help
-	  The wireguard package has been renamed to wireguard-tools to
-	  match upstream.
+	  The wireguard package has been renamed to wireguard-tools
+	  for the userspace tooling and wireguard-linux-compat for the
+	  kernel side for legacy (<5.6) kernels to match upstream.
 
 config BR2_PACKAGE_PERL_NET_PING
 	bool "perl-net-ping was removed"
diff --git a/DEVELOPERS b/DEVELOPERS
index 66dc7cf4c2..80843dd1a1 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1945,6 +1945,7 @@ F:	package/python-websocket-client/
 F:	package/sedutil/
 F:	package/tpm2-totp/
 F:	package/triggerhappy/
+F:	package/wireguard-linux-compat/
 F:	package/wireguard-tools/
 F:	support/testing/tests/package/test_docker_compose.py
 
diff --git a/package/Config.in b/package/Config.in
index 170a1c986d..873a592d64 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2176,6 +2176,7 @@ endif
 	source "package/wavemon/Config.in"
 	source "package/wget/Config.in"
 	source "package/whois/Config.in"
+	source "package/wireguard-linux-compat/Config.in"
 	source "package/wireguard-tools/Config.in"
 	source "package/wireless-regdb/Config.in"
 	source "package/wireless_tools/Config.in"
diff --git a/package/wireguard-linux-compat/Config.in b/package/wireguard-linux-compat/Config.in
new file mode 100644
index 0000000000..4ee214be63
--- /dev/null
+++ b/package/wireguard-linux-compat/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_WIREGUARD_LINUX_COMPAT
+	bool "wireguard linux-compat"
+	depends on BR2_LINUX_KERNEL
+	# kernel module requires 3.10+
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	help
+	  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.
+
+	  Support for WireGuard is included in Linux 5.6+. This
+	  package provides a backport of the kernel support for older
+	  kernels.
+
+	  https://www.wireguard.com
+
+comment "wireguard-linux-compat needs a toolchain w/ headers >= 3.10"
+	depends on BR2_LINUX_KERNEL && !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.hash b/package/wireguard-linux-compat/wireguard-linux-compat.hash
new file mode 100644
index 0000000000..1653eaa089
--- /dev/null
+++ b/package/wireguard-linux-compat/wireguard-linux-compat.hash
@@ -0,0 +1,4 @@
+# https://lists.zx2c4.com/pipermail/wireguard/2020-January/004844.html
+sha256 9f12f68e96f6865325995c38213e09b05751cd1ef03e0bbc9f1bdc3e5680b337  wireguard-linux-compat-0.0.20200105.tar.xz
+# Locally calculated
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.mk b/package/wireguard-linux-compat/wireguard-linux-compat.mk
new file mode 100644
index 0000000000..ddceed5660
--- /dev/null
+++ b/package/wireguard-linux-compat/wireguard-linux-compat.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# wireguard
+#
+################################################################################
+
+WIREGUARD_LINUX_COMPAT_VERSION = 0.0.20200105
+WIREGUARD_LINUX_COMPAT_SITE = https://git.zx2c4.com/wireguard-linux-compat/snapshot
+WIREGUARD_LINUX_COMPAT_SOURCE = wireguard-linux-compat-$(WIREGUARD_LINUX_COMPAT_VERSION).tar.xz
+WIREGUARD_LINUX_COMPAT_LICENSE = GPL-2.0
+WIREGUARD_LINUX_COMPAT_LICENSE_FILES = COPYING
+WIREGUARD_LINUX_COMPAT_MODULE_SUBDIRS = src
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
-- 
2.20.1

  parent reply	other threads:[~2020-01-09  9:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  9:16 [Buildroot] [PATCH v2 0/2] package/wireguard upgrade Peter Korsgaard
2020-01-09  9:16 ` [Buildroot] [PATCH v2 1/2] package/wireguard: change to the wireguard-tools package Peter Korsgaard
2020-01-09  9:16 ` Peter Korsgaard [this message]
2020-01-09 17:00 ` [Buildroot] [PATCH v2 0/2] package/wireguard upgrade Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109091620.21008-3-peter@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox