[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disarchive update
From: |
zimoun |
Subject: |
Re: Disarchive update |
Date: |
Thu, 14 Oct 2021 21:17:25 +0200 |
Hi,
On Thu, 14 Oct 2021 at 16:02, Ludovic Courtès <ludo@gnu.org> wrote:
>> Going this road (use Cuirass), why not generating the sources.json
>> similarly? Instead of the hack using the website builder.
>
> I guess that would also work, indeed. Then we could make /source.json
> redirect to ci.guix.gnu.org/whatever/latest.
I gave a look but it is not clear yet how to do it. Pointers or tips
welcome. :-)
>> On my side, I will try to resume what I started months ago: knowing the
>> SWH coverage. For instance, on this ~92% of tarballs, how many are
>> currently stored into SWH? Well, do not take your breath and I would be
>> happy if someone beats me. ;-)
>
> Yup, we definitely need that kind of info now!
Using, the Authentication mode from SWH [1] and this trivial patch, the
rate limit is at 1200 which allows to check and archive some packages.
For instance, now,
--8<---------------cut here---------------start------------->8---
for p in $(guix package -A | cut -f1 | grep "julia-");
do
./pre-inst-env guix lint -c archival $p
;done
--8<---------------cut here---------------end--------------->8---
passes. The remaining work is to check with SWH folks for an higher
value than this 1200 limit and have a token associated to an account to
the Software Heritage Authentication service. And set a cron task
“somewhere” running:
./pre-inst-env guix lint -c archival
WDYT?
Cheers,
simon
1: <https://archive.softwareheritage.org/api/>
2: <https://archive.softwareheritage.org/oidc/login/>
diff --git a/guix/swh.scm b/guix/swh.scm
index 5c41685a24..1aaf733b5d 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -153,12 +153,20 @@ (define url
url
(string-append url "/")))
+(define token
+
'xxXxxXxxXxXXXxXxXxXxXxXxxXXxXxXxXxxXXxxxxxxxXxXxXXXxXXXxXXXxXxxxXxXxXXXxXXXxXXXxXxxxXxXxXxxxXXXxXXXxxX.xxXxXXXxXxXxXxXxXxxxXxXxXxxxxXXxXxXxXxxxXXXxXXxxXxxxXXXxXxxxXXxxXXXxXXXxXXxxXxXxXXXxXxxxxxXxXxxxxXXxXxxxXXXxxXxxxxXxxxXxXXxxxxxxXXxxXxxxXxxxxXXxXxXxXXxxxxxXxxXxxxXxXXxxxxxxXXxxXxxxXXXxXxxxxXXxxXXxXxxxxXXxXxXxXxXxXXXxxXXxxXXxXxXxxxXxXxXxxXxxxxXxxXxxXxXxXxXxXXXxXXXxxXXxXxXxXXXxxXXxXxXxXXXxXXxxXxxxXXXxXXXxXXxxXXXxXxxxXXxxXXXxXxXxXxXxXXXxxXXxXxXXXxXxxXxxXxxxXXxxXxxxxxxxXXxxXxXxXxXxxxXxxxxxxxXxxXXxXxXxXXXxXxxxXxxxXxxxXXXxXxXxXxXxXxxxXxxxXXXxXxXxXxXxXXXxXxxxXXXxXxxxXXxxXXXxXxXxxXxxXxXxXxXxxxXxxxxxxXxxXXXxXXxxXxx.xxXxxxxXxxxxXxxxxXXxXXxxxXXXX-xxx_xxxXXxxxx
+ )
+
;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would
;; be ignored (<https://bugs.gnu.org/40486>).
(define* (http-get* uri #:rest rest)
- (apply http-request uri #:method 'GET rest))
+ (apply http-request uri #:method 'GET
+ #:headers `((authorization . (Bearer ,token)))
+ rest))
(define* (http-post* uri #:rest rest)
- (apply http-request uri #:method 'POST rest))
+ (apply http-request uri #:method 'POST
+ #:headers `((authorization . (Bearer ,token)))
+ rest))
(define %date-regexp
;; Match strings like "2014-11-17T22:09:38+01:00" or
Re: Disarchive update, Timothy Sample, 2021/10/13
Re: Disarchive update, Ludovic Courtès, 2021/10/14