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>, "Leo Famulari" <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Why linux-libre source code is not in sources.json
Date: Thu, 09 Sep 2021 01:46:16 +0200	[thread overview]
Message-ID: <86tuiu8wc7.fsf@gmail.com> (raw)
In-Reply-To: <877dfqhgny.fsf@gnu.org>

Hi,

On Thu, 09 Sep 2021 at 00:00, Ludovic Courtès <ludo@gnu.org> wrote:

> Now we have to see what’s available on berlin & co., and the extent to
> which SWH can help with this situation.  So far I’m not sure about the
> tarball contents, but the repo seems to be archived:

As we know, the issue with tarball on SWH is that we cannot guarantee
the map between the information stored at package time and the
information SWH serves at fetch time.  Metadata, etc. so SWH cooking can
return a tarball having the checksum Guix that expects or something
different.

We (at least me :-)) need to invest energy into Disarchive.
Definitively! 

> For some reason, we seem to be exporting only one tarball in
> sources.json currently (the file that SWH periodically reads):
>
> --8<---------------cut here---------------start------------->8---
> $ wget -qO - https://guix.gnu.org/sources.json|jq |grep linux-libre.fsfla.org
>         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz",
>         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz",
> --8<---------------cut here---------------end--------------->8---
>
> We should check why we’re not providing all the URLs and fix it.

Interesting… :-)

The file ’https://guix.gnu.org/sources.json’ is basically built using
’fold-packages’ (see ’all-packages’ in
guix-artwork/website/apps/packages/data.scm) and ’package-source’ (see
’sources-json-builder’ in
guix-artwork/website/apps/packages/builder.scm).  And indeed,
’linux-libre’ is missing.

Let consider this snippet as ’/tmp/foo.scm’ mimicking the builder of
JSON files:

--8<---------------cut here---------------start------------->8---
(use-modules (guix packages)
             (gnu packages))

(define all-packages
  (sort
   (fold-packages (lambda (package lst)
                    (if (or (package-superseded package)
                            (package-replacement package))
                        lst
                        (cons package lst)))
                  '())
   (lambda (p1 p2)
     (string<? (package-name p1)
               (package-name p2)))))

(map (lambda (p)
       (format #t "~a~%" (package-source p)))
     all-packages)
--8<---------------cut here---------------end--------------->8---

Then indeed, only 5.4.20 is seen.

--8<---------------cut here---------------start------------->8---
$ guix repl /tmp/foo.scm | grep 'linux-libre.fsfla'

#<origin ("https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz" "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-5.4.20-gnu.tar.xz" "mirror://gnu/linux-libre/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz") #<content-hash sha256:1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47> () 7faf439cfba0>
#<origin ("https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz" "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-5.4.20-gnu.tar.xz" "mirror://gnu/linux-libre/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz") #<content-hash sha256:1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47> () 7faf439cfba0>
--8<---------------cut here---------------end--------------->8---

The difference is that this package ’linux-libre-headers-5.4.20’ is
created with ’make-linux-libre-headers’ and the others with
’make-linux-libre-headers*’.  Subtle. ;-)  In other words,

--8<---------------cut here---------------start------------->8---
$ guix repl
scheme@(guix-user)> ,use(guix packages)
scheme@(guix-user)> ,use(gnu packages linux)
scheme@(guix-user)> (package-source linux-libre-headers-5.4.20)
$1 = #<origin ("https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz" "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-5.4.20-gnu.tar.xz" "mirror://gnu/linux-libre/5.4.20-gnu/linux-libre-5.4.20-gnu.tar.xz") #<content-hash sha256:1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47> () 7f881c1ec4e0>
scheme@(guix-user)> (package-source linux-libre-headers-5.13)
$2 = #<origin #<promise #<procedure 7f881c1dd900 at gnu/packages/linux.scm:248:8 ()>> #<content-hash sha256:#f> (#<origin "http://www.fsfla.org/svn/fsfla/software/linux-libre/lemote/gnewsense/branches/3.16/100gnu+freedo.patch" #<content-hash sha256:1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06> () 7f881c1ec840> #<origin "https://salsa.debian.org/kernel-team/linux/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0/debian/patches/bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch" #<content-hash sha256:1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f> () 7f881c1ec7e0> "/gnu/store/yrqr7syxbm4pddzlgc4pwn9wixmpy9xh-guix-module-union/share/guile/site/3.0/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch") 7f881c1ec780>
--8<---------------cut here---------------end--------------->8---

Therefore, the builder of JSON (mainly ’origin->json’) does not consider
such cases and assume that ’origin-uri’ can be applied.  Well, I will
try to improve the situation if no one beats me. :-)


Cheers,
simon


  reply	other threads:[~2021-09-09  0:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04 18:17 Linux-libre source code will be taken offline Leo Famulari
2021-09-04 20:32 ` Jason Self
2021-09-06 17:36   ` Leo Famulari
2021-09-27 22:30     ` Mark H Weaver
2021-09-27 23:17       ` Vagrant Cascadian
2021-09-28 13:05         ` Ludovic Courtès
2021-09-27 23:30       ` Leo Famulari
2021-09-28  0:13         ` zimoun
2021-09-28  0:17           ` zimoun
2021-09-28  0:46         ` Jason Self
2021-09-28  8:43           ` zimoun
2021-09-28 14:02             ` Jason Self
2021-09-28 14:30             ` Jason Self
2021-09-28 17:11               ` zimoun
2021-09-28 17:52                 ` Jason Self
2021-09-29  8:50                   ` zimoun
2021-10-08  1:58                     ` Maxim Cournoyer
2021-10-11  8:43                       ` zimoun
2021-09-08 22:00 ` Ludovic Courtès
2021-09-08 23:46   ` zimoun [this message]
2021-09-09  7:37     ` Why linux-libre source code is not in sources.json zimoun
2021-09-09  9:50       ` Maxime Devos
2021-09-09 17:18         ` zimoun
2021-09-11  0:22   ` Linux-libre source code via SWH sources.json 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=86tuiu8wc7.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    --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).