From patchwork Mon Mar 21 17:07:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 37976 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 6B7AB27BBEA; Mon, 21 Mar 2022 17:12:20 +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 D489327BBE9 for ; Mon, 21 Mar 2022 17:12:19 +0000 (GMT) Received: from localhost ([::1]:38064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWLZq-00066e-Us for patchwork@mira.cbaines.net; Mon, 21 Mar 2022 13:12:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWLWg-0000Xq-Nq for guix-patches@gnu.org; Mon, 21 Mar 2022 13:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWLWg-00061v-CN for guix-patches@gnu.org; Mon, 21 Mar 2022 13:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWLWg-0003LS-7r for guix-patches@gnu.org; Mon, 21 Mar 2022 13:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54216] [PATCH staging v3] 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: Mon, 21 Mar 2022 17:09:02 +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.164788253112841 (code B ref 54216); Mon, 21 Mar 2022 17:09:02 +0000 Received: (at 54216) by debbugs.gnu.org; 21 Mar 2022 17:08:51 +0000 Received: from localhost ([127.0.0.1]:38044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWLWU-0003L3-Op for submit@debbugs.gnu.org; Mon, 21 Mar 2022 13:08:51 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:41969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWLWT-0003Kq-5y for 54216@debbugs.gnu.org; Mon, 21 Mar 2022 13:08:49 -0400 Received: by mail-ed1-f47.google.com with SMTP id x34so17495130ede.8 for <54216@debbugs.gnu.org>; Mon, 21 Mar 2022 10:08:49 -0700 (PDT) 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=AOh6iBTYoMWUCdk3uvSW1tRdFyMiDmzkl57qjNMoWM0=; b=DgJ+gZycA4vPWEa3az0YwIgwImsZHDxjyYHDUcPhiD/sktdEYZAH0hmkIUK8JIgZwt VLwFiT/Qc7mveElUmdO6eC82Sxrod3HbI8zhVq5cosyvB3Av/fuJuLbJEr35lt4VwRSL KPFaT73fniAn2dDINplRyM7d0uSZa14MXcbh9b2uYQTzdBS6RdfifuzH3/CaslY/jgYB SnD1erkjSZH+Wqefur38VzZcrCZTjhwUmcEh1VUQ975sYLPowsjHdpL6m9kxqRUlBSQx PDq0dAY7eJIylcpWp08CVUdjVxID5ULImgXYuYII9qV+xi5CNqy9pL250KZ+lqLq/+xO wI9w== 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=AOh6iBTYoMWUCdk3uvSW1tRdFyMiDmzkl57qjNMoWM0=; b=xecgK/pSDSVKqLy8x00Qz7FXFVlzKgovK0xMWcPs0iKzRv73a4Pf3q13f6SP8S+sbn 9cCmHjzvi6pPHQK6HERz929e6H29Wj6iRYOyMn/zuz7ijTA4w0JnG9jZo1oMjWHVtfsG qWg5Zh4J8ET9doSjLkqdXFT7YPE4a+es5L2fAJUK7BC8d1TRp54x8zDnjQIRBySovqwA HNw/KliYp4icCajO/sNG5+KNG9p07CytNJohKCAXjInp3fY7M1mm+c2Ott15uhVfQEyc ou6zhO4F3zp3wuVi5V04gF0bj+tyKHYfG/9eH4cSnVkYZElN3OibxkonDY/zDIgOKs4N v8OQ== X-Gm-Message-State: AOAM5309GfIA4whBj11eLIuUtY8qJiFsQatowq488n0K+Z+v9d8Uft2x ks2bN/1pgOvQx0e9Na/cPfQlPef1m3I= X-Google-Smtp-Source: ABdhPJz070iRcbCbszmT+11NUiTYV7RMaNRUaUEz7t8pnJggfbq2LBnZ+wNTPlKYY15R268zFGUECQ== X-Received: by 2002:a50:d949:0:b0:418:ecfe:8c25 with SMTP id u9-20020a50d949000000b00418ecfe8c25mr23945292edj.156.1647882523057; Mon, 21 Mar 2022 10:08:43 -0700 (PDT) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id d11-20020a170906c20b00b006d584a09b9fsm7323712ejz.98.2022.03.21.10.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 10:08:42 -0700 (PDT) From: Attila Lendvai Date: Mon, 21 Mar 2022 18:07:18 +0100 Message-Id: <20220321170716.20140-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. --- also updated/rebased the cleanup patch to point to the commit that includes #:resource-limit in Shepherd. gnu/packages/admin.scm | 72 +++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 27fc33e990..3f08447ba4 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -270,26 +270,32 @@ (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 + (delete 'strip) ; Avoid some warnings from stripping .go files. + ;; 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,46 +320,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 "3ee9a7193d73821d6f1dd76a745ed5e4bb1a78c8") - ;; 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 - "07zaazw33p98n38j9hgjaipjvbh9mf0x3b5nbri5nyrxbgn0vvvb")))) - ;; TODO merge this back into the parent with a patch to staging. - (arguments - (append - (package-arguments shepherd) - '(#:phases - (modify-phases %standard-phases - (delete 'strip) ; Avoid some warnings from stripping .go files. - (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 "07zaazw33p98n38j9hgjaipjvbh9mf0x3b5nbri5nyrxbgn0vvvb")))) + (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