all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet)
Date: Fri, 11 Sep 2020 14:26:40 -0400	[thread overview]
Message-ID: <87een86ufz.fsf@gmail.com> (raw)
In-Reply-To: <87lfhkj4hr.fsf@netris.org> (Mark H. Weaver's message of "Tue, 08 Sep 2020 00:07:01 -0400")

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> Hi Maxim,
>
> maxim.cournoyer@gmail.com writes:
>
>> While trying to move some of the patching done to qtbase into a snippet,
>> with the goal of having at least the ./configure script runnable in a
>> guix environment without having to manually run patching phases:
>
> [...]
>
>> +              (snippet
>> +               (with-imported-modules '((guix build utils))
>> +                 #~(begin
>> +                     (use-modules (guix build utils))
>> +                     ;; corelib uses bundled harfbuzz, md4, md5, sha3
>> +                     (with-directory-excursion "src/3rdparty"
>> +                       (for-each delete-file-recursively
>> +                                 (list "double-conversion" "freetype" "harfbuzz-ng"
>> +                                       "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
>> +                                       "zlib")))
>> +
>> +                     (let ((coreutils #+(canonical-package coreutils)))
>> +                       (substitute* "configure"
>> +                         (("/bin/pwd")
>> +                          (string-append coreutils "/bin/pwd")))
>> +                       (substitute* "src/corelib/global/global.pri"
>> +                         (("/bin/ls")
>> +                          (string-append coreutils "/bin/ls"))))
>> +                     #t)))))
>
> Apart from the technical difficulties with cyclic modules, I'd like to
> raise another issue.
>
> In my opinion, "guix build --source PACKAGE" should produce sources that
> can be used to build the package on any system that the upstream package
> supports, not just on Guix systems.
>
> Alternatively, Guix should at least have *some* command to do this.
>
> Such a command would be especially useful for packages that we clean for
> FSDG compliance.  For example, I've made sure that "guix build --source
> icecat" produces a tarball that's suitable for any system that IceCat
> supports, and incidentally I intend to use Guix to generate the official
> IceCat source tarballs.
>
> Such a command would be useful for 'ungoogled-chromium' as well, and for
> many of our other packages that include snippets to remove
> non-FSDG-compliant code.
>
> The snippet that you proposed above would produce "sources" that can
> only be built on Guix systems, and moreover, only on the same
> architecture and core-updates cycle that produced it.
>
> I think that we ought to think about what "corresponding sources" should
> be, and put some care into making sure that "guix build --source"
> produces something worthy of that name.
>
> What do you think?

Thanks for those insightful remarks about what the source returned by
'guix build --source' should be.  I agree with you, and as Andreas
pointed, your remarks seem useful in drawing the distinction between
when to use snippets vs build phases.

Maxim


      parent reply	other threads:[~2020-09-11 18:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  2:10 Dependency cycle issues when using a Gexp-based snippet maxim.cournoyer
2020-08-24 21:09 ` Ludovic Courtès
2020-09-02 15:08   ` Maxim Cournoyer
2020-09-07  9:30     ` Ludovic Courtès
2020-09-14 16:55       ` Maxim Cournoyer
2020-09-16 10:08         ` Ludovic Courtès
2020-09-07 18:30   ` Mark H Weaver
2020-09-16 10:00     ` Ludovic Courtès
2020-09-08  4:07 ` What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet) Mark H Weaver
2020-09-08  7:22   ` Andreas Enge
2020-09-11 18:22     ` Maxim Cournoyer
2020-09-11 18:42       ` zimoun
2020-09-11 20:40       ` Andreas Enge
2020-09-11 18:26   ` Maxim Cournoyer [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87een86ufz.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.