From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8CfiKOoxB2SdIgEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:45:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2ASqKOoxB2R1kAAAauVa8A (envelope-from ) for ; Tue, 07 Mar 2023 13:45:30 +0100 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 640AFC2FA for ; Tue, 7 Mar 2023 13:45:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWgj-0001OW-42; Tue, 07 Mar 2023 07:45:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZWgh-0001Ke-AN for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZWgh-0003EJ-18 for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZWgg-0002BT-RU for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH v3 2/8] services: network-manager: Deprecate 'iwd?' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: ludo@gnu.org, Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.16781930648267 (code B ref 61587); Tue, 07 Mar 2023 12:45:02 +0000 Received: (at 61587) by debbugs.gnu.org; 7 Mar 2023 12:44:24 +0000 Received: from localhost ([127.0.0.1]:44717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg3-00029C-Kz for submit@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:24 -0500 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:55220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg1-00028r-BT for 61587@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:22 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id DAC5A20600; Tue, 7 Mar 2023 13:44:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8CCBE800B4; Tue, 7 Mar 2023 13:44:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Bda9B0ncRXjN; Tue, 7 Mar 2023 13:44:19 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 14BFC800B2; Tue, 7 Mar 2023 13:44:19 +0100 (CET) From: Bruno Victal Date: Tue, 7 Mar 2023 12:43:59 +0000 Message-Id: <8c5655db8e1f5025a20af9f2de9bd4f91ef8afaa.1678193024.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: <6d50c6d0cf8bc441bd9f38a0e2c02613b0a90d19.1678193024.git.mirai@makinata.eu> References: <6d50c6d0cf8bc441bd9f38a0e2c02613b0a90d19.1678193024.git.mirai@makinata.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678193130; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=RiF6YMHcJc+OSJbKLkOp9lF1BhGICjX4KKOV8F/Xick=; b=UbMWmJetizUY6EjghgvTM1y7m7PF9NZEwEXpolejRlnM2iJjuxLMx1fLFJU0mSPv/z/2ez RoDxpgrRX8MmTvidW8efyBAvfhtvqNX6Jg5GFv14cZ1AJpbAN/5XCN3ksANoqn0/RsRHa8 pQ43rXYw84b78TASL2i0iz0E2pNmMZoEf1pUwEA+SeeU3oz6HGFmHuetjtGSRNL5SV16a5 qenQw9mY+6iRbFjhPaWs7zxWPA/Ywq5/7SVc8NWNIMbnvsGAej2xbDbCkNNT+Wxy1xffKL IvUEObbwEe6qwKA9ICWTwoKBdBe2IQ6p3ZjyMiO+8SVKtyuhjgo3g/IUn38gug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678193130; a=rsa-sha256; cv=none; b=FI5E+i9Nw9vxcXPZF1k1WvWWRs3pVv6HiTg3R+wWtsn+3kQ1D+JBF37XHvHw88ToPTbDIa N4a03oO3MIl5ICw06EOdMuFez//+RpW6xr78PZBDddUQ8xSard1PvpuEd5t/61nkSUCbGD dBC2NvywjjuIEpjs41ZA6y+Hucv9wYdq9qKSxN5gLPIuVi9loy6i49M3nOFUeBrIckIYUz 9d9ZQSLZxnNJhZ18nPtKcGbpYFs6d+B4aPxwQzpu/tEJUxWb1axZYng3p0lrVDnVWYlZYt Zo+4NbkZXY1R2VtsDwKvJ6UBZZY8RvrDZ6RHfz8ZdP6QKSm/AMomGwugg6X9tQ== Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -0.21 X-Spam-Score: -0.21 X-Migadu-Queue-Id: 640AFC2FA X-Migadu-Scanner: scn1.migadu.com X-TUID: +RVhVNHTzfeP * gnu/services/networking.scm (warn-iwd?-field-deprecation): New procedure, helper for deprecated field. ()[iwd?]: Use helper to warn deprecated field. (network-manager-shepherd-service): Make iwd? a local variable independent from the deprecated field. * doc/guix.texi (Networking Setup): Remove mention of iwd? field. --- doc/guix.texi | 4 ---- gnu/services/networking.scm | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ed518cbcb8..ccaca0a71b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19890,10 +19890,6 @@ Networking Setup (VPNs). An example of this is the @code{network-manager-openvpn} package, which allows NetworkManager to manage VPNs @i{via} OpenVPN. -@item @code{iwd?} (default: @code{#f}) -NetworkManager will use iwd as a backend for wireless networking if this -option is set to @code{#t}, otherwise it will use wpa-supplicant. - @end table @end deftp diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 4a3d5b887f..f572de1279 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1136,6 +1136,15 @@ (define-record-type* ;;; NetworkManager ;;; +;; TODO: deprecated field, remove later. +(define-with-syntax-properties (warn-iwd?-field-deprecation + (value properties)) + (when value + (warning (source-properties->location properties) + (G_ "the 'iwd?' field is deprecated, please use \ +'shepherd-requirement' field instead~%"))) + value) + (define-record-type* network-manager-configuration make-network-manager-configuration network-manager-configuration? @@ -1147,7 +1156,9 @@ (define-record-type* (default "default")) (vpn-plugins network-manager-configuration-vpn-plugins ;list of file-like (default '())) - (iwd? network-manager-configuration-iwd? (default #f))) + (iwd? network-manager-configuration-iwd? ; TODO: deprecated field, remove. + (default #f) + (sanitize warn-iwd?-field-deprecation))) (define (network-manager-activation config) ;; Activation gexp for NetworkManager @@ -1204,7 +1215,10 @@ (define (network-manager-environment config) (define (network-manager-shepherd-service config) (match-record config (network-manager shepherd-requirement dns vpn-plugins iwd?) - (let ((conf (plain-file "NetworkManager.conf" + (let ((iwd? (or iwd? ; TODO: deprecated field, remove later. + (and shepherd-requirement + (memq 'iwd shepherd-requirement)))) + (conf (plain-file "NetworkManager.conf" (string-append "[main]\ndns=" dns "\n" (if iwd? "[device]\nwifi.backend=iwd\n" "")))) @@ -1214,6 +1228,8 @@ (define (network-manager-shepherd-service config) (provision '(networking)) (requirement `(user-processes dbus-system loopback ,@shepherd-requirement + ;; TODO: iwd? is deprecated and should be passed + ;; with shepherd-requirement, remove later. ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$network-manager -- 2.39.1