Message ID | 20221220052349.4965-1-GNUtoo@cyberdimension.org |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0738D27BBED; Fri, 23 Dec 2022 22:09:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C656927BBE9 for <patchwork@mira.cbaines.net>; Fri, 23 Dec 2022 22:09:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1p8qDw-0003FB-7q; Fri, 23 Dec 2022 17:09:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p8qDu-0003F1-JY for guix-patches@gnu.org; Fri, 23 Dec 2022 17:09:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p8qDu-0002YT-2s for guix-patches@gnu.org; Fri, 23 Dec 2022 17:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p8qDt-0002YN-Tb for guix-patches@gnu.org; Fri, 23 Dec 2022 17:09:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60288] [RESEND #2] [PATCH v1 0/2] Start adding ZIM file(s) Resent-From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Dec 2022 22:09:01 +0000 Resent-Message-ID: <handler.60288.B.16718332829789@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60288 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60288@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16718332829789 (code B ref -1); Fri, 23 Dec 2022 22:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Dec 2022 22:08:02 +0000 Received: from localhost ([127.0.0.1]:39076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1p8qCw-0002Xm-29 for submit@debbugs.gnu.org; Fri, 23 Dec 2022 17:08:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:38228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <GNUtoo@cyberdimension.org>) id 1p8qCu-0002Xc-3k for submit@debbugs.gnu.org; Fri, 23 Dec 2022 17:08:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <GNUtoo@cyberdimension.org>) id 1p8qCt-0003AW-U4 for guix-patches@gnu.org; Fri, 23 Dec 2022 17:07:59 -0500 Received: from cyberdimension.org ([2001:910:1314:ffff::1] helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from <GNUtoo@cyberdimension.org>) id 1p8qCs-0002S5-C6 for guix-patches@gnu.org; Fri, 23 Dec 2022 17:07:59 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 5f323909; Fri, 23 Dec 2022 22:03:41 +0000 (UTC) Received: from primary_laptop (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id ce71ce7d; Fri, 23 Dec 2022 22:03:41 +0000 (UTC) Date: Fri, 23 Dec 2022 23:07:31 +0100 From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Message-ID: <20221220052349.4965-1-GNUtoo@cyberdimension.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/w_TNHNTWrz/qmLV53Fhwj4H"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
Start adding ZIM file(s)
|
|
Message
Denis 'GNUtoo' Carikli
Dec. 23, 2022, 10:07 p.m. UTC
Hi, Here are two small patches. The first one add #:substitutable? to the copy-build system. I don't know how to check if it works as intended though. It's similar to the commit d0050ea8ad1c32d94cf5ba6725a0fc961bb23f38 ("build-system/go: Add #:substitutable? argument.") so normally it shouldn't be an issue, but if someone can double check it it would be best as it would avoid keeping around substitutes of very big sizes. The second patch adds a ZIM file. I'll most likely send more patches to add additional ZIM files packages (about 10) later on. I prefer doing it this way as it avoids having to deal with potential rebases breaking if there is something wrong with my second patch. Denis 'GNUtoo' Carikli (2): build-system/copy: Add #:substitutable? argument. gnu: Add wikipedia_en_all_maxi gnu/local.mk | 1 + gnu/packages/zim-files.scm | 86 ++++++++++++++++++++++++++++++++++++++ guix/build-system/copy.scm | 4 +- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/zim-files.scm base-commit: c193b5203b31246a6d74270c8086c45851561947
Comments
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes: > Here are two small patches. > > The first one add #:substitutable? to the copy-build system. > > I don't know how to check if it works as intended though. It's > similar to the commit d0050ea8ad1c32d94cf5ba6725a0fc961bb23f38 > ("build-system/go: Add #:substitutable? argument.") so normally > it shouldn't be an issue, but if someone can double check it it > would be best as it would avoid keeping around substitutes of > very big sizes. > > The second patch adds a ZIM file. I'll most likely send more > patches to add additional ZIM files packages (about 10) later > on. I prefer doing it this way as it avoids having to deal with > potential rebases breaking if there is something wrong with my > second patch. > > Denis 'GNUtoo' Carikli (2): > build-system/copy: Add #:substitutable? argument. > gnu: Add wikipedia_en_all_maxi I haven't looked at this in detail, but one comment on the QA failures. Building the package for this large file involves copying it from the store, to another place in the store. This requires 2x the space which this large file takes up, which is a pretty wasteful approach. This is the reason behind the build failures I've seen, the build machines run out of space when attempting the file copy. Maybe an alternative if you want to have a package would be to symlink to the source. That way, there's only a large file and a symlink in the store, rather than two copies of the same large file. Chris
On Wed, 28 Dec 2022 18:10:54 +0000 Christopher Baines <mail@cbaines.net> wrote: > I haven't looked at this in detail, but one comment on the QA > failures. Building the package for this large file involves copying it > from the store, to another place in the store. This requires 2x the > space which this large file takes up, which is a pretty wasteful > approach. Not only that but it also take a very long time to do that copy on slower machines with an encrypted rootfs. > This is the reason behind the build failures I've seen, the build > machines run out of space when attempting the file copy. Maybe an > alternative if you want to have a package would be to symlink to the > source. That way, there's only a large file and a symlink in the > store, rather than two copies of the same large file. I'll try that. I hope that guix gc will not garbage collect the source though. Do you know if it's possible just to have a source package somehow (and download the source to a specific filename) and not copy anything at all? Denis.
On Wed, 28 Dec 2022 18:10:54 +0000 Christopher Baines <mail@cbaines.net> wrote:> > Maybe an alternative if you want to have a package would be to > symlink to the source. The issue is that I don't know how to refer to the source in a situation like that. I didn't really find good examples of all that. So far the best I saw was to either define (source [...]) and reuse it in multiple packages or to reuse the source of another package with (package-source <package name>) like in linux.scm. With the gnu build system, it copies the source in the current directory, so I've really no idea what to do here. We might also need to add the source to the inputs or native-inputs or propagated-inputs somehow so it would not garbage collect it when we install the zim. Is propagated-inputs the way to go? Denis.