From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EKs3CPacq2L/ZwEAbAwnHQ (envelope-from ) for ; Thu, 16 Jun 2022 23:13:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qJMbCPacq2JaGgAAauVa8A (envelope-from ) for ; Thu, 16 Jun 2022 23:13:26 +0200 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 87270EE7A for ; Thu, 16 Jun 2022 23:13:25 +0200 (CEST) Received: from localhost ([::1]:39436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1wnr-00041N-TN for larch@yhetil.org; Thu, 16 Jun 2022 17:13:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1wnW-00040j-Al for guix-patches@gnu.org; Thu, 16 Jun 2022 17:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1wnV-0000bD-PM for guix-patches@gnu.org; Thu, 16 Jun 2022 17:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1wnV-0004aK-Ic for guix-patches@gnu.org; Thu, 16 Jun 2022 17:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55659] [PATCH 1/2] services: ddclient: Fix extra-options serialization. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Jun 2022 21:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai Cc: 55659@debbugs.gnu.org Received: via spool by 55659-submit@debbugs.gnu.org id=B55659.165541392417552 (code B ref 55659); Thu, 16 Jun 2022 21:13:01 +0000 Received: (at 55659) by debbugs.gnu.org; 16 Jun 2022 21:12:04 +0000 Received: from localhost ([127.0.0.1]:43209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1wmY-0004Yl-0X for submit@debbugs.gnu.org; Thu, 16 Jun 2022 17:12:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1wmS-0004YR-UP for 55659@debbugs.gnu.org; Thu, 16 Jun 2022 17:12:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1wmM-0000QT-FR; Thu, 16 Jun 2022 17:11:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=tms1joojyKbZVGWAFmXmivD/rN5T122fWsN4rRlJFx4=; b=ZmuJJlUroKxO5fdZKq6N wihu1vGIAB8BTlFQ8gYBRIT/fowhABJlrmKNef7GliuvGseSx+BxsrCltPVK/v49sW46Q7k0K7Fwl GFaOTPNpmpNumSAb3CNlDteRgjUj7b2xAQgPoaa5nEuyyCK9UtzU+HynBmMc0LWaTdXb/W8ab0qtv v6gPcQVdpisGgn3tUXJinQAp/sxl1fSogZifkz3/R93NCHw53m2q2hXc8nCrbymD4j2xlOo09sxS6 YhIVxBMtyVGNuhoZU4q9RbBTXJ+YWHLRMpITujvZaTCJzoyGhSc/8brrs6K2VVa3YYrQ0pgLfA1my TtGwdVAN/gUq1Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60958 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1wmM-0001Np-0W; Thu, 16 Jun 2022 17:11:50 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220526130912.29483-1-attila@lendvai.name> Date: Thu, 16 Jun 2022 23:11:47 +0200 In-Reply-To: <20220526130912.29483-1-attila@lendvai.name> (Attila Lendvai's message of "Thu, 26 May 2022 15:09:12 +0200") Message-ID: <87mtecjoto.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655414006; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=tms1joojyKbZVGWAFmXmivD/rN5T122fWsN4rRlJFx4=; b=kCrkf63sPTbjKnwl43OrqwiFKYriUBISahkZIDf2j+L38ZzXjEeA7AMHdzGpxvVhLSIL4a tDsKFpHLxx6Qlzsu9HERbaBtYvh1d4A/BrwPMe6wELYB0vDBNWWmdVZxDUQB84Ljndjlf/ L3vioFeeQYhskPf7uvLvMg1x1HNUod5CmQdGGv8xr7b30WOocaLp1ShM1kfoyN9A4Sjpzt k6wTmd07wFizmeCXsDKcPPxvUBoMLQe2iwzS9qkLhco3SxNRy1qs5wbQ7cDk10P2QVGUJo o5KFA1JxRNd/On02q8I9HMdowGcZ+BRkXyTsiqMx38Q57hPK7Nuu1vhJG/t4fg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655414006; a=rsa-sha256; cv=none; b=dxG6JFzdUt7ohH2NfRMMyY7uYtUyqfzx65p1mbocy5adsNWkRP62FCm69DEP+odd3pEjAJ xdUjqeJ70hC2SXpGrzSfAewtCm1Lm8rq6zuhH4naKS7SCBqkqWBImMoLQew2wQysjkjlvB TyZm3zqB9F7S7rcUbRwbsCB33k8HN+9ZFs/7SYP7t+7GjXAfizu5jqiSjzefX1lugMk6Hf tAVLncRnjgmiZGdNVcJJPaj+zj0MsGJyq1oT5pHAjySajKPWKEVudswYtx7knvxQqaJ/CL nfSx+DlcB0Z0V0Ox0E3vncJ6GWzNf59yLtIfW9ALIejT3PgVxjIk6NkWEsBosQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZmuJJlUr; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -4.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZmuJJlUr; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 87270EE7A X-Spam-Score: -4.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: ixQ5GoiIpia6 Hi, Attila Lendvai skribis: > Prior to this fix it has serialized "extra-options=3D..." into the ddclie= nt.conf > file. [...] > (define (serialize-field field-name val) > - (when (not (member field-name '(group secret-file user))) > - (format #t "~a=3D~a\n" (uglify-field-name field-name) val))) > + (cond > + ((eq? field-name 'extra-options) > + (display val)) > + ((not (member field-name '(group secret-file user))) > + (format #t "~a=3D~a\n" (uglify-field-name field-name) val)))) >=20=20 > (define (serialize-boolean field-name val) > (serialize-field field-name (if val "yes" "no"))) > @@ -921,9 +924,6 @@ (define (serialize-string field-name val) > (define (serialize-list field-name val) > (if (null? val) "" (serialize-field field-name (string-join val)))) >=20=20 > -(define (serialize-extra-options extra-options) > - (string-join extra-options "\n" 'suffix)) > - > (define-configuration ddclient-configuration > (ddclient > (file-like ddclient) > @@ -959,8 +959,8 @@ (define-configuration ddclient-configuration > file contains credentials for use by ddclient. You are expected to crea= te it > manually.") > (extra-options > - (list '()) > - "Extra options will be appended to @file{ddclient.conf} file.")) > + (string "") > + "Extra options will be appended verbatim to the @file{ddclient.conf} = file.")) In other places, such as (gnu home services desktop), I=E2=80=99ve used an = extra =E2=80=98raw-configuration-string=E2=80=99 field type to handle this cases.= This might be clearer than adding the =E2=80=98cond=E2=80=99 above in =E2=80=98seriali= ze-field=E2=80=99. WDYT? The change above also changes the interface (from list to string), but I think that=E2=80=99s OK. Thanks, Ludo=E2=80=99.