[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: hydra: build-package-metadata: Update fields in s
From: |
Ludovic Courtès |
Subject: |
branch master updated: hydra: build-package-metadata: Update fields in sources.json. |
Date: |
Fri, 12 May 2023 07:45:11 -0400 |
This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new 24249ac hydra: build-package-metadata: Update fields in sources.json.
24249ac is described below
commit 24249ac02ece0eecb53237b9d5a2a4e91f336c69
Author: Simon Tournier <zimon.toutoune@gmail.com>
AuthorDate: Fri May 12 11:45:04 2023 +0200
hydra: build-package-metadata: Update fields in sources.json.
This format had been discussed in
<https://gitlab.softwareheritage.org/swh/infra/sysadm-environment/-/issues/4868>.
* hydra/build-package-metadata.scm (origin->json)[resolve]: Add the fields
'outputHashAlgo' and 'outputHashMode'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
hydra/build-package-metadata.scm | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/hydra/build-package-metadata.scm b/hydra/build-package-metadata.scm
index 1ddb409..d110d4d 100755
--- a/hydra/build-package-metadata.scm
+++ b/hydra/build-package-metadata.scm
@@ -1,7 +1,7 @@
#!/usr/bin/env -S guix repl --
!#
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020, 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2020, 2021, 2023 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -160,13 +160,23 @@ superseded packages."
(else '()))
,@(if (or (eq? url-fetch method)
(eq? url-fetch/tarbomb method)
- (eq? url-fetch/zipbomb method))
+ (eq? url-fetch/zipbomb method)
+ (eq? git-fetch method)
+ (eq? svn-fetch method)
+ (eq? svn-multi-fetch method)
+ (eq? hg-fetch method))
(let* ((content-hash (origin-hash origin))
(hash-value (content-hash-value content-hash))
(hash-algorithm (content-hash-algorithm content-hash))
(algorithm-string (symbol->string hash-algorithm)))
`(("integrity" . ,(string-append algorithm-string "-"
- (base64-encode
hash-value)))))
+ (base64-encode hash-value)))
+ ("outputHashAlgo" . ,algorithm-string)
+ ("outputHashMode" . ,(if (or (eq? url-fetch method)
+ (eq? url-fetch/tarbomb method)
+ (eq? url-fetch/zipbomb method))
+ "flat"
+ "recursive"))))
'())
,@(if (eq? method git-fetch)
`(("git_ref" . ,(git-reference-commit uri)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: hydra: build-package-metadata: Update fields in sources.json.,
Ludovic Courtès <=