From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GyVkFb0DV1+JOQAA0tVLHw (envelope-from ) for ; Tue, 08 Sep 2020 04:08:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qM/bEL0DV1/DNAAA1q6Kng (envelope-from ) for ; Tue, 08 Sep 2020 04:08:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 96A729404D3 for ; Tue, 8 Sep 2020 04:08:28 +0000 (UTC) Received: from localhost ([::1]:36110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFUvj-0000gg-H5 for larch@yhetil.org; Tue, 08 Sep 2020 00:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFUvb-0000gR-DV for guix-devel@gnu.org; Tue, 08 Sep 2020 00:08:19 -0400 Received: from world.peace.net ([64.112.178.59]:58424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFUvZ-0006cr-AM for guix-devel@gnu.org; Tue, 08 Sep 2020 00:08:18 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFUvX-0007vB-4w; Tue, 08 Sep 2020 00:08:15 -0400 From: Mark H Weaver To: maxim.cournoyer@gmail.com, guix-devel Subject: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet) In-Reply-To: <87h7ssx07p.fsf@gmail.com> References: <87h7ssx07p.fsf@gmail.com> Date: Tue, 08 Sep 2020 00:07:01 -0400 Message-ID: <87lfhkj4hr.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.112.178.59; envelope-from=mhw@netris.org; helo=world.peace.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 00:08:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: xb5UfQ8dzARi 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