guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disabling authentication checks for tests in local Guix checkouts


From: Ada Stevenson
Subject: Disabling authentication checks for tests in local Guix checkouts
Date: Mon, 10 Jun 2024 06:20:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

Hi Guix,

I'm currently trying to help test the changes to GRUB submitted in issue #71348[1]. Unfortunately, `make check`, whilst building the local Guix channel, authenticates every commit. That means commits not signed by people in `guix-authorizations` will stop the channel from building and prevents running any of the tests.

I have tried to fix the issue by writing a patch:
-----
diff --git a/etc/system-tests.scm b/etc/system-tests.scm
index 221a63bb7f..6655850396 100644
--- a/etc/system-tests.scm
+++ b/etc/system-tests.scm
@@ -49,7 +49,7 @@ (define (tests-for-current-guix source commit)
   ;; of tests to run in the usual way:
   ;;
   ;;   make check-system TESTS=installed-os
-  (let ((guix (channel-source->package source #:commit commit)))
+ (let ((guix (channel-source->package source #:commit commit #:authenticate? #f)))
     (map (lambda (test)
            (system-test
             (inherit test)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 54521ab3c4..46d66604c7 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -563,7 +563,7 @@ (define-public guix
 the Nix package manager.")
       (license license:gpl3+))))

-(define* (channel-source->package source #:key commit)
+(define* (channel-source->package source #:key commit (authenticate? #t))
   "Return a package for the given channel SOURCE, a lowerable object."
   (package
     (inherit guix)
@@ -571,7 +571,8 @@ (define* (channel-source->package source #:key commit)
                             (if commit (string-take commit 7) "")))
     (build-system channel-build-system)
     (arguments `(#:source ,source
-                 #:commit ,commit))
+                 #:commit ,commit
+                 #:authenticate? ,authenticate?))
     (inputs '())
     (native-inputs '())
     (propagated-inputs '())))
-----

Initially this seems like it works, as it starts to index all of the commits in the local checkout, which didn't occur beforehand, instead immediately giving a `Git error: cannot locate remote-tracking branch 'origin/keyring'` (I've run `git fetch -a`, and my Savannah remote is called `origin`).

I'm not sure where this second building of the channel is occurring; the channel-build-system is being passed the `authenticate? #f` flag, so I'm at a loss.

I'd really appreciate any input or help!

Warmly,
Ada

[1] https://issues.guix.gnu.org/issue/71348



reply via email to

[Prev in Thread] Current Thread [Next in Thread]