From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KAKbMCe4RWP5HwEAbAwnHQ (envelope-from ) for ; Tue, 11 Oct 2022 20:38:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AG2tMCe4RWMHJQEAauVa8A (envelope-from ) for ; Tue, 11 Oct 2022 20:38:31 +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 6EFCB10D42 for ; Tue, 11 Oct 2022 20:38:31 +0200 (CEST) Received: from localhost ([::1]:58278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiK98-00048p-Ig for larch@yhetil.org; Tue, 11 Oct 2022 14:38:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiJw8-0002L9-23 for guix-patches@gnu.org; Tue, 11 Oct 2022 14:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiJw6-0004MX-V8 for guix-patches@gnu.org; Tue, 11 Oct 2022 14:25:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiJw6-0004jU-Me for guix-patches@gnu.org; Tue, 11 Oct 2022 14:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 Oct 2022 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166551269918178 (code B ref 57963); Tue, 11 Oct 2022 18:25:02 +0000 Received: (at 57963) by debbugs.gnu.org; 11 Oct 2022 18:24:59 +0000 Received: from localhost ([127.0.0.1]:54787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJw3-0004j8-Cl for submit@debbugs.gnu.org; Tue, 11 Oct 2022 14:24:59 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJw1-0004it-8e for 57963@debbugs.gnu.org; Tue, 11 Oct 2022 14:24:57 -0400 Received: by mail-ed1-f68.google.com with SMTP id a67so11985927edf.12 for <57963@debbugs.gnu.org>; Tue, 11 Oct 2022 11:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=M61TazbGJ+eo6EbfqzVekEDU9xa45ifiLMtgAgfebW0=; b=etzMX8lZRtAmToJTlnvyU45alV0bIq66lJ+B1U4C0y7wWJQGKPO7W1Hqu7DIgmkUoN 1PZwSZYkT+LHjl3sXZW/UhxgAljEvdrLUzaEJwypeNstkoOoD5/ngb1rwKBU7PKwfc47 /RcIjL9jo0zdPSAJL6VU5rAPtAy9g+Kg+lyFi8VVZQWo/+P8mKEGvppeg/rNSR0EY1ew m2SvKKMxt0PPH6pQsYa7SAnzUzdrhb2G4rSwUIcrL7myi26WDWNSoWacl8K6Xy7Hf9LD iuD63/FsOg3UDnoiAoMHZkyGYVNWn6OxtnJi6yom0u8NIkV9qIO+HVhmPeHcURafXL1R CwXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=M61TazbGJ+eo6EbfqzVekEDU9xa45ifiLMtgAgfebW0=; b=m/1n6VjdNHrknAx2BzHf7iM3PSe1mc1HTjhGO/l2cCA2CCwf7W1XfsEytH4sFZZZRN p2zRsydIAfKLR0vJYYnsbqxhLVDhcAT/uNY8yJC8rcxKeMRS8f2rtxOYUTaW4L5Adzy7 QqJ9X63KI81Ff0sw0WM5fgCExKTypr5ATLjJMVU5OWA4LV8g2ATpbpzV+9e0+XZTvsU3 QIXHKjZ5V2yveO+jGcYAemVugNX4+fLWdrakiey394ThRg4bLJ7uzw0RPI1F8mWhioy1 12KQ08Oce3+H3HIkmmRqnwxs9opI+CrSuhRyiErpdHfWfI9TlkRxP7CcpN2UlHr0bE/9 DmTg== X-Gm-Message-State: ACrzQf11MtcBbwq0e/cphw3ErfSlXT2cVslQEhVQCze8nQhruk03b0Ka DaGZj7gyWLaaeMjZBNpXhds= X-Google-Smtp-Source: AMsMyM5Vq/0Q2uFrjtK5Pgm4bK+s5IQST544SETJGXYG6VKzJIqpeaPe3EYK+rU9/6AzSTW/9zx1Sw== X-Received: by 2002:a05:6402:847:b0:453:943b:bf4 with SMTP id b7-20020a056402084700b00453943b0bf4mr24355863edz.301.1665512691381; Tue, 11 Oct 2022 11:24:51 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id gc22-20020a1709072b1600b0078cf8a743d6sm78352ejc.100.2022.10.11.11.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 11:24:50 -0700 (PDT) Message-ID: <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com> From: Liliana Marie Prikler Date: Tue, 11 Oct 2022 20:24:48 +0200 In-Reply-To: <87pmeykchl.fsf@taiju.info> References: <20221002131535.9972-1-higashi@taiju.info> <20221002131535.9972-2-higashi@taiju.info> <87zge4chb5.fsf@trop.in> <87edvfkob8.fsf@taiju.info> <7a7ba84518d2f6afa387e1e2649bc249acd74750.camel@gmail.com> <87pmeykchl.fsf@taiju.info> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665513511; 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=M61TazbGJ+eo6EbfqzVekEDU9xa45ifiLMtgAgfebW0=; b=Uv4CalI+D4sasH+IxHdENODbv07LACp++ioaTp37m3ADou4BVzANrvQOItuFoPp37Gi4qL 46api0ajMYHq75Cwq1CS4wJN5z7XXNN/VoDP2pqhUEZGjPmNKJyjVs/SZn6D7Bsf7Hb1N7 Ottq9J4yK5P7uPeWVy6eLVrduDtqaO04OFSD5v8TA91hRds6SHF2szgPvXeU/OjHJvbdW9 TVbIm7F6IqZhggAVwtO+du8nA6CBRQpcvhpu1uECegh/5hB85Icu3r+uHwK9vJBTJYgMXs 0LxhS0nYFT2xMS/igALl/cYW/07NQPt4G+4pYFG56xnWDmmyukTe7qVO6+njqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665513511; a=rsa-sha256; cv=none; b=BcSYmxbmW1KE2evJPPd1JgOyMkPsA+67UK44njHK4zf4F27Pd86rtS5cWN/svrLAgEaKyr hvzRPFKblMf+duVUEDT01DF9GCqxRSxLPG3udrAAdR+VZehRUHd4RTB4JGBj52gI2lgAFg cQS3FtvOErSOHbYNlsjcZXU4s5nokxuq9g3BATDTybGrk9mluKHycN9ejkCMdvpZ2lMIdF X9WDmg8g8a8KK4OHgXAXy7K0dZMLXlQvl25+xPxYx0ANqgpS9uzljIipcZir2GTIWvCyWt IdcprHdPo1rb2ppdbzXybNqlz8gN+rMiAWInuBapWCDmfhMTZvP1EAwmCC3Klw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=etzMX8lZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 6.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=etzMX8lZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 6EFCB10D42 X-Spam-Score: 6.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: zYKnZoJuAWI2 Am Dienstag, dem 11.10.2022 um 17:09 +0900 schrieb Taiju HIGASHI: > Liliana Marie Prikler writes: >=20 > > Am Dienstag, dem 11.10.2022 um 12:54 +0900 schrieb Taiju HIGASHI: > > > We can specify invalid value such as (list "foo" '(foo bar) 123). > > It will be sanitized before that. >=20 > I'm sorry, I may not be getting it. >=20 > When I reconfigure with the following settings: >=20 > --8<---------------cut here---------------start------------->8--- > (home-environment > =C2=A0(packages (list font-google-noto)) > =C2=A0(services > =C2=A0 (append > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (service home-bash-service-type)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (modify-services %home-base-services > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (home-fontconfig-service-type > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 config =3D> (home-fontco= nfig-configuration > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (extra-config > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list "foo" 123= )))))))) > --8<---------------cut here---------------end--------------->8--- >=20 > The following error occurs. >=20 > --8<---------------cut here---------------start------------->8--- > ./pre-inst-env guix home container home-fontconfig-config.scm > Backtrace: > In guix/monads.scm: > =C2=A0=C2=A0=C2=A0 487:9 19 (_ _) > In gnu/services.scm: > =C2=A0 1137:16 18 (_ _) > In guix/monads.scm: > =C2=A0=C2=A0=C2=A0 487:9 17 (_ _) > In gnu/services.scm: > =C2=A0 1140:36 16 (_ _) > In srfi/srfi-1.scm: > =C2=A0=C2=A0 586:17 15 (map1 (#< type: # 7f1926abf=E2=80=A6>)) > In ice-9/eval.scm: > =C2=A0=C2=A0=C2=A0 155:9 14 (_ #(#(# 7f1926df8780>) #)) > =C2=A0=C2=A0=C2=A0 159:9 13 (_ #(#(# 7f1926df8780>) #)) > =C2=A0=C2=A0 173:55 12 (_ #(#(# 7f1926df8780>) #)) > In gnu/services/configuration.scm: > =C2=A0=C2=A0=C2=A0 124:8 11 (serialize-configuration _ _) > In srfi/srfi-1.scm: > =C2=A0=C2=A0 586:29 10 (map1 (#< name: font-director= ies > type: str=E2=80=A6> =E2=80=A6)) > =C2=A0=C2=A0 586:29=C2=A0 9 (map1 (#< name: default-= font-serif- > family =E2=80=A6> =E2=80=A6)) > =C2=A0=C2=A0 586:29=C2=A0 8 (map1 (#< name: default-= font-sans- > serif-fa=E2=80=A6> =E2=80=A6)) > =C2=A0=C2=A0 586:29=C2=A0 7 (map1 (#< name: default-= font- > monospace-fam=E2=80=A6> =E2=80=A6)) > =C2=A0=C2=A0 586:17=C2=A0 6 (map1 (#< name: extra-co= nfig type: > maybe-ext=E2=80=A6>)) > In ice-9/eval.scm: > =C2=A0=C2=A0=C2=A0 155:9=C2=A0 5 (_ #(#(# 7f1926df8780>) # =E2=80=A6)) > In srfi/srfi-1.scm: > =C2=A0=C2=A0 586:29=C2=A0 4 (map1 ("foo" 123)) > =C2=A0=C2=A0 586:17=C2=A0 3 (map1 (123)) > In unknown file: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2 (raise #<&= formatted-message format: "'extra-config' type > must be x=E2=80=A6>) > In ice-9/boot-9.scm: > =C2=A0 1685:16=C2=A0 1 (raise-exception _ #:continuable? _) > =C2=A0 1685:16=C2=A0 0 (raise-exception _ #:continuable? _) >=20 > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > Wrong type (expecting exact integer): #<&formatted-message format: > "'extra-config' type must be xml string or sxml list, was given: > ~a\n" arguments: (("foo" 123))> > --8<---------------cut here---------------end--------------->8--- >=20 > Is it sanitized before? That error seems to be coming from your sanitizer if I read this correctly. > > > > Also, making multi-type fields is debatable, but isn't great > > > > IMO. > > >=20 > > > I see. If we had to choose one or the other, I would prefer the > > > string-type field. > > Prefer sexp-type. >=20 > I too would like to write my settings in S-expression, but for users > who know the XML format of fontconfig but do not know how to use > SXML, I believe the effort of converting XML to SXML in their head > and writing it cannot be ignored. > Still, users can write settings in SXML and convert them to > strings. That is a choice the user prefers to make; someone who > doesn't know SXML writing strings and converting them to SXML is not > a choice the user prefers to make. You can likewise convert xml->sxml explicitly, there's not really any difference here. Providing this in a sanitizer just makes it more user-friendly. Cheers