From patchwork Mon Sep 26 21:44:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 42998 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 0076127BBE9; Mon, 26 Sep 2022 22:57:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 CF73B27BBE9 for ; Mon, 26 Sep 2022 22:57:21 +0100 (BST) Received: from localhost ([::1]:60312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocw6K-0007xy-W9 for patchwork@mira.cbaines.net; Mon, 26 Sep 2022 17:57:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocvxM-0001gA-Ay for guix-patches@gnu.org; Mon, 26 Sep 2022 17:48:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocvxK-0006vJ-UN for guix-patches@gnu.org; Mon, 26 Sep 2022 17:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocvxK-0002ez-Du for guix-patches@gnu.org; Mon, 26 Sep 2022 17:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54216] [PATCH v6] gnu: shepherd: Build Shepherd 0.9.2 from git. 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, 26 Sep 2022 21:48: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.166422883510053 (code B ref 54216); Mon, 26 Sep 2022 21:48:02 +0000 Received: (at 54216) by debbugs.gnu.org; 26 Sep 2022 21:47:15 +0000 Received: from localhost ([127.0.0.1]:51968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocvwY-0002c5-QZ for submit@debbugs.gnu.org; Mon, 26 Sep 2022 17:47:15 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:36589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocvwV-0002bq-AL for 54216@debbugs.gnu.org; Mon, 26 Sep 2022 17:47:13 -0400 Received: by mail-ej1-f54.google.com with SMTP id 13so16932003ejn.3 for <54216@debbugs.gnu.org>; Mon, 26 Sep 2022 14:47:11 -0700 (PDT) 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; bh=lSCsuXNfhiK5VSRvX4+HgvoAejkyBWM0tDIk60qKPRw=; b=FCMYiybinM2oVqAoC5rdq/dZ6GrlFqlBTOOEcUytnM9MtW/b4kIQk2WgwZHweA8lt8 DmjJaKzRZlQEfV6PSIBty6wwUO/kIZw5UxJi2OoWGCEK9LI3aGYJTKQapokMEIPtBbrn //etCHUWmrZjVTyswV2Kis8tbcLiZEffpr57SV29KZ/0GE94/1G474m66aHS8Yh1lJZB x/eobH/GmzhXx6CO2frV9KUV/W0arynPpf4S+VrKFfTPo7AOPPYlrGAnLkYL1LlZpeE/ NMUOLtsmA/zKSsIEG1pAB9iUcgPpaEWmCKr12Yc9rBKirVtX5GEB+OV67bZP99CbalKe 3KIw== 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; bh=lSCsuXNfhiK5VSRvX4+HgvoAejkyBWM0tDIk60qKPRw=; b=4FYlJ8Juimin8SZJiCYrW80PVRzXK5P6FFkon+NuTEPuz8GccQdmD8GgjL87nrVOrt Ox+vEWn8Skaziis+3lYgJ6vz3erOXzMDzi9tHnWWCi5T2kE8sm9+wRV+BBlSs33fgNGJ QD2uKw22zsWMA53ZOsW/mWUNLe3orlDGzbTgV4ljLoYc6Q+qqP2M+zbpKVnddxyLSkNE jsja/9n+RMcQv6GoCDPaLT5KgbKF2f4kQt4kalUlW1Xyq1WMUu+mUdwvxC+fFJgvjBUI FTMPRVEcPIh7vK6XRdgKwRw1VYd08Sl0FMZoYkFaXuXxk8tJYCJwrqFZr3r+kBeg/6Fg dWYw== X-Gm-Message-State: ACrzQf1hqdxA3MRdADBWATFOM0EKUFatjX7IlDlWojrtkN3MWIAxT5mw V2e7FYsK5W47ENgFTMavlhetl9cn2Tg= X-Google-Smtp-Source: AMsMyM7F6R1dAbX0f6yKa9WhPzL4Bf41biVdNo5A1f9WcuRRpKi+itmiYtMNOQPdOdSdyIjYwSEyOA== X-Received: by 2002:a17:906:ee86:b0:741:89bc:27a1 with SMTP id wt6-20020a170906ee8600b0074189bc27a1mr20435353ejb.725.1664228825377; Mon, 26 Sep 2022 14:47:05 -0700 (PDT) Received: from lelap.lan (catv-86-101-126-246.catv.fixed.vodafone.hu. [86.101.126.246]) by smtp.gmail.com with ESMTPSA id bp24-20020a170907919800b0073c74bee6eesm8576663ejb.201.2022.09.26.14.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 14:47:04 -0700 (PDT) From: Attila Lendvai Date: Mon, 26 Sep 2022 23:44:46 +0200 Message-Id: <20220926214445.16793-1-attila@lendvai.name> X-Mailer: git-send-email 2.35.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" 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 greatly reducing 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. --- v6: fix the (delete 'strip) merge error to always include it. GExp experts may be able to simplify it, or chose to drop it altogether. gnu/packages/admin.scm | 50 +++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5fb621e027..e57f0436cb 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -327,12 +327,13 @@ (define-public shepherd-0.9 (inherit shepherd) (version "0.9.2") (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 - "0mcby3ygh3bpns44rb1vnk8bz2km4nlw092nrcgkm3nkqfmbp4p1")) + (base32 "1b16qc7zmm1cz45gspcbng4djz9jy8db4awfw63b2hvf9b396mv2")) (modules '((guix build utils))) (snippet ;; Avoid continuation barriers so (@ (fibers) sleep) can be @@ -347,24 +348,27 @@ (define-public shepherd-0.9 (arguments (list #:configure-flags #~'("--localstatedir=/var") #:make-flags #~'("GUILE_AUTO_COMPILE=0") - #:phases (if (%current-target-system) - #~(modify-phases %standard-phases - (add-before 'configure 'set-fibers-directory - (lambda _ - ;; When cross-compiling, refer to the target - ;; Fibers, not the native one. - (substitute* '("herd.in" "shepherd.in") - (("%FIBERS_SOURCE_DIRECTORY%") - #$(file-append - (this-package-input "guile-fibers") - "/share/guile/site/3.0")) - (("%FIBERS_OBJECT_DIRECTORY%") - #$(file-append - (this-package-input "guile-fibers") - "/lib/guile/3.0/site-ccache")))))) - #~%standard-phases))) - (native-inputs (list pkg-config guile-3.0 - guile-fibers-1.1)) ;for cross-compilation + #:phases #~(modify-phases %standard-phases + (delete 'strip) ; Warns when stripping .go files. + #$@(if (%current-target-system) + #~((add-before 'configure 'set-fibers-directory + (lambda _ + ;; When cross-compiling, refer to the target + ;; Fibers, not the native one. + (substitute* '("herd.in" "shepherd.in") + (("%FIBERS_SOURCE_DIRECTORY%") + #$(file-append + (this-package-input "guile-fibers") + "/share/guile/site/3.0")) + (("%FIBERS_OBJECT_DIRECTORY%") + #$(file-append + (this-package-input "guile-fibers") + "/lib/guile/3.0/site-ccache")))))) + #~())))) + (native-inputs + (list autoconf automake gettext-minimal help2man texinfo pkg-config + guile-fibers-1.1 ; for cross-compilation + guile-3.0)) (inputs (list guile-3.0 guile-fibers-1.1)))) (define-public guile2.2-shepherd