unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#50515] (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json'.
@ 2021-09-11  0:14 zimoun
  2021-09-11  0:26 ` [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2021-09-11  0:14 UTC (permalink / raw)
  To: 50515; +Cc: zimoun, ludo, leo

Hi,

This patch is a follow-up of this message:

<https://lists.gnu.org/archive/html/guix-devel/2021-09/msg00106.html>

Now, 'sources.json' file contains the missing origins; for instance:

--8<---------------cut here---------------start------------->8---
$ cat /tmp/gnu.org/software/guix/sources.json | jq | grep fsfla | sort | uniq -c
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.238-gnu/deblob-4.14"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.14.238-gnu/deblob-check"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.196-gnu/deblob-4.19"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.19.196-gnu/deblob-check"
      2         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.274-gnu/deblob-4.4"
      2         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.4.274-gnu/deblob-check"
      2         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.274-gnu/deblob-4.9"
      2         "https://linux-libre.fsfla.org/pub/linux-libre/releases/4.9.274-gnu/deblob-check"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.10.47-gnu/deblob-5.10"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.10.47-gnu/deblob-check"
     14         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.12.14-gnu/deblob-5.12"
     14         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.12.14-gnu/deblob-check"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.129-gnu/deblob-5.4"
      4         "https://linux-libre.fsfla.org/pub/linux-libre/releases/5.4.129-gnu/deblob-check"
      2         "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---

First, it should be investigated why the deblob script
'5.12.14-gnu/deblob-5.12' appears 14 times.  In the same idea, the
source of 5.12.14 appears 28 times.  Well, I have tried to add
’delete-duplicates’ but without success.  To be continued… :-)

Second, I do not know if SWH ingests scripts as:

<https://linux-libre.fsfla.org/pub/linux-libre/releases/5.12.14-gnu/deblob-check>

and it is worth to carefully check with them. :-)

Last, the first patch tweaks the check to ease from the command-line the
build of the full website and not only 300 packages (otherwise it is
easy to miss corner cases ;-)).  Other said, turn
’GUIX_WEB_SITE_LOCAL=yes’ to ’GUIX_WEB_SITE_LOCAL=whatever-value’ (where
whatever-value can be ’no’ for instance) allows to build the full
website. It appears to me simpler than the previous check.  WDYT?


All the best,
simon


zimoun (2):
  website: Tweak 'GUIX_WEB_SITE_LOCAL'.
  website: Add 'computed-origin-method' packages to 'sources.json'.

 website/README                    |   3 +
 website/apps/packages/builder.scm | 134 +++++++++++++++++++-----------
 website/apps/packages/data.scm    |   3 +-
 3 files changed, 89 insertions(+), 51 deletions(-)


base-commit: d8efebc0794e8d6b2debc0e8a233a4b4b3b6f676
--
2.29.2




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

* [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL'.
  2021-09-11  0:14 [bug#50515] (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json' zimoun
@ 2021-09-11  0:26 ` zimoun
  2021-09-11  0:26   ` [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
  2021-09-12  0:54   ` Mark H Weaver
  0 siblings, 2 replies; 7+ messages in thread
From: zimoun @ 2021-09-11  0:26 UTC (permalink / raw)
  To: 50515; +Cc: zimoun

* website/apps/packages/data.scm (%package-list): Compare to 'yes' instead of
any value.
* website/README: Document it.
---
 website/README                 | 3 +++
 website/apps/packages/data.scm | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/website/README b/website/README
index ce2819f..19951d6 100644
--- a/website/README
+++ b/website/README
@@ -37,6 +37,9 @@ commands:
                           -- haunt build
 #+end_example
 
+Any other value than =GUIX_WEB_SITE_LOCAL=yes= will build the full website
+considering all the packages and not a small subset.
+
 ** Serve locally
 #+begin_example
   LANG=en_US.UTF-8 guix environment -CN -m manifest.scm \
diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm
index d1bbc92..eb34d26 100644
--- a/website/apps/packages/data.scm
+++ b/website/apps/packages/data.scm
@@ -50,7 +50,8 @@
                    (string<? (package-name p1)
                              (package-name p2))))))
       (cond ((null? packages) '())
-            ((getenv "GUIX_WEB_SITE_LOCAL") (list-head packages 300))
+            ((string=? "yes" (getenv "GUIX_WEB_SITE_LOCAL"))
+             (list-head packages 300))
             (else packages)))))
 
 (define (all-packages)
-- 
2.29.2





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

* [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
  2021-09-11  0:26 ` [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
@ 2021-09-11  0:26   ` zimoun
  2021-09-12  0:54   ` Mark H Weaver
  1 sibling, 0 replies; 7+ messages in thread
From: zimoun @ 2021-09-11  0:26 UTC (permalink / raw)
  To: 50515; +Cc: zimoun

With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered
are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and
gnu/packages/linux.scm.

* website/apps/packages/builder.scm (gexp-references): Unexported variable
from the module '(guix gexp)'.
(origin->json): Add 'computed-origin-method' case.
(package-json-builder): Adjust.
(sources-json-builder): Idem.
[flatten]: New procedure.
---
 website/apps/packages/builder.scm | 134 +++++++++++++++++++-----------
 1 file changed, 84 insertions(+), 50 deletions(-)

diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm
index fb53215..ecf958a 100644
--- a/website/apps/packages/builder.scm
+++ b/website/apps/packages/builder.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Nicolò Balzarotti <nicolo@nixo.xyz>
-;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2020, 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; Initially written by sirgazil
 ;;; who waives all copyright interest on this file.
@@ -49,11 +49,14 @@
   #:use-module ((guix base64) #:select (base64-encode))
   #:use-module ((guix describe) #:select (current-profile))
   #:use-module ((guix config) #:select (%guix-version))
+  #:use-module (guix gexp)
   #:use-module (json)
   #:use-module (ice-9 match)
   #:use-module ((web uri) #:select (string->uri uri->string))
   #:export (builder))
 
+;;; Required by 'origin->json' for 'computed-origin-method' corner cases
+(define gexp-references (@@ (guix gexp) gexp-references))
 
 ;;;
 ;;; Application builder.
@@ -98,7 +101,7 @@
   (define method
     (origin-method origin))
 
-  (define uri                                     ;represented as string
+  (define uri
     (origin-uri origin))
 
   (define (resolve urls)
@@ -106,53 +109,67 @@
          (append-map (cut maybe-expand-mirrors <> %mirrors)
                      (map string->uri urls))))
 
-  `((type . ,(cond ((or (eq? url-fetch method)
-                        (eq? url-fetch/tarbomb method)
-                        (eq? url-fetch/zipbomb method)) 'url)
-                   ((eq? git-fetch method) 'git)
-                   ((or (eq? svn-fetch method)
-                        (eq? svn-multi-fetch method)) 'svn)
-                   ((eq? hg-fetch method) 'hg)
-                   (else                   #nil)))
-    ,@(cond ((or (eq? url-fetch method)
+  (match uri
+    ((? promise? promise)               ;computed-origin-method
+     (match (force promise)
+       ((? gexp? g)
+        (map origin->json
+             (filter-map (match-lambda
+                           ((? gexp-input? thing)
+                            (match (gexp-input-thing thing)
+                              ((? origin? o) o)
+                              (_ #f)))
+                           (_ #f))
+                         (gexp-references g))))
+       (_ `((type . #nil)))))
+    (_                                  ;represented as string
+     `((type . ,(cond ((or (eq? url-fetch method)
+                           (eq? url-fetch/tarbomb method)
+                           (eq? url-fetch/zipbomb method)) 'url)
+                      ((eq? git-fetch method) 'git)
+                      ((or (eq? svn-fetch method)
+                           (eq? svn-multi-fetch method)) 'svn)
+                      ((eq? hg-fetch method) 'hg)
+                      (else                   #nil)))
+       ,@(cond ((or (eq? url-fetch method)
+                    (eq? url-fetch/tarbomb method)
+                    (eq? url-fetch/zipbomb method))
+                `(("urls" . ,(list->vector
+                              (resolve
+                               (match uri
+                                 ((? string? url) (list url))
+                                 ((urls ...) urls)))))))
+               ((eq? git-fetch method)
+                `(("git_url" . ,(git-reference-url uri))))
+               ((eq? svn-fetch method)
+                `(("svn_url" . ,(svn-reference-url uri))))
+               ((eq? svn-multi-fetch method)
+                `(("svn_url" . ,(svn-multi-reference-url uri))))
+               ((eq? hg-fetch method)
+                `(("hg_url" . ,(hg-reference-url uri))))
+               (else '()))
+       ,@(if (or (eq? url-fetch method)
                  (eq? url-fetch/tarbomb method)
                  (eq? url-fetch/zipbomb method))
-             `(("urls" . ,(list->vector
-                           (resolve
-                            (match uri
-                              ((? string? url) (list url))
-                              ((urls ...) urls)))))))
-            ((eq? git-fetch method)
-             `(("git_url" . ,(git-reference-url uri))))
-            ((eq? svn-fetch method)
-             `(("svn_url" . ,(svn-reference-url uri))))
-            ((eq? svn-multi-fetch method)
-             `(("svn_url" . ,(svn-multi-reference-url uri))))
-            ((eq? hg-fetch method)
-             `(("hg_url" . ,(hg-reference-url uri))))
-            (else '()))
-    ,@(if (or (eq? url-fetch method)
-              (eq? url-fetch/tarbomb method)
-              (eq? url-fetch/zipbomb method))
-          (let* ((content-hash (origin-hash origin))
-                 (hash-value (content-hash-value content-hash))
-                 (hash-algorithm (content-hash-algorithm content-hash))
-                 (algorithm-string (symbol->string hash-algorithm)))
-            `(("integrity" . ,(string-append algorithm-string "-"
-                                             (base64-encode hash-value)))))
-          '())
-    ,@(if (eq? method git-fetch)
-          `(("git_ref" . ,(git-reference-commit uri)))
-          '())
-    ,@(if (eq? method svn-fetch)
-          `(("svn_revision" . ,(svn-reference-revision uri)))
-          '())
-    ,@(if (eq? method svn-multi-fetch)
-          `(("svn_revision" . ,(svn-multi-reference-revision uri)))
-          '())
-    ,@(if (eq? method hg-fetch)
-          `(("hg_changeset" . ,(hg-reference-changeset uri)))
-          '())))
+             (let* ((content-hash (origin-hash origin))
+                    (hash-value (content-hash-value content-hash))
+                    (hash-algorithm (content-hash-algorithm content-hash))
+                    (algorithm-string (symbol->string hash-algorithm)))
+               `(("integrity" . ,(string-append algorithm-string "-"
+                                                (base64-encode hash-value)))))
+             '())
+       ,@(if (eq? method git-fetch)
+             `(("git_ref" . ,(git-reference-commit uri)))
+             '())
+       ,@(if (eq? method svn-fetch)
+             `(("svn_revision" . ,(svn-reference-revision uri)))
+             '())
+       ,@(if (eq? method svn-multi-fetch)
+             `(("svn_revision" . ,(svn-multi-reference-revision uri)))
+             '())
+       ,@(if (eq? method hg-fetch)
+             `(("hg_changeset" . ,(hg-reference-changeset uri)))
+             '())))))
 
 (define (packages-json-builder)
   "Return a JSON page listing all packages."
@@ -167,7 +184,12 @@
       ,@(if cpe-name `(("cpe_name" . ,cpe-name)) '())
       ,@(if cpe-version `(("cpe_version" . ,cpe-version)) '())
       ,@(if (origin? (package-source package))
-            `(("source" . ,(origin->json (package-source package))))
+            `(("source" . ,(let ((json (origin->json (package-source package))))
+                             (match json
+                               ((('type . x) other ...)
+                                json)
+                               ((head tail ...) ;multi-origin
+                                head)))))       ;XXXX: Improve this approximation
             '())
       ("synopsis" . ,(package-synopsis package))
       ,@(if (package-home-page package)
@@ -195,11 +217,23 @@
   (define (package->json package)
     `(,@(if (origin? (package-source package))
             (origin->json (package-source package))
-            `(("type" . "no-origin")
+            `((type . "no-origin")
               ("name" . ,(package-name package))))))
 
+  (define (flatten lst)
+    ;; Convert nested lists to simple list
+    `(,@(if (null? lst)
+            '()
+            (match lst
+              ((head tail ...)
+               (match head
+                 ((('type . x) other ...)
+                  (cons head (flatten tail)))
+                 (_
+                  (append (flatten head) (flatten tail)))))))))
+
   (make-page "sources.json"
-             `(("sources" . ,(list->vector (map package->json (all-packages))))
+             `(("sources" . ,(list->vector (flatten (map package->json (all-packages)))))
                ("version" . "1")
                ("revision" .
                 ,(match (current-profile)
-- 
2.29.2





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

* [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
  2021-09-11  0:26 ` [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
  2021-09-11  0:26   ` [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
@ 2021-09-12  0:54   ` Mark H Weaver
  2021-09-13  7:01     ` zimoun
  1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2021-09-12  0:54 UTC (permalink / raw)
  To: zimoun; +Cc: 50515

Hi Simon,

> With Guix 9875f9bca3976bf3576eab9be42164fde454597e, the packages considered
> are IceCat and the Linux kernel; see: gnu/packages/gnuzilla.scm and
> gnu/packages/linux.scm.
>
> * website/apps/packages/builder.scm (gexp-references): Unexported variable
> from the module '(guix gexp)'.
> (origin->json): Add 'computed-origin-method' case.

Thanks for working on this.

> diff --git a/website/apps/packages/builder.scm b/website/apps/packages/builder.scm
> index fb53215..ecf958a 100644
> --- a/website/apps/packages/builder.scm
> +++ b/website/apps/packages/builder.scm
[...]
> @@ -106,53 +109,67 @@
>           (append-map (cut maybe-expand-mirrors <> %mirrors)
>                       (map string->uri urls))))
> 
> -  `((type . ,(cond ((or (eq? url-fetch method)
> -                        (eq? url-fetch/tarbomb method)
> -                        (eq? url-fetch/zipbomb method)) 'url)
> -                   ((eq? git-fetch method) 'git)
> -                   ((or (eq? svn-fetch method)
> -                        (eq? svn-multi-fetch method)) 'svn)
> -                   ((eq? hg-fetch method) 'hg)
> -                   (else                   #nil)))
> -    ,@(cond ((or (eq? url-fetch method)
> +  (match uri
> +    ((? promise? promise)               ;computed-origin-method
> +     (match (force promise)

Here, you're implicitly assuming that 'computed-origin-method' is the
only origin method that puts a promise in the 'uri' field.  That may be
true today, but it will not necessarily be true tomorrow, and therefore
it seems suboptimal to make that assumption in the code.

Instead, I would suggest checking for "computed origins" in the same way
that is done for the other cases: using 'eq?'.  It's not ideal, but it's
more future-proof than checking for a promise in the 'url' field, and
anyway it's the way things are currently being done.

However, there's a difficulty, and I suspect you're already aware of it
and that it's why you used the suboptimal approach above:

At present, 'computed-origin-method' is not exported by any Guix module,
nor is there even a unique definition of it.  Instead, there are two
copies of it, one in gnuzilla.scm and one in linux.scm.

The reason 'computed-origin-method' is not exported is because it never
went through the review process that such a radical new capability in
Guix should go through before becoming part of it's public API.

At the time that I added 'computed-origin-method', I was under time
pressure to push security updates for IceCat, and my previous method of
cherry picking dozens of upsteam patches and applying them to the most
recent IceCat release suddenly became impractical due to comprehensive
code reformatting done upstream.

I've always viewed 'computed-origin-method' as a temporary hack to work
around limitations in the 'snippet' mechanism.  Most importantly, last I
checked, it was not possible for a 'snippet' to produce a tarball with a
different base name than the original downloaded source.  I consider it
a *requirement* for the 'icecat' source tarball and it's unpacked
directory to be named "icecat-…" and not "firefox-…", and similarly for
'linux-libre'.

I'm sorry that I never found the energy to clean this up properly.

Anyway, regarding your proposed patch: for now, I would suggest the
following options:

(1) In a separate preceding commit, move 'computed-origin-method' to its
    own module, export it, use the exported one in gnuzilla.scm and
    linux.scm, and use 'eq?' to test for it in the code above.  There
    should probably also be a comment next to the definition of
    'computed-origin-method' pointing out that it's a temporary hack,
    hopefully to be superceded by snippets when they have gained the
    required functionality.

(2) Alternatively, for now, use 'eq?' against the two private copies
    (accessed using @@, see below), along with a "FIXME" comment.

___ (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method))
_______ (eq? method (@@ (gnu packages linux) computed-origin-method)))

What do you think?

I'm not on the guix-patches list, so please CC me on replies that you'd
like me to see.

       Thanks,
         Mark

-- 
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>.




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

* [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
  2021-09-12  0:54   ` Mark H Weaver
@ 2021-09-13  7:01     ` zimoun
  2021-09-16  0:07       ` Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2021-09-13  7:01 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 50515

Hi Mark,

Thanks for looking at the patch and for your inputs.


On Sat, 11 Sep 2021 at 20:54, Mark H Weaver <mhw@netris.org> wrote:

>> @@ -106,53 +109,67 @@
>>           (append-map (cut maybe-expand-mirrors <> %mirrors)
>>                       (map string->uri urls))))
>> 
>> -  `((type . ,(cond ((or (eq? url-fetch method)
>> -                        (eq? url-fetch/tarbomb method)
>> -                        (eq? url-fetch/zipbomb method)) 'url)
>> -                   ((eq? git-fetch method) 'git)
>> -                   ((or (eq? svn-fetch method)
>> -                        (eq? svn-multi-fetch method)) 'svn)
>> -                   ((eq? hg-fetch method) 'hg)
>> -                   (else                   #nil)))
>> -    ,@(cond ((or (eq? url-fetch method)
>> +  (match uri
>> +    ((? promise? promise)               ;computed-origin-method
>> +     (match (force promise)
>
> Here, you're implicitly assuming that 'computed-origin-method' is the
> only origin method that puts a promise in the 'uri' field.  That may be
> true today, but it will not necessarily be true tomorrow, and therefore
> it seems suboptimal to make that assumption in the code.

Yes, I agree.  My initial draft contained something as your wrote below:

     (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method))
         (eq? method (@@ (gnu packages linux) computed-origin-method)))

but then, I thought it was a redundant test because then the promise
check is necessary to unwrap the values of embedded origins.  And
currently, all the 'computed-origin-method's use a promise.

> Instead, I would suggest checking for "computed origins" in the same way
> that is done for the other cases: using 'eq?'.  It's not ideal, but it's
> more future-proof than checking for a promise in the 'url' field, and
> anyway it's the way things are currently being done.

I cannot predict the future but the check about the method is as
suboptimal as mine. :-) If another package uses computed-origin-method,
then it should be added here.  However, from my understanding, there is
an higher probability that this hypothetical packages would use a
promise.

> However, there's a difficulty, and I suspect you're already aware of it
> and that it's why you used the suboptimal approach above:
>
> At present, 'computed-origin-method' is not exported by any Guix module,
> nor is there even a unique definition of it.  Instead, there are two
> copies of it, one in gnuzilla.scm and one in linux.scm.

Yes. :-)

> The reason 'computed-origin-method' is not exported is because it never
> went through the review process that such a radical new capability in
> Guix should go through before becoming part of it's public API.
>
> At the time that I added 'computed-origin-method', I was under time
> pressure to push security updates for IceCat, and my previous method of
> cherry picking dozens of upsteam patches and applying them to the most
> recent IceCat release suddenly became impractical due to comprehensive
> code reformatting done upstream.
>
> I've always viewed 'computed-origin-method' as a temporary hack to work
> around limitations in the 'snippet' mechanism.  Most importantly, last I
> checked, it was not possible for a 'snippet' to produce a tarball with a
> different base name than the original downloaded source.  I consider it
> a *requirement* for the 'icecat' source tarball and it's unpacked
> directory to be named "icecat-…" and not "firefox-…", and similarly for
> 'linux-libre'.

Thanks for explaining.

> Anyway, regarding your proposed patch: for now, I would suggest the
> following options:
>
> (1) In a separate preceding commit, move 'computed-origin-method' to its
>     own module, export it, use the exported one in gnuzilla.scm and
>     linux.scm, and use 'eq?' to test for it in the code above.  There
>     should probably also be a comment next to the definition of
>     'computed-origin-method' pointing out that it's a temporary hack,
>     hopefully to be superceded by snippets when they have gained the
>     required functionality.

I think it is the better approach.  Move the ’computed-origin-method’
procedure to (guix packages) and export it; add a comment about it.

However, I would not like that the sources.json situation stays blocked
by the computed-origin-method situation when sources.json is produced by
the website independently of Guix, somehow. :-)

Therefore, there is an option (3). Move the ’computed-origin-method’
procedure to (guix packages) and add a comment about it; use it for
icecat and linux with (@@ (guix packages) computed-origin-method).

WDYT about this (3)?  It simplifies this patch and let the time to
discuss the ’computed-origin-method’ case without exposing it to the
public API.

> (2) Alternatively, for now, use 'eq?' against the two private copies
>     (accessed using @@, see below), along with a "FIXME" comment.
>
> ___ (or (eq? method (@@ (gnu packages gnuzilla) computed-origin-method))
> _______ (eq? method (@@ (gnu packages linux) computed-origin-method)))

I commented above why I am not convinced that is better than directly
check the promise.  I do agree with the FIXME comment; the commit
message is not enough here.



Cheers,
simon




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

* [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
  2021-09-13  7:01     ` zimoun
@ 2021-09-16  0:07       ` Mark H Weaver
  2021-09-16 11:48         ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2021-09-16  0:07 UTC (permalink / raw)
  To: zimoun; +Cc: 50515

Hi Simon,

zimoun <zimon.toutoune@gmail.com> writes:

> Therefore, there is an option (3). Move the ’computed-origin-method’
> procedure to (guix packages) and add a comment about it; use it for
> icecat and linux with (@@ (guix packages) computed-origin-method).
>
> WDYT about this (3)?  It simplifies this patch and let the time to
> discuss the ’computed-origin-method’ case without exposing it to the
> public API.

Sure, that sounds like a fine approach.

   Thank you!
      Mark

-- 
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>.




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

* [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
  2021-09-16  0:07       ` Mark H Weaver
@ 2021-09-16 11:48         ` zimoun
  0 siblings, 0 replies; 7+ messages in thread
From: zimoun @ 2021-09-16 11:48 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 50515

Hi Mark,

On Thu, 16 Sept 2021 at 02:08, Mark H Weaver <mhw@netris.org> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:
>
> > Therefore, there is an option (3). Move the ’computed-origin-method’
> > procedure to (guix packages) and add a comment about it; use it for
> > icecat and linux with (@@ (guix packages) computed-origin-method).
> >
> > WDYT about this (3)?  It simplifies this patch and let the time to
> > discuss the ’computed-origin-method’ case without exposing it to the
> > public API.
>
> Sure, that sounds like a fine approach.

Done in patch#50620.

<http://issues.guix.gnu.org/50620>

Cheers,
simon




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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11  0:14 [bug#50515] (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json' zimoun
2021-09-11  0:26 ` [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
2021-09-11  0:26   ` [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
2021-09-12  0:54   ` Mark H Weaver
2021-09-13  7:01     ` zimoun
2021-09-16  0:07       ` Mark H Weaver
2021-09-16 11:48         ` 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).