unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Subject: Disarchive and SHA
Date: Wed, 20 Oct 2021 12:23:42 +0200	[thread overview]
Message-ID: <868ryoc7v5.fsf@gmail.com> (raw)
In-Reply-To: 86k0i8c7zj.fsf@gmail.com

Hi,

Trying to investigate why, for instance,

--8<---------------cut here---------------start------------->8---
$ guix lint -c archival zabbix-agentd
gnu/packages/monitoring.scm:167:5: zabbix-agentd@5.2.6: Disarchive entry refers to non-existent SWH directory 'e664cd5e820df2a194a5c6a64f12161480331b4b'
--8<---------------cut here---------------end--------------->8---

I notice something annoying.  For representing SHA-256, Guix uses
’nix-base32’ and Disarchive uses ’base16’.

Therefore, from the source,

--8<---------------cut here---------------start------------->8---
(define-public zabbix-agentd
  (package
    (name "zabbix-agentd")
    (version "5.2.6")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://cdn.zabbix.com/zabbix/sources/stable/"
             (version-major+minor version) "/zabbix-" version ".tar.gz"))
       (sha256
        (base32 "100n1rv7r4pqagxxifzpcza5bhrr2fklzx7gndxwiyq4597p1jvn"))))
--8<---------------cut here---------------end--------------->8---

it does not match the URL:

<http://disarchive.guix.gnu.org/sha256/100n1rv7r4pqagxxifzpcza5bhrr2fklzx7gndxwiyq4597p1jvn>

and instead, one has to convert to ’base16’.  I am not aware of any tool
to ease this transformation.  Maybe, we could add an option to “guix
hash”.  WDYT?


Using ’base16’, the URL matches and the file is downloaded.  Neat!

<http://disarchive.guix.gnu.org/sha256/76cb704f2a04fbc87bb3eff44fa71339c355d467f7bbd8fb53f8927c760e1680>



Along the process, I also notice,

--8<---------------cut here---------------start------------->8---
$ guix download https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz

Starting download of /tmp/guix-file.rcYxyF
From https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz...
download failed "https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz" 404 "Not Found"

Starting download of /tmp/guix-file.rcYxyF
From https://web.archive.org/web/20211020115955/https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz...
following redirection to `https://web.archive.org/web/20210410075108/https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz'...
 …2.6.tar.gz                                                        350KiB/s 00:57 | 19.6MiB transferred
/gnu/store/3w8mp25gyrkq3dngaw27kvqaggrx9qp0-zabbix-5.2.6.tar.gz
100n1rv7r4pqagxxifzpcza5bhrr2fklzx7gndxwiyq4597p1jvn
--8<---------------cut here---------------end--------------->8---

And this fallback is not done by the file ’sources.json’.

--8<---------------cut here---------------start------------->8---
$ wget https://guix.gnu.org/sources.json
$ cat sources.json | jq | grep zabbix
      "git_url": "https://github.com/lukecyca/pyzabbix",
        "https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz"
      "git_url": "https://github.com/unioslo/zabbix-cli",
        "https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.6.tar.gz"
--8<---------------cut here---------------end--------------->8---

That’s why «Disarchive entry refers to non-existent SWH directory».


Help welcome for improving this ’sources.json’. :-)  Especially, turning
the current way using the website builder into derivation-style usable
by the CI.


Cheers,
simon


       reply	other threads:[~2021-10-20 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <86k0i8c7zj.fsf@gmail.com>
2021-10-20 10:23 ` zimoun [this message]
2021-10-20 17:03   ` Disarchive and SHA zimoun
2021-10-21 20:28   ` Ludovic Courtès
2021-10-21 21:22     ` zimoun

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=868ryoc7v5.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@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).