From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:57882) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSoFv-000095-KJ for guix-patches@gnu.org; Sun, 26 Apr 2020 16:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSoFu-0006yc-RA for guix-patches@gnu.org; Sun, 26 Apr 2020 16:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSoFu-0006yW-Er for guix-patches@gnu.org; Sun, 26 Apr 2020 16:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSoFu-0008CO-Cn for guix-patches@gnu.org; Sun, 26 Apr 2020 16:52:02 -0400 Subject: [bug#40683] [PATCH v4] 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-Message-ID: From: Brice Waegeneire Date: Sun, 26 Apr 2020 22:51:02 +0200 Message-Id: <20200426205102.5782-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40683@debbugs.gnu.org Cc: leo@famulari.name * gnu/packages/vpn.scm (wireguard-linux-compat)[build-system]: Replace 'gnu-build-system' by 'linux-module-build-system'. [outputs]: Add 'kernel-patch'. [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. --- Put patch in 'kernel-patch' output. gnu/packages/vpn.scm | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 739522959c..8c69b4be51 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,24 @@ 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) + (outputs '("out" + "kernel-patch")) (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 +492,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")) + (assoc-ref %outputs "kernel-patch")) #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 -- 2.26.0