From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:33354) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSoe7-0003Sa-Ho for guix-patches@gnu.org; Sun, 26 Apr 2020 17:17:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSoe6-0002d5-PC for guix-patches@gnu.org; Sun, 26 Apr 2020 17:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSoe6-0002d0-CC for guix-patches@gnu.org; Sun, 26 Apr 2020 17:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSoe6-0000Nl-7o for guix-patches@gnu.org; Sun, 26 Apr 2020 17:17:02 -0400 Subject: [bug#40683] [PATCH v4] gnu: Add loadable module to wireguard-linux-compat. Resent-Message-ID: Date: Sun, 26 Apr 2020 17:16:36 -0400 From: Leo Famulari Message-ID: <20200426211636.GA23689@jasmine.lan> References: <20200426205102.5782-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20200426205102.5782-1-brice@waegenei.re> 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: Brice Waegeneire Cc: 40683@debbugs.gnu.org --uQr8t48UFsdbeI+V Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 26, 2020 at 10:51:02PM +0200, Brice Waegeneire wrote: > * 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. Thanks! I've attached a v5 that ensures the license files still get installed. Does it work for you? --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-Add-loadable-module-to-wireguard-linux-compat.patch" Content-Transfer-Encoding: quoted-printable =46rom 2e28a69dc384880cf858e4c402588ccd0bfd84fa Mon Sep 17 00:00:00 2001 =46rom: Brice Waegeneire Date: Sun, 26 Apr 2020 22:51:02 +0200 Subject: [PATCH] gnu: Add loadable module to wireguard-linux-compat. * 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. Signed-off-by: Leo Famulari --- gnu/packages/vpn.scm | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 739522959c..a9e20049c6 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -11,6 +11,7 @@ ;;; Copyright =A9 2019, 2020 Leo Famulari ;;; Copyright =A9 2019 Rutger Helling ;;; Copyright =A9 2019 Ricardo Wurmus +;;; Copyright =A9 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,21 @@ 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)) + ;; So that 'install-license-files' works... + (add-before 'install-license-files 'reset-cwd + (lambda _ + (chdir "..") #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 WireGua= rd 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= =2E5. +WireGuard was added to Linux 5.6.") (license license:gpl2))) =20 (define-public wireguard-tools --=20 2.26.2 --ZPt4rx8FFjLCG7dd-- --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl6l+jEACgkQJkb6MLrK fwg4lA/8CnN2S3RXNipGkgvF8UbKR5oHQM1jEdjac+CBra9Q19b6Pr2L6DcEw26g z728KWT0lKJvmmQVEYFIVRjdXCs9R/ClFOAJrEvTzYmaJpZIkndZPZAtrLhDKUUX q8soxOFCxFFecezaKV11zPZJtCWsPSkAKvjYjG/yldiXHDMVBGd3UGwLUkO21VT9 kP8RX/g0nFsS1Dt8YA/X7dTfwmfEamby8WmGvk1M237oqW27AH8U6ce/nYZZ3TeL tKufsO0O02DyC6dFEGmhKQUhVE7pe7xh7KUOg6rbWgryRoGlfXV5tGwT3Exxs5dB ohwhsenNqTypvsHaFzfuNc7RGl2Uo6tLAsXZ9GdZdMGJEQ2CoqrQ3jEkJ9v/AwWR 3vNWTlp5DL9FZUJq/pucAwAJ4hV/PYaL71KsZFhnhUobLSmk3+ylVctjtWJJuGd3 VeUMCVZ4ByrTAOHwQFPVL44yuvfdl2AUZgRYQyIFVS53P+0ojSaMbV69c7fHqc5V aWRs4LR/5lekSyRmHgif3b6WT1cugmHz72IXfmYMscNKQL76+eBiCPrvFaO0gYQQ g/P7qnHSZSpVEMbyfAaoc6vB8fyXp7oJ6iTGKCyA1UAgY1L2SHHhwPOGsnzksJQZ vQp7LQW+wz1Slr/Owa0qVwTynEej9MTVJ+HcsL+AJNfTeFC/bQI= =rp5I -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V--