unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: maxim.cournoyer@gmail.com, guix-devel <guix-devel@gnu.org>
Subject: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet)
Date: Tue, 08 Sep 2020 00:07:01 -0400	[thread overview]
Message-ID: <87lfhkj4hr.fsf@netris.org> (raw)
In-Reply-To: <87h7ssx07p.fsf@gmail.com>

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?

      Mark


  parent reply	other threads:[~2020-09-08  4:08 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 ` Mark H Weaver [this message]
2020-09-08  7:22   ` What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet) 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

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=87lfhkj4hr.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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).