From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp11.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 8BJ+GvGxOGJcqAAAgWs5BA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 21 Mar 2022 18:12:17 +0100
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp11.migadu.com with LMTPS
	id CJrhF/GxOGLTjgAA9RJhRA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 21 Mar 2022 18:12:17 +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 E0E1416EC2
	for <larch@yhetil.org>; Mon, 21 Mar 2022 18:12:16 +0100 (CET)
Received: from localhost ([::1]:38064 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 1nWLZn-00066e-Gs
	for larch@yhetil.org; Mon, 21 Mar 2022 13:12:15 -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 <Debian-debbugs@debbugs.gnu.org>)
 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 <Debian-debbugs@debbugs.gnu.org>)
 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 <Debian-debbugs@debbugs.gnu.org>) 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 <attila@lendvai.name>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Mon, 21 Mar 2022 17:09:02 +0000
Resent-Message-ID: <handler.54216.B54216.164788253112841@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.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 <debbugs-submit-bounces@debbugs.gnu.org>)
 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 <attila.lendvai@gmail.com>) 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 <attila@lendvai.name>
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
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-To: larch@yhetil.org
X-Migadu-Country: US
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1647882737;
	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=AOh6iBTYoMWUCdk3uvSW1tRdFyMiDmzkl57qjNMoWM0=;
	b=KN6Hp+ttK7hZeYjkMVoYCXo3dCElmIurL00EFAperClE5fzjy6q7XcKhMKqGQKGHnECWf7
	zUFKPuERJvkmLk73ggleUgFMQ+/7l32mjGMgRxYVlazel+tkATjPoHUR880hjheprNHbZP
	obLpVOYxOM3L/+jdpZpRXBESym04tn7NZOEeVtFAymklwEuD00SkJn0YM3OCYa+C2+t6lL
	h4E1gfb3SbqsSV6QQwdaFaGA3fXH1CigQdpsYB80DcdnrXGixXf15y4rqLJtAlBZfxesH5
	Qbe9OnZ98xtVWDuJEEz6N2CTmVe1xYJUWB/yK+wJxGnfhKYeVloOcLM4H/iMeQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647882737; a=rsa-sha256; cv=none;
	b=nLG1w+w23bmZ6l6uq4LcUn/FIHekC+2jriQuzibFqP4FIKjATCFQCV345KuYiKRLtAfsSO
	6n/2GOZs6Ou0oUoZlCnT+/B6TC1ehlIZdMY4dxtNftCYx9OYyJ7rGxXVZNWzbV4sMqujBk
	/CZILHrkNUDGT6WygOEu06+gk0mXvyqUNRKC3xolFWdMnL/wacyqk0rSw4Oc50jqRXJcc9
	84JuGvbsSJPvRKk2U+f3R6anU6R4nMVMykSedRoF7Hr2ldzIoLfQSsI4UDDYn8mHYZ4Vsm
	OHc8greQi237nLJgcPzWC1m72CFSkYrTbOd4znP+rp91u8MoiKRVhdBGmY4OWQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=DgJ+gZyc;
	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: 1.88
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=DgJ+gZyc;
	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: E0E1416EC2
X-Spam-Score: 1.88
X-Migadu-Scanner: scn0.migadu.com
X-TUID: V9q0PF+XwOfT

* 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 <https://bugs.gnu.org/48368>.
-                  (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 <https://bugs.gnu.org/48368>.
+             (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 <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
+          (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
-- 
2.34.0