From patchwork Sat Jul 4 18:54:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 23050 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 496EA27BBE3; Sat, 4 Jul 2020 19:55:16 +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, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 237DB27BBE4 for ; Sat, 4 Jul 2020 19:55:11 +0100 (BST) Received: from localhost ([::1]:46830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrnJe-0006bJ-Gl for patchwork@mira.cbaines.net; Sat, 04 Jul 2020 14:55:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJW-0006YR-QB for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrnJW-0006q9-GG for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrnJW-0005H6-ER for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42193] [WIP 1/6] services: simulated-wifi: Use 'kernel-module-loader'. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jul 2020 18:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42193 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 42193@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159388888220169 (code B ref -1); Sat, 04 Jul 2020 18:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jul 2020 18:54:42 +0000 Received: from localhost ([127.0.0.1]:59617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnJB-0005FD-Kj for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:54:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:45496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnJA-0005F6-1I for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:54:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJ9-0006S8-Or for guix-patches@gnu.org; Sat, 04 Jul 2020 14:54:39 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:41537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJ7-0006n8-Jd for guix-patches@gnu.org; Sat, 04 Jul 2020 14:54:39 -0400 X-Originating-IP: 176.181.186.101 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@waegenei.re) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 2C1CBC0003 for ; Sat, 4 Jul 2020 18:54:34 +0000 (UTC) From: Brice Waegeneire Date: Sat, 4 Jul 2020 20:54:25 +0200 Message-Id: <20200704185431.13739-1-brice@waegenei.re> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200704185234.12571-1-brice@waegenei.re> References: <20200704185234.12571-1-brice@waegenei.re> MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.198; envelope-from=brice@waegenei.re; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 14:54:35 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/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 ;;; Copyright © 2019 Sou Bunnbu ;;; Copyright © 2019 Alex Griffin +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; 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")))