From patchwork Fri Apr 24 19:51:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 21457 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 278B527BBE4; Fri, 24 Apr 2020 20:53:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D013727BBE1 for ; Fri, 24 Apr 2020 20:53:14 +0100 (BST) Received: from localhost ([::1]:51200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jS4Nu-0008Pn-A3 for patchwork@mira.cbaines.net; Fri, 24 Apr 2020 15:53:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59956) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jS4Np-0008PY-DN for guix-patches@gnu.org; Fri, 24 Apr 2020 15:53:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jS4Ni-0005Vm-8R for guix-patches@gnu.org; Fri, 24 Apr 2020 15:53:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jS4Nh-0005Vh-S4 for guix-patches@gnu.org; Fri, 24 Apr 2020 15:53:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jS4Nh-0005sw-Ol for guix-patches@gnu.org; Fri, 24 Apr 2020 15:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40683] [PATCH v3] gnu: Add loadable module to wireguard-linux-compat. References: <20200417155855.6210-1-brice@waegenei.re> In-Reply-To: <20200417155855.6210-1-brice@waegenei.re> Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Apr 2020 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40683 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40683@debbugs.gnu.org Cc: me@tobias.gr, leo@famulari.name Received: via spool by 40683-submit@debbugs.gnu.org id=B40683.158775793622571 (code B ref 40683); Fri, 24 Apr 2020 19:53:01 +0000 Received: (at 40683) by debbugs.gnu.org; 24 Apr 2020 19:52:16 +0000 Received: from localhost ([127.0.0.1]:58003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jS4Mt-0005rt-3i for submit@debbugs.gnu.org; Fri, 24 Apr 2020 15:52:16 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jS4Mq-0005re-6S for 40683@debbugs.gnu.org; Fri, 24 Apr 2020 15:52:10 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 5F9331BF204; Fri, 24 Apr 2020 19:51:59 +0000 (UTC) From: Brice Waegeneire Date: Fri, 24 Apr 2020 21:51:55 +0200 Message-Id: <20200424195155.23535-1-brice@waegenei.re> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/vpn.scm (wireguard-linux-compat)[build-system]: Replace 'gnu-build-system' by 'linux-module-build-system'. [arguments]: Adjust the build system. Add phase 'change-directory'. Rename phases 'build' to 'build-patch' and 'install' to 'install-patch'. [description]: Mention the loadable module. --- This version of the patch merge the now defunct 'wireguard-linux-module' into 'wireguard-linux-compat' -- hoping that it's less confusing for users. gnu/packages/vpn.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 739522959c..6bcce8fe52 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2019, 2020 Leo Famulari ;;; Copyright © 2019 Rutger Helling ;;; Copyright © 2019 Ricardo Wurmus +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system linux-module) #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -465,19 +467,22 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers (sha256 (base32 "0ymprz3h4b92wlcqm5k5vmcgap8pjv202bgkdx0axmp12n1lmyvx")))) - (build-system gnu-build-system) + (build-system linux-module-build-system) (arguments `(#:tests? #f ; No test suite - #:modules ((guix build gnu-build-system) + #:modules ((guix build linux-module-build-system) (guix build utils) (ice-9 popen) (ice-9 textual-ports)) #:phases (modify-phases %standard-phases - (delete 'configure) ; No ./configure script - (replace 'build + (add-before 'build 'change-directory + (lambda _ + (chdir "./src") + #t)) + (add-after 'build 'build-patch (lambda* (#:key outputs #:allow-other-keys) - (let* ((patch-builder "./kernel-tree-scripts/create-patch.sh") + (let* ((patch-builder "../kernel-tree-scripts/create-patch.sh") (port (open-input-pipe patch-builder)) (str (get-string-all port))) (close-pipe port) @@ -485,15 +490,16 @@ The peer-to-peer VPN implements a Layer 2 (Ethernet) network between the peers (lambda (port) (format port "~a" str)))) #t)) - (replace 'install + (add-after 'install 'install-patch (lambda* (#:key outputs #:allow-other-keys) (install-file "wireguard.patch" (assoc-ref %outputs "out")) #t))))) (home-page "https://git.zx2c4.com/wireguard-linux-compat/") (synopsis "WireGuard kernel module for Linux 3.10 through 5.5") - (description "This is an out-of-tree Linux kernel patch adding WireGuard to -kernel versions 3.10 through 5.5. WireGuard was added to Linux 5.6.") + (description "This package contains an out-of-tree kernel patch and +a loadable module adding WireGuard to Linux kernel versions 3.10 through 5.5. +WireGuard was added to Linux 5.6.") (license license:gpl2))) (define-public wireguard-tools