From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EB9UDkLwe2cMUgEAe85BDQ:P1 (envelope-from ) for ; Mon, 06 Jan 2025 15:01:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EB9UDkLwe2cMUgEAe85BDQ (envelope-from ) for ; Mon, 06 Jan 2025 16:01:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="J8lkOG/u"; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=UO2Vnkcl; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736175682; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=g6Jwt4cdSLO8r+HXF6kbwmnRGM01bXY3z4R1wqzhifA=; b=Q6AHWTh+Bny4OGYeSneMjDeMZuuSOS3AwrTI8miNYjo8+aI4nwSKSRLX2ItBvgby+/PReP +YZhFO0xvzwzaXsdqiUaPoPD0Tk4Kx8VmSL4lrXS4V27dwOx7vYFFleNiZgnk7373svJwl lHIy6JCL9pztV+ur2ScAd3vnTS0o4n7WGPz0Y85ZidKsykLA743F3QZS0oKwwL8zi7EYKM ZpkZXhVWM+SDPpRNNTkRTVH2OaKUN9nQXDO4VmLQOGXiAsNcrn0zmum5DQ7JhWKRrs0p/j McpmWWO/is0Cjx4grbYBBG+4ICxsWNljXMS+mImBobIHVlZsLHRQnc3k8XNCYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="J8lkOG/u"; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=UO2Vnkcl; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736175682; a=rsa-sha256; cv=none; b=oJr8TUnvTcVKnZtt74usbBqAyrL4wA60a5Hj8sfqZwmIwgmm/q6blZxHPhGzGluLqg3gQO 8tGVvCDcM9c9J2/mwWTnEUL6te9PRH64CWpzheBnlMg/0swTMl0SnDIjAS+r7L0YQFvnzz d7KVoZRWEKB592gDKS3eujdfm077Aart4QWG3KTWit41o6fk3XlPo4dLqTwDWdD/YUfDeM oB9SBkHKoIqLuDorJqA8lfMoemX/KHfmbuI7eJ9/cHoJ2TVhzu7IdcEJSyQFIhhm+s1XU7 aHqoxN1xkLZBgeIuOlpkzWdRzwwIL1cqihsTAHeC+TnnyTn5aUwugascyu300A== 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 D2C257CB9B for ; Mon, 06 Jan 2025 16:01:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUobR-0007na-Vf; Mon, 06 Jan 2025 10:01:13 -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 1tUobJ-0007jA-6G for guix-patches@gnu.org; Mon, 06 Jan 2025 10:01:06 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUobG-00010y-09 for guix-patches@gnu.org; Mon, 06 Jan 2025 10:01:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=g6Jwt4cdSLO8r+HXF6kbwmnRGM01bXY3z4R1wqzhifA=; b=J8lkOG/udiDkPSc3m7Qh2FgyxYQhygS6dr3rqZkVBE+5F6nEhaPVF/gW98yFTfzJ7FA5Ks5zRarMCu2RYtviMXvqJ57NENFKmBKUKlFHLZM1lTQVPxkM0J/8Xr8Sdl4fG0sFD5YcNXpbQDGsklp9JBRpdDUR+TpQwyezNAzqJUoPL/iK1CUvqptnwFacEQWSItdkQ9A9LQdCaUKxXJKUSK+CvLdZDQ2vOrupa7jkiOVwqf23Q3knVTq0voY5DaDWnldGcNYegA+fF2qtfMqZ+X9YfgEWsr/Dn0tjHL7iTTbGkrFQjJrEdw02Lrv+bUieTULoXo3x2C/oA9ZWGOu15g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUobF-0001Cm-QW for guix-patches@gnu.org; Mon, 06 Jan 2025 10:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75407] [PATCH Cuirass] base: Add support for disabling channel authentication. Resent-From: Romain GARBAGE Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Jan 2025 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75407 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75407@debbugs.gnu.org Cc: ludovic.courtes@inria.fr, Romain GARBAGE X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17361756064214 (code B ref -1); Mon, 06 Jan 2025 15:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 15:00:06 +0000 Received: from localhost ([127.0.0.1]:39615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUoaL-00015Q-Uc for submit@debbugs.gnu.org; Mon, 06 Jan 2025 10:00:06 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39936) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUoaJ-00012D-Cv for submit@debbugs.gnu.org; Mon, 06 Jan 2025 10:00:04 -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 1tUoaB-0007Nu-4c for guix-patches@gnu.org; Mon, 06 Jan 2025 09:59:55 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUoa4-0000da-Pz for guix-patches@gnu.org; Mon, 06 Jan 2025 09:59:51 -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=g6Jwt4cdSLO8r+HXF6kbwmnRGM01bXY3z4R1wqzhifA=; b=UO2VnkcljqMOdvhCDaEtBw799VA8WFji3jk0L65v26cBKx2hmTEJ6ZeV LndMLRFCAogndB2sfHI/rBcP8AylaxoIFFEWRkgekZawJAeCMhHha+0vl rhKN9ibjHpuuZg5JjQK+hL5g2infU1ojMxsQfh2W/Z0YAS4n+g/M2V2BF Y=; X-IronPort-AV: E=Sophos;i="6.12,293,1728943200"; d="scan'208";a="105589899" Received: from unknown (HELO guix-A102.bordeaux.inria.fr) ([193.50.110.191]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2025 15:59:45 +0100 From: Romain GARBAGE Date: Mon, 6 Jan 2025 15:59:37 +0100 Message-ID: <20250106145937.17780-1-romain.garbage@inria.fr> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.104; envelope-from=romain.garbage@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.86 X-Spam-Score: 0.86 X-Migadu-Queue-Id: D2C257CB9B X-TUID: NbMwrqKckrDR * src/cuirass/base.scm (channel-update-service, jobset-monitor): Add support for disabling Guix channel authentication. * doc/cuirass.texi (Specifications): Add documentation. --- doc/cuirass.texi | 4 ++++ src/cuirass/base.scm | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/cuirass.texi b/doc/cuirass.texi index 4c160c3..b3ab4c5 100644 --- a/doc/cuirass.texi +++ b/doc/cuirass.texi @@ -248,6 +248,10 @@ You can store any information you like in properties, but you must make sure that this is serializable. For example, the properties alist cannot contain records. +The special @code{authenticate-channels?} property, when set to +@code{#f}, disables authentication of @emph{all} the channels declared in the +specification, including the Guix channel. + @end table @end deftp diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 837de51..89fff82 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -507,7 +507,7 @@ to update Git checkouts, effectively serializing all Git operations." ;; Note: All Git operations are serialized when in fact it would be enough ;; to serialize operations with the same URL (because they are cached in the ;; same directory). - (define (fetch store channels) + (define (fetch store channels authenticate?) (let/ec return (with-exception-handler (lambda (exception) @@ -533,16 +533,17 @@ to update Git checkouts, effectively serializing all Git operations." (lambda () (non-blocking (set-thread-name "git-checkout") - (latest-channel-instances* store channels)))))) + (latest-channel-instances* store channels + #:authenticate? authenticate?)))))) (lambda () (with-store store (let loop () (match (get-message channel) - (`(fetch ,channels ,reply) + (`(fetch ,channels ,authenticate? ,reply) (log-info "fetching channels:~{ '~a'~}" (map channel-name channels)) - (let ((result (fetch store channels))) + (let ((result (fetch store channels authenticate?))) (if result (log-info "pulled commits~{ ~a~}" (zip (map (compose channel-name @@ -741,6 +742,14 @@ concurrently; it sends derivation build requests to BUILDER." (define channels (specification-channels spec)) + (define authenticate? + (match (assq 'authenticate-channels? + (specification-properties spec)) + (#f #t) ; Authenticate by default. + ((_ . authenticate?) + ;; Ensure the return value is a boolean. + (->bool authenticate?)))) + (define (perform-update) (let* ((timestamp (time-second (current-time time-utc))) (recent? (lambda (time) @@ -762,7 +771,7 @@ concurrently; it sends derivation build requests to BUILDER." (match (let ((reply (make-channel))) (log-info "fetching channels for spec '~a'" name) (put-message update-service - `(fetch ,channels ,reply)) + `(fetch ,channels ,authenticate? ,reply)) (get-message reply)) (#f ;; TODO: Send the error to CHANNEL so the web interface base-commit: e1a4675ec417db3e7f97c05c3f2642ab8acb9210 -- 2.46.0