From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp12.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms0.migadu.com with LMTPS
	id 0C0/LHeOIGLMFAAAgWs5BA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 03 Mar 2022 10:46:31 +0100
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp12.migadu.com with LMTPS
	id iOvgKHeOIGL6WgEAauVa8A
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 03 Mar 2022 10:46:31 +0100
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 4EE86371A4
	for <larch@yhetil.org>; Thu,  3 Mar 2022 10:46:31 +0100 (CET)
Received: from localhost ([::1]:52512 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	id 1nPi2Y-0003iu-DR
	for larch@yhetil.org; Thu, 03 Mar 2022 04:46:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34374)
 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 1nPi29-0003fD-Fh
 for guix-patches@gnu.org; Thu, 03 Mar 2022 04:46:05 -0500
Received: from debbugs.gnu.org ([209.51.188.43]:47583)
 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 1nPi26-0005cA-Bu
 for guix-patches@gnu.org; Thu, 03 Mar 2022 04:46:05 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nPi26-0001wd-3P
 for guix-patches@gnu.org; Thu, 03 Mar 2022 04:46:02 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#54216] [PATCH v3] gnu: shepherd-for-guix: New package for use in
 Guix.
References: <20220301182848.26694-1-attila@lendvai.name>
In-Reply-To: <20220301182848.26694-1-attila@lendvai.name>
Resent-From: Attila Lendvai <attila@lendvai.name>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Thu, 03 Mar 2022 09:46:02 +0000
Resent-Message-ID: <handler.54216.B54216.16463007197413@debbugs.gnu.org>
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 <attila@lendvai.name>
Received: via spool by 54216-submit@debbugs.gnu.org id=B54216.16463007197413
 (code B ref 54216); Thu, 03 Mar 2022 09:46:02 +0000
Received: (at 54216) by debbugs.gnu.org; 3 Mar 2022 09:45:19 +0000
Received: from localhost ([127.0.0.1]:41478 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1nPi1O-0001vV-Ir
 for submit@debbugs.gnu.org; Thu, 03 Mar 2022 04:45:18 -0500
Received: from mail-ej1-f46.google.com ([209.85.218.46]:33616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <attila.lendvai@gmail.com>) id 1nPi1M-0001vG-Ph
 for 54216@debbugs.gnu.org; Thu, 03 Mar 2022 04:45:17 -0500
Received: by mail-ej1-f46.google.com with SMTP id kt27so9467319ejb.0
 for <54216@debbugs.gnu.org>; Thu, 03 Mar 2022 01:45:16 -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=WE/QBGbwtrwixbmVr1qs58V3rb2LHSH68DAAwVGwcpE=;
 b=kAd3xymRAMkKWAevGyEoBfciYgWvzxNF8p/Wg+LDroxL+Ain1eW11vr01vHX4V4CE1
 PA5a0PwiywOhJ9zrnx6tSy+uRYa3re5bZPPIW0v46uYicxh4CEfuKO8CbyvDsz2XQtlu
 /dpmNY685gF6E4hf3oJtdpJ0I9KrJDURv/Qus+KsxtL5UmG54Tn8XsZ52eO8FxZRBWL4
 L77BW1DDLVdYaWGPw1U7wFEYhZju3vrC3xyPa2O27dxasHtT3fuMmb44PDio060McYok
 MjhhhGcNM0kp/R3WjCVfvU1TYz020bp5KHFBJYPcNL2+zAyXD1D+skZtIMwsxY/P7Y1N
 ageA==
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=WE/QBGbwtrwixbmVr1qs58V3rb2LHSH68DAAwVGwcpE=;
 b=DhwYCFh0doMOnWoqmclh8D0/fAG1N6N3Q4yK7WS2HYWkAZ8YmyCtXBxPoSIIfift8e
 xujGIj5M4h3RXPBqNxD9SESC4fFGSpC49G0NCX7LgB9AdEKv8Cfic/mlVPTyVV8LRGKa
 geeipjFHiHSPjeK2hap40YDRvRlWMiEbar7M0f4wy/JTRUXeQUBL0N7/PvN80paN5MYs
 Avncf7LFmpwcuVB7YZuC2Lf9ZYk83qHU+W3z4RtAgeS7n6CmYINoXiVxgMWGwVt/sZeD
 nKiJjZQkpG5z7rjnRQ/gCqt16L5WBKq799Y+N1JxSh/1P3KFbNn5XleF9zFtbnK/M2xO
 1G+Q==
X-Gm-Message-State: AOAM530CNkKZ20FsgFs2gH5TPZsOt6pswb0GxjNHj+xWzekWs11cQcaM
 THH5joGtJhbCfTw/24TbdzvR0QE0Nhs=
X-Google-Smtp-Source: ABdhPJzF6EP2jC7Iu0aBQ4FzL0EAxnr85s4+BViHPgM1DIGLnp77+K3pEO8NWzbRemtd1y03cTJt0g==
X-Received: by 2002:a17:906:4fd2:b0:6d9:f7b6:964a with SMTP id
 i18-20020a1709064fd200b006d9f7b6964amr5594308ejw.474.1646300710548; 
 Thu, 03 Mar 2022 01:45:10 -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
 e24-20020a170906045800b006da975173b5sm174209eja.141.2022.03.03.01.45.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Mar 2022 01:45:09 -0800 (PST)
From: Attila Lendvai <attila@lendvai.name>
Date: Thu,  3 Mar 2022 10:43:36 +0100
Message-Id: <20220303094335.8926-1-attila@lendvai.name>
X-Mailer: git-send-email 2.34.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
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+larch=yhetil.org@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1646300791;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:resent-cc:
	 resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=WE/QBGbwtrwixbmVr1qs58V3rb2LHSH68DAAwVGwcpE=;
	b=H11sIS8+gW/vTa5PVAo79pyXWn9qMFsW/ZEobj/+7DyGwM7xxsUVj3NvTZ+qddyhv2sXc5
	Q/8WYSjmxUgRtc9ZrmgeyaecOLtN6BJFvmVc2G9tSH5ITgp1eqPx2kdgZ/g75nuHxYq9Rs
	sKifpC/DCgKjOdmFXue6ob9UMvdsA0mymygJ29FMUZnS6tui2U9fKEoFdTPb3+zzHvre7R
	7RKSNBtixL8NrfG6Ifvo5cefQc3vZ/i6lo/cKqsIMT+K5VQwm+roYd07yUDIuzIeqGTMhA
	RZ8zKq6xtPPHcLH5nZDdyXuZiI27s9t6WSWzrqJMdF090byZ22//dQL4FIaMEQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646300791; a=rsa-sha256; cv=none;
	b=EPzuaH0VQN3I4T76hwBxv0zckyJooTVBTCbNbxSm7TFlM8yLdMTks3mmBAnv+EzZQtf808
	0i+J9e0LpRksdiK9gGrsZdjFnzuYE/ZQXdg5L93SE21vESTQbIbjsYSsu2VRXWpIeLtLAo
	BesvfPbLmsvLDG5YgSsf0i7A36cEKoFaihA1Yxk+WbH8ieF7zutyD1XU/0gtr7+/U5tyXK
	+wKSAS6FOxTmp3nbL0OkbfsdzFGerlHiG10fFtx2nUbhzMqfBf9FT6TjjxkmoKKiia5uJk
	GfbabcVEhUzmLFYb1nf+YKi3nuNBLvI1LUL0o5si/vQ38Q41ccfzh87fX6giiA==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kAd3xymR;
	dmarc=none;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Spam-Score: 2.33
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kAd3xymR;
	dmarc=none;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Queue-Id: 4EE86371A4
X-Spam-Score: 2.33
X-Migadu-Scanner: scn0.migadu.com
X-TUID: yzgGW01NHnzS

This also updates shepherd-for-guix to the latest commit, so that the two
variants have a different version.

* gnu/packages/admin.scm (shepherd-for-guix): New variable.
---

v3: as per the discussion, implement the patching through a phase.

once it gets merged, i'll prepare another patch to staging that
cleans this all up by moving most of this into the parent package,
and also switch it to build from git.

 gnu/packages/admin.scm    | 48 +++++++++++++++++++++++++++++++++++++++
 gnu/services/shepherd.scm |  2 +-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index c8f91aab0d..dbceaca5e5 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -307,6 +307,54 @@ (define-public shepherd
     (license license:gpl3+)
     (home-page "https://www.gnu.org/software/shepherd/")))
 
+;; This is the Shepherd package used by Guix.  This package variant
+;; allows us to add new features and fix bugs in Shepherd and use the
+;; new features in Guix, without having to go through the 'staging'
+;; branch, and without having to wait for a new release, see
+;; [TODO] in the manual.
+(define-public shepherd-for-guix
+  (let* ((version "0.8.1")
+         ;; If it's an unreleased commit:
+         (commit "7c380590164ea8ee40de46059d07e08a48963577")
+         ;; Use the below form if it's a release, and also set REVISION to #f.
+         ;; (commit (string-append "v" version))
+         (revision "1"))
+    (package
+      (inherit shepherd)
+      (version (if revision
+                   (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.
+         (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 <https://bugs.gnu.org/48368>.
+                (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
+the build time of Guix when working on Shepherd."))))
+
 (define-public guile2.2-shepherd
   (package
     (inherit shepherd)
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index b44dbf9d9f..991194ffe6 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -88,7 +88,7 @@ (define-record-type* <shepherd-configuration>
   shepherd-configuration make-shepherd-configuration
   shepherd-configuration?
   (shepherd shepherd-configuration-shepherd
-            (default shepherd)) ; file-like
+            (default shepherd-for-guix)) ; file-like
   (services shepherd-configuration-services
             (default '()))) ; list of <shepherd-service>
 
-- 
2.34.0