From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aJ8bLZLQAF9bWgAA0tVLHw (envelope-from ) for ; Sat, 04 Jul 2020 18:55:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +Nf8KJLQAF+EEgAA1q6Kng (envelope-from ) for ; Sat, 04 Jul 2020 18:55:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E1549409D3 for ; Sat, 4 Jul 2020 18:55:14 +0000 (UTC) Received: from localhost ([::1]:46868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrnJh-0006eI-7y for larch@yhetil.org; Sat, 04 Jul 2020 14:55:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJY-0006bG-DX for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrnJY-0006qT-4k for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrnJY-0005Ha-3p for guix-patches@gnu.org; Sat, 04 Jul 2020 14:55:04 -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:04 +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.159388888620238 (code B ref -1); Sat, 04 Jul 2020 18:55:04 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jul 2020 18:54:46 +0000 Received: from localhost ([127.0.0.1]:59631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnJF-0005GG-GD for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:54:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:45506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnJC-0005FV-Uk for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:54:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJC-0006TV-Md for guix-patches@gnu.org; Sat, 04 Jul 2020 14:54:42 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:40309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrnJ8-0006nC-Tp for guix-patches@gnu.org; Sat, 04 Jul 2020 14:54:42 -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 relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3675AE0002 for ; Sat, 4 Jul 2020 18:54:35 +0000 (UTC) From: Brice Waegeneire Date: Sat, 4 Jul 2020 20:54:26 +0200 Message-Id: <20200704185431.13739-2-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.196; envelope-from=brice@waegenei.re; helo=relay4-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 14:54:36 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.6 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: xwp7lHOaS7OA * 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"))) -- 2.26.2