GNU logs - #54199, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#54199] [PATCH] doc: Add 'Working on Shepherd' section.
Resent-From: Attila Lendvai <attila@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 28 Feb 2022 18:52:01 +0000
Resent-Message-ID: <handler.54199.B.16460743138645 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 54199
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 54199 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16460743138645
          (code B ref -1); Mon, 28 Feb 2022 18:52:01 +0000
Received: (at submit) by debbugs.gnu.org; 28 Feb 2022 18:51:53 +0000
Received: from localhost ([127.0.0.1]:34776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOl7h-0002FN-3d
	for submit <at> debbugs.gnu.org; Mon, 28 Feb 2022 13:51:53 -0500
Received: from lists.gnu.org ([209.51.188.17]:45610)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <attila.lendvai@HIDDEN>) id 1nOl7f-0002FG-Sj
 for submit <at> debbugs.gnu.org; Mon, 28 Feb 2022 13:51:52 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57200)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <attila.lendvai@HIDDEN>)
 id 1nOl7f-0002Gx-LF
 for guix-patches@HIDDEN; Mon, 28 Feb 2022 13:51:51 -0500
Received: from [2a00:1450:4864:20::52d] (port=38488
 helo=mail-ed1-x52d.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <attila.lendvai@HIDDEN>)
 id 1nOl7d-0002yV-FV
 for guix-patches@HIDDEN; Mon, 28 Feb 2022 13:51:51 -0500
Received: by mail-ed1-x52d.google.com with SMTP id s24so18941305edr.5
 for <guix-patches@HIDDEN>; Mon, 28 Feb 2022 10:51:48 -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=Z4BoOD9lLPDpuk3lB9HLFRG0sdx1TbzYCh+yrzoGLWY=;
 b=cFSDi+kkwnl5N629OjiA/F5GYYrj+2+VJFC6hGMO+RJj8fuM8Fo5kJrFfAwho3+QTw
 1x0gpIzt/HMd2/KLqNS/KkFiX1wOj8HEXzabHswO48DU+I2zm/U5jgGfDVKqLAbWPHyY
 qFAspBWkCMxIiU2XJsN8dsbuKPmVQ89FEGTJb567IK/JIn+UtimiJ8s2CTtFVPyxT5iI
 Y9PHWkbnXscNEEEy+y/LkPcjkhyeBMyDC6xTWxLbRyPsU+xPLN4fc0KKLHNjy5bOj+dH
 amgql2NUt5JunwRw9BYzGxyQ2eQAVRXMwc8ipiZYfwz1v9CWLHeAyWog5yrPb85qw5hE
 BoQg==
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=Z4BoOD9lLPDpuk3lB9HLFRG0sdx1TbzYCh+yrzoGLWY=;
 b=bUubqudWwX/crdssWySohlokRnKBLpuVmKT3vCUfgOqR3BEyZsrBrW1QIr9iqw0Xpo
 Q2XaaqkcQJVg79XlJGBpwtnKQjYtw1Lo0EieYNgR/TXMCP7LSn7mgeOU8sAcvILPUuvD
 pUQoosQPoj7ubOg1sxDl4nlWP+vQxIUdXVSh2qf8kNjWRFzEM80isgjOs+UyPcZW2I9f
 cG9GGwfrbPLeorf9xncEaMR5S+vP2IORoi3F17UTx1ZRuzzUoM66AToKWaZwfXB9x0VS
 gzeZLW14Wzswim9VLBsP0nORU1UGXraMwZKsUpxdsAz7vNeEWmnUWwfao2P5urlvBZi9
 53xA==
X-Gm-Message-State: AOAM5318TTiTojN8Nty5hF32+egP27wEkEYKlyehH9v0LDpHf4yjLAJR
 kIIz9AOen0AGf4YVPrWsSVZfBxCOXu8=
X-Google-Smtp-Source: ABdhPJz3p/J43mkaBqKZZYGDlxQmRUXxN3P+X+P1hhcmrEfuxFv4DOJBFh82u2JTVArhrfu6O0liTQ==
X-Received: by 2002:a50:9d47:0:b0:40f:9d3d:97b6 with SMTP id
 j7-20020a509d47000000b0040f9d3d97b6mr21547150edk.392.1646074307606; 
 Mon, 28 Feb 2022 10:51:47 -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
 ee21-20020a056402291500b00410d4261313sm6256428edb.24.2022.02.28.10.51.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 28 Feb 2022 10:51:47 -0800 (PST)
From: Attila Lendvai <attila@HIDDEN>
Date: Mon, 28 Feb 2022 19:51:16 +0100
Message-Id: <20220228185115.28042-1-attila@HIDDEN>
X-Mailer: git-send-email 2.34.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52d
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::52d;
 envelope-from=attila.lendvai@HIDDEN; helo=mail-ed1-x52d.google.com
X-Spam_score_int: 0
X-Spam_score: -0.1
X-Spam_bar: /
X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
 PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

---
 doc/contributing.texi | 91 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 207efc4ee6..d36b6e66e0 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -29,6 +29,7 @@ choice.
 * Tracking Bugs and Patches::   Keeping it all organized.
 * Commit Access::               Pushing to the official repository.
 * Updating the Guix Package::   Updating the Guix package definition.
+* Working on Shepherd::         Modifying and testing Shepherd.
 * Translating Guix::            Make Guix speak your native language.
 @end menu
 
@@ -1697,6 +1698,96 @@ This check can be disabled, @emph{at your own peril}, by setting the
 this variable is set, the updated package source is also added to the
 store.  This is used as part of the release process of Guix.
 
+@node Working on Shepherd
+@section Working on Shepherd
+
+This chapter documents how to modify and test GNU@tie{}Shepherd
+(@pxref{Shepherd Services}) in the Guix environment.
+
+There are two @emph{manifestations} of Shepherd in a Guix System:
+
+@table @code
+
+@item @emph{The Shepherd process}
+The init process first started by the kernel (i.e. running as PID 1).
+This is a Guile executable that is executing the @code{main} function of
+the Shepherd codebase.  Among other things, this is the process
+responsible for starting and stopping Guix System services (i.e. daemon
+processes).
+
+@item @emph{The Shepherd API}
+The Scheme code of Shepherd, which is a dependency of certain packages
+and the Guix codebase itself.  A typical example of this is the Scheme
+code implementing a Guix System service, e.g. the OpenSSH server service
+(see @code{openssh-shepherd-service}).
+
+@end table
+
+Modifying the latter results in the recompilation of several dependant
+packages, and it takes too long to be a reasonable edit-compile-test
+cycle.  But starting up a VM that merely uses a customized Shepherd init
+process is a relatively quick operation.
+
+Luckily, not all changes to Shepherd require the recompilation of all
+its dependencies.  The rule of thumb here is that:
+
+@itemize
+
+@item
+if you are making changes to the public API of Shepherd (i.e. anything
+that may have compile-time effects on dependant packages, like adding or
+removing public functions, or changing public macros, etc.), then you
+will need to go through a full recompilation, so that the the Guix
+codebase, and the dependant packages can observe the changes while they
+are being compiled.
+
+@item
+if you're only working on Shepherd's implementation (e.g. making
+Shepherd's error handling more bullet proof), then it's enough to only
+recompile Shepherd itself, and use the resulting package as the one that
+gets started as the init process.
+
+@end itemize
+
+The @ref{Shepherd Services, @code{shepherd-configuration}} section
+documents how you can replace the Shepherd process by specifying a
+custom Shepherd package for an @code{operating-system} object.  To get a
+customized Shepherd package, you can simply make a copy of it in
+@file{gnu/packages/admin.scm}, and change the @code{source} and
+@code{version} field along these lines:
+
+@lisp
+(define-public shepherd-dev-pid-1
+  (package
+    (name "shepherd")
+    (version "dev-pid-1")
+    (source (git-checkout
+             (url "file:///my/path/shepherd/")))
+    ...
+    ))
+@end lisp
+
+To modify and use a new Shepherd API, you can change the @code{source}
+and @code{version} field of the @code{shepherd} package in
+@file{gnu/packages/admin.scm} along these lines:
+
+@lisp
+(define-public shepherd     ; do not change this
+  (package
+    (name "shepherd")
+    (version "dev")
+    (source (git-checkout
+             (url "file:///my/path/shepherd/")
+             (commit "[a commit hash]")))
+    ...
+    ))
+@end lisp
+
+To avoid excessive recompilation times, we pick a specific commit in the
+latter, and only update it as needed.  But the former will pick up any
+newly recorded commit when we issue a @command{guix system vm
+/path/to/my-test.scm}.
+
 @cindex translation
 @cindex l10n
 @cindex i18n
-- 
2.34.0





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Attila Lendvai <attila@HIDDEN>
Subject: bug#54199: Acknowledgement ([PATCH] doc: Add 'Working on
 Shepherd' section.)
Message-ID: <handler.54199.B.16460743138645.ack <at> debbugs.gnu.org>
References: <20220228185115.28042-1-attila@HIDDEN>
X-Gnu-PR-Message: ack 54199
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 54199 <at> debbugs.gnu.org
Date: Mon, 28 Feb 2022 18:52:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 54199 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
54199: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54199
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#54199] [PATCH] doc: Add 'Working on Shepherd' section.
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 28 Feb 2022 19:32:02 +0000
Resent-Message-ID: <handler.54199.B54199.164607669412358 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54199
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Attila Lendvai <attila@HIDDEN>, 54199 <at> debbugs.gnu.org
Received: via spool by 54199-submit <at> debbugs.gnu.org id=B54199.164607669412358
          (code B ref 54199); Mon, 28 Feb 2022 19:32:02 +0000
Received: (at 54199) by debbugs.gnu.org; 28 Feb 2022 19:31:34 +0000
Received: from localhost ([127.0.0.1]:34820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOlk5-0003DF-Mc
	for submit <at> debbugs.gnu.org; Mon, 28 Feb 2022 14:31:33 -0500
Received: from andre.telenet-ops.be ([195.130.132.53]:43816)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1nOlk3-0003D5-6G
 for 54199 <at> debbugs.gnu.org; Mon, 28 Feb 2022 14:31:32 -0500
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id 0jXV2700E4UW6Th01jXVxf; Mon, 28 Feb 2022 20:31:29 +0100
Message-ID: <73e2b7cba0065c3b6b16bb14438dd3a8ea218808.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Mon, 28 Feb 2022 20:31:25 +0100
In-Reply-To: <20220228185115.28042-1-attila@HIDDEN>
References: <20220228185115.28042-1-attila@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-BKgnQnL4nQJwMjc9jgCA"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1646076689; bh=kWbh/HqasmyQUKCpC9gve512iNSlHJ/zbPdCAqF4YTQ=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=YgGY8GjBb5i+Y6je/ipN9YpeqvNEPdqL/SSGTcDMVE51zNnHbhLLvI4XPxcD+kdUL
 tpasK/foqhvFWz/s6xly09f08Pv5NnhTflxe466shWLiqq4GyjV2l6r+utS5y8qVq/
 9SesR0ZAH7OaJ5B09JTD8M7KvoAXYj6AZCnNIDQbzvzxPRhfmrtJoNsVXkrKDJo7qc
 HPrIcDkwcE9KwFjRr0wcopvWIOFmz0JVrTK+7TjNmDMmfmM2Qa7lPbMYSXQqNLakgy
 b4MASR7I/g0LxO6gqcMOXW1acoiGeNuj3Zz4g9GQc32YzWtjYeO7Oa+C6juyj7c5E2
 Wz1iKQ4s+qWAA==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-BKgnQnL4nQJwMjc9jgCA
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Attila Lendvai schreef op ma 28-02-2022 om 19:51 [+0100]:
> +Luckily, not all changes to Shepherd require the recompilation of all
> +its dependencies.=C2=A0 The rule of thumb here is that:

=E2=80=98not all changes require=E2=80=99 -> =E2=80=98most changes do not r=
equire=E2=80=99?

> +@itemize
> +
> +@item
> +if you are making changes to the public API of Shepherd (i.e. anything
> +that may have compile-time effects on dependant packages, like adding or
> +removing public functions, or changing public macros, etc.), then you
> +will need to go through a full recompilation, so that the the Guix
> +codebase, and the dependant packages can observe the changes while they
> +are being compiled.

I don't think this is necessary?  If I change the API a little, then
why would packages only using 'sbin/halt', 'sbin/reboot' and
'sbin/shutdown' of the 'shepherd' package have to be recompiled?

Even if the API is changed, the package still uses the old shepherd
package with the old API, so no recompilation necessary.

Also, even if the API is changed, then 'guix system reconfigure ...'
would pick up the modified shepherd, and shepherd services modules
would be compiled against the shepherd from the shepherd-configuration
record (see 'shepherd-boot-gexp', 'shepherd-configuration-file' and
'scm->go' in (gnu services shepherd)).

> +@item
> +if you're only working on Shepherd's implementation (e.g. making
> +Shepherd's error handling more bullet proof), then it's enough to only
> +recompile Shepherd itself, and use the resulting package as the one that
> +gets started as the init process.
> +

So I don't think the distinction between API and implementation is
necessary here.  (Feel free to correct in you have observed the
contrary!)

Greetings,
Maxime

--=-BKgnQnL4nQJwMjc9jgCA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYh0jDRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rChAQDtnfhTsxl+cA3h9U/XjghagtLC
o+qwfRtTTdSzyE+jUgD+MZV8nOX7u+3w+bCFHwhGlJKrDD28Ejybfvj4seIt/wM=
=6Hjl
-----END PGP SIGNATURE-----

--=-BKgnQnL4nQJwMjc9jgCA--





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#54199] [PATCH] doc: Add 'Working on Shepherd' section.
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 28 Feb 2022 19:39:02 +0000
Resent-Message-ID: <handler.54199.B54199.164607712112963 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54199
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Attila Lendvai <attila@HIDDEN>, 54199 <at> debbugs.gnu.org
Received: via spool by 54199-submit <at> debbugs.gnu.org id=B54199.164607712112963
          (code B ref 54199); Mon, 28 Feb 2022 19:39:02 +0000
Received: (at 54199) by debbugs.gnu.org; 28 Feb 2022 19:38:41 +0000
Received: from localhost ([127.0.0.1]:34825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOlqz-0003N1-G3
	for submit <at> debbugs.gnu.org; Mon, 28 Feb 2022 14:38:41 -0500
Received: from baptiste.telenet-ops.be ([195.130.132.51]:58424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1nOlqw-0003Mr-KR
 for 54199 <at> debbugs.gnu.org; Mon, 28 Feb 2022 14:38:40 -0500
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by baptiste.telenet-ops.be with bizsmtp
 id 0jec2700J4UW6Th01jecnv; Mon, 28 Feb 2022 20:38:37 +0100
Message-ID: <cfb14eda0845cab93da71a68172eda67be1a36e7.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Mon, 28 Feb 2022 20:38:36 +0100
In-Reply-To: <20220228185115.28042-1-attila@HIDDEN>
References: <20220228185115.28042-1-attila@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-QZVTcuDbvtzSnAR7RShP"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1646077117; bh=mCprPGcggoowh9N3V5J3G5/cUos1YoLAc9zVjcZX/yE=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=LcoI3ldDuCNkhUU8rxDToL5hJlKgjKd1jxKz6+IQ7cBSRhAMjnA3youFRA39X3F2s
 PU4QtC98hS4pHJX9PHobL2bkhGhNr8wSWCJqJvO4mxdiJnGMZMOUhNzxXQyIuQbuRt
 WASr00PRuSbMFcIT3l9Vl4G9ESvUIvwoEGcX/Wp+l6P9l/OGwLTMaQ+yUWpagyGSDm
 zJ/N58tlY7mmwMYZiQggW+0nLM5iykxW65AZG2M0WxKXbTlloj5wR+Ojf4TqRHYW3E
 5/kfN6QYHm3kSdG+08WSOxTorSga2imZSctPx7qn2Drjw2Q4NKm3Zmmc9Tw9UHJj/S
 pi0QRajgNb9LA==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-QZVTcuDbvtzSnAR7RShP
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Attila Lendvai schreef op ma 28-02-2022 om 19:51 [+0100]:
> +custom Shepherd package for an @code{operating-system} object.=C2=A0 To =
get a
> +customized Shepherd package, you can simply make a copy of it in
> +@file{gnu/packages/admin.scm}, and change the @code{source} and
> +@code{version} field along these lines:
> +
> +@lisp
> +(define-public shepherd-dev-pid-1
> +=C2=A0 (package
> +=C2=A0=C2=A0=C2=A0 (name "shepherd")
> +=C2=A0=C2=A0=C2=A0 (version "dev-pid-1")
> +=C2=A0=C2=A0=C2=A0 (source (git-checkout
> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 (url "file:///my/path/shepherd/")))
> +=C2=A0=C2=A0=C2=A0 ...
> +=C2=A0=C2=A0=C2=A0 ))


There's no need to make a copy, we can use inheritance here
to reduce duplication:

(define my-shepherd
  (package
    (inherit shepherd)
    (source (git-checkout
              (url "file:///my/path/shepherd/"))))

Also, we're missing autoconf & friends here?
To help with shepherd hacking, I think it would be ok to add them to
the standard 'shepherd' package with a nice comment.  If not, a
'shepherd-next' package or the like could be defined, a variant
of 'shepherd' for building from git?

Also, the documentation is being inconsistent with versions here.
In one place, you're using "dev-pid-1", and in another, "dev".
These versions also seem a bit odd for not being version _numbers_,
which doesn't mesh well with '17.4.3 Version Numbers'.

Greetings,
Maxime.

--=-QZVTcuDbvtzSnAR7RShP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYh0kvBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hfNAQCaaBZjyT4VeIfz8cA/w5RXsTLO
izsCCVwdbgea75GkVAEAkj6bO9m8Hn2y1ZF6Sp/1hggsj/3SJFxu1mCrV2D+cQ8=
=KLzT
-----END PGP SIGNATURE-----

--=-QZVTcuDbvtzSnAR7RShP--





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#54199] [PATCH] doc: Add 'Working on Shepherd' section.
Resent-From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Tue, 01 Mar 2022 10:15:02 +0000
Resent-Message-ID: <handler.54199.B54199.164612966413136 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54199
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Attila Lendvai <attila@HIDDEN>
Cc: 54199 <at> debbugs.gnu.org
Received: via spool by 54199-submit <at> debbugs.gnu.org id=B54199.164612966413136
          (code B ref 54199); Tue, 01 Mar 2022 10:15:02 +0000
Received: (at 54199) by debbugs.gnu.org; 1 Mar 2022 10:14:24 +0000
Received: from localhost ([127.0.0.1]:35541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOzWS-0003Po-Hg
	for submit <at> debbugs.gnu.org; Tue, 01 Mar 2022 05:14:24 -0500
Received: from pelzflorian.de ([5.45.111.108]:38654 helo=mail.pelzflorian.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1nOzWQ-0003Pf-PM
 for 54199 <at> debbugs.gnu.org; Tue, 01 Mar 2022 05:14:23 -0500
Received: from pelzflorian.localdomain (unknown [5.45.111.108])
 by mail.pelzflorian.de (Postfix) with ESMTPSA id 2B387360637;
 Tue,  1 Mar 2022 11:14:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de;
 s=mail; t=1646129661;
 bh=gKfFRiTBj7DLH3EhtcQ2zEjQ17bZ+JCKyARYnMStYkw=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To;
 b=3s+8gyDLXCTbFExKQmDODHlLxvzV2r/LEmNfa4uO78N6AoOs2nNsKf1OnJVOZQ89Q
 37LfExy/PjFRhzPY/invja+toCl/jw5GH7LwgYd1BbCRZUtEd228FKJdAMCbC42VUo
 G36sQvAKT8fl+2soE1SXJTVlDRGFR/i2zyDNXDY4=
Date: Tue, 1 Mar 2022 11:14:14 +0100
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Message-ID: <20220301101414.pvf2wmnfbys3hw62@HIDDEN>
References: <20220228185115.28042-1-attila@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20220228185115.28042-1-attila@HIDDEN>
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thank you Attila.

On Mon, Feb 28, 2022 at 07:51:16PM +0100, Attila Lendvai wrote:
> +@item @emph{The Shepherd API}
> +The Scheme code of Shepherd, which is a dependency of certain packages
> +and the Guix codebase itself.  A typical example of this is the Scheme
> +code implementing a Guix System service, e.g. the OpenSSH server service
> +(see @code{openssh-shepherd-service}).

The last line reads like a @ref clickable link.


> +To modify and use a new Shepherd API, you can change the @code{source}
> +and @code{version} field of the @code{shepherd} package in
> +@file{gnu/packages/admin.scm} along these lines:
> +
> +@lisp
> +(define-public shepherd     ; do not change this
> +  (package
> +    (name "shepherd")
> +    (version "dev")
> +    (source (git-checkout
> +             (url "file:///my/path/shepherd/")
> +             (commit "[a commit hash]")))
> +    ...
> +    ))
> +@end lisp
> +
> +To avoid excessive recompilation times, we pick a specific commit in the
> +latter, and only update it as needed.  But the former will pick up any
> +newly recorded commit when we issue a @command{guix system vm
> +/path/to/my-test.scm}.

Don’t you need to update the sha256 hash so Guix picks up that it
needs to rebuild shepherd?  Unless you change the version each time to
a new value.

I wonder if you can just graft, i.e. introduce a
(replacement my-shepherd) field in the

(define-public shepherd     ; do not change this
  (package
    (name "shepherd")
    (replacement my-shepherd)
    …

I have not tested and grafting may be unreliable.

Regards,
Florian




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#54199] [PATCH] doc: Add 'Working on Shepherd' section.
References: <20220228185115.28042-1-attila@HIDDEN>
In-Reply-To: <20220228185115.28042-1-attila@HIDDEN>
Resent-From: Attila Lendvai <attila@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 02 May 2022 11:12:01 +0000
Resent-Message-ID: <handler.54199.B54199.165148991112497 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54199
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: "54199 <at> debbugs.gnu.org" <54199 <at> debbugs.gnu.org>
Reply-To: Attila Lendvai <attila@HIDDEN>
Received: via spool by 54199-submit <at> debbugs.gnu.org id=B54199.165148991112497
          (code B ref 54199); Mon, 02 May 2022 11:12:01 +0000
Received: (at 54199) by debbugs.gnu.org; 2 May 2022 11:11:51 +0000
Received: from localhost ([127.0.0.1]:34974 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nlTy3-0003FV-MI
	for submit <at> debbugs.gnu.org; Mon, 02 May 2022 07:11:51 -0400
Received: from mail-4317.proton.ch ([185.70.43.17]:14077)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <attila@HIDDEN>) id 1nlTy0-0003FC-4h
 for 54199 <at> debbugs.gnu.org; Mon, 02 May 2022 07:11:50 -0400
Date: Mon, 02 May 2022 11:11:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name;
 s=protonmail3; t=1651489900;
 bh=YmT2n3O3fIC5THKEeMiAj4m+txJ7yLcQ1Q9hlZ8zBjo=;
 h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc:
 Date:Subject:Reply-To:Feedback-ID:Message-ID;
 b=ZhovUAT4OAwb7s1ket4B7efzRLrsncNdEmQFGt0g3/4rX105pkgt/0Q08FFsuEHx/
 LTlFx8Tpe8GC6h612hFdiaPI+YiVylHQ6o/KevOce9TZW7I16T6EFmmFmf+UdFoopx
 ZiiOps0DWjCH4JBjuIVT78blcOTpDj0/kBoSc65l/v+HGNKy4vAhv2T9hnRDFiiW3v
 sZ+zDEHUEzPQ8HeK4ZR2ksQLoIv7uwPxiEzZ540w71YtEH6YIq+iHd3EVISdXhQk37
 AOG0CWa6+CW4zANfYIPxVv/kts813F72ivS7D0O21visIqnB8KcW3qb5TCUzVouOk7
 eMo+/wT7mSz+Q==
From: Attila Lendvai <attila@HIDDEN>
Message-ID: <Xz2EpTg1VwJDI6Yff7sfGzq-GHqYC5jerjJbK4THtVYxyN2dBAjAxZDLnw_e2BQU1TVhM51gn7uy7ZPpkbtF_RrJe29MEFm3liWDUFrIpnA=@lendvai.name>
Feedback-ID: 28384833:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

FTR, this is waiting for the fate of:

https://issues.guix.gnu.org/54216

i'll update this patch after that one is settled.

--
=E2=80=A2 attila lendvai
=E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39
--
=E2=80=9CReason is not automatic. Those who deny it cannot be conquered by =
it. Do not count on them. Leave them alone.=E2=80=9D
=09=E2=80=94 Ayn Rand (1905=E2=80=931982)






Last modified: Mon, 2 May 2022 11:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.