From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KGLMOshCqmVuUAAA62LTzQ:P1 (envelope-from ) for ; Fri, 19 Jan 2024 10:37:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KGLMOshCqmVuUAAA62LTzQ (envelope-from ) for ; Fri, 19 Jan 2024 10:37:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=YyFmQIwb; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705657032; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=7GI5BPaC1bHTwyb5THkEEe9wcQKrE1TNTB2rUaIUW+4=; b=cWf4+rAotIglEcmediI9wbE2EHePMebQDNtLAfNwgYCZ8vASfLx+KfXmvgtVfntwfmyZsj jMPtw5wSLDBKPVudU9KhlA6KuEBlE4Ox8aQ/OgrRo3NlLSMYRSmyWWcmyNXfDbcsxZtPf0 jHoEQ9Fun9ubluGl8MCyN7W93nEjrHskfSCjebvnAbP4272+ZCEetZJm0Hc8l50BHtu2lh fuqkMA01vr+pBLmR+o2HTI/Zmll32MTMkz6Il7JXle0AIbjA1ql6Z6NV83hqeP5ytcF13J KPHDC9ALV0tErTcoRk9nKjh5HG96lFPtfDvJYPhxuiqVMVB/KXRrmloAaNHomQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=YyFmQIwb; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705657032; a=rsa-sha256; cv=none; b=AsaoRTNp0jtatzieg2b1USwn5LaYYjUtT4SnDqInIaug6432g+Q7FGyKHLkkOB3aBW7QuR uwp+a2wcwwod0yMnF4d2lZjfk1krBKItVEHqGgp33rP/sORzXzhj9u9VZKpbEoQfHZY9/H 3aU10yxP31Kh2NNPk2RlcJMX4B+gsZwzvf2WbHgsfPZFAKshsF5bz2hqpkzHMyvpzW/49e zUJq3vrcZJdu0VR7RonQNsz748UVRHLzXP5iCE7XszP5cIteFHYe01Ncs8QS9XgbUbbmOz Mj/cI3jlwV/VVH33WqbI5p2cY9qWHa3Ve6DVdSiRR+mSp5LgBHtCVWVGg+8Bxg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 861DC3FE68 for ; Fri, 19 Jan 2024 10:37:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQlIn-0008Gb-6G; Fri, 19 Jan 2024 04:36:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQlIm-0008GP-3x for guix-devel@gnu.org; Fri, 19 Jan 2024 04:36:40 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQlIi-0007lJ-EC for guix-devel@gnu.org; Fri, 19 Jan 2024 04:36:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7GI5BPaC1bHTwyb5THkEEe9wcQKrE1TNTB2rUaIUW+4=; b=YyFmQIwbaGQctqPqTFXs8VMeYepH3QdZCLfeM4fwJAxWvIj/lyDLm7ML BdEStGQex1HJhc1JMhcDyA4GEbhpu5ybGmohghKgUbBwBTtJvQnROlAtf RD6zlk7AkgMmjeNsUwa+brBsm8s5g5KJJI3pmk/M1Avs+5J8FB03586G4 E=; X-IronPort-AV: E=Sophos;i="6.05,204,1701126000"; d="scan'208";a="147540507" Received: from unknown (HELO ribbon) ([193.50.110.52]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 10:36:31 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Cc: Emmanuel Agullo Subject: Fetching a channel set over HTTP X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 30 =?utf-8?Q?Niv=C3=B4se?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Crible 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: Fri, 19 Jan 2024 10:36:30 +0100 Message-ID: <87mst1br6p.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -11.42 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -11.42 X-Migadu-Queue-Id: 861DC3FE68 X-TUID: /GpbELXxs4sl Hello Guix! My colleague Emmanuel Agullo came up with an interesting use case and suggestion that we got around to play with. If you paste the following snippet as ~/.config/guix/channels.scm: --8<---------------cut here---------------start------------->8--- (use-modules (guix http-client) (json) (guix channels)) (define-syntax alist-let (syntax-rules () ((_ alist (variable rest ...) body ...) (let ((variable (assoc-ref alist (symbol->string 'variable)))) (alist-let alist (rest ...) body ...))) ((_ alist () body ...) (begin body ...)))) (define (alist->channel-introduction alist) (alist-let alist (signer commit) (make-channel-introduction commit (openpgp-fingerprint signer)))) (define (alist->channel alist) (alist-let alist (name url branch commit introduction) (channel (name (string->symbol name)) (url url) (branch branch) (commit commit) (introduction (and=3D> introduction alist->channel-introduction)))= )) (pk 'channels (map alist->channel (vector->list (json->scm (http-fetch/cached "https://people.bordeaux.inria.fr/lcourtes/tmp/channels.json"))))) --8<---------------cut here---------------end--------------->8--- =E2=80=A6 then anytime you run =E2=80=98guix pull=E2=80=99, you=E2=80=99ll = actually get the channels I published in that =E2=80=98channels.json=E2=80=99 file (generated by =E2=80=98guix describe -f json=E2=80=99). Since it=E2=80=99s JSON, you=E2=80=99re not executing arbitrary code; the a= uthentication and downgrade prevention mechanisms are in effect too, although the file could direct you to unauthenticated third-party channels (authentication is always required for the =E2=80=98guix=E2=80=99 channel itself) and there= =E2=80=99s no downgrade prevention if you=E2=80=99re using =E2=80=98time-machine=E2=80=99= rather than =E2=80=98pull=E2=80=99. The use cases are: 1. Within a team, everyone would default to downloading an agreed-upon channels file. Someone in the team is responsible for keeping that file up-to-date etc. 2. One could define a =E2=80=9Cstable distro=E2=80=9D by publishing such = a file: they=E2=80=99d pin channels to specific commits and change those commi= ts only when the packages they care about have been tested. 3. As someone distributing software, you could publish such a file and provide simple instructions to deploy the software. 4. Cuirass, qa.guix, etc. could publish a channels file for each issue, branch, or jobset so that users can trivially reproduce it. What if we exposed the snippet above (1) as a =E2=80=98download-channels=E2= =80=99 procedure, say, and (2) at the CLI level? guix time-machine -C https://example.org/channels.json -- =E2=80=A6 Thoughts? Ludo=E2=80=99.