unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 40683@debbugs.gnu.org
Cc: me@tobias.gr, leo@famulari.name
Subject: [bug#40683] [PATCH v3] gnu: Add loadable module to wireguard-linux-compat.
Date: Fri, 24 Apr 2020 21:51:55 +0200	[thread overview]
Message-ID: <20200424195155.23535-1-brice@waegenei.re> (raw)
In-Reply-To: <20200417155855.6210-1-brice@waegenei.re>

* 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 <leo@famulari.name>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; 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
-- 
2.26.0

  parent reply	other threads:[~2020-04-24 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 15:58 [bug#40683] [PATCH] gnu: Add wireguard-module Brice Waegeneire
2020-04-17 16:47 ` Tobias Geerinckx-Rice via Guix-patches via
2020-04-23 12:34 ` [bug#40683] [PATCH v2] gnu: Add wireguard-linux-module Brice Waegeneire
2020-04-23 17:03   ` Leo Famulari
2020-04-23 12:44 ` [bug#40683] Re: [bug#40683] [PATCH] gnu: Add wireguard-module Brice Waegeneire
2020-04-24 19:51 ` Brice Waegeneire [this message]
2020-04-26 20:51 ` [bug#40683] [PATCH v4] gnu: Add loadable module to wireguard-linux-compat Brice Waegeneire
2020-04-26 21:16   ` Leo Famulari
2020-04-26 22:25     ` bug#40683: " Leo Famulari

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20200424195155.23535-1-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=40683@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=me@tobias.gr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).