From patchwork Mon Feb 25 01:15:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 1237 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0E8C116CAD; Mon, 25 Feb 2019 01:16:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7B8EA16CAA for ; Mon, 25 Feb 2019 01:16:14 +0000 (GMT) Received: from localhost ([127.0.0.1]:58258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gy4sQ-0006je-2n for patchwork@mira.cbaines.net; Sun, 24 Feb 2019 20:16:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gy4sG-0006gZ-7d for guix-patches@gnu.org; Sun, 24 Feb 2019 20:16:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gy4sE-0000YW-NO for guix-patches@gnu.org; Sun, 24 Feb 2019 20:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gy4sE-0000XV-8q for guix-patches@gnu.org; Sun, 24 Feb 2019 20:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gy4sE-0007pu-4z for guix-patches@gnu.org; Sun, 24 Feb 2019 20:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34643] [PATCH 1/2] gnu: Add WireGuard. References: <20190225011257.GA30833@jasmine.lan> In-Reply-To: <20190225011257.GA30833@jasmine.lan> Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Feb 2019 01:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34643 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 34643@debbugs.gnu.org Received: via spool by 34643-submit@debbugs.gnu.org id=B34643.155105732330069 (code B ref 34643); Mon, 25 Feb 2019 01:16:02 +0000 Received: (at 34643) by debbugs.gnu.org; 25 Feb 2019 01:15:23 +0000 Received: from localhost ([127.0.0.1]:50695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gy4rU-0007oj-83 for submit@debbugs.gnu.org; Sun, 24 Feb 2019 20:15:23 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gy4rR-0007oN-Qx for 34643@debbugs.gnu.org; Sun, 24 Feb 2019 20:15:14 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C561722155; Sun, 24 Feb 2019 20:15:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 24 Feb 2019 20:15:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mesmtp; bh=f3D/xX59tMfD4xhvEx9SVmr Hh8G3W7PKt4ad2SSJlSA=; b=I9fj9N2dCB/ktoxuLIAR+LX2veiLUuvpIdRq+4e SvTot/rauLwfMUshrttrtSR/pbn4Tqd5R+nTx8wp9VTYVi35UlkT8kQMGq2v5mV/ Arz9pnCo9k3c9gw/WOlQQnbjUqBacGbEgwd5QloLMIZmN8G24au0iRoWJ7H/n0Sv Qerk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=f3D/xX 59tMfD4xhvEx9SVmrHh8G3W7PKt4ad2SSJlSA=; b=I0VevyIEbnvsWEsuVuBxi4 fVMDDOvQDOf+Xad3OfE28Oa5bkgZNXNytPuDAak4DqjQGIVscxIz+5yAMywkBq2f 3fMaSz6kKeBTlbQobJSU45MXS9ldY60l6wigfVIb62rfZMYmBkiBv1J/lQU60V2L 1ij5ueJqM4oVFA4Ap7WA1JELOotZ/8vrU3YbbSawh8MQ4xv3OJqsO2zU+jvKVSVj Yr7pmBTsMX8DeL9+t3yawdfJxC7D2hLif884pMX83ivpFc/uoUk8Bll0FKjjzxqJ VoJdgW3ugZhaH9abwhBh6Hy4WYghKxwu88XgxPsOWpj358jeRp/xvzGSXxli8sRw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrudehgddvleculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofggtgfgsehtkeertd ertdejnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucffohhmrghinhepfihirhgvghhurghrugdrtghomhdpshhouhhrtg gvfhhorhhgvgdrnhgvthdpiiigvdgtgedrtghomhenucfkphepjedurddutdehrddvtddt rdejvdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrg hmvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from jasmine.lan (pool-71-105-200-72.nycmny.fios.verizon.net [71.105.200.72]) by mail.messagingengine.com (Postfix) with ESMTPA id E3C01E40C2 for <34643@debbugs.gnu.org>; Sun, 24 Feb 2019 20:15:07 -0500 (EST) From: Leo Famulari Date: Sun, 24 Feb 2019 20:15:02 -0500 Message-Id: <9b27f8b284f9f92f7bbc8c8edc7dbadd54a5035d.1551057302.git.leo@famulari.name> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (wireguard): New variable. --- gnu/packages/linux.scm | 50 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6463510eeb..983e335e30 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2016, 2018 Rene Saavedra ;;; Copyright © 2016 Carlos Sánchez de La Lama ;;; Copyright © 2016, 2017 Nils Gillmann -;;; Copyright © 2017, 2018 Leo Famulari +;;; Copyright © 2017, 2018, 2019 Leo Famulari ;;; Copyright © 2017 José Miguel Sánchez García ;;; Copyright © 2017 Gábor Boskovits ;;; Copyright © 2017 Mathieu Othacehe @@ -5132,3 +5132,51 @@ the correct permissions and ownership, and then pack them up, or one would have to construct the archives directly, without using the archiver.") (home-page "http://freshmeat.sourceforge.net/projects/fakeroot") (license license:gpl3+))) + +(define-public wireguard + (package + (name "wireguard") + (version "0.0.20190123") + (source (origin + (method url-fetch) + (uri (string-append "https://git.zx2c4.com/WireGuard/snapshot/" + "WireGuard-" version ".tar.xz")) + (sha256 + (base32 + "16yzzy4i0z2zslmyr3kppkvkrxryzwdil6v270w9w5mg65v3rlgd")))) + (build-system gnu-build-system) + (outputs '("out" ; The WireGuard userspace tools + "kernel-patch")) ; A patch to build Linux with WireGuard support + (arguments + `(#:make-flags + (list "CC=gcc" + "WITH_BASHCOMPLETION=yes" + ;; Build and install the helper script wg-quick(8). + "WITH_WGQUICK=yes" + (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "SYSCONFDIR=" (assoc-ref %outputs "out") "/etc")) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; No ./configure script + (add-after 'unpack 'make-patch + (lambda* (#:key outputs #:allow-other-keys) + (let* ((output (assoc-ref outputs "kernel-patch")) + (patch-file (string-append output "/wireguard.patch")) + (patch-builder "./contrib/kernel-tree/create-patch.sh")) + (mkdir-p output) + ;; XXX Do this in Scheme? + (zero? (system (string-append "bash " patch-builder " > " patch-file))) + #t))) + (add-after 'make-patch 'chdir + (lambda _ + (chdir "src/tools") + #t))))) + (inputs + `(("libmnl" ,libmnl))) + (home-page "https://www.wireguard.com/") + (synopsis "Tools for configuring WireGuard") + (description "This package provides the userspace tools for setting and +retrieving configuration of WireGuard network tunnel interfaces, and a patch +that can be applied to a Linux kernel source tree in order to build it with +WireGuard support.") + (license license:gpl2)))