From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id xZQYL+n5b2HbWwEAgWs5BA (envelope-from ) for ; Wed, 20 Oct 2021 13:13:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ELM6Kun5b2FDEgAAB5/wlQ (envelope-from ) for ; Wed, 20 Oct 2021 11:13:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5F385C625 for ; Wed, 20 Oct 2021 13:13:45 +0200 (CEST) Received: from localhost ([::1]:39180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1md9XT-0005Hm-W3 for larch@yhetil.org; Wed, 20 Oct 2021 07:13:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md8lB-0000W1-8D for guix-devel@gnu.org; Wed, 20 Oct 2021 06:23:49 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1md8l9-0007L3-6M for guix-devel@gnu.org; Wed, 20 Oct 2021 06:23:48 -0400 Received: by mail-wm1-x329.google.com with SMTP id g2so17812058wme.4 for ; Wed, 20 Oct 2021 03:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:message-id:mime-version :content-transfer-encoding; bh=0M8nK3u+uD2d44Fx2rJuLJoP1yMzqFL8bRswy3qC3EU=; b=EdXyBwYlAlRUCNodRduUXGB7Ij99q+Rs1cQmFsHXNaxy1xoL5ArFidVbjbNfAPYWtM xMu0W/s5ZiFbQm9AgZHHnLOMaIg6HprMwgOxS0tLYqtC0Xw1/QdyfuQ1nzY4wMpmBWVe cWTQGKUMPFIsT+hlLTIxkfqPACofJ7K2ROFeQp/Mh9eAyLv82LI1WG0m1ZYS1cDsdzrg f3TlDt7GDAS/qX+VmwXxE8K6jwfTLGSyGzRMTrBKXHrQtcYVXk+LMgg+eDYVt+I3c/ou 3guHCr3c91b+7RWgOShqvr8U7IWq1wxUUx8KUJy9cei8+Q3q5dcDZRb/EuB1gv0Wi1Q1 ffqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :mime-version:content-transfer-encoding; bh=0M8nK3u+uD2d44Fx2rJuLJoP1yMzqFL8bRswy3qC3EU=; b=by19tRYMm2fYGRV2W2iJEL1MxNPi/VNNDTQlIQrAQsotn6XFgw5evPkNq6iAuwUHpo Y6iXMzjOedsUdLvGDhXaZtAZDosqrkNhN9HQEvqZo8cLAy1O+J5lVhyZ1m7SVzpZh7y3 snthxhy7keSuEWaQNH6tDo2BNN8ec1uKg8HaiHDXu1YEsI89JsMLVsZezRH0D7Z9C8a2 wVTLMIknd1hpvcPmMj8Juufp4MsoYmSoaTugWyMIiuENcNgfWdYt486BZqdKKaUsfh11 ZPXW0yFv/rOkxJZt3WjqE7/4jgiV6y1VJNwtcoFUagDvsFaJC3wtl6Srxtd++H0EvUPk bGtA== X-Gm-Message-State: AOAM53115iyi3+s1/ss63oQkjRp+kX72i6zIXNyT7vn3AWhTPq8dJ5ne W3wjvIB0pmVtTK6/P9PZPXg= X-Google-Smtp-Source: ABdhPJz8dz8a+paz5BUIQbLjrHUrvaX8Jni9nY6ycfbq6lkYkajo/S2Eo/KQ8CMlpTTJKkL3QS9HNA== X-Received: by 2002:adf:e382:: with SMTP id e2mr41100004wrm.90.1634725425435; Wed, 20 Oct 2021 03:23:45 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id g2sm1660260wrb.20.2021.10.20.03.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 03:23:45 -0700 (PDT) From: zimoun To: Guix Devel Subject: Disarchive and SHA References: <86k0i8c7zj.fsf@gmail.com> Date: Wed, 20 Oct 2021 12:23:42 +0200 Message-ID: <868ryoc7v5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634728425; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0M8nK3u+uD2d44Fx2rJuLJoP1yMzqFL8bRswy3qC3EU=; b=A3QZK+tvNZJ0gFNjWDMTYVRm7RO+4aT9Oxracw939uh9LzoXLS50dqH8oaiT6KwP2QzO9U +msrFPkdk5QyT0cfmqXuEHkhIQcUuVDjjffDQHL52c+zaK8T4nTFB/X0c2ksBLMLJtaTjA J9OcXn3fkogZhRB/5BtWr0IaOG/Dj8CbE9lqHeGwWrxIRIKkrjttOvUdB947yc8BbVdZrC z7LoDJZtAlH2uEKI7KMgP2Hbtec+KobeSbT1LTBKYglge+ojP6v1YXCYm9Hdp9g/sxl0/p /tBraCGhJEN/q790WrF3kKn5mJUEsfVA9Ce2m3uckGpHbYoTKfh0XpU9xdqnug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634728425; a=rsa-sha256; cv=none; b=puq/Sknag595v5NCA5xup/hXzDYtKLf2vUVh86xxYnsw/7Z9O1oc/4a51lPC9H4buNY4K7 UbbKPgiYveMzxx5re9IcMLCuWuf99U+liCapIl7qit7y1EFJaWb3SNYX5NJ7le7Tj6opBg 2JUc8EhLoUDe7sa38NfZm4nF/hq3ItYaPzqW2SNXZHrOaFhywzYKquU/si/DFPSG+aJyQp Ht1EsPKBWA/82HkKIlSeFK+/4icRT7ivzefSaYy4RVivPNgwv87fNtScx5FcKFXflfauZV XXNizYvj5xFUa35YPx/tdF2XfGh/MHOCmZpqgCt7Y5xPuXwKM2/uyDa8ogRXxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EdXyBwYl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=EdXyBwYl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 5F385C625 X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: a4rBIMDN2xKa 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 re= fers to non-existent SWH directory 'e664cd5e820df2a194a5c6a64f12161480331b4= b' --8<---------------cut here---------------end--------------->8--- I notice something annoying. For representing SHA-256, Guix uses =E2=80=99nix-base32=E2=80=99 and Disarchive uses =E2=80=99base16=E2=80=99. 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: and instead, one has to convert to =E2=80=99base16=E2=80=99. I am not awar= e of any tool to ease this transformation. Maybe, we could add an option to =E2=80=9Cguix hash=E2=80=9D. WDYT? Using =E2=80=99base16=E2=80=99, the URL matches and the file is downloaded.= Neat! 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/zabb= ix/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'... =E2=80=A62.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 =E2=80=99sources.json=E2=80=99. --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=E2=80=99s why =C2=ABDisarchive entry refers to non-existent SWH direct= ory=C2=BB. Help welcome for improving this =E2=80=99sources.json=E2=80=99. :-) Especi= ally, turning the current way using the website builder into derivation-style usable by the CI. Cheers, simon