From patchwork Fri Mar 4 10:30:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 37614 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 D7CE927BBEA; Fri, 4 Mar 2022 11:37:11 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED 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 33DA127BBE9 for ; Fri, 4 Mar 2022 11:37:11 +0000 (GMT) Received: from localhost ([::1]:52796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ6FC-0005Ew-4l for patchwork@mira.cbaines.net; Fri, 04 Mar 2022 06:37:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ6F4-0005DY-8f for guix-patches@gnu.org; Fri, 04 Mar 2022 06:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQ6F3-0001N6-PE for guix-patches@gnu.org; Fri, 04 Mar 2022 06:37:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQ6F3-0002ub-Ka for guix-patches@gnu.org; Fri, 04 Mar 2022 06:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54216] [PATCH shepherd staging v2] gnu: shepherd: Build it from git, and clean up shepherd-for-guix. References: <20220301182848.26694-1-attila@lendvai.name> In-Reply-To: <20220301182848.26694-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Mar 2022 11:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54216 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54216@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 54216-submit@debbugs.gnu.org id=B54216.164639377811143 (code B ref 54216); Fri, 04 Mar 2022 11:37:01 +0000 Received: (at 54216) by debbugs.gnu.org; 4 Mar 2022 11:36:18 +0000 Received: from localhost ([127.0.0.1]:44648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQ6EL-0002tf-N0 for submit@debbugs.gnu.org; Fri, 04 Mar 2022 06:36:18 -0500 Received: from mail-ed1-f53.google.com ([209.85.208.53]:44659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQ6EJ-0002tQ-3K for 54216@debbugs.gnu.org; Fri, 04 Mar 2022 06:36:15 -0500 Received: by mail-ed1-f53.google.com with SMTP id x5so10349532edd.11 for <54216@debbugs.gnu.org>; Fri, 04 Mar 2022 03:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vPNkbcZmXZFRX+YrqoSa+cu3J1/OUdFIlZXnxlIwtWw=; b=YeX+TBSU8HMNiN0FB40XFSnrL71wRCVH7Y+imXbaLyHGmH1X+THJF0CaiYBP9GNQcg ygPvkqkSbnNVsT6KL8rYQBNfzmeHlGk1TxDaz/bfsJ6tVVOyD2jvy2vvSPQy9ptUA7Aj fo/gXC0CfWleZHe8ZWDV5Oko9zRq4lXRNgQVIID2r5pb8Vb3uT2ff1T5sOp/CXROISkZ rb9h/JzqRhC+ZyJQq+7ZYvtpZjlWpyX223Dxx37JlFzGcaym9DCBbOoAW+7BD1BxizJt JpaYDHs1hMCb3LJWwHjSnT7NwNt2TbT9rya0bFle/9KIw8UvIFd6LcMax3rHLS+yvUVt cJoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=vPNkbcZmXZFRX+YrqoSa+cu3J1/OUdFIlZXnxlIwtWw=; b=Vpk+0g1a3pTSU+mukSul8PnduT8ylqbKdQCOjR3gG54WtwUTA3q0fnvF3qR/p0Z0xz Tj37WAtU1UxgfBv6bffSTwWY+HjdDPQKIdYfoVPKCl1vrCGgqubrMUApr8tOdlHJaJsm TWCGMG+cg0cJHik/0TKHUzq92MNdvWkhJwdzUBBrCxKW1FFUdjIT08m1hYYVyfgyj6tx PF0mrul/gb8PVlFPh0t8nhHbbD01AbKj6UGY0Gc45llZ5e235eyFp32dibrvvEgc+Uai mnlDExp/1Zcy7pk4/0AZf+xU7IS2rMtjecANqZSFkyI6FazXeroPhYZVhkKtZc0ih8Wz 1aIw== X-Gm-Message-State: AOAM530HAwg602l+wMPnBD/7Gars5eUVrU+/NtYCoTtP8i9rMQH9GncE Al8J25FEpZGDFGYfthYJBuYotGAQfPs= X-Google-Smtp-Source: ABdhPJxArZK5kQCtmRGy2Z0Dxlz+KWbrznkJIVABs3xVHA//X9XzbVOZPYz0qd2zeLhRH9yY2PH9LQ== X-Received: by 2002:aa7:d9d9:0:b0:415:9ec3:e124 with SMTP id v25-20020aa7d9d9000000b004159ec3e124mr15277441eds.15.1646393769001; Fri, 04 Mar 2022 03:36:09 -0800 (PST) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id q9-20020a17090609a900b006cd30a3c4f0sm1702026eje.147.2022.03.04.03.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 03:36:08 -0800 (PST) From: Attila Lendvai Date: Fri, 4 Mar 2022 11:30:29 +0100 Message-Id: <20220304103028.24388-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (shepherd): Change SOURCE to point to the git repository. (shepherd-for-guix): Simplify by moving most of the customizations into the above. --- i accidentally used the wrong hash in the first version. v2 fixes it, and also adds a more conformant commit message. my server is now building/reconfiguring into this codebase, that's how i've noticed my mistake. no idea why it didn't surface earlier, probably due to an unfortunate ordering of the test builds and the copy-paste mistake. gnu/packages/admin.scm | 70 +++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index dbceaca5e5..882dc9f121 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -270,26 +270,31 @@ (define-public shepherd (package (name "shepherd") (version "0.8.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/shepherd/shepherd-" - version ".tar.gz")) - (sha256 - (base32 - "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Build with -O1 to work around . - (substitute* "Makefile.in" - (("compile --target") - "compile -O1 --target")))))) + (source + (origin + (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 name version)) + (sha256 + (base32 "109ha9rk4ycqcmx9cddlbym92c3fvbwp12q9p42h8sg8vr367w5j")) + (modules '((guix build utils))))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--localstatedir=/var") - #:make-flags '("GUILE_AUTO_COMPILE=0"))) + #:make-flags '("GUILE_AUTO_COMPILE=0") + #:phases + (modify-phases %standard-phases + ;; TODO delete this once Guile is updated to v3.0.8+ + (add-after 'unpack 'patch-source + (lambda _ + ;; Build with -O1 to work around . + (substitute* "Makefile.am" + (("compile --target") + "compile -O1 --target"))))))) (native-inputs - (list pkg-config + (list autoconf automake gettext-minimal help2man texinfo pkg-config ;; This is the Guile we use as a cross-compiler... guile-3.0)) (inputs @@ -314,45 +319,26 @@ (define-public shepherd ;; [TODO] in the manual. (define-public shepherd-for-guix (let* ((version "0.8.1") - ;; If it's an unreleased commit: + ;; A commit string, or #f if it's a release. (commit "7c380590164ea8ee40de46059d07e08a48963577") - ;; Use the below form if it's a release, and also set REVISION to #f. - ;; (commit (string-append "v" version)) - (revision "1")) + (revision "1") ; Only relevant when COMMIT is specified. + (git-ref (or commit (string-append "v" version)))) (package (inherit shepherd) - (version (if revision + (version (if commit (git-version version revision commit) version)) (source (origin (inherit (package-source shepherd)) - (method git-fetch) (uri (git-reference ;; Build from git and add Autotools inputs, to make developing ;; Shepherd easier. It enables easier package inheritance. (url "https://git.savannah.gnu.org/git/shepherd.git/") - (commit commit))) - (snippet #f) ; TODO delete this once parent is refactored. + (commit git-ref))) (sha256 - (base32 - "1hgkbl3fyzwi5vw63kbkswnf3viyfl52c5dzkx7vbkr4sj5ysz1g")))) - ;; TODO merge this back into the parent with a patch to staging. - (arguments - (append - (package-arguments shepherd) - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-source - (lambda _ - ;; Build with -O1 to work around . - (substitute* "Makefile.am" - (("compile --target") - "compile -O1 --target")))))))) - (native-inputs - (modify-inputs (package-native-inputs shepherd) - (prepend autoconf automake gettext-minimal help2man texinfo))) - (description "A package variant for use in Guix. It helps lowering + (base32 "1hgkbl3fyzwi5vw63kbkswnf3viyfl52c5dzkx7vbkr4sj5ysz1g")))) + (description "A package variant for use in Guix. It helps lowering the build time of Guix when working on Shepherd.")))) (define-public guile2.2-shepherd