diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-08-11 19:34:56 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-08-27 14:41:26 +0200 |
| commit | e3e5375687daa5715800bdba91bbd8b443f456c6 (patch) | |
| tree | 35f835bcf3130df1cbd4904c4f29c9cd70ad389c | |
| parent | 46a6cfa7e3bfd6fa4646342196bac165efd275a2 (diff) | |
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 <ludo@gnu.org>
Merges: #10534
| -rw-r--r-- | guix/scripts/publish.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index b51fbbadae1..6f213234e35 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm | |||
| @@ -265,6 +265,9 @@ usage." | |||
| 265 | (define %public-key | 265 | (define %public-key |
| 266 | (make-parameter #f)) | 266 | (make-parameter #f)) |
| 267 | 267 | ||
| 268 | (define %public-key-file-in-use | ||
| 269 | (make-parameter %public-key-file)) | ||
| 270 | |||
| 268 | (define %nix-cache-info | 271 | (define %nix-cache-info |
| 269 | `(("StoreDir" . ,%store-directory) | 272 | `(("StoreDir" . ,%store-directory) |
| 270 | ("WantMassQuery" . 0) | 273 | ("WantMassQuery" . 0) |
| @@ -793,7 +796,7 @@ to compress or decompress the log file; just return it as-is." | |||
| 793 | 796 | ||
| 794 | (define (render-signing-key) | 797 | (define (render-signing-key) |
| 795 | "Render signing key." | 798 | "Render signing key." |
| 796 | (let ((file %public-key-file)) | 799 | (let ((file (%public-key-file-in-use))) |
| 797 | (values `((content-type . (text/plain (charset . "UTF-8"))) | 800 | (values `((content-type . (text/plain (charset . "UTF-8"))) |
| 798 | (x-raw-file . ,file)) | 801 | (x-raw-file . ,file)) |
| 799 | file))) | 802 | file))) |
| @@ -1309,6 +1312,8 @@ because service is listening to localhost~%"))) | |||
| 1309 | 1312 | ||
| 1310 | (parameterize ((%public-key public-key) | 1313 | (parameterize ((%public-key public-key) |
| 1311 | (%private-key private-key) | 1314 | (%private-key private-key) |
| 1315 | (%public-key-file-in-use | ||
| 1316 | (assoc-ref opts 'public-key-file)) | ||
| 1312 | (cache-bypass-threshold | 1317 | (cache-bypass-threshold |
| 1313 | (or (assoc-ref opts 'cache-bypass-threshold) | 1318 | (or (assoc-ref opts 'cache-bypass-threshold) |
| 1314 | (cache-bypass-threshold)))) | 1319 | (cache-bypass-threshold)))) |
