unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / Atom feed
* Linux-libre source code will be taken offline
@ 2021-09-04 18:17 Leo Famulari
  2021-09-04 20:32 ` Jason Self
  2021-09-08 22:00 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Leo Famulari @ 2021-09-04 18:17 UTC (permalink / raw)
  To: guix-devel

According to the linux-libre team in the #gnu-linux-libre IRC channel on
Libera.chat, all releases of linux-libre before 4.4.282, 4.9.281,
4.14.245, 4.19.205, 5.4.143, 5.10.61, and 5.13.13 will be deleted from
their servers, and their Git repo is also going to be rewritten to
remove them.

So, if anybody wanted to build old versions of Guix System (or
linux-libre based on old revisions of guix.git), some third party should
preserve and mirror those files and the Git repo:

https://linux-libre.fsfla.org/pub/linux-libre/releases/
git://linux-libre.fsfla.org/releases.git

The reason for the removal is that some nonfree things were accidentally
not removed by the previous releases of the deblob scripts.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linux-libre source code will be taken offline
  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-08 22:00 ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Jason Self @ 2021-09-04 20:32 UTC (permalink / raw)
  To: guix-devel

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

For some clarity on the situation:
http://www.fsfla.org/pipermail/linux-libre/2021-August/003439.html

The scripts are not being removed and my understanding is that Guix
only uses the scripts anyway.

> and their Git repo is also going to be rewritten to remove them.

The tags for the kernel source code would be removed (but not for the
cleanup scripts) but my understanding is that this doesn't requite
rewriting history.

The release tarballs are already gone but the tags corresponding to the
libre kernel versions continue to exist in releases.git. My
understanding is that the desire is to eventually remove those
although I'm not sure about the timing but certainly long enough into
the future to allow time to adapt.

Also, the cleanup scripts will continue to exist in git as well, in both
old and new versions, even after the tags for the corresponding libre
kernel release have been deleted, so an interested person would still
be able to recreate the appropriate source code even after tag deletion
has happened. Given that they result in kernel source code with known
freedom problems it seems very undesirable to use the old versions
though.

This could be an example that it's desirable to use releases.git to
obtained needed pieces, whether scripts or the source code.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linux-libre source code will be taken offline
  2021-09-04 20:32 ` Jason Self
@ 2021-09-06 17:36   ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2021-09-06 17:36 UTC (permalink / raw)
  To: Jason Self; +Cc: guix-devel

On Sat, Sep 04, 2021 at 01:32:16PM -0700, Jason Self wrote:
> The scripts are not being removed and my understanding is that Guix
> only uses the scripts anyway.

Okay, that's great. We do use the scripts.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linux-libre source code will be taken offline
  2021-09-04 18:17 Linux-libre source code will be taken offline Leo Famulari
  2021-09-04 20:32 ` Jason Self
@ 2021-09-08 22:00 ` Ludovic Courtès
  2021-09-08 23:46   ` Why linux-libre source code is not in sources.json zimoun
  2021-09-11  0:22   ` Linux-libre source code via SWH sources.json zimoun
  1 sibling, 2 replies; 9+ messages in thread
From: Ludovic Courtès @ 2021-09-08 22:00 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Hi!

Leo Famulari <leo@famulari.name> skribis:

> According to the linux-libre team in the #gnu-linux-libre IRC channel on
> Libera.chat, all releases of linux-libre before 4.4.282, 4.9.281,
> 4.14.245, 4.19.205, 5.4.143, 5.10.61, and 5.13.13 will be deleted from
> their servers, and their Git repo is also going to be rewritten to
> remove them.
>
> So, if anybody wanted to build old versions of Guix System (or
> linux-libre based on old revisions of guix.git), some third party should
> preserve and mirror those files and the Git repo:
>
> https://linux-libre.fsfla.org/pub/linux-libre/releases/
> git://linux-libre.fsfla.org/releases.git

At the time you wrote this message (Sep. 4), I and others who were
present on IRC downloaded the tarballs to be on the safe side, so thanks
for the heads-up!

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:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,m (guix swh)
scheme@(guix swh)> (lookup-origin "https://guix.gnu.org/sources.json")
$2 = #<<origin> visits-url: "https://archive.softwareheritage.org/api/1/origin/https://guix.gnu.org/sources.json/visits/" type: #<unspecified> url: "https://guix.gnu.org/sources.json">
scheme@(guix swh)> (car (origin-visits $2))
$3 = #<<visit> date: #<date nanosecond: 807978 second: 20 minute: 38 hour: 17 day: 8 month: 9 year: 2021 zone-offset: 0> origin: "https://guix.gnu.org/sources.json" url: "https://archive.softwareheritage.org/api/1/origin/https://guix.gnu.org/sources.json/visit/313/" snapshot-url: "https://archive.softwareheritage.org/api/1/snapshot/bfdb775f4768dd3d20231effbf29b96cd7184985/" status: partial number: 313>
scheme@(guix swh)> (define s (visit-snapshot $3))
scheme@(guix swh)> (car ((@@ (gnu packages linux) linux-libre-urls) "5.14.1" "gnu"))
$4 = "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.14.1-gnu/linux-libre-5.14.1-gnu.tar.xz"
scheme@(guix swh)> (lookup-snapshot-branch s $4)
$5 = #f
scheme@(guix swh)> (lookup-snapshot-branch s (car ((@@ (gnu packages linux) linux-libre-urls) "5.13.14" "gnu1")))
$6 = #f
scheme@(guix swh)> (lookup-snapshot-branch s (car ((@@ (gnu packages linux) linux-libre-urls) "5.10.62" "gnu1")))
$7 = #f
scheme@(guix swh)> (lookup-origin "git://linux-libre.fsfla.org/releases.git")
$8 = #<<origin> visits-url: "https://archive.softwareheritage.org/api/1/origin/git://linux-libre.fsfla.org/releases.git/visits/" type: #<unspecified> url: "git://linux-libre.fsfla.org/releases.git">
scheme@(guix swh)> (car (origin-visits $8))
$9 = #<<visit> date: #<date nanosecond: 729324 second: 34 minute: 9 hour: 17 day: 4 month: 9 year: 2021 zone-offset: 0> origin: "git://linux-libre.fsfla.org/releases.git" url: "https://archive.softwareheritage.org/api/1/origin/git://linux-libre.fsfla.org/releases.git/visit/4/" snapshot-url: "https://archive.softwareheritage.org/api/1/snapshot/cbf57c5bd0c5161c8df8853c64e96040b5c9cd9c/" status: full number: 4>
--8<---------------cut here---------------end--------------->8---

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.

> The reason for the removal is that some nonfree things were accidentally
> not removed by the previous releases of the deblob scripts.

IMO such issues should be treated as regular bugs, without compromising
on transparency and availability.

Thanks,
Ludo’.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Why linux-libre source code is not in sources.json
  2021-09-08 22:00 ` Ludovic Courtès
@ 2021-09-08 23:46   ` zimoun
  2021-09-09  7:37     ` zimoun
  2021-09-11  0:22   ` Linux-libre source code via SWH sources.json zimoun
  1 sibling, 1 reply; 9+ messages in thread
From: zimoun @ 2021-09-08 23:46 UTC (permalink / raw)
  To: Ludovic Courtès, Leo Famulari; +Cc: guix-devel

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Why linux-libre source code is not in sources.json
  2021-09-08 23:46   ` Why linux-libre source code is not in sources.json zimoun
@ 2021-09-09  7:37     ` zimoun
  2021-09-09  9:50       ` Maxime Devos
  0 siblings, 1 reply; 9+ messages in thread
From: zimoun @ 2021-09-09  7:37 UTC (permalink / raw)
  To: Ludovic Courtès, Leo Famulari; +Cc: guix-devel

Hi,

On Thu, 09 Sep 2021 at 01:46, zimoun <zimon.toutoune@gmail.com> wrote:

> --8<---------------cut here---------------start------------->8---
> 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. :-)

Ouch, it appears to me complicated because:

 a) at the package level, what is the source of linux-libre?
 b) this source is the result of some computed-origin-method

Somehow, SWH ingests URLs and no more.  And the current implementation
looks like:

--8<---------------cut here---------------start------------->8---
(define-public linux-libre-5.14-pristine-source
  (let ((version linux-libre-5.14-version)
        (hash (base32 "1iq8s031fviccc4710biwl7gxqdimm3nhlvxd0m3fykvhhmcanq0")))
   (make-linux-libre-source version
                            (%upstream-linux-source version hash)
                            deblob-scripts-5.14)))
--8<---------------cut here---------------end--------------->8---

where ’make-linux-libre-source’ returns a ’computed-origin-method’.  And
the ’origin-uri’ of ’linux-libre-5.14-pristine-source’ is a ’gexp’.
Then inside this ’gexp’, you can read the ’%upstream-linux-source’ URL:

--8<---------------cut here---------------start------------->8---
#<gexp-input native
 #<origin
  #"mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz"
  #<content-hash sha256:06lbjsbr86qa8yai5gfclbfxvcqsw33kxj9b4r93hh6z1wajmx82>
--8<---------------cut here---------------end--------------->8---

and I do not know if it is possible to extract such thing.

Moreover, the ’deblob-scripts-5.14’ is an origin from
’linux-libre-deblob-scripts’ which returns a list of 2 origins.  These 2
URLs do not appear in ’linux-libre-5.14-pristine-source’, for instance.

Therefore, I do not know how to extract the source URLs for the package
’linux-libre-5.14’.


Ideas?

Cheers,
simon


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Why linux-libre source code is not in sources.json
  2021-09-09  7:37     ` zimoun
@ 2021-09-09  9:50       ` Maxime Devos
  2021-09-09 17:18         ` zimoun
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Devos @ 2021-09-09  9:50 UTC (permalink / raw)
  To: zimoun, Ludovic Courtès, Leo Famulari; +Cc: guix-devel

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

Hi,

> [...]
> 
> where ’make-linux-libre-source’ returns a ’computed-origin-method’.  And
> the ’origin-uri’ of ’linux-libre-5.14-pristine-source’ is a ’gexp’.
> Then inside this ’gexp’, you can read the ’%upstream-linux-source’ URL:
> 
> --8<---------------cut here---------------start------------->8---
> #<gexp-input native
>  #<origin
>   #"mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz"
>   #<content-hash sha256:06lbjsbr86qa8yai5gfclbfxvcqsw33kxj9b4r93hh6z1wajmx82>
> --8<---------------cut here---------------end--------------->8---
> 
> and I do not know if it is possible to extract such thing.

To extract the <origin> from the <gexp-input>, use gexp-input-thing.
To extract the <gexp-input> from the <gexp>, use the unexported
gexp-references.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Why linux-libre source code is not in sources.json
  2021-09-09  9:50       ` Maxime Devos
@ 2021-09-09 17:18         ` zimoun
  0 siblings, 0 replies; 9+ messages in thread
From: zimoun @ 2021-09-09 17:18 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Guix Devel

Hi,

On Thu, 9 Sept 2021 at 11:51, Maxime Devos <maximedevos@telenet.be> wrote:

> > where ’make-linux-libre-source’ returns a ’computed-origin-method’.  And
> > the ’origin-uri’ of ’linux-libre-5.14-pristine-source’ is a ’gexp’.
> > Then inside this ’gexp’, you can read the ’%upstream-linux-source’ URL:
> >
> > --8<---------------cut here---------------start------------->8---
> > #<gexp-input native
> >  #<origin
> >   #"mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz"
> >   #<content-hash sha256:06lbjsbr86qa8yai5gfclbfxvcqsw33kxj9b4r93hh6z1wajmx82>
> > --8<---------------cut here---------------end--------------->8---
> >
> > and I do not know if it is possible to extract such thing.
>
> To extract the <origin> from the <gexp-input>, use gexp-input-thing.
> To extract the <gexp-input> from the <gexp>, use the unexported
> gexp-references.

Thanks!  It does the job. :-)

I will fix sources.json if no one beats me.

With the (ugly) snippet below,  I get almost the linux-libre, I guess.
The question is now how does SWH ingest the script with the URL:

<https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-5.13>

Another story. :-)

Cheers,
simon


--8<---------------cut here---------------start------------->8---
$ guix repl /tmp/linux.scm | grep linux-libre
(mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-check
https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-5.13)
(mirror://kernel.org/linux/kernel/v5.x/linux-5.13.14.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-check
https://linux-libre.fsfla.org/pub/linux-libre/releases/5.13.14-gnu1/deblob-5.13)
(mirror://kernel.org/linux/kernel/v4.x/linux-4.4.283.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.283-gnu1/deblob-check
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.283-gnu1/deblob-4.4)
(mirror://kernel.org/linux/kernel/v4.x/linux-4.19.206.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.206-gnu1/deblob-check
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.206-gnu1/deblob-4.19)

[...]

(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)
(mirror://kernel.org/linux/kernel/v4.x/linux-4.14.246.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.246-gnu1/deblob-check
https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.246-gnu1/deblob-4.14)
(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)
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
(use-modules (guix packages)
             (guix gexp)
             (gnu packages)
             (gnu packages linux)
             (srfi srfi-1)
             (ice-9 match))

(define gexp-references (@@ (guix gexp) gexp-references))

(define (thing->string thing)
  (match thing
    ((? gexp-input? g)
     (match (gexp-input-thing g)
       ((? origin? o)
        (origin-uri o))
       (_ #f)))
    (_ #f)))

(define (get-uri pkg)
  (match (package-source pkg)
    ((? origin? o)
     (match (origin-uri o)
       ((? string? s)
        (list s))
       ((? list? lst)
        lst)
       ((? promise? prom)
        (match (force prom)
          ((? gexp? g)
           (filter (lambda (x) x)
                   (delete-duplicates
                    (map thing->string
                         (gexp-references g)))))
          (_
           (list #f))))
       (_
        (list #f))))
    (_ #f)))

(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~%" (get-uri p)))
     all-packages)
--8<---------------cut here---------------end--------------->8---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux-libre source code via SWH sources.json
  2021-09-08 22:00 ` Ludovic Courtès
  2021-09-08 23:46   ` Why linux-libre source code is not in sources.json zimoun
@ 2021-09-11  0:22   ` zimoun
  1 sibling, 0 replies; 9+ messages in thread
From: zimoun @ 2021-09-11  0:22 UTC (permalink / raw)
  To: Ludovic Courtès, Leo Famulari; +Cc: guix-devel

Hi,

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

> We should check why we’re not providing all the URLs and fix it.

Done in patch#50515.

<http://issues.guix.gnu.org/issue/50515>

Well, I think that all the packages with true ’origin?’ are now in
’sources.json’.  If not, please comment in #50515. :-)

However, we need to check if the deblob scripts are ingested by SWH.
Well, I am not sure because their listener of ’sources.json’ only
ingests tarballs and other zip files but not plain file as the deblob
scripts.  Who knows? :-)

Cheers,
simon


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-11  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-08 22:00 ` Ludovic Courtès
2021-09-08 23:46   ` Why linux-libre source code is not in sources.json zimoun
2021-09-09  7:37     ` 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

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 NNTP newsgroup(s).