From patchwork Fri Feb 24 14:02:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 47257 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D46216BBF; Fri, 24 Feb 2023 14:07:26 +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=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 60E2F16BA9 for ; Fri, 24 Feb 2023 14:07:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVYj2-0000Xe-9K; Fri, 24 Feb 2023 09:07: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 ) id 1pVYj1-0000XP-1U for guix-patches@gnu.org; Fri, 24 Feb 2023 09:07:03 -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 ) id 1pVYj0-0000tF-P2 for guix-patches@gnu.org; Fri, 24 Feb 2023 09:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVYj0-000708-JQ for guix-patches@gnu.org; Fri, 24 Feb 2023 09:07:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61750] [PATCH 1/2] gnu: shepherd: Build Shepherd from git. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 14:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61750@debbugs.gnu.org Cc: Attila Lendvai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167724759326874 (code B ref -1); Fri, 24 Feb 2023 14:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2023 14:06:33 +0000 Received: from localhost ([127.0.0.1]:36379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYiX-0006zO-5H for submit@debbugs.gnu.org; Fri, 24 Feb 2023 09:06:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:45134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYiV-0006zG-Lu for submit@debbugs.gnu.org; Fri, 24 Feb 2023 09:06:32 -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 ) id 1pVYiU-0000SV-HC for guix-patches@gnu.org; Fri, 24 Feb 2023 09:06:30 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVYiS-0000ix-BI for guix-patches@gnu.org; Fri, 24 Feb 2023 09:06:30 -0500 Received: by mail-ed1-x52c.google.com with SMTP id cq23so54927079edb.1 for ; Fri, 24 Feb 2023 06:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=lNv4PeQUBX2s86eTmG2NspXuE6EL0JLweCbfhhOpeGM=; b=XSI9qKEKE84GE5dDCFKWxbNtWAs0dFvxBlhDXy+P12mzx3DaHvVV2WwEFesEQIN8n7 kUhFtT4og9JvgQjqcIJZy69oR6IXghneXGg30uzwlCfKa4DW83toNlKQ/2GdvXj8Kx14 hUBgINKGR4/1QCXjXCUBceC5xYf9TSHyNVO3fUs7YE5oAb8VCjouJ+ZjheALRYc5CMkA TPMqPnpEW9KTsND1Y9wQD9BtXSjdrmT82npz427Y3OsQxQIzTjqNJdr1KY58fHEO7NEm btPwC/Bmhcdf3tC5gK/JgpZngpsCyJylPLAw3hTO/rffZAu195NkGuTt5iTJrqVgZtUd qTmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lNv4PeQUBX2s86eTmG2NspXuE6EL0JLweCbfhhOpeGM=; b=Au/gE87WOGWIUWfBNXvT0YlbsvYmWlXUEOokhDfBuLgtAFYipflctU+2P4cJldimVR S9urCwiB6fvbfO32J0uXqwRC9YNHyHUjB+I/xYamdh8jUSUy48NshugIwYlDbFNx45Ng GeMVTxmALg6+8mHP3HvtrXKXWC+FvdmEzRRbLuVpa+jQ+MeRq05KFGiCrzYzFFEjLYBs REwahJD7sWwMh1wPx0r41FzeBFyVHfW5AOKhAzKCyB2VaGJxHxYEo8LsMkh2KSLXBuaD ScUIZcYr8++GDwIwHZ2lzS5mMVo/2kFge6/RmNwQuNGnbotU0PCeXowqPYW0e9ivsziR 7IXg== X-Gm-Message-State: AO0yUKUMhzi7y+FYP3JpoqtG2RXBcTuxFLluhKj3WAZbfBIVO68J+KJg xypEZLn0LVDvovR/UWfe6xkXSUWT4Fs= X-Google-Smtp-Source: AK7set+UyFBEAAtYNs2SMpKBUZqs5UywK8EIaYwfOsqwZLcz4gNGSmzXZC7qQHkjlvb5hQN5V4XbjQ== X-Received: by 2002:a17:907:60d4:b0:8e1:cc38:6e78 with SMTP id hv20-20020a17090760d400b008e1cc386e78mr16765249ejc.39.1677247585658; Fri, 24 Feb 2023 06:06:25 -0800 (PST) Received: from lelap.lan (catv-80-98-247-145.catv.fixed.vodafone.hu. [80.98.247.145]) by smtp.gmail.com with ESMTPSA id de30-20020a1709069bde00b008d57e796dcbsm6166398ejc.25.2023.02.24.06.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 06:06:25 -0800 (PST) From: Attila Lendvai Date: Fri, 24 Feb 2023 15:02:43 +0100 Message-Id: <20230224140243.15315-1-attila@lendvai.name> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=attila.lendvai@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 The rationale for this is that it makes it simpler to start VM's with a Shepherd that is compiled from a local checkout. This facilitates hacking on Shepherd itself, and testing it in the Guix init environment, by speeding up the edit-compile-test cycle. * gnu/packages/admin.scm (shepherd-0.9): Source points to the git repo; adjust native-inputs accordingly. Also delete the strip build phase. --- the first commit works, except when cross-compiling: help2man wants to run the foreign binary, and fails. the second commit is a WIP attempt to get the compiled man pages from the native package when cross compiling. it's not ready, but i got stuck at needing to gunzip the man pages, and where to put them to convince the makefile to not execute help2man, etc. my suggestion is to simply get rid of the not-very-useful auto generated man page to fix cross-compilation. if that's not desirable, then the second commit needs to be polished, or implemented some other way. gnu/packages/admin.scm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d4cc8ca6ca..91f98bf48e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -335,12 +335,13 @@ (define-public shepherd-0.9 (inherit shepherd) (version "0.9.3") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/shepherd/shepherd-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/shepherd.git/") + (commit (string-append "v" version)))) + (file-name (git-file-name "shepherd" version)) (sha256 - (base32 - "0qy2yq13xhf05an5ilz7grighdxicx56211yaarqq5qigiiybc32")))) + (base32 "1pvdpx2mfki8wvhcac54p8fn5idqszicww60ikswszz2cv5d0s11")))) (arguments (list #:configure-flags #~'("--localstatedir=/var") #:make-flags #~'("GUILE_AUTO_COMPILE=0") @@ -360,12 +361,17 @@ (define-public shepherd-0.9 (this-package-input "guile-fibers") "/lib/guile/3.0/site-ccache")))))) #~%standard-phases))) - - ;; Note: Use 'guile-3.0-latest' to address the continuation-related memory - ;; leak reported at . - (native-inputs (list pkg-config guile-3.0-latest - guile-fibers-1.1)) ;for cross-compilation - (inputs (list guile-3.0-latest guile-fibers-1.1)))) + (native-inputs + (list autoconf + automake + gettext-minimal + guile-3.0 + guile-fibers-1.1 ; for cross-compilation + help2man + pkg-config + texinfo)) + (inputs (list guile-3.0 + guile-fibers-1.1)))) (define-public guile2.2-shepherd (package From patchwork Fri Feb 24 14:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 47258 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9069416BBC; Fri, 24 Feb 2023 14:09:06 +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=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable 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 3CB9016BA9 for ; Fri, 24 Feb 2023 14:09:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVYkx-0000yR-NC; Fri, 24 Feb 2023 09:09:03 -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 ) id 1pVYkx-0000yI-66 for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:03 -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 ) id 1pVYkw-0001sU-PO for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVYkw-00073N-CH for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61750] [PATCH 2/2] WIP failing attempt to get the man page while cross-compiling References: <20230224140243.15315-1-attila@lendvai.name> In-Reply-To: <20230224140243.15315-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61750@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 61750-submit@debbugs.gnu.org id=B61750.167724769027049 (code B ref 61750); Fri, 24 Feb 2023 14:09:02 +0000 Received: (at 61750) by debbugs.gnu.org; 24 Feb 2023 14:08:10 +0000 Received: from localhost ([127.0.0.1]:36384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYk5-00072C-SF for submit@debbugs.gnu.org; Fri, 24 Feb 2023 09:08:10 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:37739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYk3-00071l-M4 for 61750@debbugs.gnu.org; Fri, 24 Feb 2023 09:08:08 -0500 Received: by mail-ed1-f49.google.com with SMTP id d30so13992850eda.4 for <61750@debbugs.gnu.org>; Fri, 24 Feb 2023 06:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=jQo/wNFHulOYlFFgPFqyciUNMTAGHCvwEzLYNMAhuHo=; b=DtYFMS0wQh8Q6ceff5jJZYWSkFiUGKngb0idy2B0pSj/YifJpUyRPQb+lJVVMLaSRU VAebY0fKxhb7F6LnYHZjl0Z7MTepQYKjbKWWM5lKUZNpG4aRml44UYq0HSBYMcYS/fxC jn6blIaMDDkaVtjPS4YarOnsYD78ufnEuOMkp+JtwkzzFugdam/AuCs5viO6Xsfaryxh txww21RjC+D2n6zsQtXesttsa9uGTOWqldf0kGJo8otRUpE8d8XxUuffDcsqcCLfOsB9 jlsNxhinwUVWis8KVGgrXUQ1QqEMGi8T4r8MYWYFnPzN04L7Xjl4qND3ZjW1BlMPqDgY 5peQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jQo/wNFHulOYlFFgPFqyciUNMTAGHCvwEzLYNMAhuHo=; b=Cy2+UvAdXDUXP0+QVZ18B8dgZu7xF8t3aV+W3EnpfnHhQvarWOOCvpxjcJvAzFq1BX gOcgxnS41isAkHcjzA3MU0uyYcZAKLhC+z5vHpZPLf5gtpt+nYxVE5DyX8L+d231uACm Ny9f7Y5rZ7TyZ7lnuWfnlCuopHEa0BNKplCsQr5nZh2AHmC38xl8AYqdHXis00LkjchG OFw9Hz6roKobKVerZngYpQCLAtBvBPdjC1uIo6/KZ1m2Yyj2eb9bygx959XLdKLx1TbO W7bMQUjd7ffbww9csgaB3rSaKUOYMlDvqbjDzIGxp9PaOOZYh2qz4qY2czj28HoFEc2V 82+Q== X-Gm-Message-State: AO0yUKUcJvvq2XXYpBM7JYtWQIhk3qJgXZOEqLJhn+covAIjrsSnoiBx xziJ2Aa+xYOCpqChQR+dblmG8T1Cj3U= X-Google-Smtp-Source: AK7set8w0BwjeFTHuPLSPXhOcIMcctLZP92JTQh2W9dFj+zU75TPm+ajdZQ8rScX5NUw9T0ZgD8vkA== X-Received: by 2002:a17:906:1557:b0:8de:a8c:403c with SMTP id c23-20020a170906155700b008de0a8c403cmr14485535ejd.58.1677247681485; Fri, 24 Feb 2023 06:08:01 -0800 (PST) Received: from lelap.lan (catv-80-98-247-145.catv.fixed.vodafone.hu. [80.98.247.145]) by smtp.gmail.com with ESMTPSA id m11-20020a50930b000000b004a27046b7a7sm7260905eda.73.2023.02.24.06.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 06:08:01 -0800 (PST) From: Attila Lendvai Date: Fri, 24 Feb 2023 15:07:42 +0100 Message-Id: <20230224140740.16494-2-attila@lendvai.name> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 --- gnu/packages/admin.scm | 48 +++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 91f98bf48e..6e5082e612 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -343,7 +343,7 @@ (define-public shepherd-0.9 (sha256 (base32 "1pvdpx2mfki8wvhcac54p8fn5idqszicww60ikswszz2cv5d0s11")))) (arguments - (list #:configure-flags #~'("--localstatedir=/var") + (list #:configure-flags #~'("HELP2MAN=true --localstatedir=/var") #:make-flags #~'("GUILE_AUTO_COMPILE=0") #:phases (if (%current-target-system) #~(modify-phases %standard-phases @@ -359,17 +359,45 @@ (define-public shepherd-0.9 (("%FIBERS_OBJECT_DIRECTORY%") #$(file-append (this-package-input "guile-fibers") - "/lib/guile/3.0/site-ccache")))))) + "/lib/guile/3.0/site-ccache"))))) + (add-after 'configure 'copy-man-pages + (lambda* (#:key outputs native-inputs #:allow-other-keys) + ;; Cannot run help2man when cross-compiling, + ;; so let's copy the man pages from the native + ;; build. + (let ((gzip (search-input-file native-inputs + "bin/gzip"))) + ;; TODO + (pk #$(file-append + (this-package-input this-package) + "/man/shepherd.1.gz")) + (invoke gzip "--decompress" "--stdout" + #$(file-append + (this-package-input this-package) + "/man/shepherd.1.gz") + ">doc/shepherd.1")) + #;(copy-file #$(file-append + (this-package-input this-package) + "/man/shepherd.1") + (string-append + (assoc-ref outputs "out") + "/man/shepherd.1")) + #f))) #~%standard-phases))) (native-inputs - (list autoconf - automake - gettext-minimal - guile-3.0 - guile-fibers-1.1 ; for cross-compilation - help2man - pkg-config - texinfo)) + (cons* autoconf + automake + gettext-minimal + guile-3.0 + guile-fibers-1.1 ; for cross-compilation + help2man + pkg-config + texinfo + ;; for the help2man man page when cross-compiling + (if (%current-target-system) + (list gzip + this-package) + '()))) (inputs (list guile-3.0 guile-fibers-1.1))))