guix_mirror_bot pushed a commit to branch master
in repository guix.

commit e3e5375687daa5715800bdba91bbd8b443f456c6
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Aug 11 19:34:56 2026 +0200

    publish: Fix public-key rendering.
    
    --public-key is currenlty ignored when passed to render-signing-key.
    
    * guix/scripts/publish.scm (%public-key-file-in-use): New variable.
    (render-signing-key): Ensure --public-key is read.
    (guix-publish): Parameterize %public-key-file-in-use.
    
    Fixes: guix/guix#10533
    Signed-off-by: Ludovic Courtès <[email protected]>
    Merges: #10534
---
 guix/scripts/publish.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index b51fbbadae..6f213234e3 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -265,6 +265,9 @@ usage."
 (define %public-key
   (make-parameter #f))
 
+(define %public-key-file-in-use
+  (make-parameter %public-key-file))
+
 (define %nix-cache-info
   `(("StoreDir" . ,%store-directory)
     ("WantMassQuery" . 0)
@@ -793,7 +796,7 @@ to compress or decompress the log file; just return it 
as-is."
 
 (define (render-signing-key)
   "Render signing key."
-  (let ((file %public-key-file))
+  (let ((file (%public-key-file-in-use)))
     (values `((content-type . (text/plain (charset . "UTF-8")))
               (x-raw-file . ,file))
             file)))
@@ -1309,6 +1312,8 @@ because service is listening to localhost~%")))
 
       (parameterize ((%public-key public-key)
                      (%private-key private-key)
+                     (%public-key-file-in-use
+                      (assoc-ref opts 'public-key-file))
                      (cache-bypass-threshold
                       (or (assoc-ref opts 'cache-bypass-threshold)
                           (cache-bypass-threshold))))

Reply via email to