From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 0H1zLwkzB2R+HQEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:50:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mM5uLwkzB2R84wAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 13:50:17 +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 7DFC0CC13 for ; Tue, 7 Mar 2023 13:50:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWlZ-0003vr-0N; Tue, 07 Mar 2023 07:50: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 1pZWlX-0003v4-Bj for guix-patches@gnu.org; Tue, 07 Mar 2023 07:50: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 1pZWlX-0004AZ-3F for guix-patches@gnu.org; Tue, 07 Mar 2023 07:50:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZWlW-0002Od-U4 for guix-patches@gnu.org; Tue, 07 Mar 2023 07:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH v3 5/8] services: connman: Deprecate 'iwd?' field. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 12:50: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.16781933719139 (code B ref 61587); Tue, 07 Mar 2023 12:50:02 +0000 Received: (at 61587) by debbugs.gnu.org; 7 Mar 2023 12:49:31 +0000 Received: from localhost ([127.0.0.1]:44742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWl1-0002NL-IG for submit@debbugs.gnu.org; Tue, 07 Mar 2023 07:49:31 -0500 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:42792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWkz-0002ND-La for 61587@debbugs.gnu.org; Tue, 07 Mar 2023 07:49:30 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id A4DE720A0A; Tue, 7 Mar 2023 13:49:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id CAC9A800B5; Tue, 7 Mar 2023 13:44:20 +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 oH2fEXyezFpK; Tue, 7 Mar 2023 13:44:20 +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 4B41C800AA; Tue, 7 Mar 2023 13:44:20 +0100 (CET) From: Bruno Victal Date: Tue, 7 Mar 2023 12:44:02 +0000 Message-Id: <8f687a369c103cafa671284edcaecc9fa0b2766c.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=1678193417; 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=BUK0M7kqCAIR+838lHDjsjt3EYF2usgpeYujWjgsCmA=; b=eNfGpltKVUJoc6vn2IyR5CjIqWMf8kv8cwXN5a9X/2RFYfzhU0i7VOe+FF+Ukd3lneJX1x Yg4GBllz4NZIgek1T7cNscvhrXL4k+DOyJ8WIDhYsAqHaHHHSbzVPM6+edchAGaUdCGu3v 1abVrBoSuSMwp1+MCYlrr0C/2yBFE2r7MkTZz/HU6MpLR+J80P8kgHlih8iXBRWjEJsl5o nE7c321+jeRWSwjweiXAMpCTKW8dC34oE5bZmgTwtFxEaStEo6xwheuZz7Ngrpy2ANLrVA oT2aODZk4RLyEyKyI+HEBbVay0Mzdo95l3+gsuF3c4KTDv/mF7D3maMoKFKSQg== 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=1678193417; a=rsa-sha256; cv=none; b=rdxjiyzmov4A4XIzaYAPsB2bxzBVOPsNp5R06uvsjM9rB0MG8w39ZOHUIAvAfy6tcnqLdS /a9yLzmSY0vj02AOOa6uNJ1dx79bg7sju3qPvpjqu3qnKwQO3jyZK/5uxmKWR289A5QOa9 3n9G7G7oytRYliyp6pWrXFVFDU4q6WSWZZzd/qAgP0U0IlY2K4Wgry7gEPhOnqf/+xNKDZ fGY/WYN4GgiBGQU3xWyJjDjohZq2pnUvQts21oVjGzx6sNh77QzDggglGDkjvdhq42bd6Y qJC7EO9jzpboNM2g9bvBjleB7P5pT/5bLppH8jZ25aXOYNRFmf3yW2OtakCdwA== 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: 7DFC0CC13 X-Migadu-Scanner: scn1.migadu.com X-TUID: P9rzfASm05QH * gnu/services/networking.scm () [iwd?]: Use helper to warn deprecated field. (connman-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 | 2 -- gnu/services/networking.scm | 50 +++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ece0c0354d..b098e45a50 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19926,8 +19926,6 @@ Networking Setup @item @code{disable-vpn?} (default: @code{#f}) When true, disable connman's vpn plugin. -@item @code{iwd?} (default: @code{#f}) -When true, ConnMan uses iwd to connect to wireless networks. @end table @end deftp diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 6a09f6e728..0ed467f9d8 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1294,7 +1294,8 @@ (define-record-type* (disable-vpn? connman-configuration-disable-vpn? (default #f)) (iwd? connman-configuration-iwd? - (default #f))) + (default #f) + (sanitize warn-iwd?-field-deprecation))) (define (connman-activation config) (let ((disable-vpn? (connman-configuration-disable-vpn? config))) @@ -1308,27 +1309,32 @@ (define (connman-activation config) (define (connman-shepherd-service config) (match-record config (connman shepherd-requirement disable-vpn? iwd?) - (list (shepherd-service - (documentation "Run Connman") - (provision '(networking)) - (requirement `(user-processes dbus-system loopback - ,@shepherd-requirement - ,@(if iwd? '(iwd) '()))) - (start #~(make-forkexec-constructor - (list (string-append #$connman - "/sbin/connmand") - "--nodaemon" - "--nodnsproxy" - #$@(if disable-vpn? '("--noplugin=vpn") '()) - #$@(if iwd? '("--wifi=iwd_agent") '())) - - ;; As connman(8) notes, when passing '-n', connman - ;; "directs log output to the controlling terminal in - ;; addition to syslog." Redirect stdout and stderr - ;; to avoid spamming the console (XXX: for some reason - ;; redirecting to /dev/null doesn't work.) - #:log-file "/var/log/connman.log")) - (stop #~(make-kill-destructor)))))) + (let ((iwd? (or iwd? ; TODO: deprecated field, remove later. + (and shepherd-requirement + (memq 'iwd shepherd-requirement))))) + (list (shepherd-service + (documentation "Run Connman") + (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 #$connman + "/sbin/connmand") + "--nodaemon" + "--nodnsproxy" + #$@(if disable-vpn? '("--noplugin=vpn") '()) + #$@(if iwd? '("--wifi=iwd_agent") '())) + + ;; As connman(8) notes, when passing '-n', connman + ;; "directs log output to the controlling terminal in + ;; addition to syslog." Redirect stdout and stderr + ;; to avoid spamming the console (XXX: for some reason + ;; redirecting to /dev/null doesn't work.) + #:log-file "/var/log/connman.log")) + (stop #~(make-kill-destructor))))))) (define %connman-log-rotation (list (log-rotation -- 2.39.1