From unknown Mon Jun 16 23:33:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50515 <50515@debbugs.gnu.org> To: bug#50515 <50515@debbugs.gnu.org> Subject: Status: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'. Reply-To: bug#50515 <50515@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:33:18 +0000 retitle 50515 (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json= '. reassign 50515 guix-patches submitter 50515 zimoun severity 50515 normal tag 50515 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 20:14:38 2021 Received: (at submit) by debbugs.gnu.org; 11 Sep 2021 00:14:38 +0000 Received: from localhost ([127.0.0.1]:39317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOqfG-0004gL-8g for submit@debbugs.gnu.org; Fri, 10 Sep 2021 20:14:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:40362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOqfE-0004gD-RQ for submit@debbugs.gnu.org; Fri, 10 Sep 2021 20:14:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOqfE-0006hW-Jm for guix-patches@gnu.org; Fri, 10 Sep 2021 20:14:36 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:42907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOqfC-0000Sl-Pf for guix-patches@gnu.org; Fri, 10 Sep 2021 20:14:36 -0400 Received: by mail-wr1-x42d.google.com with SMTP id q11so4921697wrr.9 for ; Fri, 10 Sep 2021 17:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WRAhr1WrsJPKv4hmA5A/kRDwJ9xhGb3MJu+2jy+D7/U=; b=cM/BtfKh3Hp6hI6L6Ho5/E4DBZvEIc0vpduEYtsHU692dQPGFvF6hMyeMzNu1+OH/d JX4nixN4OUCsiPFbczdLRK3DU2WyS8nRjADm4sosBE64BCVic1d8H33uzCU7jZUr05iK w6Dklz+vVUBvYoMBwFVMLbroVQRo1UMBsjLf2VruCVXkui1bX9iXNHu1mJe9iwPcjCoi esrcpD34f63S51uZTH3ATZM6YV4E0GwvoUbOr9kxz/Fvx0AUhetv68+IxdqQ2njq4h/G LLShPnru4peec0B8wo7k9/eKK1LtWATsHfLaZ29c+p1nznBI5TTPt6OTG1J/9andCbSP gipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WRAhr1WrsJPKv4hmA5A/kRDwJ9xhGb3MJu+2jy+D7/U=; b=wSbjOZPH5QYLoP5shsstW9YVm/VtKIw8ystmDxXW+MEv11Xie0uY3bKKaY5nSBhZaX DA01INnZZda87QX1Re/Ka6CKRTKi6YsI6PweY7kml0lL9ny/pVa5sZDr6ATJuWZKEMcX rT/hJLitOfIk1o8Izn2I7Zl4Q4+yrW/ZUkZh1fblXCRPFn8cudbzzPbC9u6rOaUvOrqi jQ6w9bj6zYn7F+j+oYVYj9dVE8XBb+K0KvB9rn93wJ4EaRHqvxH+mOofdzUr2lYWUTH4 ofn+1dvIxCWDFOVSdHYpxISEU0/fNNrVIjZBfmAJ7nVgQj/SvyEsTqoi4TVhrU154XZU ibeQ== X-Gm-Message-State: AOAM533b7X3uYROKjFwKvUGNLUVOLIbS9S10RN6k5ME4GyqEVMlNiy5y kp+p4N4+yawoiHkPNlfpmiiLZD0HPK4= X-Google-Smtp-Source: ABdhPJykILvEucZTl582kwr4ZLqpWQANjPLvWpwOy1fK3z+1K8WVCjDL0MwgGeh0+Ep0tZrm3MC0qw== X-Received: by 2002:adf:9f51:: with SMTP id f17mr350277wrg.301.1631319272345; Fri, 10 Sep 2021 17:14:32 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id t18sm89358wrp.97.2021.09.10.17.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 17:14:32 -0700 (PDT) From: zimoun To: guix-patches@gnu.org Subject: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'. Date: Sat, 11 Sep 2021 02:14:24 +0200 Message-Id: <20210911001424.9860-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Debbugs-CC: , Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, This patch is a follow-up of this message: Now, 'sources.json' file contains the missing origins; for instance: --8<---------------cut here---------------start------------->8--- $ cat /tmp/gnu.org/software/guix/sources.json | jq | grep fsfla | sort | uniq -c 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.238-gnu/deblob-4.14" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.238-gnu/deblob-check" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.196-gnu/deblob-4.19" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.196-gnu/deblob-check" 2 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.274-gnu/deblob-4.4" 2 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.274-gnu/deblob-check" 2 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.274-gnu/deblob-4.9" 2 "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.274-gnu/deblob-check" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.10.47-gnu/deblob-5.10" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.10.47-gnu/deblob-check" 14 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.12.14-gnu/deblob-5.12" 14 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.12.14-gnu/deblob-check" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.129-gnu/deblob-5.4" 4 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.129-gnu/deblob-check" 2 "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz", --8<---------------cut here---------------end--------------->8--- First, it should be investigated why the deblob script '5.12.14-gnu/deblob-5.12' appears 14 times. In the same idea, the source of 5.12.14 appears 28 times. Well, I have tried to add ’delete-duplicates’ but without success. To be continued… :-) Second, I do not know if SWH ingests scripts as: and it is worth to carefully check with them. :-) Last, the first patch tweaks the check to ease from the command-line the build of the full website and not only 300 packages (otherwise it is easy to miss corner cases ;-)). Other said, turn ’GUIX_WEB_SITE_LOCAL=yes’ to ’GUIX_WEB_SITE_LOCAL=whatever-value’ (where whatever-value can be ’no’ for instance) allows to build the full website. It appears to me simpler than the previous check. WDYT? All the best, simon zimoun (2): website: Tweak 'GUIX_WEB_SITE_LOCAL'. website: Add 'computed-origin-method' packages to 'sources.json'. website/README | 3 + website/apps/packages/builder.scm | 134 +++++++++++++++++++----------- website/apps/packages/data.scm | 3 +- 3 files changed, 89 insertions(+), 51 deletions(-) base-commit: d8efebc0794e8d6b2debc0e8a233a4b4b3b6f676 -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 20:26:19 2021 Received: (at 50515) by debbugs.gnu.org; 11 Sep 2021 00:26:19 +0000 Received: from localhost ([127.0.0.1]:39329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOqqY-00051o-Qk for submit@debbugs.gnu.org; Fri, 10 Sep 2021 20:26:18 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:41837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOqqX-00051Y-5I for 50515@debbugs.gnu.org; Fri, 10 Sep 2021 20:26:18 -0400 Received: by mail-wr1-f43.google.com with SMTP id w29so4198538wra.8 for <50515@debbugs.gnu.org>; Fri, 10 Sep 2021 17:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=S2iU+STXnZDF50cw9O56YPWttyO0HP7tAGp0BTItsiY=; b=ojxNjCTX19wniOY+MuaniLpZfSJbWZseUvc9z27uPY+TBvkVNVMwgyGUJTMe/Og1mF 49q8dXto8hoYHfJGS5LCuozrChqqczdetkH4nq8Cw74BaHouTS/k1rRd/n/dhvG5duPg XfmLRA+dMBv016xa1w9HFoucM8H2oZqTWhFfkz+t7RAxnRmd2ihc2YhXApTlO1QfX0W0 2p7dkb5t8ASfjhEqCUEN1A5DabSgReyCKrY4OKqTW0oAT8s/cJE52sQ5L8rSn6RvgW4Z aFE07nqtNTJOkbs0EScYAN/XZHR/2ibeDvFuacriWexr64QdLxlZyM8n8XjvKJjXJO2C YZ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=S2iU+STXnZDF50cw9O56YPWttyO0HP7tAGp0BTItsiY=; b=reBtSeNwGG86oS8IqMegeDqqg0Z/8f5/jqcg7ZXsdz67QGV0nTgcIJMx9GnU/yFc+w m9lJGzl3FuTTBpFvcok1JM7oKMSy62Duc7Hp5VFFwrqF1UB+kU0iByqeDHWQP4Ob6DDT sJFJuyy/PFazoOHQd3H1z6xiU3ZvMZlwlIaotv0JRpGbG2av7mGgBWOh6mRmAAa9B42I ToItXx30j5ZFEsilZJAaYPIziDqFjGqIdxf48j311HGQqFRDy/9a1vpQYscwOezLrBz7 d4wc5q8AlEBtW+fi118HNptLYRKa/gPbCPW00d8Rcpt8aFIKhrkC0RrHo5zsYt+9Saoo RV1Q== X-Gm-Message-State: AOAM531NVmvtdkQsO6yctciPThlevV1bRN7x+9dXA4dN3ODHzmVFze4S W21QHkdH3Tda3CoBjWrnd9NRcCIjmGI= X-Google-Smtp-Source: ABdhPJxOSydNaFWoIfirTxx51u3tIcdmpcfVb3er7pCpUnPTnY7yeX60tdpHyUtHtahljb1xSY6VzA== X-Received: by 2002:adf:d184:: with SMTP id v4mr395636wrc.229.1631319971324; Fri, 10 Sep 2021 17:26:11 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x21sm181561wmc.14.2021.09.10.17.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 17:26:11 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL'. Date: Sat, 11 Sep 2021 02:26:07 +0200 Message-Id: <20210911002608.14074-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * website/apps/packages/data.scm (%package-list): Compare to 'yes' instead of any value. * website/README: Document it. --- website/README | 3 +++ website/apps/packages/data.scm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/website/README b/website/README index ce2819f..19951d6 100644 --- a/website/README +++ b/website/README @@ -37,6 +37,9 @@ commands: -- haunt build #+end_example +Any other value than =GUIX_WEB_SITE_LOCAL=yes= will build the full website +considering all the packages and not a small subset. + ** Serve locally #+begin_example LANG=en_US.UTF-8 guix environment -CN -m manifest.scm \ diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm index d1bbc92..eb34d26 100644 --- a/website/apps/packages/data.scm +++ b/website/apps/packages/data.scm @@ -50,7 +50,8 @@ (string) id 1mOqqc-000526-0f for submit@debbugs.gnu.org; Fri, 10 Sep 2021 20:26:22 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:35646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOqqX-00051a-QM for 50515@debbugs.gnu.org; Fri, 10 Sep 2021 20:26:19 -0400 Received: by mail-wr1-f53.google.com with SMTP id i23so4967841wrb.2 for <50515@debbugs.gnu.org>; Fri, 10 Sep 2021 17:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vwrGUIXLJn4AliOmzs+v9XSS3uJLqjn9QpjTHO8By9M=; b=UTc60ixqoFDufwyEsATmiYo09Nu69kvFsi6HTE8gNZPGloEZvGMtl+6xDC4Vw34tzp pYWLEOWio9NY8oPm1oJ2VzQYQnuhhI365JOOTZcxszfharVP1PEuCIXn/DFNnGj5QDPd h1Y4tkAMZjyrcjUzYQRscsQcyruvT5Z3fbEFvkaEUuaR6fMxfu91uWdfe179jAwEGSij vGXE+ALOG6dAw6IqRV8PPkMHTCyEPc4TQRAZWyX/fLyGsd/ZHA3Gp9lSwAqPZ3yFDDdc xEF6l1hgFH5ah1JiPHBElozKA9YqvOL9XMmmboKe5ZCh9uAhJzu8FBLnsVDNMJkuOiFr cS+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vwrGUIXLJn4AliOmzs+v9XSS3uJLqjn9QpjTHO8By9M=; b=aucPoGFcjilX7OglfbSe3007ig8sWcp2YXDPuBlGWjZSIKQjx1jPPuzCwv1PPfUrxQ t7ZsbKongYqpdHvisJ49R3C+/7LS6Yf5/dLzHpJpgDuTNhKllgyR/ONr4bQQjkMI51Nj eIm8raAcwaQXTWOMBbwfrk8wtbRz8YdwJlC+ojzL22bp8EwetZxdV1iYYIeOZbScc9tL lhFi+fBOtLRNi1Ek1gWWvWxODo6fNwxb9/Wn6tvONH+Wa/qC+OPbCWIheSvZVOeO03zz B1l5a2yipNQTP+ayj+eZ2yrzD3OBElwlYAnLk+hj4E5y06dEou9ldHd7TJ23vfYwdMLG SQuA== X-Gm-Message-State: AOAM533k/hQ35LJ3bXn0Uf6MgkNHC2VP0INw+gmQAIs2Ev7+/VNTT0jz F8OF+5tBF2nhR3OQSBx2z5sb8OOZbkA= X-Google-Smtp-Source: ABdhPJwVQkQg3Llb58m653LbNcaOsHTdDJ4K7I3EDBDprc0mctyd/Q8w8LlICbnMLQ/ZF44ocB3xHA== X-Received: by 2002:a5d:5262:: with SMTP id l2mr417880wrc.190.1631319972031; Fri, 10 Sep 2021 17:26:12 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id x21sm181561wmc.14.2021.09.10.17.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 17:26:11 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. Date: Sat, 11 Sep 2021 02:26:08 +0200 Message-Id: <20210911002608.14074-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210911002608.14074-1-zimon.toutoune@gmail.com> References: <20210911002608.14074-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported variable from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-js [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.53 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.53 listed in list.dnswl.org] X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported variable from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-json-builder): Idem. [flatten]: New procedure. --- website/apps/packages/builder.scm | 134 +++++++++++++++++++----------- 1 file changed, 84 insertions(+), 50 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index fb53215..ecf958a 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -49,11 +49,14 @@ #:use-module ((guix base64) #:select (base64-encode)) #:use-module ((guix describe) #:select (current-profile)) #:use-module ((guix config) #:select (%guix-version)) + #:use-module (guix gexp) #:use-module (json) #:use-module (ice-9 match) #:use-module ((web uri) #:select (string->uri uri->string)) #:export (builder)) +;;; Required by 'origin->json' for 'computed-origin-method' corner cases +(define gexp-references (@@ (guix gexp) gexp-references)) ;;; ;;; Application builder. @@ -98,7 +101,7 @@ (define method (origin-method origin)) - (define uri ;represented as string + (define uri (origin-uri origin)) (define (resolve urls) @@ -106,53 +109,67 @@ (append-map (cut maybe-expand-mirrors <> %mirrors) (map string->uri urls)))) - `((type . ,(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) 'url) - ((eq? git-fetch method) 'git) - ((or (eq? svn-fetch method) - (eq? svn-multi-fetch method)) 'svn) - ((eq? hg-fetch method) 'hg) - (else #nil))) - ,@(cond ((or (eq? url-fetch method) + (match uri + ((? promise? promise) ;computed-origin-method + (match (force promise) + ((? gexp? g) + (map origin->json + (filter-map (match-lambda + ((? gexp-input? thing) + (match (gexp-input-thing thing) + ((? origin? o) o) + (_ #f))) + (_ #f)) + (gexp-references g)))) + (_ `((type . #nil))))) + (_ ;represented as string + `((type . ,(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) 'url) + ((eq? git-fetch method) 'git) + ((or (eq? svn-fetch method) + (eq? svn-multi-fetch method)) 'svn) + ((eq? hg-fetch method) 'hg) + (else #nil))) + ,@(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + `(("urls" . ,(list->vector + (resolve + (match uri + ((? string? url) (list url)) + ((urls ...) urls))))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + ((eq? svn-multi-fetch method) + `(("svn_url" . ,(svn-multi-reference-url uri)))) + ((eq? hg-fetch method) + `(("hg_url" . ,(hg-reference-url uri)))) + (else '())) + ,@(if (or (eq? url-fetch method) (eq? url-fetch/tarbomb method) (eq? url-fetch/zipbomb method)) - `(("urls" . ,(list->vector - (resolve - (match uri - ((? string? url) (list url)) - ((urls ...) urls))))))) - ((eq? git-fetch method) - `(("git_url" . ,(git-reference-url uri)))) - ((eq? svn-fetch method) - `(("svn_url" . ,(svn-reference-url uri)))) - ((eq? svn-multi-fetch method) - `(("svn_url" . ,(svn-multi-reference-url uri)))) - ((eq? hg-fetch method) - `(("hg_url" . ,(hg-reference-url uri)))) - (else '())) - ,@(if (or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - (let* ((content-hash (origin-hash origin)) - (hash-value (content-hash-value content-hash)) - (hash-algorithm (content-hash-algorithm content-hash)) - (algorithm-string (symbol->string hash-algorithm))) - `(("integrity" . ,(string-append algorithm-string "-" - (base64-encode hash-value))))) - '()) - ,@(if (eq? method git-fetch) - `(("git_ref" . ,(git-reference-commit uri))) - '()) - ,@(if (eq? method svn-fetch) - `(("svn_revision" . ,(svn-reference-revision uri))) - '()) - ,@(if (eq? method svn-multi-fetch) - `(("svn_revision" . ,(svn-multi-reference-revision uri))) - '()) - ,@(if (eq? method hg-fetch) - `(("hg_changeset" . ,(hg-reference-changeset uri))) - '()))) + (let* ((content-hash (origin-hash origin)) + (hash-value (content-hash-value content-hash)) + (hash-algorithm (content-hash-algorithm content-hash)) + (algorithm-string (symbol->string hash-algorithm))) + `(("integrity" . ,(string-append algorithm-string "-" + (base64-encode hash-value))))) + '()) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision uri))) + '()) + ,@(if (eq? method svn-multi-fetch) + `(("svn_revision" . ,(svn-multi-reference-revision uri))) + '()) + ,@(if (eq? method hg-fetch) + `(("hg_changeset" . ,(hg-reference-changeset uri))) + '()))))) (define (packages-json-builder) "Return a JSON page listing all packages." @@ -167,7 +184,12 @@ ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '()) ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '()) ,@(if (origin? (package-source package)) - `(("source" . ,(origin->json (package-source package)))) + `(("source" . ,(let ((json (origin->json (package-source package)))) + (match json + ((('type . x) other ...) + json) + ((head tail ...) ;multi-origin + head))))) ;XXXX: Improve this approximation '()) ("synopsis" . ,(package-synopsis package)) ,@(if (package-home-page package) @@ -195,11 +217,23 @@ (define (package->json package) `(,@(if (origin? (package-source package)) (origin->json (package-source package)) - `(("type" . "no-origin") + `((type . "no-origin") ("name" . ,(package-name package)))))) + (define (flatten lst) + ;; Convert nested lists to simple list + `(,@(if (null? lst) + '() + (match lst + ((head tail ...) + (match head + ((('type . x) other ...) + (cons head (flatten tail))) + (_ + (append (flatten head) (flatten tail))))))))) + (make-page "sources.json" - `(("sources" . ,(list->vector (map package->json (all-packages)))) + `(("sources" . ,(list->vector (flatten (map package->json (all-packages))))) ("version" . "1") ("revision" . ,(match (current-profile) -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 20:56:38 2021 Received: (at 50515) by debbugs.gnu.org; 12 Sep 2021 00:56:38 +0000 Received: from localhost ([127.0.0.1]:41650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPDnS-0002S1-6A for submit@debbugs.gnu.org; Sat, 11 Sep 2021 20:56:38 -0400 Received: from world.peace.net ([64.112.178.59]:49096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPDnQ-0002Ro-BR for 50515@debbugs.gnu.org; Sat, 11 Sep 2021 20:56:36 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPDnJ-0002QN-Ko; Sat, 11 Sep 2021 20:56:29 -0400 From: Mark H Weaver To: zimoun Subject: Re: [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. In-Reply-To: <20210911002608.14074-2-zimon.toutoune@gmail.com> References: <20210911002608.14074-2-zimon.toutoune@gmail.com> <20210911002608.14074-1-zimon.toutoune@gmail.com> Date: Sat, 11 Sep 2021 20:54:50 -0400 Message-ID: <87a6kid34a.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Simon, > With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages consider= ed > are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and > gnu/packages/linux.scm. > > * website/apps/packages/builder.scm (gexp-references): Unexported variable > from the module '(guix gexp)'. > (origin->json): Add 'computed-origin-method' case. Thanks for working on this. > diff --git a/website/apps/packages/builder.scm b/website/apps/packages/bu= ilder.scm > index fb53215..ecf958a 100644 > --- a/website/apps/packages/builder.scm > +++ b/website/apps/packages/builder.scm [...] > @@ -106,53 +109,67 @@ > (append-map (cut maybe-expand-mirrors <> %mirrors) > (map string->uri urls)))) >=20 > - `((type . ,(cond ((or (eq? url-fetch method) > - (eq? url-fetch/tarbomb method) > - (eq? url-fetch/zipbomb method)) 'url) > - ((eq? git-fetch method) 'git) > - ((or (eq? svn-fetch method) > - (eq? svn-multi-fetch method)) 'svn) > - ((eq? hg-fetch method) 'hg) > - (else #nil))) > - ,@(cond ((or (eq? url-fetch method) > + (match uri > + ((? promise? promise) ;computed-origin-method > + (match (force promise) Here, you're implicitly assuming that 'computed-origin-method' is the only origin method that puts a promise in the 'uri' field. That may be true today, but it will not necessarily be true tomorrow, and therefore it seems suboptimal to make that assumption in the code. Instead, I would suggest checking for "computed origins" in the same way that is done for the other cases: using 'eq?'. It's not ideal, but it's more future-proof than checking for a promise in the 'url' field, and anyway it's the way things are currently being done. However, there's a difficulty, and I suspect you're already aware of it and that it's why you used the suboptimal approach above: At present, 'computed-origin-method' is not exported by any Guix module, nor is there even a unique definition of it. Instead, there are two copies of it, one in gnuzilla.scm and one in linux.scm. The reason 'computed-origin-method' is not exported is because it never went through the review process that such a radical new capability in Guix should go through before becoming part of it's public API. At the time that I added 'computed-origin-method', I was under time pressure to push security updates for IceCat, and my previous method of cherry picking dozens of upsteam patches and applying them to the most recent IceCat release suddenly became impractical due to comprehensive code reformatting done upstream. I've always viewed 'computed-origin-method' as a temporary hack to work around limitations in the 'snippet' mechanism. Most importantly, last I checked, it was not possible for a 'snippet' to produce a tarball with a different base name than the original downloaded source. I consider it a *requirement* for the 'icecat' source tarball and it's unpacked directory to be named "icecat-=E2=80=A6" and not "firefox-=E2=80=A6", and s= imilarly for 'linux-libre'. I'm sorry that I never found the energy to clean this up properly. Anyway, regarding your proposed patch: for now, I would suggest the following options: (1) In a separate preceding commit, move 'computed-origin-method' to its own module, export it, use the exported one in gnuzilla.scm and linux.scm, and use 'eq?' to test for it in the code above. There should probably also be a comment next to the definition of 'computed-origin-method' pointing out that it's a temporary hack, hopefully to be superceded by snippets when they have gained the required functionality. (2) Alternatively, for now, use 'eq?' against the two private copies (accessed using @@, see below), along with a "FIXME" comment. ___ (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method)) _______ (eq? method (@@ (gnu packages linux) computed-origin-method))) What do you think? I'm not on the guix-patches list, so please CC me on replies that you'd like me to see. Thanks, Mark --=20 Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about . From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 03:18:08 2021 Received: (at 50515) by debbugs.gnu.org; 13 Sep 2021 07:18:08 +0000 Received: from localhost ([127.0.0.1]:44046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPgEC-0008Ac-7I for submit@debbugs.gnu.org; Mon, 13 Sep 2021 03:18:08 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:45036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPgEA-0008A0-4u for 50515@debbugs.gnu.org; Mon, 13 Sep 2021 03:18:07 -0400 Received: by mail-wr1-f43.google.com with SMTP id d6so12987332wrc.11 for <50515@debbugs.gnu.org>; Mon, 13 Sep 2021 00:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=xUrpcfKSMj7qsgl07P2WZGhe3zeTvNKbk9O3k2i0J8E=; b=kD/bys02EEOwuNM2ZxzrddoBTXszSERDXsypfHk3GeuUWHtJi7Y/2h5cYlJxHVpxFz 7MUSS2FpCjl4nRmRmLvGVjaZtK63GEX859vrVLFYwk/AgDahD/IF3ZpsqNXQhIR6ywKm GsEx9l/bjoqfwYcEarBPZ8nqCZ7m/mvOjON1fDMBra93LApXPAHMdGYI5X5FAKeMkXP9 WPv/qgRcE9GVh3e/ohvUIlguyHtu2ygYpk0xPA0PNt/JZIsHhoCWwMVXf690mCACzAIy EMa9vLp7ln1jxANvDZ5ea0RHG/cj4mdh/zMnvFXL3JiiSDiQYij1zCIyANbhPXfFr/lx VBIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=xUrpcfKSMj7qsgl07P2WZGhe3zeTvNKbk9O3k2i0J8E=; b=2kCn/4abz5hRsI6tBRvDuZinpbHx9SaDnGYROu2k3sjUGipZLlilwzIN1lIidiuHE9 1dcmZASoLzkMHUY1wJio1OAhguFcyC1OQOn67aSX0IuY5g5HAlNkPEGy4IkMNC82mdBR TPrKHtumCjcCL7dh9GzINGHA0iEspa2IYJT6G4Ggdgw/Oo1QFMrlpOToROW+d0zj3SCg K2Gtq5YGGnSFtCk2fAYg0xYmhzjtKS3MwinuUy2O8AC1cr8YMzPgnKj4m5IoQShqxW3d zp2/q4l7n1bgTChR+ozeVP9sSBIvk/xM8nyUOtE0opDEY/IkZnUmj5WOuWQfxn0LuyCC L+Sw== X-Gm-Message-State: AOAM531klYXLqgFMvO9RocuEBahHpVM4jqBJ3HvOOy917RRluTcV1Qc0 J0bkeV6BM4ncKYfr3usmjOPG1sbjMEs= X-Google-Smtp-Source: ABdhPJyTojq+8BSO/eUmOD5WeCWeaO3Uj2cJwobm3etWXq6FjPLLaV06CHx63xQ/w5GMAdnY1t7h+Q== X-Received: by 2002:a05:6000:1627:: with SMTP id v7mr11048543wrb.347.1631517480023; Mon, 13 Sep 2021 00:18:00 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u13sm6441667wrt.41.2021.09.13.00.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 00:17:59 -0700 (PDT) From: zimoun To: Mark H Weaver Subject: Re: [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. In-Reply-To: <87a6kid34a.fsf@netris.org> References: <20210911002608.14074-2-zimon.toutoune@gmail.com> <20210911002608.14074-1-zimon.toutoune@gmail.com> <87a6kid34a.fsf@netris.org> Date: Mon, 13 Sep 2021 09:01:45 +0200 Message-ID: <865yv5vu06.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Mark, Thanks for looking at the patch and for your inputs. On Sat, 11 Sep 2021 at 20:54, Mark H Weaver wrote: >> @@ -106,53 +109,67 @@ >> (append-map (cut maybe-expand-mirrors <> %mirrors) >> (map string->uri urls)))) >>=20 >> - `((type . ,(cond ((or (eq? url-fetch method) >> - (eq? url-fetch/tarbomb method) >> - (eq? url-fetch/zipbomb method)) 'url) >> - ((eq? git-fetch method) 'git) >> - ((or (eq? svn-fetch method) >> - (eq? svn-multi-fetch method)) 'svn) >> - ((eq? hg-fetch method) 'hg) >> - (else #nil))) >> - ,@(cond ((or (eq? url-fetch method) >> + (match uri >> + ((? promise? promise) ;computed-origin-method >> + (match (force promise) > > Here, you're implicitly assuming that 'computed-origin-method' is the > only origin method that puts a promise in the 'uri' field. That may be > true today, but it will not necessarily be true tomorrow, and therefore > it seems suboptimal to make that assumption in the code. Yes, I agree. My initial draft contained something as your wrote below: (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method)) (eq? method (@@ (gnu packages linux) computed-origin-method))) but then, I thought it was a redundant test because then the promise check is necessary to unwrap the values of embedded origins. And currently, all the 'computed-origin-method's use a promise. > Instead, I would suggest checking for "computed origins" in the same way > that is done for the other cases: using 'eq?'. It's not ideal, but it's > more future-proof than checking for a promise in the 'url' field, and > anyway it's the way things are currently being done. I cannot predict the future but the check about the method is as suboptimal as mine. :-) If another package uses computed-origin-method, then it should be added here. However, from my understanding, there is an higher probability that this hypothetical packages would use a promise. > However, there's a difficulty, and I suspect you're already aware of it > and that it's why you used the suboptimal approach above: > > At present, 'computed-origin-method' is not exported by any Guix module, > nor is there even a unique definition of it. Instead, there are two > copies of it, one in gnuzilla.scm and one in linux.scm. Yes. :-) > The reason 'computed-origin-method' is not exported is because it never > went through the review process that such a radical new capability in > Guix should go through before becoming part of it's public API. > > At the time that I added 'computed-origin-method', I was under time > pressure to push security updates for IceCat, and my previous method of > cherry picking dozens of upsteam patches and applying them to the most > recent IceCat release suddenly became impractical due to comprehensive > code reformatting done upstream. > > I've always viewed 'computed-origin-method' as a temporary hack to work > around limitations in the 'snippet' mechanism. Most importantly, last I > checked, it was not possible for a 'snippet' to produce a tarball with a > different base name than the original downloaded source. I consider it > a *requirement* for the 'icecat' source tarball and it's unpacked > directory to be named "icecat-=E2=80=A6" and not "firefox-=E2=80=A6", and= similarly for > 'linux-libre'. Thanks for explaining. > Anyway, regarding your proposed patch: for now, I would suggest the > following options: > > (1) In a separate preceding commit, move 'computed-origin-method' to its > own module, export it, use the exported one in gnuzilla.scm and > linux.scm, and use 'eq?' to test for it in the code above. There > should probably also be a comment next to the definition of > 'computed-origin-method' pointing out that it's a temporary hack, > hopefully to be superceded by snippets when they have gained the > required functionality. I think it is the better approach. Move the =E2=80=99computed-origin-metho= d=E2=80=99 procedure to (guix packages) and export it; add a comment about it. However, I would not like that the sources.json situation stays blocked by the computed-origin-method situation when sources.json is produced by the website independently of Guix, somehow. :-) Therefore, there is an option (3). Move the =E2=80=99computed-origin-method= =E2=80=99 procedure to (guix packages) and add a comment about it; use it for icecat and linux with (@@ (guix packages) computed-origin-method). WDYT about this (3)? It simplifies this patch and let the time to discuss the =E2=80=99computed-origin-method=E2=80=99 case without exposing = it to the public API. > (2) Alternatively, for now, use 'eq?' against the two private copies > (accessed using @@, see below), along with a "FIXME" comment. > > ___ (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method)) > _______ (eq? method (@@ (gnu packages linux) computed-origin-method))) I commented above why I am not convinced that is better than directly check the promise. I do agree with the FIXME comment; the commit message is not enough here. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 15 20:09:04 2021 Received: (at 50515) by debbugs.gnu.org; 16 Sep 2021 00:09:04 +0000 Received: from localhost ([127.0.0.1]:53459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQexb-0006cz-Pr for submit@debbugs.gnu.org; Wed, 15 Sep 2021 20:09:03 -0400 Received: from world.peace.net ([64.112.178.59]:57558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQexY-0006cR-LU for 50515@debbugs.gnu.org; Wed, 15 Sep 2021 20:09:02 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQexS-0007iE-0Z; Wed, 15 Sep 2021 20:08:54 -0400 From: Mark H Weaver To: zimoun Subject: Re: [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. In-Reply-To: <865yv5vu06.fsf@gmail.com> References: <20210911002608.14074-2-zimon.toutoune@gmail.com> <20210911002608.14074-1-zimon.toutoune@gmail.com> <87a6kid34a.fsf@netris.org> <865yv5vu06.fsf@gmail.com> Date: Wed, 15 Sep 2021 20:07:09 -0400 Message-ID: <871r5pcrhz.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Simon, zimoun writes: > Therefore, there is an option (3). Move the =E2=80=99computed-origin-meth= od=E2=80=99 > procedure to (guix packages) and add a comment about it; use it for > icecat and linux with (@@ (guix packages) computed-origin-method). > > WDYT about this (3)? It simplifies this patch and let the time to > discuss the =E2=80=99computed-origin-method=E2=80=99 case without exposin= g it to the > public API. Sure, that sounds like a fine approach. Thank you! Mark --=20 Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about . From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 16 07:49:03 2021 Received: (at 50515) by debbugs.gnu.org; 16 Sep 2021 11:49:03 +0000 Received: from localhost ([127.0.0.1]:54008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQpt1-0007Rm-9P for submit@debbugs.gnu.org; Thu, 16 Sep 2021 07:49:03 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:34385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQpsz-0007RG-A7 for 50515@debbugs.gnu.org; Thu, 16 Sep 2021 07:49:01 -0400 Received: by mail-qt1-f171.google.com with SMTP id 2so5225887qtw.1 for <50515@debbugs.gnu.org>; Thu, 16 Sep 2021 04:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vPLyQjQL3+difjvlrEF0yqHj+M3JNJD0i9a8x4BFLSQ=; b=oAHopS61t22ganYTAH1TdA0iiHHmkOhe0yR2m13b9e1KeajvFtS3CkePTf5YzF/5Xp zRTkd/a1MF0QGfMrNhmqWSl5bpGDLtq3dtiO4BF4OBs4HfEVLRatJ9NlK6PwZ/bQL9Al 0ZXOP9jtj+4e+6v6V5Ys0DlEAAIwyYGBl/OFdFBSF6+5jOf6POGEG1OFif+UG6mXL9Xr E2KnhMpjHgXDEeZkxaXDRcGqeSCD5x9bY5+xt3Kd5c9eZMFYCaDtuQpphS5OGa+pvHyW KFx6KwCU2mV7G/iRhxNkbWOrd9OYdAAHAQAdrXJgGlg5x5e9jOe6OmCaxWmdnl3RDhgA kWhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vPLyQjQL3+difjvlrEF0yqHj+M3JNJD0i9a8x4BFLSQ=; b=S/M371xHXiAhojsswz99earOmxeVo1fYkamzM88TKuRUdgSuOH6kkcB0/jLPs09VM+ UzjcNjGE3o6uqsqGMpKQpzMq9VT8N9W9Cv8M/LEe/wsbNqQGIlkU85n5zO9JbRrsLbNj mKxRTSbjRXB00CqkR4fVgzSD1v7YfbY93PFlUFuFuyoN+gTvvtgkY/zegQZhs/gwHxMj j8Ok5fJ7cZ0dz5x5ohpZ4B0IssNlzywsDJEB3jbdJCzwep8/yS2h7aYi6kNh2293n5Az OrHh4L7iobGNTijskncGWGTI/vcprDnnPvRSDuBwWfo6QIYKn774WOGz/7EjmrGRF5QD FN9g== X-Gm-Message-State: AOAM5324c0Gg9KBBNP4GA+BGrG6V2EKjFAQo5rwhj3EaidGGjNhFsJA0 hz6GFeohaD7tMR5Y0isYVx1ij7SVs7Qc7KynKKDXlg+vw94= X-Google-Smtp-Source: ABdhPJyLjPqb4OhpMzBuo1iYOAect8CoTZd0iPEaHmm8xQTRfDc4mLab7eR4GwPTitV7OLxmGbFjdwdkwn/FaGzOqI8= X-Received: by 2002:ac8:66d8:: with SMTP id m24mr4568872qtp.39.1631792935731; Thu, 16 Sep 2021 04:48:55 -0700 (PDT) MIME-Version: 1.0 References: <20210911002608.14074-2-zimon.toutoune@gmail.com> <20210911002608.14074-1-zimon.toutoune@gmail.com> <87a6kid34a.fsf@netris.org> <865yv5vu06.fsf@gmail.com> <871r5pcrhz.fsf@netris.org> In-Reply-To: <871r5pcrhz.fsf@netris.org> From: zimoun Date: Thu, 16 Sep 2021 13:48:44 +0200 Message-ID: Subject: Re: [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. To: Mark H Weaver Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Mark, On Thu, 16 Sept 2021 at 02:08, Mark H Weaver wrote: > zimoun writes: > > > Therefore, there is an option (3). Move the =E2=80=99computed-origin-me= thod=E2=80=99 > > procedure to (guix packages) and add a comment about it; use it for > > icecat and linux with (@@ (guix packages) computed-origin-method). > > > > WDYT about this (3)? It simplifies this patch and let the time to > > discuss the =E2=80=99computed-origin-method=E2=80=99 case without expos= ing it to the > > public API. > > Sure, that sounds like a fine approach. Done in patch#50620. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 01 10:19:36 2021 Received: (at 50515) by debbugs.gnu.org; 1 Oct 2021 14:19:36 +0000 Received: from localhost ([127.0.0.1]:56804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWJNv-0005Q1-Vu for submit@debbugs.gnu.org; Fri, 01 Oct 2021 10:19:36 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:47022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWJNr-0005Pl-Hl for 50515@debbugs.gnu.org; Fri, 01 Oct 2021 10:19:34 -0400 Received: by mail-wr1-f41.google.com with SMTP id k7so15636718wrd.13 for <50515@debbugs.gnu.org>; Fri, 01 Oct 2021 07:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=ZQ6x5xq+7Ip5nBTrKiVPFp9KEio7vzsVTNoKUXhQiGs=; b=T01zpNi5wBuHtvoORWwFKN18sE14h7GnjWQg/FCDK2HaRaL+dOSj4OI6QB9TkygtCm 6+HPVi6mE2v/Ve6jvbIMMnj1OS3uOUWoFTiUk+FR9lDLojpY59IzouVt8Z6Mb/CiEJtt lvYEygQWm+yhM7nxNDExZh4HYii7hySUSBgJqOBA3bMxKoQBfsJcP7W7AbZ0AQ31aThm Rw/JyP4bbm1ey6gVk73MyYxm0DA5Xi+KqLOXp+NTP3uUNw1KBWPEq3vTebgclL/q6UxW 5Dh8b23Q/UE+rbsHYrWw+L77eh/9YE21pZt9VRuvliEVpuvqXrJ0lkZvCWEfUQj89Ko2 PK1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=ZQ6x5xq+7Ip5nBTrKiVPFp9KEio7vzsVTNoKUXhQiGs=; b=XcwmGAARDjpHzz1L8mDFVhR4eJFqYR/luIy1Enqhph+9R/BYy2JMXHlIC3RpfYMhwQ OoqxLp69UAJFRv1JjNMNN9zPNmfG8RhCjYuSF8RjRBu8C/jN4i98HbasInbEXwLxtw+q B8KRg1gGbdsNAizgVQqhP5PUSD5QQtuBONCsNBxm4mu8znR5CMN7uJawdKS2LqI/zmqa 8MWtkOVH1W3UJcHDjsQyrYASLroK1QY2D8aHU6cuQhIx95x6ckkwjtXcWbmCyEKAV0Wz xMcL1wKbfM3h2ei5Z+Kr9DZOWbuKbvb9HyU8t6MkLU4x+279XjhWUHqMtNoQu08DYdz/ visw== X-Gm-Message-State: AOAM530fBAgMJn9h7Dg834rBjVxnA1ynBlpjPD2WMrz2cpxEw3B8F5wu EcYb0nf++ssWMbdt/bh563Y= X-Google-Smtp-Source: ABdhPJwr/kzs+ZMMVTZfXQtoCTMOW5UKTEmmkNtDOyu9p6fzoKUl1kgPhfI1CkZdIvuVJ4yaf03maw== X-Received: by 2002:adf:ab19:: with SMTP id q25mr3330747wrc.64.1633097965570; Fri, 01 Oct 2021 07:19:25 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id h11sm5267457wru.10.2021.10.01.07.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 07:19:25 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org, ludo@gnu.org Subject: Re: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. References: <20210911002608.14074-1-zimon.toutoune@gmail.com> <20210911002608.14074-2-zimon.toutoune@gmail.com> Date: Fri, 01 Oct 2021 16:16:16 +0200 In-Reply-To: <20210911002608.14074-2-zimon.toutoune@gmail.com> (zimoun's message of "Sat, 11 Sep 2021 02:26:08 +0200") Message-ID: <86wnmwakzz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Thanks for 50620. However, because the package guix had not been updated in the same time =E2=80=93 see [2/2] of 50620 =E2=80=93 it makes co= nvoluted to avoid: --8<---------------cut here---------------start------------->8--- ERROR: In procedure %resolve-variable: error: computed-origin-method: unbound variable --8<---------------cut here---------------end--------------->8--- The package guix supports the previous location and as soon as it will be updated the new location will be effective. Because I am not convinced that people (at least me) will track that; to make it work with both locations means something along these lines: --8<---------------cut here---------------start------------->8--- (define computed-origin-method? (catch #t (lambda _ (define computed-origin-method (@@ (guix packages) computed-origin-method)) (lambda (method) (eq? method computed-origin-method))) (lambda _ (lambda (method) (or (eq? method (@@ (gnu packages linux) computed-origin-method)) (eq? method (@@ (gnu packages gnuzilla) computed-origin-metho= d))))))) (if (computed-origin-method? method) ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm ;; represent their 'uri' as 'promise'. (match uri ((? promise? promise) [...] ;;Regular packages represent 'uri' as string. `((type . ,(cond ((or (eq? url-fetch method) [...] --8<---------------cut here---------------end--------------->8--- Update the package guix reduces to just: --8<---------------cut here---------------start------------->8--- (if (eq? method (@@ (guix packages) computed-origin-method)) ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm ;; represent their 'uri' as 'promise'. (match uri ((? promise? promise) [...] ;;Regular packages represent 'uri' as string. `((type . ,(cond ((or (eq? url-fetch method) [...] --8<---------------cut here---------------end--------------->8--- which had been the original aim of 50620. Could you please update the package guix? See [2/2] of 50620. :-) Or do I miss something? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 03:54:04 2021 Received: (at 50515) by debbugs.gnu.org; 4 Oct 2021 07:54:04 +0000 Received: from localhost ([127.0.0.1]:35538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXInU-0006x5-BB for submit@debbugs.gnu.org; Mon, 04 Oct 2021 03:54:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXInS-0006wa-0F for 50515@debbugs.gnu.org; Mon, 04 Oct 2021 03:54:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43560) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXInM-0004Qn-MF; Mon, 04 Oct 2021 03:53:56 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60518 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXInM-0005q5-9z; Mon, 04 Oct 2021 03:53:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. References: <20210911002608.14074-1-zimon.toutoune@gmail.com> <20210911002608.14074-2-zimon.toutoune@gmail.com> <86wnmwakzz.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 =?utf-8?Q?Vend=C3=A9miaire?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Oct 2021 09:53:53 +0200 In-Reply-To: <86wnmwakzz.fsf@gmail.com> (zimoun's message of "Fri, 01 Oct 2021 16:16:16 +0200") Message-ID: <87v92dtecu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! zimoun skribis: > Could you please update the package guix? See [2/2] of 50620. :-) It=E2=80=99s not strictly necessary because the web site is built against t= he latest Guix commit anyway. You can try: guix build -f .guix.scm HTH! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 05 10:09:55 2021 Received: (at 50515) by debbugs.gnu.org; 5 Oct 2021 14:09:55 +0000 Received: from localhost ([127.0.0.1]:41539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8l-00045t-Dk for submit@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:55 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:43798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8j-00045a-6U for 50515@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:54 -0400 Received: by mail-wr1-f41.google.com with SMTP id r7so22078346wrc.10 for <50515@debbugs.gnu.org>; Tue, 05 Oct 2021 07:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QArQn51U+zXCwUtIw8PXoVBpPg++Wgae9DERMWn8Zac=; b=CIaxbL8DFHtarlr8nTZ6FqNbkUSnmPJj1rmfcu1CWzN0gZgLLdsCL8La7241qZVX9G f1SffcO643q30Sih/bRMV2ecceWy3j7wJ3spqDY4I1ZTvWbOOD5t8lwo0vRwkLbP75M7 Bc9+6l5VCtzjk4JEVwLCOnDrCiPVpAAG/dEMAC/k9v6NSG9jzSB/XEvDTN/ABVz6+sRw QKELMP1P+c/UImkrzdjxQvFTJrUJC5axjROBXInB1Q8hzDKqgL2V0GIc2B8/KWoBXUU5 Uss9hwgFiqkDUgJTTh2eX9sJDygcauh0r+85+UgSIM8YNIW8WL4XszkxWVV2FKRCykn1 53Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QArQn51U+zXCwUtIw8PXoVBpPg++Wgae9DERMWn8Zac=; b=h3lykr2nnOmLEWzXqT3cBabnbQhXJTx072tJD53SDTj3BMsBUyaE5NrqtbjDPxeE/r Y+GxTJkbCh9mbt4d1EKC52csl3waeusN6zOerMwlkH01cGrEkcTiakYBirCzqqb6gDfn MxTVu1khx9c/4JW0Wcfy9ArJeJK5+HWohzwLAQ66RpXMY2AxeH1X3HoPLXUDcZNJc5rP CRIhzEDhVmLey6fk4im4FFaTUNY/Q8y926Bx8WcZYsX0Bta0/cUNGC3eWDRBU97i+80i G0Q+YRn1j6E33eDtsvczTDqecCpEhtNuCdkVzQh00cz/dvnQpKL14gjy9AnMQNE14X/U 4W8A== X-Gm-Message-State: AOAM532zI1SkXyW0MPU+TNdiVsC+on9QZx647YKREaoHzC1vcGisDbXb H/q/45DZC6nkPo/TwM5IvvK7y2Fc6QlFRA== X-Google-Smtp-Source: ABdhPJxk0OLVW310u8TA31HNe9DAlczBUZpx8bkQJJQttX14+0isLQ1lsv7OEnEy0mm48me8AqArAw== X-Received: by 2002:adf:f302:: with SMTP id i2mr11829364wro.18.1633442987396; Tue, 05 Oct 2021 07:09:47 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k9sm17478479wrz.22.2021.10.05.07.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 07:09:47 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH v2 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL'. Date: Tue, 5 Oct 2021 16:09:36 +0200 Message-Id: <20211005140937.19272-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * website/apps/packages/data.scm (%package-list): Compare to 'yes' instead of any value. * website/README: Document it. --- website/README | 8 ++++++++ website/apps/packages/data.scm | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/website/README b/website/README index ce2819f..bc623c5 100644 --- a/website/README +++ b/website/README @@ -37,6 +37,14 @@ commands: -- haunt build #+end_example +Any other value than =GUIX_WEB_SITE_LOCAL=yes= will build the full website +considering all the packages and not a small subset. Note that the final +website is built using the following command: + +#+begin_example + guix build -f .guix.scm +#+end_example + ** Serve locally #+begin_example LANG=en_US.UTF-8 guix environment -CN -m manifest.scm \ diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm index d1bbc92..eb34d26 100644 --- a/website/apps/packages/data.scm +++ b/website/apps/packages/data.scm @@ -50,7 +50,8 @@ (string) id 1mXl8m-000467-P2 for submit@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:57 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:35490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl8k-00045c-7r for 50515@debbugs.gnu.org; Tue, 05 Oct 2021 10:09:55 -0400 Received: by mail-wm1-f46.google.com with SMTP id z184-20020a1c7ec1000000b003065f0bc631so3231328wmc.0 for <50515@debbugs.gnu.org>; Tue, 05 Oct 2021 07:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J1ixy7v9ulTATuLK12zUG+8X8VozY0FWmbsamB2kBk4=; b=W/zL+QsyJKMRUFKEq/KAbAChoV/6UpNyK+Cq0N0LbMdsXmCS/MBkBqpiDiRrnARUAE ff4/fAr4Eijxmfs7s5uGQ+Nxvh8xeQxyAI62kY4Ej50st2swKee9Yz0Jz2QeVty/8/u4 Y8loMW17kLm9iOz4hJugp0FUIh1/V63xYN0y4xjJk6SNkve+FYBjdq6OLQ6sKtUTeSvt /h1Sp/8WqpAOlhqHhRpT0ZG/mD7nqHpJdXKiVG6+kLQLVUrEBCTgKfgNyzpHiPpv9khR DYuY72Q/5zzZynbhE94Sry3nFd5MYuoJoP0Ks9yTrE3SUxgJUlw91x/39PExFsffS0ju hT6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J1ixy7v9ulTATuLK12zUG+8X8VozY0FWmbsamB2kBk4=; b=GE6PGrx3ub366G11XvQo4NWBkZpNVfuoxTSbnCksVPN+gdEGhM3/LRh/ydAybbHQDY zly0sB9/KNzDajFVG+HHetdBtfjfE5L3Yu2chX06LDdykQbSfTZxuzNXVwkYLDSOu5RI oIZqTRGpFO03hPir1w1Z+/Nj7IBvk0u3bKjp5F/m7DAKBLXJ/ivi8ltJogBjifOPCFrZ 5GjqhCzdGh4vI31mfmqK35aASeUqDe768gIulPI8TzWMbObcQg+BNDRt4WPjflRuYUCU G6+ydXj2gMZ0wM0CHlbAMVbH/FLkdTFQGEi5GuhWsC0WD1E6DRwtCtdUGDR4NESXBors bnKQ== X-Gm-Message-State: AOAM532ikvGueun4H/GWo5MihFbNsqFI3gNEmxdggbNMaqtgLYQk9Ez7 fr8kU4SsEw17lwyB81QpHjDnBHSOnuR6FA== X-Google-Smtp-Source: ABdhPJwslJTC1xoTpIjBpmQeuZWYqIzPkzpJnLL90NlsavezgnOS+NQhmlVLXhFad4IUp3Kq/JzZ4A== X-Received: by 2002:a1c:4e11:: with SMTP id g17mr2669844wmh.17.1633442988403; Tue, 05 Oct 2021 07:09:48 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id k9sm17478479wrz.22.2021.10.05.07.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 07:09:48 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH v2 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. Date: Tue, 5 Oct 2021 16:09:37 +0200 Message-Id: <20211005140937.19272-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211005140937.19272-1-zimon.toutoune@gmail.com> References: <20211005140937.19272-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported procedure from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-j [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.46 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.46 listed in list.dnswl.org] X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported procedure from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-json-builder): Idem. [flatten]: New procedure. --- website/apps/packages/builder.scm | 141 +++++++++++++++++++----------- 1 file changed, 89 insertions(+), 52 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index fb53215..9237d89 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -49,11 +49,14 @@ #:use-module ((guix base64) #:select (base64-encode)) #:use-module ((guix describe) #:select (current-profile)) #:use-module ((guix config) #:select (%guix-version)) + #:use-module (guix gexp) #:use-module (json) #:use-module (ice-9 match) #:use-module ((web uri) #:select (string->uri uri->string)) #:export (builder)) +;;; Required by 'origin->json' for 'computed-origin-method' corner cases +(define gexp-references (@@ (guix gexp) gexp-references)) ;;; ;;; Application builder. @@ -98,7 +101,7 @@ (define method (origin-method origin)) - (define uri ;represented as string + (define uri (origin-uri origin)) (define (resolve urls) @@ -106,53 +109,70 @@ (append-map (cut maybe-expand-mirrors <> %mirrors) (map string->uri urls)))) - `((type . ,(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) 'url) - ((eq? git-fetch method) 'git) - ((or (eq? svn-fetch method) - (eq? svn-multi-fetch method)) 'svn) - ((eq? hg-fetch method) 'hg) - (else #nil))) - ,@(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - `(("urls" . ,(list->vector - (resolve - (match uri - ((? string? url) (list url)) - ((urls ...) urls))))))) - ((eq? git-fetch method) - `(("git_url" . ,(git-reference-url uri)))) - ((eq? svn-fetch method) - `(("svn_url" . ,(svn-reference-url uri)))) - ((eq? svn-multi-fetch method) - `(("svn_url" . ,(svn-multi-reference-url uri)))) - ((eq? hg-fetch method) - `(("hg_url" . ,(hg-reference-url uri)))) - (else '())) - ,@(if (or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - (let* ((content-hash (origin-hash origin)) - (hash-value (content-hash-value content-hash)) - (hash-algorithm (content-hash-algorithm content-hash)) - (algorithm-string (symbol->string hash-algorithm))) - `(("integrity" . ,(string-append algorithm-string "-" - (base64-encode hash-value))))) - '()) - ,@(if (eq? method git-fetch) - `(("git_ref" . ,(git-reference-commit uri))) - '()) - ,@(if (eq? method svn-fetch) - `(("svn_revision" . ,(svn-reference-revision uri))) - '()) - ,@(if (eq? method svn-multi-fetch) - `(("svn_revision" . ,(svn-multi-reference-revision uri))) - '()) - ,@(if (eq? method hg-fetch) - `(("hg_changeset" . ,(hg-reference-changeset uri))) - '()))) + (if (eq? method (@@ (guix packages) computed-origin-method)) + ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm + ;; represent their 'uri' as 'promise'. + (match uri + ((? promise? promise) + (match (force promise) + ((? gexp? g) + (map origin->json + (filter-map (match-lambda + ((? gexp-input? thing) + (match (gexp-input-thing thing) + ((? origin? o) o) + (_ #f))) + (_ #f)) + (gexp-references g)))) + (_ `((type . #nil)))))) + ;;Regular packages represent 'uri' as string. + `((type . ,(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) 'url) + ((eq? git-fetch method) 'git) + ((or (eq? svn-fetch method) + (eq? svn-multi-fetch method)) 'svn) + ((eq? hg-fetch method) 'hg) + (else #nil))) + ,@(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + `(("urls" . ,(list->vector + (resolve + (match uri + ((? string? url) (list url)) + ((urls ...) urls))))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + ((eq? svn-multi-fetch method) + `(("svn_url" . ,(svn-multi-reference-url uri)))) + ((eq? hg-fetch method) + `(("hg_url" . ,(hg-reference-url uri)))) + (else '())) + ,@(if (or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + (let* ((content-hash (origin-hash origin)) + (hash-value (content-hash-value content-hash)) + (hash-algorithm (content-hash-algorithm content-hash)) + (algorithm-string (symbol->string hash-algorithm))) + `(("integrity" . ,(string-append algorithm-string "-" + (base64-encode hash-value))))) + '()) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision uri))) + '()) + ,@(if (eq? method svn-multi-fetch) + `(("svn_revision" . ,(svn-multi-reference-revision uri))) + '()) + ,@(if (eq? method hg-fetch) + `(("hg_changeset" . ,(hg-reference-changeset uri))) + '())))) (define (packages-json-builder) "Return a JSON page listing all packages." @@ -167,7 +187,12 @@ ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '()) ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '()) ,@(if (origin? (package-source package)) - `(("source" . ,(origin->json (package-source package)))) + `(("source" . ,(let ((json (origin->json (package-source package)))) + (match json + ((('type . x) other ...) + json) + ((head tail ...) ;multi-origin + head))))) ;XXXX: Improve this approximation '()) ("synopsis" . ,(package-synopsis package)) ,@(if (package-home-page package) @@ -195,11 +220,23 @@ (define (package->json package) `(,@(if (origin? (package-source package)) (origin->json (package-source package)) - `(("type" . "no-origin") + `((type . "no-origin") ("name" . ,(package-name package)))))) + (define (flatten lst) + ;; Convert nested lists to simple list + `(,@(if (null? lst) + '() + (match lst + ((head tail ...) + (match head + ((('type . x) other ...) + (cons head (flatten tail))) + (_ + (append (flatten head) (flatten tail))))))))) + (make-page "sources.json" - `(("sources" . ,(list->vector (map package->json (all-packages)))) + `(("sources" . ,(list->vector (flatten (map package->json (all-packages))))) ("version" . "1") ("revision" . ,(match (current-profile) -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 05 10:10:12 2021 Received: (at 50515) by debbugs.gnu.org; 5 Oct 2021 14:10:13 +0000 Received: from localhost ([127.0.0.1]:41550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl92-00047e-IF for submit@debbugs.gnu.org; Tue, 05 Oct 2021 10:10:12 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:43863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXl90-00047J-Qp for 50515@debbugs.gnu.org; Tue, 05 Oct 2021 10:10:11 -0400 Received: by mail-wr1-f46.google.com with SMTP id r7so22079864wrc.10 for <50515@debbugs.gnu.org>; Tue, 05 Oct 2021 07:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=ys+lCKkj14X+39PrcgR8+jSEExisihF6v+9xBvM8+0k=; b=Tq8hyOnUHm3WHqHSJagxjUO76X86TNu8X/G7D9WK+u/Rl9HgnBlBd+15S0U7uidcEq wvqwoxJ4N0s3jCBsK4pk3g027jMGZhYLVsAoPlUEGf4PxtLo0IIxWpKkGSVGQKw27zta Zg1FNXOdYXV0aKaS1KraEvXBLfWSrf+NSLsq/mtoenAYroKUp+1kN9yhMpY2hNOxXfI8 QtTl9Q5rggw8R0nP9Haeh/MEtHJ420DT2hlNjCGCZgEI4g4yFYPkFAxqH/1rkO069G+7 7tkXhcOuLhEyCvFh0kSY/HqnD3EX9GYay/czGSTlLEybxdiqnV53+YZZNZV8scnc2I9A jtrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=ys+lCKkj14X+39PrcgR8+jSEExisihF6v+9xBvM8+0k=; b=BF8IG2FYLZWcmqY8j7IIH/FppmozE8hLdgdW4mIbztu9SpKaShX4m6YD2DVzIFpsWa wYbcwQLkW4tW1se/Q8M5U5uHmR/IraEdJFPMEQtz8FyIb2gydd5gVvADh8vHVfL8LGin hKNktS/IWMu6MfWDc5YOa3Ki22GhwsMKMjOqYMuhq73Kv+X/pCxZnjyMjc57GRRqOEU/ xYbCKa+JgSrHgQYec45cORKP4BE545vH2NytgVHpljgJVLtBsmmQPhiVxqnyDuggyOmP 9yTycaYNsqn6+3q8Hv0UpFpajpyiQ3/OCzfIUnaP3WEt3mc8EuhJ+0z6AszgoLHOVNwY EQhg== X-Gm-Message-State: AOAM533gCj4JdpRttbMRNq+/aAEmkkyOvnLmfZ7O8Dho/F5C7vgstexz p5CMXz3Lt02/CFQzRhlVgn8Kv6BWHpwp6A== X-Google-Smtp-Source: ABdhPJwbmSgTD4YriP01Evf42MU99LEPWOeHTkQlGERXnsF7U6AeM38h1bdHLtIAuWKemsDAgOjH+g== X-Received: by 2002:adf:a319:: with SMTP id c25mr22255627wrb.307.1633443001454; Tue, 05 Oct 2021 07:10:01 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id r9sm17814097wru.2.2021.10.05.07.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 07:10:00 -0700 (PDT) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. In-Reply-To: <87v92dtecu.fsf@gnu.org> References: <20210911002608.14074-1-zimon.toutoune@gmail.com> <20210911002608.14074-2-zimon.toutoune@gmail.com> <86wnmwakzz.fsf@gmail.com> <87v92dtecu.fsf@gnu.org> Date: Tue, 05 Oct 2021 16:09:57 +0200 Message-ID: <86sfxflg0a.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, v2 sent. But not tested=E2=80=A6 On Mon, 04 Oct 2021 at 09:53, Ludovic Court=C3=A8s wrote: > zimoun skribis: > >> Could you please update the package guix? See [2/2] of 50620. :-) > > It=E2=80=99s not strictly necessary because the web site is built against= the > latest Guix commit anyway. You can try: > > guix build -f .guix.scm Running locally this command, I get this error. That=E2=80=99s why I think the recommendation using =E2=80=9Cguix environment -m manifest.scm=E2= =80=9D is much easier. Anyway! --8<---------------cut here---------------start------------->8--- Running 'haunt build' for lingua de_DE... Backtrace: In haunt/ui.scm: 125:6 19 (run-haunt-command _ . _) In haunt/ui/build.scm: 60:4 18 (haunt-build . _) In haunt/site.scm: 130:14 17 (build-site _) In haunt/utils.scm: 64:11 16 (flat-map _ . _) In srfi/srfi-1.scm: 586:29 15 (map1 _) 586:29 14 (map1 _) 586:29 13 (map1 _) 586:29 12 (map1 _) 586:17 11 (map1 (#= =E2=80=A6)) In unknown file: 10 (_ # =E2=80=A6) In ice-9/eval.scm: 155:9 9 (_ _) 155:9 8 (_ _) 173:39 7 (_ #(#(#)= =E2=80=A6)) 293:34 6 (_ #(#(#(#))= =E2=80=A6)) 159:9 5 (_ #(#(#(#))= =E2=80=A6)) 159:9 4 (_ _) 196:43 3 (_ _) In unknown file: 2 (force #) In ice-9/eval.scm: 245:16 1 (_ #(#(#(#))= =E2=80=A6)) In unknown file: 0 (string=3D? "yes" #f) ERROR: In procedure string=3D?: In procedure string=3D: Wrong type argument in position 2 (expecting string= ): #f building pages in '/tmp/gnu.org/software/guix'... Backtrace: --8<---------------cut here---------------end--------------->8--- Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 18 08:23:59 2021 Received: (at 50515) by debbugs.gnu.org; 18 Oct 2021 12:23:59 +0000 Received: from localhost ([127.0.0.1]:46157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcRgN-0005F3-Hz for submit@debbugs.gnu.org; Mon, 18 Oct 2021 08:23:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcRgL-0005Er-79 for 50515@debbugs.gnu.org; Mon, 18 Oct 2021 08:23:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36640) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcRgG-0000h4-0Y; Mon, 18 Oct 2021 08:23:52 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:58414 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcRgF-0000RU-Nh; Mon, 18 Oct 2021 08:23:51 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#50515: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'. References: <20211005140937.19272-1-zimon.toutoune@gmail.com> <20211005140937.19272-2-zimon.toutoune@gmail.com> Date: Mon, 18 Oct 2021 14:23:49 +0200 In-Reply-To: <20211005140937.19272-2-zimon.toutoune@gmail.com> (zimoun's message of "Tue, 5 Oct 2021 16:09:37 +0200") Message-ID: <87tuhea5d6.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! zimoun skribis: > With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages consider= ed > are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and > gnu/packages/linux.scm. > > * website/apps/packages/builder.scm (gexp-references): Unexported procedu= re > from the module '(guix gexp)'. > (origin->json): Add 'computed-origin-method' case. > (package-json-builder): Adjust. > (sources-json-builder): Idem. > [flatten]: New procedure. Apologies for the looong delay! > +;;; Required by 'origin->json' for 'computed-origin-method' corner cases > +(define gexp-references (@@ (guix gexp) gexp-references)) Hmm not great. The only public API that would allow us to approximate it is =E2=80=98lower-gexp=E2=80=99, but it requires access to the daemon, s= o it=E2=80=99s not suitable. Let=E2=80=99s keep it this way! > (define (package->json package) > `(,@(if (origin? (package-source package)) > (origin->json (package-source package)) > - `(("type" . "no-origin") > + `((type . "no-origin") > ("name" . ,(package-name package)))))) >=20=20 > + (define (flatten lst) > + ;; Convert nested lists to simple list > + `(,@(if (null? lst) > + '() > + (match lst > + ((head tail ...) > + (match head > + ((('type . x) other ...) > + (cons head (flatten tail))) > + (_ > + (append (flatten head) (flatten tail))))))))) > + > (make-page "sources.json" > - `(("sources" . ,(list->vector (map package->json (all-packa= ges)))) > + `(("sources" . ,(list->vector (flatten (map package->json (= all-packages))))) Maybe we should just change =E2=80=98package->json=E2=80=99 to always retur= n a list of JSON records (alists)? That way, we would write: (append-map package->json (all-packages)) which I find slightly clearer. WDYT? Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 05:41:58 2021 Received: (at 50515) by debbugs.gnu.org; 21 Oct 2021 09:41:58 +0000 Received: from localhost ([127.0.0.1]:56271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdUaE-0006Do-2r for submit@debbugs.gnu.org; Thu, 21 Oct 2021 05:41:58 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:39917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdUaC-0006DW-J8 for 50515@debbugs.gnu.org; Thu, 21 Oct 2021 05:41:56 -0400 Received: by mail-wm1-f46.google.com with SMTP id y22-20020a1c7d16000000b003231ea3d705so2482400wmc.4 for <50515@debbugs.gnu.org>; Thu, 21 Oct 2021 02:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kapqVad6eu9vRG6USlZ8Pct3QV/x7LLuJ8c/seSQr+4=; b=iyVNA9Tm3lIZKqOctqlaxWQT3koDI7At2eIfv56GMPBGxgPLwlxb0lyIA8HB5KXBbf mJKI5gGg+GrnX2DIk0u04PaDFpbvKWzQRrnDxFwDLwikEjNYloBJkbPhTAzO2EWE4pyj RRAT4Prn4HiDXO5Z+Vs5gglbxED8RLRuFS2LuSMKUqCM1quP0+lKwkhLoC93ZyCq9Cg1 2xx4iXXDuiPxem1Xwzf7FSbPpbNL/p/2lzpdDQG4LWt+y9sJka9PwauufagYfyhXlkor L65ygkSc6ghK0gjdN2q9w8JH1elOzqo8LjswkDDsxn0p9HSDEdYzVZi+aHwrShpU/aeo Q3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kapqVad6eu9vRG6USlZ8Pct3QV/x7LLuJ8c/seSQr+4=; b=MveDA/p/8h59bB7xtDKG+FumsYHYEAhQFoQocWvsDMByHiyNmI20AFx0CA7Koy0CyI CyaYwHj0yt0dCarsSlndtHBliaYOKFxE1lZOjxG4VnVZNywYHpU6LcPJEA0aRSckD2al 8cpMRdgRC7QKJ5zC6h//pobREPtCXjF4FQPKw8F5Y1Gqun0TsuKgRm/2trmPBPqxKI7b a5Qr6EYq2Qv9tjS/nZespu97yUhwjsFLooD1ZYcfcEwnEB+r74f+H2a5KaZQzr3KBXS0 bSYbj63c+bimzNUiKnRxpQemeVEqN+E39x2WsII5Ub7DKmmagqnxhLaQ2Zun/lIGcc75 D9UQ== X-Gm-Message-State: AOAM532DTqSQCv6/74AG4BuV5+/pK+ziAn3nk0C5kElzAiI1y9Xbzk7g 7xHdNpHsNMglFBuX//jf5Y1cBcGiGlQ= X-Google-Smtp-Source: ABdhPJzL4XFVShGOgcI6xSExnXyEDbH08oFg4yQmjHT5mtCu5oJWolSEk0d7HMMNo8pm/GScVLO+tg== X-Received: by 2002:a05:600c:2044:: with SMTP id p4mr5396602wmg.53.1634809310623; Thu, 21 Oct 2021 02:41:50 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id l24sm7316991wmi.3.2021.10.21.02.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 02:41:50 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH v3 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL'. Date: Thu, 21 Oct 2021 11:41:37 +0200 Message-Id: <20211021094138.2245-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * website/apps/packages/data.scm (%package-list): Compare to 'yes' instead of any value. * website/README: Document it. --- website/README | 8 ++++++++ website/apps/packages/data.scm | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/website/README b/website/README index ce2819f..bc623c5 100644 --- a/website/README +++ b/website/README @@ -37,6 +37,14 @@ commands: -- haunt build #+end_example +Any other value than =GUIX_WEB_SITE_LOCAL=yes= will build the full website +considering all the packages and not a small subset. Note that the final +website is built using the following command: + +#+begin_example + guix build -f .guix.scm +#+end_example + ** Serve locally #+begin_example LANG=en_US.UTF-8 guix environment -CN -m manifest.scm \ diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm index d1bbc92..eb34d26 100644 --- a/website/apps/packages/data.scm +++ b/website/apps/packages/data.scm @@ -50,7 +50,8 @@ (string) id 1mdUaH-0006E5-Fe for submit@debbugs.gnu.org; Thu, 21 Oct 2021 05:42:02 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:53040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdUaD-0006DZ-QS for 50515@debbugs.gnu.org; Thu, 21 Oct 2021 05:41:59 -0400 Received: by mail-wm1-f51.google.com with SMTP id m42so41792wms.2 for <50515@debbugs.gnu.org>; Thu, 21 Oct 2021 02:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YC9K8Arh3mWkt9DkSbnfS2PE0S2734xO/31E4gKnXdI=; b=SrmqhJ2y0emPaSHJwPwNOfmEIEWmRY5dDINzoYFSnosUmFRrfFDGmOyLHc8+1k26MX nk5/CxO/dr+oNKA2tlO/ZiKM9dynXlQArID26ayU9z6ybYPXEnsig3lzTUaANd4I9IgH xTDVfzAg16c4c+cF147sHbq/AzGY4uMle2H7TsBg8nK3WHmm/QyJQ9+uqpoCTY8yj790 tZvA4bvk8deOE7i+SPncbeUj8DSn4ljRaZtMp5OF0E34XO6KcwinxX/z5Jc1262zMS8D oS8PXyJrNf8lufQEikh2vaopQlyvV81G5JZ/wkd03d+74A/+/PAXPpVUmHH88WqeJyc6 lesA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YC9K8Arh3mWkt9DkSbnfS2PE0S2734xO/31E4gKnXdI=; b=HMHaYzVuQkQmalhmNBGtpRJTTdH8oeag/bix2VlrsuuFBUqn6eLEPAneoRozL9J+1k mOLMrUdDWgt7q+IpeHg7x+T6BCLaXkj1thFgr81JskmvuL38E6UR588juj35MyOnLARE KTyP/ksdBzec4OY289riaTXBM1btWLlEyiQYwgEW4JOVDQssu9rgqprvfd4MxcKnCqdG J/jMuBltSnySWs8qGDKrS8fqK8p00g325CWsC4dSNapGD3pc/0DmDUWZ5ETH2bqlfRJ8 QFydbVKn8Hjrda8MFwyieHYEMoBkt8Wy7WmQSAp8bjevRmMO/9/EThtcQCMuIpK0E6oX VNew== X-Gm-Message-State: AOAM533cBzENHo0MQ/9z/WFY4kDzJT34oxDfUJOt+34jgEDZ+3+lmoWO Lo0ZJnFIgL7IuohN7Rvr9UFsGh+JJm0= X-Google-Smtp-Source: ABdhPJxaCVPY6D/bitrr7vatJQBjRr9rYRv3HG8wdffXyDaJxBmF9+sQhY0ycXqOsfN2grLelOvcHw== X-Received: by 2002:a1c:9d50:: with SMTP id g77mr5295458wme.58.1634809311993; Thu, 21 Oct 2021 02:41:51 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id l24sm7316991wmi.3.2021.10.21.02.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 02:41:51 -0700 (PDT) From: zimoun To: 50515@debbugs.gnu.org Subject: [PATCH v3 2/2] website: Add 'computed-origin-method' packages to 'sources.json'. Date: Thu, 21 Oct 2021 11:41:38 +0200 Message-Id: <20211021094138.2245-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211021094138.2245-1-zimon.toutoune@gmail.com> References: <20211021094138.2245-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Using Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered by 'computed-origin-method' are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported procedure from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-j [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.51 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.51 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Debbugs-Envelope-To: 50515 Cc: zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Using Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered by 'computed-origin-method' are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. * website/apps/packages/builder.scm (gexp-references): Unexported procedure from the module '(guix gexp)'. (origin->json): Add 'computed-origin-method' case. (package-json-builder): Adjust. (sources-json-builder): Idem. --- website/apps/packages/builder.scm | 127 +++++++++++++++++------------- 1 file changed, 74 insertions(+), 53 deletions(-) diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm index fb53215..b08ba2e 100644 --- a/website/apps/packages/builder.scm +++ b/website/apps/packages/builder.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolò Balzarotti -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; ;;; Initially written by sirgazil ;;; who waives all copyright interest on this file. @@ -49,11 +49,14 @@ #:use-module ((guix base64) #:select (base64-encode)) #:use-module ((guix describe) #:select (current-profile)) #:use-module ((guix config) #:select (%guix-version)) + #:use-module (guix gexp) #:use-module (json) #:use-module (ice-9 match) #:use-module ((web uri) #:select (string->uri uri->string)) #:export (builder)) +;;; Required by 'origin->json' for 'computed-origin-method' corner cases +(define gexp-references (@@ (guix gexp) gexp-references)) ;;; ;;; Application builder. @@ -98,7 +101,7 @@ (define method (origin-method origin)) - (define uri ;represented as string + (define uri (origin-uri origin)) (define (resolve urls) @@ -106,53 +109,70 @@ (append-map (cut maybe-expand-mirrors <> %mirrors) (map string->uri urls)))) - `((type . ,(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) 'url) - ((eq? git-fetch method) 'git) - ((or (eq? svn-fetch method) - (eq? svn-multi-fetch method)) 'svn) - ((eq? hg-fetch method) 'hg) - (else #nil))) - ,@(cond ((or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - `(("urls" . ,(list->vector - (resolve - (match uri - ((? string? url) (list url)) - ((urls ...) urls))))))) - ((eq? git-fetch method) - `(("git_url" . ,(git-reference-url uri)))) - ((eq? svn-fetch method) - `(("svn_url" . ,(svn-reference-url uri)))) - ((eq? svn-multi-fetch method) - `(("svn_url" . ,(svn-multi-reference-url uri)))) - ((eq? hg-fetch method) - `(("hg_url" . ,(hg-reference-url uri)))) - (else '())) - ,@(if (or (eq? url-fetch method) - (eq? url-fetch/tarbomb method) - (eq? url-fetch/zipbomb method)) - (let* ((content-hash (origin-hash origin)) - (hash-value (content-hash-value content-hash)) - (hash-algorithm (content-hash-algorithm content-hash)) - (algorithm-string (symbol->string hash-algorithm))) - `(("integrity" . ,(string-append algorithm-string "-" - (base64-encode hash-value))))) - '()) - ,@(if (eq? method git-fetch) - `(("git_ref" . ,(git-reference-commit uri))) - '()) - ,@(if (eq? method svn-fetch) - `(("svn_revision" . ,(svn-reference-revision uri))) - '()) - ,@(if (eq? method svn-multi-fetch) - `(("svn_revision" . ,(svn-multi-reference-revision uri))) - '()) - ,@(if (eq? method hg-fetch) - `(("hg_changeset" . ,(hg-reference-changeset uri))) - '()))) + (if (eq? method (@@ (guix packages) computed-origin-method)) + ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm + ;; represent their 'uri' as 'promise'. + (match uri + ((? promise? promise) + (match (force promise) + ((? gexp? g) + (append-map origin->json + (filter-map (match-lambda + ((? gexp-input? thing) + (match (gexp-input-thing thing) + ((? origin? o) o) + (_ #f))) + (_ #f)) + (gexp-references g)))) + (_ `((type . #nil)))))) + ;;Regular packages represent 'uri' as string. + `(((type . ,(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) 'url) + ((eq? git-fetch method) 'git) + ((or (eq? svn-fetch method) + (eq? svn-multi-fetch method)) 'svn) + ((eq? hg-fetch method) 'hg) + (else #nil))) + ,@(cond ((or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + `(("urls" . ,(list->vector + (resolve + (match uri + ((? string? url) (list url)) + ((urls ...) urls))))))) + ((eq? git-fetch method) + `(("git_url" . ,(git-reference-url uri)))) + ((eq? svn-fetch method) + `(("svn_url" . ,(svn-reference-url uri)))) + ((eq? svn-multi-fetch method) + `(("svn_url" . ,(svn-multi-reference-url uri)))) + ((eq? hg-fetch method) + `(("hg_url" . ,(hg-reference-url uri)))) + (else '())) + ,@(if (or (eq? url-fetch method) + (eq? url-fetch/tarbomb method) + (eq? url-fetch/zipbomb method)) + (let* ((content-hash (origin-hash origin)) + (hash-value (content-hash-value content-hash)) + (hash-algorithm (content-hash-algorithm content-hash)) + (algorithm-string (symbol->string hash-algorithm))) + `(("integrity" . ,(string-append algorithm-string "-" + (base64-encode hash-value))))) + '()) + ,@(if (eq? method git-fetch) + `(("git_ref" . ,(git-reference-commit uri))) + '()) + ,@(if (eq? method svn-fetch) + `(("svn_revision" . ,(svn-reference-revision uri))) + '()) + ,@(if (eq? method svn-multi-fetch) + `(("svn_revision" . ,(svn-multi-reference-revision uri))) + '()) + ,@(if (eq? method hg-fetch) + `(("hg_changeset" . ,(hg-reference-changeset uri))) + '()))))) (define (packages-json-builder) "Return a JSON page listing all packages." @@ -167,7 +187,8 @@ ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '()) ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '()) ,@(if (origin? (package-source package)) - `(("source" . ,(origin->json (package-source package)))) + `(("source" . ,(list->vector + (origin->json (package-source package))))) '()) ("synopsis" . ,(package-synopsis package)) ,@(if (package-home-page package) @@ -195,11 +216,11 @@ (define (package->json package) `(,@(if (origin? (package-source package)) (origin->json (package-source package)) - `(("type" . "no-origin") - ("name" . ,(package-name package)))))) + `(((type . "no-origin") + ("name" . ,(package-name package))))))) (make-page "sources.json" - `(("sources" . ,(list->vector (map package->json (all-packages)))) + `(("sources" . ,(list->vector (append-map package->json (all-packages)))) ("version" . "1") ("revision" . ,(match (current-profile) -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 05:47:07 2021 Received: (at 50515) by debbugs.gnu.org; 21 Oct 2021 09:47:07 +0000 Received: from localhost ([127.0.0.1]:56279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdUfD-0006Mh-Eh for submit@debbugs.gnu.org; Thu, 21 Oct 2021 05:47:07 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:34541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdUfB-0006MD-3c for 50515@debbugs.gnu.org; Thu, 21 Oct 2021 05:47:06 -0400 Received: by mail-wr1-f42.google.com with SMTP id y3so159168wrl.1 for <50515@debbugs.gnu.org>; Thu, 21 Oct 2021 02:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=RIpOPcGwXw81/GXcJCJEgxNO3YIGmT8+NmOYyMUsiQQ=; b=hZuMpDup7ZmEggT9iXhz6h+3RE1Xiu35jLnTp+AGlG+V416U+ZYV4DF4vnq7u5vCel uvAZ805AlxOKPT75DuPJclFXxiVmIgybJSro65D09ivJGj4U0z2GsPzvllP+IXFxc4Il DL7S4kJndNYLQ5HdZgGcU2BHnXGdv4OyXdJc/Kf/q+gGiprG6DTaI+kSL3uhin/BMNgt rUGbF40m082nhKuJfxpodddOywUcnhcDtchUcMyq6nQtm0/Wa2iwea6Ahy767qmEeBRf 48/YsZcF4U88LofLAIDgUI9TE1mJ6rCSphUNyHrRaFUnCWp9AvA2EYUpenXFpCjaLAKa Ey/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=RIpOPcGwXw81/GXcJCJEgxNO3YIGmT8+NmOYyMUsiQQ=; b=WewGPOJuWgh6gSZXVh0QL8HOZOui3qZmV4M8Kgw09z5kkoXnb3RjVjITwo/6wrKb15 dDSCurgzK2CCw9Wn5vbGvFv5hOetXVD6q9bX1f6/tJPUceprI1Pobnj7R4TFCzOqq6bg MqR7NLAixGE+TQnsmgLAQQLpcgJy//EVPY+8D8/I9R/bCr8tRhajSP2IU82tWObiWvt1 xqT0v86aPJNDjTSBy7CmGJSGN1Ku4Ac50n3GfkUhHDowApzroxbwie/L+odSykCcSbv7 NbCBYCyUtmCVK2i8b8zCUhK6ysw9kPTbACy0axYdPhzzCpIP98gGsdbiCoFVkBY3EfD3 0N5w== X-Gm-Message-State: AOAM530PaBzCwY5T8MMuniJocrhXgb2o35JWn3HVZMJ52cWCIdi3SXE3 3ghLTWxq7Te+ubrtDdki0zZhlUxOp+M= X-Google-Smtp-Source: ABdhPJwtQS4wsFeBEf1sXAQjMIyO/TgsOdTccpFf09C0U+cmqdliFXKHIjkt4Tqur27drHxmzhAAGg== X-Received: by 2002:adf:a4c5:: with SMTP id h5mr299497wrb.38.1634809619194; Thu, 21 Oct 2021 02:46:59 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id w26sm4375599wmk.34.2021.10.21.02.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 02:46:58 -0700 (PDT) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#50515: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'. In-Reply-To: <87tuhea5d6.fsf_-_@gnu.org> References: <20211005140937.19272-1-zimon.toutoune@gmail.com> <20211005140937.19272-2-zimon.toutoune@gmail.com> <87tuhea5d6.fsf_-_@gnu.org> Date: Thu, 21 Oct 2021 11:42:24 +0200 Message-ID: <86v91qemtb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50515 Cc: 50515@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Mon, 18 Oct 2021 at 14:23, Ludovic Court=C3=A8s wrote: >> (make-page "sources.json" >> - `(("sources" . ,(list->vector (map package->json (all-pack= ages)))) >> + `(("sources" . ,(list->vector (flatten (map package->json = (all-packages))))) > > Maybe we should just change =E2=80=98package->json=E2=80=99 to always ret= urn a list of > JSON records (alists)? That way, we would write: > > (append-map package->json (all-packages)) > > which I find slightly clearer. Done with v3. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 16:58:31 2021 Received: (at 50515-done) by debbugs.gnu.org; 21 Oct 2021 20:58:31 +0000 Received: from localhost ([127.0.0.1]:58740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdf8x-0003KT-8A for submit@debbugs.gnu.org; Thu, 21 Oct 2021 16:58:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdf8w-0003KG-3k for 50515-done@debbugs.gnu.org; Thu, 21 Oct 2021 16:58:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37604) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdf8q-0003s3-QT; Thu, 21 Oct 2021 16:58:24 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54723 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdf8q-0000TQ-Fe; Thu, 21 Oct 2021 16:58:24 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#50515: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'. References: <20210911001424.9860-1-zimon.toutoune@gmail.com> <20211021094138.2245-1-zimon.toutoune@gmail.com> Date: Thu, 21 Oct 2021 22:58:21 +0200 In-Reply-To: <20211021094138.2245-1-zimon.toutoune@gmail.com> (zimoun's message of "Thu, 21 Oct 2021 11:41:37 +0200") Message-ID: <87zgr2umc2.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50515-done Cc: 50515-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) zimoun skribis: > * website/apps/packages/data.scm (%package-list): Compare to 'yes' instea= d of > any value. > * website/README: Document it. [...] > Using Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages conside= red > by 'computed-origin-method' are IceCat and the Linux kernel; see: > gnu/packages/gnuzilla.scm and gnu/packages/linux.scm. > > * website/apps/packages/builder.scm (gexp-references): Unexported procedu= re > from the module '(guix gexp)'. > (origin->json): Add 'computed-origin-method' case. > (package-json-builder): Adjust. > (sources-json-builder): Idem. Finally pushed, thanks! Ludo=E2=80=99. From unknown Mon Jun 16 23:33:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 19 Nov 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator