unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Disarchive update
Date: Thu, 14 Oct 2021 21:17:25 +0200	[thread overview]
Message-ID: <86ilxzpgai.fsf@gmail.com> (raw)
In-Reply-To: <87ilxzpuuq.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

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/>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: swh-auth.patch --]
[-- Type: text/x-diff, Size: 1488 bytes --]

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

  reply	other threads:[~2021-10-14 19:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 10:05 Disarchive update Ludovic Courtès
2021-10-09 10:37 ` Mathieu Othacehe
2021-10-10 13:22   ` Ludovic Courtès
2021-10-12  8:41     ` Mathieu Othacehe
2021-10-14 14:06       ` Ludovic Courtès
2021-10-12  9:19 ` zimoun
2021-10-14 14:02   ` Ludovic Courtès
2021-10-14 19:17     ` zimoun [this message]
2021-10-21 19:41       ` Ludovic Courtès
2021-10-21 19:57         ` zimoun
2021-10-13 14:54 ` Timothy Sample
2021-10-14 14:04   ` Ludovic Courtès
2021-10-14 14:31 ` Ludovic Courtès
2021-10-14 21:44   ` zimoun
2021-10-21 19:44   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ilxzpgai.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).