unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 42193@debbugs.gnu.org
Subject: [bug#42193] [WIP 1/6] services: simulated-wifi: Use 'kernel-module-loader'.
Date: Sat,  4 Jul 2020 20:54:26 +0200	[thread overview]
Message-ID: <20200704185431.13739-2-brice@waegenei.re> (raw)
In-Reply-To: <20200704185234.12571-1-brice@waegenei.re>

* gnu/services/networking.scm (simulated-wifi-shepherd-services):
Change 'mac-simulation-module' service to use 'kernel-module-loader'.
---
 gnu/services/networking.scm | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 348dc369d8..353fdce2bb 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Sou Bunnbu <iyzsong@member.fsf.org>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu services)
   #:use-module (gnu services base)
   #:use-module (gnu services configuration)
+  #:use-module (gnu services linux)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services dbus)
   #:use-module (gnu system shadow)
@@ -1442,10 +1444,10 @@ simulation."
   (append (hostapd-shepherd-services config
                                      #:requirement
                                      '(unblocked-wifi
-                                       mac-simulation-module))
+                                       kernel-module-loader))
           (list (shepherd-service
                  (provision '(unblocked-wifi))
-                 (requirement '(file-systems mac-simulation-module))
+                 (requirement '(file-systems kernel-module-loader))
                  (documentation
                   "Unblock WiFi devices for use by mac80211_hwsim.")
                  (start #~(lambda _
@@ -1453,21 +1455,6 @@ simulation."
                                     "unblock" "0")
                             (invoke #$(file-append util-linux "/sbin/rfkill")
                                     "unblock" "1")))
-                 (one-shot? #t))
-                (shepherd-service
-                 (provision '(mac-simulation-module))
-                 (requirement '(file-systems))
-                 (modules '((guix build utils)))
-                 (documentation
-                  "Load the mac80211_hwsim Linux kernel module.")
-                 (start (with-imported-modules '((guix build utils))
-                          #~(lambda _
-                              ;; XXX: We can't use 'load-linux-module*' here because it
-                              ;; expects a flat module directory.
-                              (setenv "LINUX_MODULE_DIRECTORY"
-                                      "/run/booted-system/kernel/lib/modules")
-                              (invoke #$(file-append kmod "/bin/modprobe")
-                                      "mac80211_hwsim"))))
                  (one-shot? #t)))))
 
 (define simulated-wifi-service-type
@@ -1475,7 +1462,9 @@ simulation."
    (name 'simulated-wifi)
    (extensions
     (list (service-extension shepherd-root-service-type
-                             simulated-wifi-shepherd-services)))
+                             simulated-wifi-shepherd-services)
+          (service-extension kernel-module-loader-service-type
+                             (const '("mac80211_hwsim")))))
    (default-value (hostapd-configuration
                    (interface "wlan1")
                    (ssid "Test Network")))
-- 
2.26.2





  parent reply	other threads:[~2020-07-04 18:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200704185234.12571-1-brice@waegenei.re>
2020-07-04 18:54 ` [bug#42193] [WIP 1/6] services: simulated-wifi: Use 'kernel-module-loader' Brice Waegeneire
2020-07-04 18:54 ` Brice Waegeneire [this message]
2020-07-06 11:08   ` Danny Milosavljevic
2020-07-06 12:31     ` Brice Waegeneire
2020-07-04 18:54 ` [bug#42193] [WIP 2/6] services: Add 'kernel-profile-service-type' Brice Waegeneire
2020-07-08 11:29   ` pelzflorian (Florian Pelz)
2020-07-08 16:22     ` Brice Waegeneire
2020-07-11 17:30       ` pelzflorian (Florian Pelz)
2020-07-04 18:54 ` [bug#42193] [WIP 3/6] services: Add 'modprobe-service-type' Brice Waegeneire
2020-07-04 18:54 ` [bug#42193] [WIP 4/6] services: kernel-module-loader: Return a single 'shepherd-service' Brice Waegeneire
2020-07-06  0:03   ` Danny Milosavljevic
2020-07-06 10:01     ` Brice Waegeneire
2020-07-17 18:49   ` Danny Milosavljevic
2021-01-06 18:20     ` Danny Milosavljevic
2020-07-04 18:54 ` [bug#42193] [WIP 5/6] WIP services: Add kernel-arguments-service-type Brice Waegeneire
2020-07-04 18:54 ` [bug#42193] [WIP 6/6] WIP services: Add kernel-module-configuration service Brice Waegeneire

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=20200704185431.13739-2-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=42193@debbugs.gnu.org \
    /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).