GNU bug report logs -
#75407
[PATCH Cuirass] base: Add support for disabling channel authentication.
Previous Next
Reported by: Romain GARBAGE <romain.garbage <at> inria.fr>
Date: Mon, 6 Jan 2025 15:01:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75407 in the body.
You can then email your comments to 75407 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#75407
; Package
guix-patches
.
(Mon, 06 Jan 2025 15:01:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Romain GARBAGE <romain.garbage <at> inria.fr>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 06 Jan 2025 15:01:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Reply sent
to
Ludovic Courtès <ludovic.courtes <at> inria.fr>
:
You have taken responsibility.
(Thu, 09 Jan 2025 14:42:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Romain GARBAGE <romain.garbage <at> inria.fr>
:
bug acknowledged by developer.
(Thu, 09 Jan 2025 14:42:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 75407-done <at> debbugs.gnu.org (full text, mbox):
Romain GARBAGE <romain.garbage <at> inria.fr> skribis:
> * src/cuirass/base.scm (channel-update-service, jobset-monitor): Add support
> for disabling Guix channel authentication.
> * doc/cuirass.texi (Specifications): Add documentation.
Applied, thanks!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 07 Feb 2025 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.