From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 4LBBNzklRWNGngAAbAwnHQ (envelope-from ) for ; Tue, 11 Oct 2022 10:11:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GNOhNjklRWNVPAAAG6o9tA (envelope-from ) for ; Tue, 11 Oct 2022 10:11:37 +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 89B6F2B8A8 for ; Tue, 11 Oct 2022 10:11:37 +0200 (CEST) Received: from localhost ([::1]:52262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiAMR-0000QP-A9 for larch@yhetil.org; Tue, 11 Oct 2022 04:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiAKy-0000ON-0p for guix-patches@gnu.org; Tue, 11 Oct 2022 04:10:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiAKx-0001sX-N9 for guix-patches@gnu.org; Tue, 11 Oct 2022 04:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiAKx-0000XV-3h for guix-patches@gnu.org; Tue, 11 Oct 2022 04:10:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 Oct 2022 08:10:03 +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: Liliana Marie Prikler Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16654757942042 (code B ref 57963); Tue, 11 Oct 2022 08:10:03 +0000 Received: (at 57963) by debbugs.gnu.org; 11 Oct 2022 08:09:54 +0000 Received: from localhost ([127.0.0.1]:50787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiAKo-0000Wr-CR for submit@debbugs.gnu.org; Tue, 11 Oct 2022 04:09:54 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:37433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiAKm-0000Wc-JL for 57963@debbugs.gnu.org; Tue, 11 Oct 2022 04:09:53 -0400 Received: by mail-pj1-f41.google.com with SMTP id p3-20020a17090a284300b0020a85fa3ffcso15277116pjf.2 for <57963@debbugs.gnu.org>; Tue, 11 Oct 2022 01:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RWsntEowhaQNEfUjM7GeMpePGIUh4tTsqTKqmm+nzNM=; b=GZuv2aw7AF7kml/iCo5mISdkd67IddRwB/o41WvNU64Wso9kEfIvkHA5eRrhmMFJBq JUDxzR3QtB46bQAS1O24lFEVzapKAQ5cgdouiKOl/aM+8ZkFz/Vd2+CQksbyWuzulKEl DZr+WzQ9DzS8WXBAV7sevZED0yY9no3yuNJUK7SgQfSOLzSXbho001XCz6qZ7CX8bot3 SERKtb6JTeTENaYM4nsM3hl2cqpFggHx0b9XN7IX8JC8JwnWN/S+KwkiTDZhldmJpd9Y 9wNGbbfiSENzJyQss6lSYSvhu6yM0vrwX4neiWaGbTleZbtYBc7qEFaJYqR569+JuIHj VV7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RWsntEowhaQNEfUjM7GeMpePGIUh4tTsqTKqmm+nzNM=; b=MpTTcxnq+V5IDliwB2EZyn7qZ6stNmqwpzsI4YtkXJRsS/RUrsrF2/gMQGjY7HG+SB QyzJbwphPUahjl4NQge1un5lFdpGJs1W9W1eZds/4ECp4Y77B8HiE1n5Vw67kCOoXo5q ERnFaDfMsEHxhLF8yeT3bSWwGHu4lq7Q67Dgc9/5UJ4iwNo1GT/XnSKLJML3/IKM3ybR TDrgOCYB6KhRYSkq25Asfb4hyKckCuYldFqEHfq73y0do2ifGZzFFeHih5NWAPGNWdp0 6sGV87oK2JZPfXTTS21hjdY+btFJmNKF0EWzyoM5odWDlyh9cUzDhZvXMZre+pGwggZM cKjw== X-Gm-Message-State: ACrzQf0yGg3IsIZKpKGQOaw7XC5xp6f0yjYCGVuhh6r/yinNaqZ7Wugz xNh0CHQZXqgofUI3dGowvAWZ5g== X-Google-Smtp-Source: AMsMyM6zM4EMBTbW1m1K9UngnTTmm43NiDtK2cPmdQQVG9pnQYuzS2tcE88IWxXejgmM8S6e9/amZw== X-Received: by 2002:a17:90b:4c0d:b0:20d:43db:cc14 with SMTP id na13-20020a17090b4c0d00b0020d43dbcc14mr10216353pjb.119.1665475786557; Tue, 11 Oct 2022 01:09:46 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id y19-20020aa79af3000000b00560c9048569sm6542969pfp.67.2022.10.11.01.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 01:09:46 -0700 (PDT) From: Taiju HIGASHI 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> Date: Tue, 11 Oct 2022 17:09:42 +0900 In-Reply-To: <7a7ba84518d2f6afa387e1e2649bc249acd74750.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 11 Oct 2022 06:21:49 +0200") Message-ID: <87pmeykchl.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp 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=1665475897; 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: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=RWsntEowhaQNEfUjM7GeMpePGIUh4tTsqTKqmm+nzNM=; b=AUqQt6IKM3zRuZJ1aFT/xP72Bjn0HPR0+ZWu/Y+v2TBzScgIDwuLTJcRarJoPJEaYK4mWg lva4Yj+EH9LOoPG9Q7qkEi0rtsYh5XSXi4CYq8PT0wIeDGn4M8D8T5rN0vK1LqFE38lY1I tx5ZY67lM/JuX9xF25Vui5rmhTtlsNT2yXqpSs1o/eLmOa9p+t8410tdREtfcyBnebPgDL G6qErpsRd2eIUvat/mXm4LYb2DaVVGsy+1DtoEEZix4wwnc8bSvzKyxNXTfBqzeTiRsjMF 3morx3HyEdeD0jklYXPoP3D5Kx8sEi+FcXlRy8LvluzFVbBwO4xHYhcxD92xEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665475897; a=rsa-sha256; cv=none; b=gcWZ73lTBxx44wLhJ577l794AdXIDL2JxOiVkQ05fe5tAZWFmupHErZB5okcvO4yJeWuEu g5wfSHem/wmzp0/CWWsUK0ywBtfA9wwXHoDlQ2kF+6YCQT0lrECrIc6GUc7SeSOrTBNDL1 mC05t8DG2+0X0b7D52H5rtuTdEStmnuTZ8NnMxOc3KGyCZNJry+6Lr5XIdrxWbd/4qIaF8 v3mJQWDGwYqFN22BkhvMaGeusR8tDdmYHJ75qDlzYygbgqT4TMDDPH2TmZcH63+YquPjoZ BRQGJfsiBINaPO6w0lh9rC4nL8/JUKtGz25jVwbz72eHle0IK+Ey4nkKRO3oCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=GZuv2aw7; dmarc=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: 3.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=GZuv2aw7; dmarc=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: 89B6F2B8A8 X-Spam-Score: 3.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: rF1EkSa7mYP1 Liliana Marie Prikler writes: > 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. I'm sorry, I may not be getting it. When I reconfigure with the following settings: --8<---------------cut here---------------start------------->8--- (home-environment (packages (list font-google-noto)) (services (append (list (service home-bash-service-type)) (modify-services %home-base-services (home-fontconfig-service-type config => (home-fontconfig-configuration (extra-config (list "foo" 123)))))))) --8<---------------cut here---------------end--------------->8--- The following error occurs. --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix home container home-fontconfig-config.scm Backtrace: In guix/monads.scm: 487:9 19 (_ _) In gnu/services.scm: 1137:16 18 (_ _) In guix/monads.scm: 487:9 17 (_ _) In gnu/services.scm: 1140:36 16 (_ _) In srfi/srfi-1.scm: 586:17 15 (map1 (#< type: #)) In ice-9/eval.scm: 155:9 14 (_ #(#(#) #)) 159:9 13 (_ #(#(#) #)) 173:55 12 (_ #(#(#) #)) In gnu/services/configuration.scm: 124:8 11 (serialize-configuration _ _) In srfi/srfi-1.scm: 586:29 10 (map1 (#< name: font-directories type: str…> …)) 586:29 9 (map1 (#< name: default-font-serif-family …> …)) 586:29 8 (map1 (#< name: default-font-sans-serif-fa…> …)) 586:29 7 (map1 (#< name: default-font-monospace-fam…> …)) 586:17 6 (map1 (#< name: extra-config type: maybe-ext…>)) In ice-9/eval.scm: 155:9 5 (_ #(#(#) # …)) In srfi/srfi-1.scm: 586:29 4 (map1 ("foo" 123)) 586:17 3 (map1 (123)) In unknown file: 2 (raise #<&formatted-message format: "'extra-config' type must be x…>) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) 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--- Is it sanitized before? >> > Also, making multi-type fields is debatable, but isn't great IMO. >> >> I see. If we had to choose one or the other, I would prefer the >> string-type field. > Prefer sexp-type. 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. >> > If serialization would support G-exps, we could write >> > >> > (list #~"RAW_XML_HERE") >> > >> > or even something like this: >> > >> > (list #~(READ-THE-WHOLE-FILE #$(local-file "our-old.xml"))) >> >> Does it mean that the specification does not allow it now? Or does it >> mean that it is not possible with my implementation? > I think your serialize would have to unpack the G-Expressions. You can > test that with some example configs of your own. Thank you. I'll give it a try. Thanks, -- Taiju