GNU bug report logs - #65119
[PATCH 0/8] Sharing service code between Home and System

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: patch; dated Sun, 6 Aug 2023 21:06:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 17 Sep 2023 10:27:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 06:27:28 2023
Received: from localhost ([127.0.0.1]:49137 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qhozw-00044T-Fv
	for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 06:27:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qhozu-00044H-7I
 for 65119 <at> debbugs.gnu.org; Sun, 17 Sep 2023 06:27:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qhozf-0007A8-IF; Sun, 17 Sep 2023 06:27:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=F65agTvEuWL6V0eQPBcoPfIvuBugIpHS/Cj6Io45Oy0=; b=sPGvnRa7fjuSzJFYn1b6
 dyj5im8YwekB3oz7fkpUI3dEXNRdHiAFXfdpUR7Jap/pkNcoWGSAu4oLEkaDqWsvgYmBYUfdeUbrN
 sVl7ozDqa8Bmu2jyqBQ6lqEoGn4yMEWPUz3r3gt9bFkrEkcvpQCizGq76MBqUKKpXJyZvwBiwaFLi
 UAVv9Q4jc3nm0bz1GDAFuTv5yE8CXGXy8ttGI/+dDxVSvXsDOhHxbkKqtME3QSaYnKW+5e3V5H0xX
 L4BTeQk8ggN9WngiTYXe7ZjREFc8PyzMiOCqKEEdOZkVbl1zCxihBs3B8yMPzI8UUi2Lsd/Fu8dZs
 iHpI9kDEjXcOWQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN>
 <87ttsnoct1.fsf@HIDDEN> <87wmx0z4u4.fsf@HIDDEN>
 <874jk3sk57.fsf@HIDDEN> <878r9alzh9.fsf@HIDDEN>
 <87wmwpxtaa.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Primidi 1 jour =?utf-8?Q?compl=C3=A9mentaire?= an 231
 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Vertu
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sun, 17 Sep 2023 12:27:08 +0200
In-Reply-To: <87wmwpxtaa.fsf@HIDDEN> (Andrew Tropin's message of "Sun, 17 Sep
 2023 09:28:29 +0400")
Message-ID: <874jjtyu0z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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: -3.3 (---)

Hi

Andrew Tropin <andrew@HIDDEN> skribis:

> On 2023-09-13 20:06, Ludovic Court=C3=A8s wrote:
>
>> Hi,
>>
>> Andrew Tropin <andrew@HIDDEN> skribis:
>>
>>> In some previous threads on guix-devel/guix-patches I mentioned, that we
>>> will maintain home services for rde separately

[...]

>> I=E2=80=99m disappointed that rde/Guix cooperation is a one-way street.
>
> That's probably a wrong statement.

That was a reaction to =E2=80=9Cwe will maintain home services for rde
separately=E2=80=9D above; to me that statement was unambiguous.

[...]

>> Then, for clarity and to avoid misunderstandings, perhaps you should
>> remove yourself from the Home team?
>>
>
> I guess this one I've already sent to you an year ago is still true:
>
>     However, I perfectly understand the reasons for Guix System style
>     services and respect your descion and desire to stick with them.  I
>     mentioned that I'll maintain already existing rde style services in r=
de
>     and it won't make sense for me to upstream most of them from rde to
>     Guix, because it will mean almost complete rewrite for them.
>
>     And this is another reason I don't participate in development of home
>     services, because it will mean double or even triple work for me,
>     however I keep an eye on patches you send, in most cases someone jumps
>     in earlier with review, so I don't bother you with my comments. But
>     development of Guix Home itself and the rest of Guix is a part of my
>     interests.
>
> I do want to get CCed on general Guix Home topics, I'm ok with getting
> CCed on other guix home patches and threads outside of my
> interests/workload capabilities.
>
> If you think that confusion is severe, we can split the team into Guix
> Home Core and Guix Home Services, however I don't think it makes a lot
> of sence.

To me, team members commit to the best of their capacity to help with
patch review in the team=E2=80=99s scope.  To receive notifications about a
given topic, I=E2=80=99d suggest using email filters or similar tools.

I hope that makes sense!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 17 Sep 2023 07:01:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 03:01:48 2023
Received: from localhost ([127.0.0.1]:48946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qhlmt-00073m-HD
	for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 03:01:47 -0400
Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:35575)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qhlmo-00073W-67
 for 65119 <at> debbugs.gnu.org; Sun, 17 Sep 2023 03:01:46 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 46887240006;
 Sun, 17 Sep 2023 07:01:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1694934088;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=nMxj/ppAGv/TrqawVU3bEKtie3w8WXAehKdr0hq2rGE=;
 b=OsV2c4gnWTrO3t9gkeoP1aUwm2mZfzLG/pExSVIgEu3ViOIagpwt8wyiIeIerTqW2mw4rp
 quO4hnlDzerrzBsYLe9/bS8lq80lj5fyD0a+XINxeWS8tUZzP+oGOeU9MIyMTeJouOOt/9
 TsIlKccaaRT/7bGhlxofIK9h/Vg+jXbx6wUG40c+qHm/1CytuwHZxDAU3uj2itT3vGAHgW
 0FOw4ETLgYSD0ILadIGc7wlDXTMWrrmtpkWhKyE57ajT4kJ9oUnl/MjkN5VSRclLlHG2h2
 kNtIpz+A9kLsVk/gvIf9NnLXH5RYUCGarEgg2/J/qtilUZPT/a0vkffCFffGnw==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <87led9lufr.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN> <87ttsnoct1.fsf@HIDDEN>
 <87wmx0z4u4.fsf@HIDDEN> <874jk3sk57.fsf@HIDDEN> <87led9lufr.fsf@HIDDEN>
Date: Sun, 17 Sep 2023 11:01:12 +0400
Message-ID: <87msxlxozr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-09-13 21:55, Ludovic Court=C3=A8s wrote:

> Andrew Tropin <andrew@HIDDEN> skribis:
>
>> 1. One of the possible options is to use free-style configurations for
>> services, so we can reuse a lot of code and drastically decrease
>> duplication (only the service definition itself and a one configuration
>> record) and maintanance burden.
>
> We=E2=80=99ve had this discussion before; in the case of key/value-style
> configuration, I=E2=80=99m against =E2=80=9Cfree-style configuration=E2=
=80=9D (nginx
> configuration is a bit different).
>
> With free-style configuration (I assume you have alists/sexps in mind),
> you might end up generating invalid config files, or get obscure error
> messages, or whatever; I=E2=80=99ve used Gnus for decades (!), any Gnus u=
ser
> will know what I mean.  This is Scheme, not Emacs Lisp/Common Lisp.
>
> [...]
>
>> 2. Another option is to rethink service extension mechanism a little bit
>> and maybe make it more polymorphic.
>> https://lists.sr.ht/~abcdw/rde-devel/%3C87sg56g97i.fsf%40trop.in%3E
>
> I very much support experimentation in this area; I=E2=80=99m sure there=
=E2=80=99s room
> for improvement (like Julien=E2=80=99s extension points, which you referr=
ed to
> in the message above).
>
> I=E2=80=99m not sure how that relates to factorizing Home/System services=
 though.
>
> [...]
>
>> My point here is: let's solve this issue on another level of
>> abstraction, by improving service extension mechanism, not by creating a
>> new level of abstraction (as we did in rde or in this patch series) to
>> cover the wholes in the previous level.
>
> Do you have ideas on how you=E2=80=99d change service extension to support
> Home/System factorization?
>

I'll write an example to demonstrate the high-level idea:

We have
=2D-8<---------------cut here---------------start------------->8---
(extensions
 (list (service-extension account-service-type
                          (const %dicod-accounts))
       (service-extension shepherd-root-service-type
                          dicod-shepherd-service)))
=2D-8<---------------cut here---------------end--------------->8---

We can do
=2D-8<---------------cut here---------------start------------->8---
(home-environment
 (services
  (list (service dicod-service-type)))
 (service-mapping
  `((,shepherd-root-service-type . ,home-shepherd-service-type)
    (,account-service-type . ,ignore-service-type))))
=2D-8<---------------cut here---------------end--------------->8---

Now you can use the same service type and configuration record in
both operating-system and home-environment and use/ignore/interpret the
configuration fields values based on the environment we are building
this thing for.

Of course service-mapping default value can be generated upfront and
stored in %guix-home-service-mapping or something like that.

This way we will get rid of almost all home- services and related
configurations.

Keep in mind that it's a raw idea, not a well-designed solution yet.

>> I would be glad to cooperate on this and design possible improvements.
>
> I interpret this sentence as you suggesting that you=E2=80=99re outside t=
he
> project=E2=80=94even though my perception is that you=E2=80=99ve been par=
t of it for
> some time, even before you got commit rights.  So do feel at Home!
> (Pun intended. :-))

My point was that rde home and system services are not affected much by
code duplication due to factorization through free-style serializers and
this problem is low priority for me at the moment.  However in long term
the proper solution would be benefitial for both guix and rde.

The reason I'm suggesting to revert this patch series is because it
feels to me as a partial solution on the wrong level of abstraction,
which cures the symptoms and also introduces shortcomings and
potentially makes it harder to introduce a proper solution in the
future.

If this problem is urgent/demanding for you, please invite me for
working or collaborating on the solution explicitly, I plan work on it
anyway, but probably not earlier than the next year.  I catched this
thread accidentially BTW, thanks to =E5=AE=8B=E6=96=87=E6=AD=A6 for CCing m=
e.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmUGpDgACgkQIgjSCVjB
3rBi3A//W2L5/mk67cXgCfnk9tgCPtPuhZIH+FBx2EwKG9Bncq/d6cgkTKt2x/Ye
67YBY+oacunl6ND2OIoEUyk5JQsiAmLIaefFVRNPCKYr8cAnxDnVM8oPL20flMcK
b8rhi1uVFWyjUpp5WhaXwj+yTr2qxbSTNww5rDhLsoQVQNgVcJCvgUn2Deyx/PsJ
U+Sam32hs1WK+YroWaok+80RcCGJvjavg5mY4k8eNBzl+Cytqazc01116nRf9J7v
LHwDPJvVnUZGvbsBGmMTAQOu/Dy1fGDKEvogfAYBoNJT+U5goY+DJTcMgZXVZkes
e0V6t5KsYkNJS4vkuSBuJDFtaONQsM7Fbd3ZoacEfa028Uq/dCvP0arMyJ/iyiHf
E93fcQUBNYCV2LJxJHAMfoP3/Zm0Yw2COMcrLsckrCsfgnsNYagPSfqp1+k/q+AJ
KnU3AduoGTAl92lXAUA5OdA6WkyJAjV31Ugp2AG4oK8uTduIip+RMMsIVNYELjqE
iyshDeBsqWVieDhpzjceSz0I1PoH9bF+HxcPDppqsq50eTvYn9H0SAPbgpPUab/T
NYvhH/g6SL1sPO4BO09lubby/P7bvGsdb6u4G6l/Ssm8RasMH/NA/dfjUQAvRm32
PRrWD8/SfESAcsbUqGATr8+A7pixZ1LCA5Uz4Asd55lDasp2r/Y=
=TXaR
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 17 Sep 2023 05:28:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 01:28:53 2023
Received: from localhost ([127.0.0.1]:48880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qhkKy-0004L1-Vl
	for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 01:28:53 -0400
Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:49311)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qhkKv-0004Kk-RJ
 for 65119 <at> debbugs.gnu.org; Sun, 17 Sep 2023 01:28:51 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id A840A1C0003;
 Sun, 17 Sep 2023 05:28:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1694928515;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=3eZEe1n256yKBWVM7xKKc8HK+md9AAgbjcM6RKI+83w=;
 b=RVJ0VJ9uK0Mgk3qVMHFr8MbTdMIveJvZXIJm7N2noaWvxm8zlBkctRZN3rjMDNcsvtyx/T
 BKs+5gyUJZI044tSuJXYU722SFiNg4WlPw4MTr57riNlo8I+UNu/t1WDQWd6Zfg0Fx71bu
 UiORyn+LbzxlDTMKEcsaXY/l+7cvkkzS1t4aajsxB6vZ5Px/Hl+oD3f0m3ULkMBUOLaS1g
 GDKWBqAX6fAQElBa5nhlLO8KFT38OaBqghIwy5FXtzmlkIJs5iX9fFDFlQWPVEMhZtY6lx
 B8SQpIyZn1W0u65HCMhMrI8LTC0rmrmrS9FlsnNfgLMRycwGXie7k1ttCb9YZQ==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <878r9alzh9.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN> <87ttsnoct1.fsf@HIDDEN>
 <87wmx0z4u4.fsf@HIDDEN> <874jk3sk57.fsf@HIDDEN> <878r9alzh9.fsf@HIDDEN>
Date: Sun, 17 Sep 2023 09:28:29 +0400
Message-ID: <87wmwpxtaa.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-09-13 20:06, Ludovic Court=C3=A8s wrote:

> Hi,
>
> Andrew Tropin <andrew@HIDDEN> skribis:
>
>> In some previous threads on guix-devel/guix-patches I mentioned, that we
>> will maintain home services for rde separately
>> https://git.sr.ht/~abcdw/rde/tree/master/item/doc/decision-log/0004-rde-=
flavor-guix-services.org
>> and thus all (most of) the home services coming to guix-patches won't be
>> used by rde or me personally.  Despite the fact that I would be glad to
>> help with reviews, I already work hard (almost fulltime) on guix, guile
>> and emacs ecosystem in parrallel to running from the war and probably
>> reviewing home services on guix-patches is less valuable use of my time
>> both for me and for the community.
>
> I=E2=80=99m disappointed that rde/Guix cooperation is a one-way street.

That's probably a wrong statement.  rde creates, integrates and
innovates a bunch of good tools, tests and often upstreams them;
contributes back a lot of changes and packages, popularizes and
encriches guix and neighbour ecosystems and helps to finish stale
projects/issues in guix mailing lists, ranging from Wayland, Emacs,
Pipewire, iwd related to Tree-sitter, Guix Home and couple other
non-trivial thing.

rde definetly benifit from all the great work done in Guix, but it's
kinda offensive to say that it's one-way street.

> Then, for clarity and to avoid misunderstandings, perhaps you should
> remove yourself from the Home team?
>

I guess this one I've already sent to you an year ago is still true:
=2D-8<---------------cut here---------------start------------->8---
    However, I perfectly understand the reasons for Guix System style
    services and respect your descion and desire to stick with them.  I
    mentioned that I'll maintain already existing rde style services in rde
    and it won't make sense for me to upstream most of them from rde to
    Guix, because it will mean almost complete rewrite for them.

    And this is another reason I don't participate in development of home
    services, because it will mean double or even triple work for me,
    however I keep an eye on patches you send, in most cases someone jumps
    in earlier with review, so I don't bother you with my comments. But
    development of Guix Home itself and the rest of Guix is a part of my
    interests.
=2D-8<---------------cut here---------------end--------------->8---

I do want to get CCed on general Guix Home topics, I'm ok with getting
CCed on other guix home patches and threads outside of my
interests/workload capabilities.

If you think that confusion is severe, we can split the team into Guix
Home Core and Guix Home Services, however I don't think it makes a lot
of sence.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmUGjn0ACgkQIgjSCVjB
3rCwug/8DWGUTUE+I/0X/PoWJyKN6K0MQi8uVsC+Wj/MBRb2ZI0EUJBQGkOZJ1Gj
EA9LowQVlDNuf3URPT9Bm8YoPgp8MoVUX/F1Icd4qL+sRYT/Z7Fyc/lk07oOqkwE
teu4KWfKHmO7Pu8cdQcD7+ZyE0WpPr6XSgufmitsJESPpvYZMi4M6qXc0UXAn+0M
ed5I5l69InSPzixY2fKg7Y0tltVct5nkID10/RYDJPM9T8ANiOqIE9URbAi2ARpy
6TpZyun7CH+buMizsP8fUxPWYYHiTXHBM5lyP48H7f0tSjWh9Fyd+3dmk9pal4Q4
XrFjMGovURJB5r9UyYUFzWUTwf2M4lxRs2Iz0i01rc23eGLmkueDipgE1BNwbbcl
HtyO6z9geLGDFeK7vVbyqC5HkH8lVWDj2Ktj29rgn/MBMGuWEP9Fj7RLztJn75cq
sPFywc3rzJqpxFsZ/K+IaRvq5I0If5V8jHPOcOcz/Lihjjchj0VH/Hb8vBuACL88
1Kg3fsXLI2cW7x9Az4aCZkvH+UZTXNVa/dMJLNoR6G/MC52yyu4eluRHMisrrjsk
Yqk8RTdMzh+mcBh7dU4DLOTwZTwSfAwuqr0sboKyjoWCjCgLM80Kha6t84bTYNu5
5lJHJs77CQnx4+CkgUAYqiBPnGUoxMn2dQkPddK6Cw1u0s2NmmY=
=+ngO
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 13 Sep 2023 19:56:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 15:56:05 2023
Received: from localhost ([127.0.0.1]:36103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qgVy1-0006Xd-Dw
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 15:56:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41324)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qgVxx-0006X4-MO
 for 65119 <at> debbugs.gnu.org; Wed, 13 Sep 2023 15:56:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qgVxl-0004M3-2V; Wed, 13 Sep 2023 15:55:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=vEcymdmciWiwYVm/zuvl8HzTW22gnZAc46+gWQDP+2I=; b=ThVo11/DBMAKDT8ucjD9
 8hkrLXvvCJB3DYY9zgOZF9wT1HYLtvjh5ZM8WZ3Fhw9cXw/Eu3Zr4szQjDlO1YGi2kFP4/gKDBohX
 Be00LNsJSj89GP2gCj0qwfqbVTqd63dI/YcTEsA1UesyMf3hXYu4tOSXcW2iP+L8OaM0hEO5YV1Vz
 64rDAvOo552DpVEY/2fAvNRVOIXhEUpgMdpIbl6oAvZ6bFBusJgqTlHdCZu68T2JQ+hVVHnnfu9YL
 ylNWCFw5OJ/ebak8yZPxqJ36df+RkJwlLMG6x29Jqdlmt6WM+RjHBmJ/0eRdciMoQuPP8H/TAyaoU
 OoI+02MSeBUaSQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN>
 <87ttsnoct1.fsf@HIDDEN> <87wmx0z4u4.fsf@HIDDEN>
 <874jk3sk57.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Septidi 27 Fructidor an 231 de la =?utf-8?Q?R=C3=A9v?=
 =?utf-8?Q?olution=2C?= jour de la Verge-d'or
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 13 Sep 2023 21:55:20 +0200
In-Reply-To: <874jk3sk57.fsf@HIDDEN> (Andrew Tropin's message of "Sat, 09 Sep
 2023 14:42:12 +0400")
Message-ID: <87led9lufr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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: -3.3 (---)

Andrew Tropin <andrew@HIDDEN> skribis:

> 1. One of the possible options is to use free-style configurations for
> services, so we can reuse a lot of code and drastically decrease
> duplication (only the service definition itself and a one configuration
> record) and maintanance burden.

We=E2=80=99ve had this discussion before; in the case of key/value-style
configuration, I=E2=80=99m against =E2=80=9Cfree-style configuration=E2=80=
=9D (nginx
configuration is a bit different).

With free-style configuration (I assume you have alists/sexps in mind),
you might end up generating invalid config files, or get obscure error
messages, or whatever; I=E2=80=99ve used Gnus for decades (!), any Gnus user
will know what I mean.  This is Scheme, not Emacs Lisp/Common Lisp.

[...]

> 2. Another option is to rethink service extension mechanism a little bit
> and maybe make it more polymorphic.
> https://lists.sr.ht/~abcdw/rde-devel/%3C87sg56g97i.fsf%40trop.in%3E

I very much support experimentation in this area; I=E2=80=99m sure there=E2=
=80=99s room
for improvement (like Julien=E2=80=99s extension points, which you referred=
 to
in the message above).

I=E2=80=99m not sure how that relates to factorizing Home/System services t=
hough.

[...]

> My point here is: let's solve this issue on another level of
> abstraction, by improving service extension mechanism, not by creating a
> new level of abstraction (as we did in rde or in this patch series) to
> cover the wholes in the previous level.

Do you have ideas on how you=E2=80=99d change service extension to support
Home/System factorization?

> I would be glad to cooperate on this and design possible improvements.

I interpret this sentence as you suggesting that you=E2=80=99re outside the
project=E2=80=94even though my perception is that you=E2=80=99ve been part =
of it for
some time, even before you got commit rights.  So do feel at Home!
(Pun intended. :-))

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 13 Sep 2023 18:06:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 14:06:46 2023
Received: from localhost ([127.0.0.1]:35992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qgUGE-0003m5-8e
	for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 14:06:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52922)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qgUG9-0003lp-Nq
 for 65119 <at> debbugs.gnu.org; Wed, 13 Sep 2023 14:06:44 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qgUFx-0008UQ-EO; Wed, 13 Sep 2023 14:06:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=OjFwn7cQmE1aAy3HZN1nGB12IMLcphkJ59S6aJXYSHY=; b=d2JintUeVlINDVCxQivu
 BteaMKNjUTEGgqbJ0vRfm3t19iH75NBr6uYMlqqkb6dbw+dsJ7qbhsuSpHwBiZj/aix3cdtOTXT+O
 HdUX/1OjZ/+RpcEkKRMzwLC7yB4u5IHwuf73ieI1tcID4pO+MriKfJCnz1RUsJuwLQnnqwHhjP35x
 ORXlLHds1FtFyPI4ZyjWu1iQJj+z9fEuZsOD5eFgwiaT+JwtUyd2xTPnNY1BvvOcXbyDbLgShFSRN
 7ssNKW+Ox6czRzHu2LpC6l8vXKjwiX2I7h9a3tv6mWp3tNtXJPLZwuqQC4/RiN07KIvOj+CAzvEck
 km4Sc+ccE/fslw==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN>
 <87ttsnoct1.fsf@HIDDEN> <87wmx0z4u4.fsf@HIDDEN>
 <874jk3sk57.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Septidi 27 Fructidor an 231 de la =?utf-8?Q?R=C3=A9v?=
 =?utf-8?Q?olution=2C?= jour de la Verge-d'or
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 13 Sep 2023 20:06:26 +0200
In-Reply-To: <874jk3sk57.fsf@HIDDEN> (Andrew Tropin's message of "Sat, 09 Sep
 2023 14:42:12 +0400")
Message-ID: <878r9alzh9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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: -3.3 (---)

Hi,

Andrew Tropin <andrew@HIDDEN> skribis:

> In some previous threads on guix-devel/guix-patches I mentioned, that we
> will maintain home services for rde separately
> https://git.sr.ht/~abcdw/rde/tree/master/item/doc/decision-log/0004-rde-f=
lavor-guix-services.org
> and thus all (most of) the home services coming to guix-patches won't be
> used by rde or me personally.  Despite the fact that I would be glad to
> help with reviews, I already work hard (almost fulltime) on guix, guile
> and emacs ecosystem in parrallel to running from the war and probably
> reviewing home services on guix-patches is less valuable use of my time
> both for me and for the community.

Then, for clarity and to avoid misunderstandings, perhaps you should
remove yourself from the Home team?

I=E2=80=99m disappointed that rde/Guix cooperation is a one-way street.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 9 Sep 2023 10:42:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 09 06:42:33 2023
Received: from localhost ([127.0.0.1]:46229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qevQ8-0003RX-Sy
	for submit <at> debbugs.gnu.org; Sat, 09 Sep 2023 06:42:33 -0400
Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:51025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qevQ6-0003RI-PV
 for 65119 <at> debbugs.gnu.org; Sat, 09 Sep 2023 06:42:31 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id DC61F20002;
 Sat,  9 Sep 2023 10:42:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1694256140;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=cFsWrox0G4lxNxBZPYAPSdNdm4iOMKXQIpk9FOAkz3g=;
 b=aLJMm7rNk/U5CHu4PDtWolEwOM8fqNYH6/81DLm3Fvu2r98PNoGELAV4sBZHPcRuBbZrx8
 X8eE8bNwflBItdtgVow1hopUG92ehqVLsJ/suvKI1mP6nBfhQ/u4aEECEAg5i0Nbigcb4R
 w3h3vUhYTsxVPtExttYP/F4dO3MGkadjjH1abx1ii4AX0Rz38kMyEe3y5Bw77N4xR5vLmt
 hFXyiSmmMrL2OvQhQRCIuTPElaJ5GShp4ZkaEjeNGlKf59xWcRdYszifUdBQt0jk28F8Vf
 9ZhEuuppsfvm97PCq9ujnO8HQjRqAm6NaIkTTes2kj9S5dxE6zosbKmNnAm5ow==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <87wmx0z4u4.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN> <87ttsnoct1.fsf@HIDDEN>
 <87wmx0z4u4.fsf@HIDDEN>
Date: Sat, 09 Sep 2023 14:42:12 +0400
Message-ID: <874jk3sk57.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-09-09 00:18, Ludovic Court=C3=A8s wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew@HIDDEN> skribis:
>
>> Yes, and and this is exactly what this solution does and in addition to
>> that it hides it under the sweet define-service-type-mapping interface.
>> `set!` explicitly communicates the danger of usage,
>> define-service-type-mapping does not.
>>
>>
>> 1. We introduce a global state here and infect potentially all the
>> modules from all channels with it + mask it with nice interface. =3D> Now
>> the result of evaluation depends on the order source files are read.
>> Every channel can break valid user's configurations with perfectly legal
>> public guix API.  We make reloading of the modules and REPL-driven
>> development in general a huge pain in the lower back.
>>
>>
>> 2. The service extension mechanism is already quite complex to understand
>> on its own, in addition to that the devirsity of record creation macros
>> / DSLs (define-record-type, define-record-type*, define-configuration)
>> doesn't make the situation better.  We introduce one more DSL on top of
>> couple existing. =3D> Learning curve raises even higher. Inspecting,
>> navigating and debugging such code becomes harder. It prevents future
>> extension with for-container or for-development-environment.  It saves
>> couple of lines and avoids some minor repetions at the moment, but not
>> sure that it's the right way to reuse the stuff between home and system
>> services.
>
> I understand what you=E2=80=99re saying.  I don=E2=80=99t necessarily agr=
ee with all of
> it because I believe abstraction is a fundamental part of programming;
> abstractions can sometimes be wrong or misleading of course, and that=E2=
=80=99s
> what we should strive to avoid.
>
> Back to this patch series, we=E2=80=99ve had one concrete illustration of=
 a
> shortcoming:
>
>   https://issues.guix.gnu.org/65510
>
> I=E2=80=99m aware of this and agree it needs to be addressed.
>
> In assessing this patch series, one should keep in mind that it solves a
> longstanding issue with Guix Home (code duplication and the inability to
> share service code with Guix System), one for which no other solution
> was proposed AFAIK.

1. One of the possible options is to use free-style configurations for
services, so we can reuse a lot of code and drastically decrease
duplication (only the service definition itself and a one configuration
record) and maintanance burden.
https://yhetil.org/guix/87ild88kax.fsf@HIDDEN/

We have only two maintainers and have more than the half of a hundred
services in rde, which is not that far from guix itself (258 services).



2. Another option is to rethink service extension mechanism a little bit
and maybe make it more polymorphic.
https://lists.sr.ht/~abcdw/rde-devel/%3C87sg56g97i.fsf%40trop.in%3E

(Just making a rough example of naive implementation) Instead of
referencing service by it's value, we could reference its name.  This
way we can write one service for Home and System, which always extends
'system-accounts-service-type, and for home case provide a different
implementation for it, so when we build operating system
system-accounts-service-type will add users to /etc/passwd, when we
build home-environment system-accounts-service-type will do nothing.

Adjusting the logic of the extension based on presence/absence of a
particular service can be very useful to make it possible to reuse
configuration for Home and System services directly.

However, improving service extension mechanism in such way, keeping
backward compatibility and upstreaming it is a hard and very
time-consuming task.  So in rde we just implemented a feature mechanism
on top of service extension mechanism to solve challenges mentioned
above and it works great.  It would be even greater if we could just do
the same with plain services.


My point here is: let's solve this issue on another level of
abstraction, by improving service extension mechanism, not by creating a
new level of abstraction (as we did in rde or in this patch series) to
cover the wholes in the previous level.  I would be glad to cooperate on
this and design possible improvements.

> My own assessment, having reviewed patches adding Home services (in all
> loneliness I must say) is that the outcome is positive, in spite of the
> shortcoming mentioned above.

> in all loneliness I must say

In some previous threads on guix-devel/guix-patches I mentioned, that we
will maintain home services for rde separately
https://git.sr.ht/~abcdw/rde/tree/master/item/doc/decision-log/0004-rde-fla=
vor-guix-services.org
and thus all (most of) the home services coming to guix-patches won't be
used by rde or me personally.  Despite the fact that I would be glad to
help with reviews, I already work hard (almost fulltime) on guix, guile
and emacs ecosystem in parrallel to running from the war and probably
reviewing home services on guix-patches is less valuable use of my time
both for me and for the community.

> In assessing this patch series, one should keep in mind that it solves a
> longstanding issue with Guix Home (code duplication and the inability to
> share service code with Guix System), one for which no other solution
> was proposed AFAIK.

I think that your concern about code duplication is valid (and I'm aware
of the issue probably even longer :) ) and I would be glad to cooperate
to solve it.  However, I'm almost sure that it should be done on service
extension mechanism level.  If this make sense, we can discuss possible
solutions in more details and next practical steps.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmT8TAQACgkQIgjSCVjB
3rCCPBAAlrSdaKKr5Y8jRpnUAjbg280odXuHJ9gnBa+fPLx+SzWo+U3JoHSyoIm+
yOg8Ej5+yMxqXtOonCU2eRXwdIuKFq3qhztvbyo9eJWh7ioQju/sh6HFIV4rlAeo
JIaCvqjZFmvPxRKJXdsoAAn9UXn+0/GES483ymJGNKUDR1jbXA/r//RTpQU60VgI
N07OTY25fhzj8W4NI5PoxMSbZ+Y2aHYSH6Bf88J+uUaer/tF611C1yKvzez5aeub
qXZQmCnEcn7CJzNUlowTVMhC5/mVNlg0PwBR0FNeZtKEm/8w+PHQYaIk+6/DkmxQ
HobpWujGADaH7+OdgsWheAQ/RQRwDshvHZNf6vx+x62+PsAhmH8V8CCK/MAfUfc5
FzGA/A81X97cKMxd8Y1MBIcOOx1LrVt0Yl5ILDSC7tfgbah4wvy6lM3P9StDxA3Z
yUUT7noIVpek8jwoPDl48eAIbTH0AI5I40ZI2j0ze3QjPmNWf/qEdZ2Fb+bVjCBy
vMx+oVSnaqsBO3W10T3kNy3vk5Oc64d7ivD6rZduCV9M/C9XlJu9uE03OosT9gD3
W1kTFuSE4KvVKGm3Gu08pdrFILusIfoMjEPPdYch9XEIVDD5KaFbirpMi0y3ofyZ
na9SgMIba2kstjzYJaTnvZKg7UMXcUQrYU/0vIEXu//kCUyJbAM=
=xb1u
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 8 Sep 2023 22:19:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 08 18:19:01 2023
Received: from localhost ([127.0.0.1]:45799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qejoa-0004G1-U6
	for submit <at> debbugs.gnu.org; Fri, 08 Sep 2023 18:19:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37548)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qejoX-0004Fm-6G
 for 65119 <at> debbugs.gnu.org; Fri, 08 Sep 2023 18:18:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qejoM-000118-Ef; Fri, 08 Sep 2023 18:18:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=mktuf7Y+D2NIGMNGmbi3E59vuvu9pbmroVquC4KJUO4=; b=ORYFqE6N3aWLNOJo2FnJ
 unjb52+P0Lwm/mg3utTwyq4FHvL1HuXygYqLwrw60fqxnU2Et3Y6DFMeza3ot2ImOlRH625HG+D/i
 d0gZcL6a4HQao3kFSLaM4hH2hvdvV8nik4LeqmIwasLWH+Zp8l/cgmt1paSjl0KdGroty9ioUKdwD
 mDWPYynQVoh9734HCLuBUljjyX3tuX7JiYP2UCmNzoIB6KOzDq2jvHGKGP8TKBfZRjLawW4UhThd3
 VECBuoTtXOSAa44ofmHmmooPEi3Vg+rgnxBPpC9vyy6O2OQYCR2wqw9vRHUIB+uzRnIDIXcPJHT4o
 9EtpSAHXmOMk4g==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN>
 <87ttsnoct1.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Tridi 23 Fructidor an 231 de la =?utf-8?Q?R=C3=A9vol?=
 =?utf-8?Q?ution=2C?= jour du Houblon
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 09 Sep 2023 00:18:43 +0200
In-Reply-To: <87ttsnoct1.fsf@HIDDEN> (Andrew Tropin's message of "Fri, 25 Aug
 2023 10:28:58 +0400")
Message-ID: <87wmx0z4u4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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: -3.3 (---)

Hi Andrew,

Andrew Tropin <andrew@HIDDEN> skribis:

> Yes, and and this is exactly what this solution does and in addition to
> that it hides it under the sweet define-service-type-mapping interface.
> `set!` explicitly communicates the danger of usage,
> define-service-type-mapping does not.
>
>
> 1. We introduce a global state here and infect potentially all the
> modules from all channels with it + mask it with nice interface. =3D> Now
> the result of evaluation depends on the order source files are read.
> Every channel can break valid user's configurations with perfectly legal
> public guix API.  We make reloading of the modules and REPL-driven
> development in general a huge pain in the lower back.
>
>
> 2. The service extension mechanism is already quite complex to understand
> on its own, in addition to that the devirsity of record creation macros
> / DSLs (define-record-type, define-record-type*, define-configuration)
> doesn't make the situation better.  We introduce one more DSL on top of
> couple existing. =3D> Learning curve raises even higher. Inspecting,
> navigating and debugging such code becomes harder. It prevents future
> extension with for-container or for-development-environment.  It saves
> couple of lines and avoids some minor repetions at the moment, but not
> sure that it's the right way to reuse the stuff between home and system
> services.

I understand what you=E2=80=99re saying.  I don=E2=80=99t necessarily agree=
 with all of
it because I believe abstraction is a fundamental part of programming;
abstractions can sometimes be wrong or misleading of course, and that=E2=80=
=99s
what we should strive to avoid.

Back to this patch series, we=E2=80=99ve had one concrete illustration of a
shortcoming:

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

I=E2=80=99m aware of this and agree it needs to be addressed.

In assessing this patch series, one should keep in mind that it solves a
longstanding issue with Guix Home (code duplication and the inability to
share service code with Guix System), one for which no other solution
was proposed AFAIK.

My own assessment, having reviewed patches adding Home services (in all
loneliness I must say) is that the outcome is positive, in spite of the
shortcoming mentioned above.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 8 Sep 2023 12:43:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 08 08:43:06 2023
Received: from localhost ([127.0.0.1]:42518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qeapG-0003ln-8B
	for submit <at> debbugs.gnu.org; Fri, 08 Sep 2023 08:43:06 -0400
Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:42055)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qeapC-0003lH-SR
 for 65119 <at> debbugs.gnu.org; Fri, 08 Sep 2023 08:43:04 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 561D31BF20A;
 Fri,  8 Sep 2023 12:42:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1694176974;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=NmmXn+673iB4ccnX95P/pDYLI5Ej4xaIpQZhFssbCy4=;
 b=IQmo7Xs4mv+auPyOfE/WeYW8iplNlIOb7uvgeaI5i6bpx/EGiJsYLbclFvdNGM82Etu7kt
 BFcLWeJjYx8shC/ONHDBe9D6TIcVSBYq8sZXQd+SDMEbggSX4Irvhxp41X+m7W/c0oSchw
 uu9q+aMc5ZgeD6Kvh2AMbRe8xp8rNlFDU5Q8FeJLUe77RYvmOKinovZ+cV6QG8HMB7yJUh
 i3hPv2smvcUtJqV6cBe57DQ3MOC++huJhEvbtNDqXbZDRKVV+ecyd130MS7Yp5/s8rlhcu
 vLQCzLfv0OmACbcnn02VffEvNElMW4Y72JxmBIcuWqS9hJZ713G6WvUkWvnEIQ==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <87ttsnoct1.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN> <87ttsnoct1.fsf@HIDDEN>
Date: Fri, 08 Sep 2023 16:42:48 +0400
Message-ID: <87bkec6dkn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-08-25 10:28, Andrew Tropin wrote:

> On 2023-08-22 18:25, Ludovic Court=C3=A8s wrote:
>
>> Hi Andrew,
>>
>> Andrew Tropin <andrew@HIDDEN> skribis:
>>
>>> Sorry for comming late to the party, I saw this message only a week ago
>>> and didn't have time to make an extensive reply yet, so I will share my
>>> quick thought on the most problematic part and maybe later will
>>> formulate others thoughts in more details.
>>>
>>> define-service-type-mapping looks imperative and potentially very
>>> problematic.  Collecting those values in unknown order and applying this
>>> implicit transformation making a good room for foot shooting.  Imagine
>>> someone would like to use his own (let's say) shepherd home service
>>> implementation and will add this to one of the source files of their
>>> channel:
>>>
>>> (define-service-type-mapping
>>>   shepherd-root-service-type =3D> my-home-shepherd-service-type)
>>>
>>> What happens if somebody will use his channel just for getting some
>>> package?  Very likely it would break the build or in the worst case it
>>> will build with unexpected service implementation under the hood.
>>
>> Yes, this is always possible.  Though it=E2=80=99s not very different fr=
om:
>>
>>   (set! home-shepherd-service-type =E2=80=A6)
>
> Yes, and and this is exactly what this solution does and in addition to
> that it hides it under the sweet define-service-type-mapping interface.
> `set!` explicitly communicates the danger of usage,
> define-service-type-mapping does not.
>
>
> 1. We introduce a global state here and infect potentially all the
> modules from all channels with it + mask it with nice interface. =3D>

To support my previous suggestion to revert this patch series I will
document the example of a consequence:

https://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dcf6abf50dbbbd95fef46=
5ab4bb3b608843ac47e1
https://issues.guix.gnu.org/65510

It highlights this:

> Now the result of evaluation depends on the order source files are
> read.
>>> Collecting those values in unknown order and applying this
>>> implicit transformation making a good room for foot shooting.

to say it differently this change introduced the implicit dependency on
the fact of the evaluation of the form, which is not explicitly
referenced anywhere.

> Every channel can break valid user's configurations with perfectly
> legal public guix API.  We make reloading of the modules and
> REPL-driven development in general a huge pain in the lower back.
>
> 2. The service extension mechanism is already quite complex to understand
> on its own, in addition to that the devirsity of record creation macros
> / DSLs (define-record-type, define-record-type*, define-configuration)
> doesn't make the situation better.  We introduce one more DSL on top of
> couple existing. =3D> Learning curve raises even higher. Inspecting,
> navigating and debugging such code becomes harder. It prevents future
> extension with for-container or for-development-environment.  It saves
> couple of lines and avoids some minor repetions at the moment, but not
> sure that it's the right way to reuse the stuff between home and system
> services.
>
>>
>> Maybe the unintended effect is more likely to happen unwillingly though,
>> maybe.
>>
>> Do you have other solutions in mind, be it for this specific issue or
>> for system/home service mapping in general?
>>
>>> I had [1][2] and still have concerns about macros and records
>>> composability and reusability.  I personally don't like excessive usage
>>> of them in general.  By adding more macros, already quite complex guix
>>> services mechanism becomes even more harder to learn, inspect, reason
>>> about and work with.  In addition to that it has a major technical issue
>>> mentioned above.  I'm strongly against this change and would suggest to
>>> revert it.
>>>
>>> I hope it doesn't sound rude and I'm really thankful for your work on
>>> this, but I just think it's not the right solution, at least yet, in its
>>> current form.
>>
>> It does sound a bit rude.  :-)  I would have loved to get any feedback
>> from you while we were discussing this in the course of reviewing the
>> Syncthing and Dicod patches a couple of months ago (which I believe you
>> were Cc=E2=80=99d on, as member of the Home team).
>>
>> I won=E2=80=99t argue about macros and records, it=E2=80=99s off-topic: =
macros and
>> records are part of the Schemer=E2=80=99s toolbox, we try and use them w=
isely,
>> and Guix code has always used macros and records.  We can discuss
>> whether a specific macro or record type is suitable, of course, but
>> general statements about them are unhelpful.
>>
>
> Actually, it's quite on-topic IMO and it seems as a consequence of the
> abandoned discussions I linked earlier, but it's a long story and we can
> keep it aside for now, because despite the reasons lead to this solution
> it has fundamental problems on its own we better to focus on.  Maybe
> later I'll elaborate on my thought process in more details.
>
>> Was it =E2=80=98for-home=E2=80=99 that triggered your comment?
>>
>> The patches do not introduce any new record type IIRC; what triggered
>> your comment regarding records?
>>
>> I=E2=80=99m all for making changes to improve on this patch series.  I=
=E2=80=99m against
>> reverting the patch series: the conditions for reverting are not met
>> (info "(guix) Commit Access").
>>
>> Thanks for your feedback,
>> Ludo=E2=80=99.
>
> Please treat it with adjustment to my not very proficient level of
> english and lacking ability to express nuances.  It's not a personal
> critique in any way, it's my roughly formulated concerns on 1. technical
> aspects of the solution and 2. possible consequences for the future of
> guix and its user-facing API.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmT7FsgACgkQIgjSCVjB
3rCkfA//aS+LyB4R5/jKJSXqPRm4HHRJC/zBbDT5cPowyLRX2ymVQZoYwqCIeDxx
4NnVOYLrjjTe7UwOg+QIcMDpyhFNcOIJt8UvyI5NCpkwLyzHx7+2lvJq9WBuBM0y
qDfOkWCoI8ywPrDpz+ajjUoYxE/cmg3IjhECmU/RacHqzGFZry6EG0PD6txpX7Yi
l/sdaISnvVkLllvvaZGASgNQ7huwmLpNGCW0hNDzu2+GdVM0LI2kJCyAQG+PvXu8
avRQI0pfvvOdIeps70b4pv34yxylBA+ZuxphGmk8lUmWI5vRWHBF3WCcw3v6hnCc
T3pqRofxXNgrHhyaEqQ3VPCNXT04bfN4hl2vJmyX+M8E+7Zq9My+BQh0sHZVK2JE
Ui/Mtx5vzmSPxFqjwbgG5UfJfpWA9zuJIpikDHVf4sYVkhQOrK0o9cRULg9ppAuE
aVc21kyRvA3gDBnEWrp754rY7dJ4JNzWHNVrbxKgx/O4rV0HChGpxjyLkBwI6r5C
HMbDuRqI5jns2MmGwGrRbbFDuNkX6hDSFLDQPi7/AXJoipJ8sIVR06wT01nl9eCM
ZDGE13hS9obZCNmyDIdKh0bbeFVsWMccMgpuiqVzlg1+RR7k6oiBs/E1uiULUZn8
BUn7xLfwdxvpcfUbHbF93jIJ7I6XEMW41cJMDvYVJj+1TOHqRJI=
=i2uj
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 25 Aug 2023 06:29:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 02:29:17 2023
Received: from localhost ([127.0.0.1]:39029 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZQJo-0003Ke-IT
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 02:29:17 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51041)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qZQJn-0003KP-8z
 for 65119 <at> debbugs.gnu.org; Fri, 25 Aug 2023 02:29:16 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 3B14660002;
 Fri, 25 Aug 2023 06:29:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1692944944;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=7GZIJFKoz/P5QdwJCespvgwo7Z5kXVMTH2pYxW8AfJ0=;
 b=R5NgiPIIpBxF1lnR6KmIJY4BFjFdbR1a1A6GJwijtKA7uLRjwHPbdF3D4zcELt0l37GFRj
 oQtrpLgQJODMPioG2pkFhrdDPvou3Ed2HMo96d6SbznNIuIpwKlfFwQ9cMw16oMTXMQ2/T
 7xRERImN4vRZbGVu3sdIIzFCBHoaa8ul6sjRWmo5hxJsoO1Gp59Gdub4BlzFECFCiGgsIZ
 Op7FJFL/bh2pvDvQTIc1TbxMdKDDwaSM+JYQxtCb34xYMN5qDNO3V47KyrvhC832i6FzKN
 Hj66ucOvzDsfIXhQDffxMDLwYv+3/G4iokqHwm8JYTpc/CmVwG0mnIt6I8FwHw==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <87jztn3uz1.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN> <87jztn3uz1.fsf@HIDDEN>
Date: Fri, 25 Aug 2023 10:28:58 +0400
Message-ID: <87ttsnoct1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-08-22 18:25, Ludovic Court=C3=A8s wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew@HIDDEN> skribis:
>
>> Sorry for comming late to the party, I saw this message only a week ago
>> and didn't have time to make an extensive reply yet, so I will share my
>> quick thought on the most problematic part and maybe later will
>> formulate others thoughts in more details.
>>
>> define-service-type-mapping looks imperative and potentially very
>> problematic.  Collecting those values in unknown order and applying this
>> implicit transformation making a good room for foot shooting.  Imagine
>> someone would like to use his own (let's say) shepherd home service
>> implementation and will add this to one of the source files of their
>> channel:
>>
>> (define-service-type-mapping
>>   shepherd-root-service-type =3D> my-home-shepherd-service-type)
>>
>> What happens if somebody will use his channel just for getting some
>> package?  Very likely it would break the build or in the worst case it
>> will build with unexpected service implementation under the hood.
>
> Yes, this is always possible.  Though it=E2=80=99s not very different fro=
m:
>
>   (set! home-shepherd-service-type =E2=80=A6)

Yes, and and this is exactly what this solution does and in addition to
that it hides it under the sweet define-service-type-mapping interface.
`set!` explicitly communicates the danger of usage,
define-service-type-mapping does not.


1. We introduce a global state here and infect potentially all the
modules from all channels with it + mask it with nice interface. =3D> Now
the result of evaluation depends on the order source files are read.
Every channel can break valid user's configurations with perfectly legal
public guix API.  We make reloading of the modules and REPL-driven
development in general a huge pain in the lower back.


2. The service extension mechanism is already quite complex to understand
on its own, in addition to that the devirsity of record creation macros
/ DSLs (define-record-type, define-record-type*, define-configuration)
doesn't make the situation better.  We introduce one more DSL on top of
couple existing. =3D> Learning curve raises even higher. Inspecting,
navigating and debugging such code becomes harder. It prevents future
extension with for-container or for-development-environment.  It saves
couple of lines and avoids some minor repetions at the moment, but not
sure that it's the right way to reuse the stuff between home and system
services.

>
> Maybe the unintended effect is more likely to happen unwillingly though,
> maybe.
>
> Do you have other solutions in mind, be it for this specific issue or
> for system/home service mapping in general?
>
>> I had [1][2] and still have concerns about macros and records
>> composability and reusability.  I personally don't like excessive usage
>> of them in general.  By adding more macros, already quite complex guix
>> services mechanism becomes even more harder to learn, inspect, reason
>> about and work with.  In addition to that it has a major technical issue
>> mentioned above.  I'm strongly against this change and would suggest to
>> revert it.
>>
>> I hope it doesn't sound rude and I'm really thankful for your work on
>> this, but I just think it's not the right solution, at least yet, in its
>> current form.
>
> It does sound a bit rude.  :-)  I would have loved to get any feedback
> from you while we were discussing this in the course of reviewing the
> Syncthing and Dicod patches a couple of months ago (which I believe you
> were Cc=E2=80=99d on, as member of the Home team).
>
> I won=E2=80=99t argue about macros and records, it=E2=80=99s off-topic: m=
acros and
> records are part of the Schemer=E2=80=99s toolbox, we try and use them wi=
sely,
> and Guix code has always used macros and records.  We can discuss
> whether a specific macro or record type is suitable, of course, but
> general statements about them are unhelpful.
>

Actually, it's quite on-topic IMO and it seems as a consequence of the
abandoned discussions I linked earlier, but it's a long story and we can
keep it aside for now, because despite the reasons lead to this solution
it has fundamental problems on its own we better to focus on.  Maybe
later I'll elaborate on my thought process in more details.

> Was it =E2=80=98for-home=E2=80=99 that triggered your comment?
>
> The patches do not introduce any new record type IIRC; what triggered
> your comment regarding records?
>
> I=E2=80=99m all for making changes to improve on this patch series.  I=E2=
=80=99m against
> reverting the patch series: the conditions for reverting are not met
> (info "(guix) Commit Access").
>
> Thanks for your feedback,
> Ludo=E2=80=99.

Please treat it with adjustment to my not very proficient level of
english and lacking ability to express nuances.  It's not a personal
critique in any way, it's my roughly formulated concerns on 1. technical
aspects of the solution and 2. possible consequences for the future of
guix and its user-facing API.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmToSioACgkQIgjSCVjB
3rDAnw/+MfkFcHw/XcTyD20CxMWnibpV/l2hWvFkvsMyvZ0cBfbR4Z5JXYJFsmZp
Etj9PjEUGIMfDmL5h3QXnMKss20eW7/reTqj1h0JvWdRbjkCtNBp0xGwwe2SV3TF
OsLIiy3ww8oALvsaF4n1FkBOqwjgQsh1IQKlqqIfIfI5Xzb103nIGKJYROnqnKe7
zyd4l8KgQXQYNvucoQ3bVtWSZ8/Oc3VfiMpdfHx7dpcD1RajvmzNrFOQ881/Nxmj
gu61diI7zN21MkceaK52yvJ30s23tZ6Em11C8/i8ziqsDMIAIDRYQG47fgAx5tXC
sW644guJqxM01CYI4KY/99IGQAblDU9C77LxnkOGP+7vq35AF/NHUuUpJyBP76GU
icXsKoDK1QJhj/qDoQlYDR6cY0jkM0WqpUIMnwH5P8MVcowRtt1uq6F1umeELdMc
ZBlx38fbGP5MKuloVPEhpF5sqVPRiw7Ym3GMwL/oH5ZwkFikPRucTjN9uqkYMO5F
ujlGYncUTXYcw4OetSdLNX74tI5M31DL7NaraQxOUz3GtRkk7/zZ9jgUO5V4Rghs
NZ3st9YNOhECyBw4SgOSF4iBJNi4BoUwVKPBRjcB74Jy4ZMMo0fOXGL1NfH25Vb+
n9o19bhFjm7F11F+pg+9A1y02OKffCGYZYPILTV1viT1erJY1zw=
=wC/3
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 22 Aug 2023 16:25:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 12:25:53 2023
Received: from localhost ([127.0.0.1]:60270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYUCW-0004E5-Jd
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 12:25:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qYUCU-0004Dh-Og
 for 65119 <at> debbugs.gnu.org; Tue, 22 Aug 2023 12:25:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qYUCD-0002Ds-Vx; Tue, 22 Aug 2023 12:25:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=3qz1NlKbi0rR8pDwRBJGzCynabB2I3hiPcgXr0OMNlE=; b=Fpky35apD2ZPxfz+9rQp
 vRIbOjRL/L7QhPJmQK0iljVSrNMCqhqrVseR+AsEVIXmRbT/E/rmGpOPqCDqF/m6GmwMUADiNrMin
 TBqOzgni3pXSOy/ynBGuVtFuEa5avkRCqmGOX+cd+TwnAEFEllPBmJKlzsxXr/32vH1J2VUO+KuNT
 bnYWmQRjhVs13zQiFbNoiOBpwEvic16oZfgJt4k9sn04jfeQIZ48eDc4tECEke6jBirZf1/bSHIao
 S0hDVq5/mtbCfs0srguCfk8o1dX/ovNUcYheWOjwNpBW6DLYR2B5hvxR0w1UnkJ4Cqk6oNY8a3lhR
 v3wtQONlhNnwxQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
 <87r0nwh5om.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Quintidi 5 Fructidor an 231 de la =?utf-8?Q?R=C3=A9v?=
 =?utf-8?Q?olution=2C?= jour du Saumon
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 22 Aug 2023 18:25:22 +0200
In-Reply-To: <87r0nwh5om.fsf@HIDDEN> (Andrew Tropin's message of "Mon, 21 Aug
 2023 17:43:21 +0400")
Message-ID: <87jztn3uz1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 paren@HIDDEN
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: -3.3 (---)

Hi Andrew,

Andrew Tropin <andrew@HIDDEN> skribis:

> Sorry for comming late to the party, I saw this message only a week ago
> and didn't have time to make an extensive reply yet, so I will share my
> quick thought on the most problematic part and maybe later will
> formulate others thoughts in more details.
>
> define-service-type-mapping looks imperative and potentially very
> problematic.  Collecting those values in unknown order and applying this
> implicit transformation making a good room for foot shooting.  Imagine
> someone would like to use his own (let's say) shepherd home service
> implementation and will add this to one of the source files of their
> channel:
>
> (define-service-type-mapping
>   shepherd-root-service-type =3D> my-home-shepherd-service-type)
>
> What happens if somebody will use his channel just for getting some
> package?  Very likely it would break the build or in the worst case it
> will build with unexpected service implementation under the hood.

Yes, this is always possible.  Though it=E2=80=99s not very different from:

  (set! home-shepherd-service-type =E2=80=A6)

Maybe the unintended effect is more likely to happen unwillingly though,
maybe.

Do you have other solutions in mind, be it for this specific issue or
for system/home service mapping in general?

> I had [1][2] and still have concerns about macros and records
> composability and reusability.  I personally don't like excessive usage
> of them in general.  By adding more macros, already quite complex guix
> services mechanism becomes even more harder to learn, inspect, reason
> about and work with.  In addition to that it has a major technical issue
> mentioned above.  I'm strongly against this change and would suggest to
> revert it.
>
> I hope it doesn't sound rude and I'm really thankful for your work on
> this, but I just think it's not the right solution, at least yet, in its
> current form.

It does sound a bit rude.  :-)  I would have loved to get any feedback
from you while we were discussing this in the course of reviewing the
Syncthing and Dicod patches a couple of months ago (which I believe you
were Cc=E2=80=99d on, as member of the Home team).

I won=E2=80=99t argue about macros and records, it=E2=80=99s off-topic: mac=
ros and
records are part of the Schemer=E2=80=99s toolbox, we try and use them wise=
ly,
and Guix code has always used macros and records.  We can discuss
whether a specific macro or record type is suitable, of course, but
general statements about them are unhelpful.

Was it =E2=80=98for-home=E2=80=99 that triggered your comment?

The patches do not introduce any new record type IIRC; what triggered
your comment regarding records?

I=E2=80=99m all for making changes to improve on this patch series.  I=E2=
=80=99m against
reverting the patch series: the conditions for reverting are not met
(info "(guix) Commit Access").

Thanks for your feedback,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 21 Aug 2023 15:52:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 21 11:52:50 2023
Received: from localhost ([127.0.0.1]:57552 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qY7D0-0000r1-16
	for submit <at> debbugs.gnu.org; Mon, 21 Aug 2023 11:52:50 -0400
Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:42849)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qY7Cx-0000qg-Ow
 for 65119 <at> debbugs.gnu.org; Mon, 21 Aug 2023 11:52:48 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 43C1C1BF204;
 Mon, 21 Aug 2023 15:52:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1692633159;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=C/O5t5vKiV7xwaWPEToczdGdHqqXnbLQ4MaCogOKgnY=;
 b=AEPPhb6u/WwHXn9tzGwG7ImUSa1eJlXEluIXq3eF87ZnKrgT7wpP5gXMk2d8QjI9Lg+o4P
 r7NBmqXmFngywe6K/3pfMJuwy+NhuvVh08rJvpPn4sWDgx5gwt6NR0V+A0RlfA0gCkrZlC
 PAbpNr2Q++S/Hcwi5FotjW0BF3fZPNQBk4EsDoKuDe3dUYT6Cn9Z20jZ4pzqZd9W684O7L
 lOUhj+fGLpy3cHB4zZCWrRD9EdihmSudxRZ8oOOOKXr5NzqxzQhCeiWj32ToRb32YWi3+g
 G5PTFYDfGnhV4/xrARgtm6OEzoyVg5iv0I1ndvXcn8p2pTqmEFrUM00X9zGg7w==
From: Andrew Tropin <andrew@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 65119 <at> debbugs.gnu.org
Subject: Re: [bug#65119] [PATCH 6/8] home: services: mcron: Define as a
 mapping of the system service.
In-Reply-To: <319a7664fdf2b910f4183ce3c748234a8763e107.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
 <319a7664fdf2b910f4183ce3c748234a8763e107.1691355218.git.ludo@HIDDEN>
Date: Mon, 21 Aug 2023 19:50:23 +0400
Message-ID: <87o7j0gzsw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-08-06 23:07, Ludovic Court=C3=A8s wrote:

> * gnu/services/mcron.scm (list-of-gexps?): Remove.
> (<mcron-configuration>): Rewrite using 'define-record-type*'.
> [home-service?]: New field.
> [log-file]: Make thunked and changed default value.
> (mcron-shepherd-services): Honor 'home-service?' and remove use of
> 'maybe-value-set?'.
> (mcron-service-type): Inherit 'home-service?' from CONFIG.
> (generate-doc): Remove.
> * gnu/home/services/mcron.scm (list-of-gexp?)
> (<home-mcron-configuration>, job-files, shepherd-schedule-action)
> (home-mcron-shepherd-services, home-mcron-profile)
> (home-mcron-extend, generate-doc): Remove.
> (home-mcron-configuration): Turn into a macro.
> (home-mcron-service-type): Define in terms of
> 'system->home-service-type'.
> <top level>: Add service type mapping.
> ---
>  gnu/home/services/mcron.scm | 96 ++++---------------------------------
>  gnu/services/mcron.scm      | 80 ++++++++++++++-----------------
>  2 files changed, 45 insertions(+), 131 deletions(-)
>
> diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm
> index f51edd6634..23be44ba07 100644
> --- a/gnu/home/services/mcron.scm
> +++ b/gnu/home/services/mcron.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright =C2=A9 2021, 2023 Andrew Tropin <andrew@HIDDEN>
>  ;;; Copyright =C2=A9 2021 Xinglu Chen <public@HIDDEN>
>  ;;; Copyright =C2=A9 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
> +;;; Copyright =C2=A9 2023 Ludovic Court=C3=A8s <ludo@HIDDEN>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -19,16 +20,9 @@
>  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
>=20=20
>  (define-module (gnu home services mcron)
> -  #:use-module (gnu packages guile-xyz)
>    #:use-module (gnu home services)
> -  #:use-module (gnu services configuration)
> -  #:use-module (gnu services shepherd)
>    #:use-module (gnu home services shepherd)
> -  #:use-module (guix records)
> -  #:use-module (guix gexp)
> -  #:use-module (srfi srfi-1)
> -  #:use-module (ice-9 match)
> -
> +  #:use-module (gnu services mcron)               ;for the service mappi=
ng
>    #:export (home-mcron-configuration
>              home-mcron-service-type))
>=20=20
> @@ -55,86 +49,16 @@ (define-module (gnu home services mcron)
>  ;;
>  ;;; Code:
>=20=20
> -(define list-of-gexps?
> -  (list-of gexp?))
> -
> -(define-configuration/no-serialization home-mcron-configuration
> -  (mcron (file-like mcron) "The mcron package to use.")
> -  (jobs
> -   (list-of-gexps '())
> -   "This is a list of gexps (@pxref{G-Expressions}), where each gexp
> -corresponds to an mcron job specification (@pxref{Syntax, mcron job
> -specifications,, mcron, GNU@tie{}mcron}).")
> -  (log? (boolean #t) "Log messages to standard output.")
> -  (log-format
> -   (string "~1@*~a ~a: ~a~%")
> -   "@code{(ice-9 format)} format string for log messages.  The default v=
alue
> -produces messages like \"@samp{@var{pid} @var{name}:
> -@var{message}\"} (@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcro=
n}).
> -Each message is also prefixed by a timestamp by GNU Shepherd."))
> -
> -(define job-files (@@ (gnu services mcron) job-files))
> -(define shepherd-schedule-action
> -  (@@ (gnu services mcron) shepherd-schedule-action))
> -
> -(define (home-mcron-shepherd-services config)
> -  (match-record config <home-mcron-configuration>
> -    (mcron jobs log? log-format)
> -    (if (null? jobs)
> -        '()                                       ;no jobs to run
> -        (let ((files (job-files mcron jobs)))
> -          (list (shepherd-service
> -                 (documentation "User cron jobs.")
> -                 (provision '(mcron))
> -                 (modules `((srfi srfi-1)
> -                            (srfi srfi-26)
> -                            (ice-9 popen)         ;for the 'schedule' ac=
tion
> -                            (ice-9 rdelim)
> -                            (ice-9 match)
> -                            ,@%default-modules))
> -                 (start #~(make-forkexec-constructor
> -                           (list (string-append #$mcron "/bin/mcron")
> -                                 #$@(if log?
> -                                        #~("--log" "--log-format" #$log-=
format)
> -                                        #~())
> -                                 #$@files)
> -                           #:log-file (string-append
> -                                       (or (getenv "XDG_STATE_HOME")
> -                                           (format #f "~a/.local/state"
> -                                                   (getenv "HOME")))
> -                                       "/log/mcron.log")))
> -                 (stop #~(make-kill-destructor))
> -                 (actions
> -                  (list (shepherd-schedule-action mcron files)))))))))
> -
> -(define home-mcron-profile (compose list home-mcron-configuration-mcron))
> -
> -(define (home-mcron-extend config jobs)
> -  (home-mcron-configuration
> -   (inherit config)
> -   (jobs (append (home-mcron-configuration-jobs config)
> -                 jobs))))
> +(define-syntax-rule (home-mcron-configuration fields ...)
> +  ;; Macro provided for backward compatibility.
> +  (for-home (mcron-configuration fields ...)))
>=20=20
>  (define home-mcron-service-type
> -  (service-type (name 'home-mcron)
> -                (extensions
> -                 (list (service-extension
> -                        home-shepherd-service-type
> -                        home-mcron-shepherd-services)
> -                       (service-extension
> -                        home-profile-service-type
> -                        home-mcron-profile)))
> -                (compose concatenate)
> -                (extend home-mcron-extend)
> -                (default-value (home-mcron-configuration))
> -                (description
> -                 "Install and configure the GNU mcron cron job manager."=
)))
> +  (service-type
> +   (inherit (system->home-service-type mcron-service-type))
> +   (default-value (for-home (mcron-configuration)))))
>=20=20
> -
> -;;;
> -;;; Generate documentation.
> -;;;
> -(define (generate-doc)
> -  (configuration->documentation 'home-mcron-configuration))
> +(define-service-type-mapping
> +  mcron-service-type =3D> home-mcron-service-type)
>=20=20
>  ;;; mcron.scm ends here
> diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm
> index 2ef5980e09..db8b539ff5 100644
> --- a/gnu/services/mcron.scm
> +++ b/gnu/services/mcron.scm
> @@ -1,5 +1,5 @@
>  ;;; GNU Guix --- Functional package management for GNU
> -;;; Copyright =C2=A9 2016, 2017, 2018, 2019, 2020 Ludovic Court=C3=A8s <=
ludo@HIDDEN>
> +;;; Copyright =C2=A9 2016-2020, 2023 Ludovic Court=C3=A8s <ludo@HIDDEN>
>  ;;; Copyright =C2=A9 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
>  ;;; Copyright =C2=A9 2023 Bruno Victal <mirai@HIDDEN>
>  ;;;
> @@ -20,10 +20,8 @@
>=20=20
>  (define-module (gnu services mcron)
>    #:use-module (gnu services)
> -  #:use-module (gnu services configuration)
>    #:use-module (gnu services shepherd)
>    #:use-module (gnu packages guile-xyz)
> -  #:use-module (guix deprecation)
>    #:use-module (guix records)
>    #:use-module (guix gexp)
>    #:use-module (srfi srfi-1)
> @@ -37,6 +35,7 @@ (define-module (gnu services mcron)
>              mcron-configuration-log-file
>              mcron-configuration-log-format
>              mcron-configuration-date-format
> +            mcron-configuration-home-service?
>=20=20
>              mcron-service-type))
>=20=20
> @@ -55,40 +54,34 @@ (define-module (gnu services mcron)
>  ;;;
>  ;;; Code:
>=20=20
> -(define list-of-gexps?
> -  (list-of gexp?))
> +;; Configuration of mcron.
> +;; XXX: 'define-configuration' cannot be used here due to the need for
> +;; 'thunked' and 'innate' fields as well as 'this-mcron-configuration'.
> +(define-record-type* <mcron-configuration> mcron-configuration
> +  make-mcron-configuration
> +  mcron-configuration?
> +  this-mcron-configuration
>=20=20
> -(define-maybe/no-serialization string)
> +  (mcron       mcron-configuration-mcron          ;file-like
> +               (default mcron))
> +  (jobs        mcron-configuration-jobs           ;list of gexps
> +               (default '()))
> +  (log?        mcron-configuration-log?           ;Boolean
> +               (default #t))
> +  (log-file    mcron-configuration-log-file       ;string | gexp
> +               (thunked)
> +               (default
> +                 (if (mcron-configuration-home-service?
> +                      this-mcron-configuration)
> +                     #~(string-append %user-log-dir "/mcron.log")

It seems that (modules `((shepherd support))) is missing for this line
to work.

> +                     "/var/log/mcron.log")))
> +  (log-format  mcron-configuration-log-format     ;string
> +               (default "~1@*~a ~a: ~a~%"))
> +  (date-format mcron-configuration-date-format    ;string | #f
> +               (default #f))
>=20=20
> -(define-configuration/no-serialization mcron-configuration
> -  (mcron
> -   (file-like mcron)
> -   "The mcron package to use.")
> -
> -  (jobs
> -   (list-of-gexps '())
> -   "This is a list of gexps (@pxref{G-Expressions}), where each gexp
> -corresponds to an mcron job specification (@pxref{Syntax, mcron job
> -specifications,, mcron, GNU@tie{}mcron}).")
> -
> -  (log?
> -   (boolean #t)
> -   "Log messages to standard output.")
> -
> -  (log-file
> -   (string "/var/log/mcron.log")
> -   "Log file location.")
> -
> -  (log-format
> -   (string "~1@*~a ~a: ~a~%")
> -   "@code{(ice-9 format)} format string for log messages.  The default v=
alue
> -produces messages like @samp{@var{pid} @var{name}: @var{message}}
> -(@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcron}).
> -Each message is also prefixed by a timestamp by GNU Shepherd.")
> -
> -  (date-format
> -   maybe-string
> -   "@code{(srfi srfi-19)} format string for date."))
> +  (home-service? mcron-configuration-home-service?
> +                 (default for-home?) (innate)))
>=20=20
>  (define (job-files mcron jobs)
>    "Return a list of file-like object for JOBS, a list of gexps."
> @@ -158,13 +151,15 @@ (define (shepherd-schedule-action mcron files)
>=20=20
>  (define (mcron-shepherd-services config)
>    (match-record config <mcron-configuration>
> -    (mcron jobs log? log-file log-format date-format)
> +    (mcron jobs log? log-file log-format date-format home-service?)
>      (if (eq? jobs '())
>          '()                             ;nothing to do
>          (let ((files (job-files mcron jobs)))
>            (list (shepherd-service
>                   (provision '(mcron))
> -                 (requirement '(user-processes))
> +                 (requirement (if home-service?
> +                                  '()
> +                                  '(user-processes)))
>                   (modules `((srfi srfi-1)
>                              (srfi srfi-26)
>                              (ice-9 popen) ;for the 'schedule' action
> @@ -175,7 +170,7 @@ (define (mcron-shepherd-services config)
>                             (list #$(file-append mcron "/bin/mcron")
>                                   #$@(if log?
>                                          `("--log" "--log-format" ,log-fo=
rmat
> -                                          ,@(if (maybe-value-set? date-f=
ormat)
> +                                          ,@(if date-format
>                                                  (list "--date-format"
>                                                        date-format)
>                                                  '()))
> @@ -209,15 +204,10 @@ (define mcron-service-type
>                  (extend (lambda (config jobs)
>                            (mcron-configuration
>                             (inherit config)
> +                           (home-service?
> +                            (mcron-configuration-home-service? config))
>                             (jobs (append (mcron-configuration-jobs confi=
g)
>                                           jobs)))))
>                  (default-value (mcron-configuration)))) ;empty job list
>=20=20
> -
> -;;;
> -;;; Generate documentation.
> -;;;
> -(define (generate-doc)
> -  (configuration->documentation 'mcron-configuration))
> -
>  ;;; mcron.scm ends here

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmTjh78ACgkQIgjSCVjB
3rAaMg/+PIW0DJ5NyaJtIUZzCT+YaAaTdE0ZQ8pRbuSqZLZb/zQXdGYgb2wRPKvL
vpL16XYqiJgj4irXkJLORPp9dNvaUlNjNHToBN4CHOSs17+UUGFa988WxYIc8OA/
v/4p9FwSoW4e8O7lCVj5OQUh03N3AVJrMvyumDuGt/d+lgZUBxKe6R5E5OYa5wF6
vu1C5bgCRB0b46m0nVWtrX2devGAQYTSo1k52BCAnD6ffWLam91hXVKVYkWppckr
dDweIlzE+qx3CE7cAF8TpfIGge0A8aj+AzyiHkSJDuWrSQkMtPGyYENPJZzELr0s
swollJEdJ4/8WbfAh9kt+2UCY0uYeCT9h31kULV+j4j0WiWo0pXTwoPLi+BMrmxI
o1XwicRHgovP+LuhvaV7YpPCyYR5GocRt/8VMrEW9xDrUOTm44BrcKODU+CmYiIF
pCVUndhGcj4jeggA5nO5gfBZHIw8b8G/2kyuN9wDu1kMZh/Ua7qqGcfz/K8oFZrC
3f647oAfFNZ3O9QSOrIFe3k4EtrSwoSNJj3TxjcJ11dgyln9/zWzH8m4k7t2aCTq
rv5kqBwvsJ2XX/xcGIR/18AUKiDcozeKm/kzytUFaEJefrFp31cK7FQ0ADlgfU54
9LUr9uXD5iaRxBSBq4p1/gKzg/Bra9sbUwYO189U5PBnuq9PEZ8=
=eEtZ
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 21 Aug 2023 13:43:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 21 09:43:38 2023
Received: from localhost ([127.0.0.1]:55876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qY5By-0007Y8-8T
	for submit <at> debbugs.gnu.org; Mon, 21 Aug 2023 09:43:38 -0400
Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:53825)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1qY5Bv-0007Xr-I2
 for 65119 <at> debbugs.gnu.org; Mon, 21 Aug 2023 09:43:36 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id AD1024000E;
 Mon, 21 Aug 2023 13:43:26 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1692625407;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=oMfZkxifIR4TXcYI2TvRId65gGOHpWRnoW9IuxGSPxg=;
 b=ZTZldmLIrrGTYGR7pIQFd0dq6vjSnvvGJ/FeVCgG2hWwqGqdNdzqmSq9WC/foHgZf47nvu
 hz8ONaGr1ff6RQ9WB65gguA03ssHFU7HiEHE/RjRDt5fd2uz9EXtfQsHPv3eMe/ChWl7T4
 RiK322dZOfXjNyRNUrBxMkoIjO6qyDd30JuGy3wdhQTqjoVJH16HQduePNlkX5V40Iffq7
 NaktBCtBpyzQjKEUphhdHU/7ojYsap6yrYVpnHGdemwQpSqNbR2Fd2PUeMZ6/LN61jQaGR
 OnSoHYwGoUEFhQHUXiLFEDNplvgDvq+aR/Gw8ZJbMsG6o0bKRT1qKpKAQjCOUw==
From: Andrew Tropin <andrew@HIDDEN>
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>, Ludovic =?utf-8?Q?Court?=
 =?utf-8?Q?=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <87ttt3a4tm.fsf@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
Date: Mon, 21 Aug 2023 17:43:21 +0400
Message-ID: <87r0nwh5om.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-GND-Sasl: andrew@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org,
 Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s?= <ludo@HIDDEN>,
 paren@HIDDEN
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2023-08-13 13:28, =E5=AE=8B=E6=96=87=E6=AD=A6 wrote:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> [...]
>>
>> This patch lets us map System services to Home and uses the new
>> mechanism for three services: mcron, dicod, and syncthing.
>>
>>   services: dicod: Remove Shepherd < 0.9.0 compatibility layer.
>>   services: dicod: Pre-build the GCIDE index.
>>   services: syncthing: Use 'match-record'.
>>   services: Define 'for-home'.
>>   home: services: Support mapping of System services to Home services.
>>   home: services: mcron: Define as a mapping of the system service.
>>   home: services: Add dicod.
>>   home: services: Add Syncthing.
>
> I didn't test them, but those changes look good to me!

Hi Ludovic, =E5=AE=8B=E6=96=87=E6=AD=A6!

Sorry for comming late to the party, I saw this message only a week ago
and didn't have time to make an extensive reply yet, so I will share my
quick thought on the most problematic part and maybe later will
formulate others thoughts in more details.

define-service-type-mapping looks imperative and potentially very
problematic.  Collecting those values in unknown order and applying this
implicit transformation making a good room for foot shooting.  Imagine
someone would like to use his own (let's say) shepherd home service
implementation and will add this to one of the source files of their
channel:

=2D-8<---------------cut here---------------start------------->8---
(define-service-type-mapping
  shepherd-root-service-type =3D> my-home-shepherd-service-type)
=2D-8<---------------cut here---------------end--------------->8---

What happens if somebody will use his channel just for getting some
package?  Very likely it would break the build or in the worst case it
will build with unexpected service implementation under the hood.

I had [1][2] and still have concerns about macros and records
composability and reusability.  I personally don't like excessive usage
of them in general.  By adding more macros, already quite complex guix
services mechanism becomes even more harder to learn, inspect, reason
about and work with.  In addition to that it has a major technical issue
mentioned above.  I'm strongly against this change and would suggest to
revert it.

I hope it doesn't sound rude and I'm really thankful for your work on
this, but I just think it's not the right solution, at least yet, in its
current form.

[1]: https://yhetil.org/guix-devel/878rvp1deg.fsf@HIDDEN/T/#u
[2]: https://yhetil.org/87ild88kax.fsf@HIDDEN
=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmTjafkACgkQIgjSCVjB
3rBuEBAAhRuAXkJen8aGjulp58QZFqBnYjrYRFuSC//q0jsaKepGcsNA3XF+qx1l
9/GmN25g7McIkwuMWIqWJY30RMp938637ki1uBNo4zFZBSQKKyPG+LKdNk84kCQk
En8TLd0r1xzt3u7Jn6BpJ41Ulx3RSxZwmhuV1Zn2E4aENkbC5IA4/m1raB6hUsy+
zsTRcrvhx13/8V4ZBLu+U6nMi9Y/8FeCXzRJkg8I2ye06zzQAvwwii5fgKfmj6/G
B0g/3r21lfUREbs7xikJDluWs4HCCrIayT4B9bB3C2VUaNObVQoUjRqhapHkUFvi
RmHSEfPMk7mPCE2M2sgpHOsUcLT3mgwqoF9Q72nr22qf6uDwA483f2ksKR1O6Ul9
Z2z6kE/r86Y1BbCd1rVJohcretu5wDYbQoWVPATHZoCCBath/4BCqvWqqLCOEm/X
dF8bv3vuv3wCbfK8DxY7G4CeymlJivCBcp275s74DTkdKUqEPthSe3pddEXJfI1z
jEmXjRaIu/kfiGgSDy7AtL4pQESl9StABtnzNFIoVOTLvS+ckZV/KEkrfOS0N7kf
ej+PsPhCc/3q0Q5KwrjuMj46kv+/8+FXwHbW5rR6RLiKDKuLn7qYySFukF6UJ871
qqDMGU5401Rpf7a/QLhE8fohpL6eiWDv9nwXqbyg20+cCWfyeV8=
=Xiui
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119-done <at> debbugs.gnu.org:


Received: (at 65119-done) by debbugs.gnu.org; 20 Aug 2023 21:23:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 20 17:23:32 2023
Received: from localhost ([127.0.0.1]:54985 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXptT-00024E-Rt
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 17:23:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qXptR-00023v-7s
 for 65119-done <at> debbugs.gnu.org; Sun, 20 Aug 2023 17:23:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qXptI-0006ZK-PT; Sun, 20 Aug 2023 17:23:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=ZrgyG9XZxV7uZO8BJ1fpoWKryiqnPuHhzC/hxKNBaUc=; b=fzxnSc9cb9xr/LeoCykM
 zmKVipLWXQIZaJ63Onku9QrlD3WJiyrMe3AxeidwI4KPvGQKu3BdKAoX5iRMI9qR21CDHpE/Cal8k
 /5OHrRIESq0Ih7JCKHNWaUOq5590Of0gnRjBsZOVpk0udvD3/6502oDlrALtRSrV+/NRKY9jGD/XH
 nXyKPAImozIbXOi+gNumVsjPpFqLC9uMAAwn4SCvjpiTXIQIqK7UeS+oHrdrI58vEV50mE6eIuAMS
 kGL4FaJG4UgoY8C7fjTYClwO1BlySHuTpGXLioKNQirbGoyCi7A4ZFd+o3Qy/Tc86yZc3d7nJx87k
 CALu9cWkEfWArQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
References: <cover.1691355218.git.ludo@HIDDEN> <87ttt3a4tm.fsf@HIDDEN>
Date: Sun, 20 Aug 2023 23:23:17 +0200
In-Reply-To: <87ttt3a4tm.fsf@HIDDEN> (=?utf-8?B?IuWui+aWh+atpiIncw==?=
 message of "Sun, 13 Aug 2023 13:28:53 +0800")
Message-ID: <87h6otpfwa.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119-done
Cc: paren@HIDDEN, 65119-done <at> debbugs.gnu.org,
 Andrew Tropin <andrew@HIDDEN>
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: -3.3 (---)

Hi,

=E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> [...]
>>
>> This patch lets us map System services to Home and uses the new
>> mechanism for three services: mcron, dicod, and syncthing.
>>
>>   services: dicod: Remove Shepherd < 0.9.0 compatibility layer.
>>   services: dicod: Pre-build the GCIDE index.
>>   services: syncthing: Use 'match-record'.
>>   services: Define 'for-home'.
>>   home: services: Support mapping of System services to Home services.
>>   home: services: mcron: Define as a mapping of the system service.
>>   home: services: Add dicod.
>>   home: services: Add Syncthing.
>
> I didn't test them, but those changes look good to me!

Pushed as 7605c01fccb20b387f5a0d98d6b81074b3039e23, thanks for taking a
look!

Ludo=E2=80=99.




Notification sent to Ludovic Courtès <ludo@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 13 Aug 2023 05:29:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 13 01:29:08 2023
Received: from localhost ([127.0.0.1]:57947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qV3f2-0002ae-IM
	for submit <at> debbugs.gnu.org; Sun, 13 Aug 2023 01:29:08 -0400
Received: from mail.envs.net ([5.199.136.28]:60574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1qV3ez-0002aU-OE
 for 65119 <at> debbugs.gnu.org; Sun, 13 Aug 2023 01:29:07 -0400
Received: from localhost (mail.envs.net [127.0.0.1])
 by mail.envs.net (Postfix) with ESMTP id 6567E38A001D;
 Sun, 13 Aug 2023 05:29:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa;
 t=1691904543; bh=y1XrE34reDeE2Kktqn/wUYqmOPx5FPKmGL2K/I3V24Q=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Tjue6hkUz1P16sRMyVOcJ8p0ts0kwDrHLFb4d+rxZ4/OFYHOjsWjXajkjLF+cob6t
 BQnMRhfnUO7ihr5ZERpcYKe660u7HK/0CjpoMwTLDPAAqd89L6DEGIgGDmZ1uD2baG
 6X0iFEblQ1RKbvgGKQoqBnNpRAyE1kNXdHLustZHNVku9UN/sgXFZLqP8M3LoPf5eR
 x1cGn358qy0URe4QZwi5y3ukzfmmxeBpwXK6Yu4FcRHz9Rx0Xo+Cl9VPp+6FgJZWc0
 75G1zY2z7dQQYQ1fFRtNsn5NRw/CSCh+noSg8gPym2J1woHXiMPoyj7Vfkl10Wjx3u
 pLYvwoTmjZ0hx2wyWmwaZPE68ik9FzMUfsC9saHpZUF3metQpnxXcimU1z0E16fzdJ
 X8shSmZ0U7diY2e/XjsjP0cG3PSUkPVsINdlhmFD0FWFc1PbdKK3bOgZ4aFcphFJd/
 u9pQekeEEI9h7dMpc8VLSMyySyVkO5tZE7Wal+k583aP319yJ/u/cAOJmKo3/hsRa/
 S6F2y+P7TQkSFPz0/wYqItNZC032kOQgMoQ6dckn4gEseKYK8+FuGryt7jpuw7vsHY
 KDgvJVj3rTXD8opWC5WsJSTuUIcfqFvl7RVEk97IKEi8lwJvec0/Ish5eyB4KM8epK
 MHohMa6cNkAg6CHmOvI1nwy8=
X-Virus-Scanned: Debian amavisd-new at mail.envs.net
Received: from mail.envs.net ([127.0.0.1])
 by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Fas6H6-d13ws; Sun, 13 Aug 2023 05:28:56 +0000 (UTC)
Received: from localhost (unknown [36.170.59.125])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mail.envs.net (Postfix) with ESMTPSA;
 Sun, 13 Aug 2023 05:28:56 +0000 (UTC)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 0c945261;
 Sun, 13 Aug 2023 05:28:54 +0000 (UTC)
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#65119: [PATCH 0/8] Sharing service code between Home and
 System
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN> ("Ludovic =?utf-8?Q?Court?=
 =?utf-8?Q?=C3=A8s=22's?= message
 of "Sun, 6 Aug 2023 23:04:54 +0200")
References: <cover.1691355218.git.ludo@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Date: Sun, 13 Aug 2023 13:28:53 +0800
Message-ID: <87ttt3a4tm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65119
Cc: 65119 <at> debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>, paren@HIDDEN
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 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> [...]
>
> This patch lets us map System services to Home and uses the new
> mechanism for three services: mcron, dicod, and syncthing.
>
>   services: dicod: Remove Shepherd < 0.9.0 compatibility layer.
>   services: dicod: Pre-build the GCIDE index.
>   services: syncthing: Use 'match-record'.
>   services: Define 'for-home'.
>   home: services: Support mapping of System services to Home services.
>   home: services: mcron: Define as a mapping of the system service.
>   home: services: Add dicod.
>   home: services: Add Syncthing.

I didn't test them, but those changes look good to me!




Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:08 2023
Received: from localhost ([127.0.0.1]:60142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyt-0005jK-Vq
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54158)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyo-0005gt-A1
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyj-0001Qw-4E; Sun, 06 Aug 2023 17:07:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=PRWEc0ELfnr0sixGrxe0jZ+hbTqDRGNBJzcGfGpP1N8=; b=lUSgWnMdn/Bma0wZKSGo
 Fi7yH4xY1hknjb3kI790YFZy3Ng1qajU+K857/DrN9WymXl7sgKuAmV5Jvf7KlxsebEYhF0KiyzFr
 GCXvu1zKlVARX94dTZJ6gAJyydw0GQdi0haG2YuNSxQC/s50qbVanchc6FVU8N2a2zW7pCw6dcmkH
 S/OBGHkElJBlUQ0T3uzSmMieYTcJLO+uyIxSlmKZVBXUg8Cxvzayw8S+G+nwQhGbE8blrSBblPAwi
 Bxzo14kwazZ1rXEFQ/bCEdfYUyx06NhqBjnRAAMbmfRAyHFOsF3qAch3IsgeAPScjEI8LzfxZhbgm
 7+EsWjqE6wmFHA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 8/8] home: services: Add Syncthing.
Date: Sun,  6 Aug 2023 23:07:35 +0200
Message-ID: <cd291ee2ab9237a253a67b10d155a736404dcc30.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: ( <paren@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/home/services/syncthing.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/services/syncthing.scm (<syncthing-configuration>)[home-service?]:
New field.
Adjust 'provision' and 'requirement' depending on 'home-service?', and
likewise for #:user and #:group.
Use 'filter' + 'negate' instead of 'remove'.
* doc/guix.texi (Networking Services): Add note and cross-reference to
"Networking Home Services".
(Networking Home Services): New node.
---
 doc/guix.texi                   | 51 ++++++++++++++++++++++++++++++++-
 gnu/home/services/syncthing.scm | 30 +++++++++++++++++++
 gnu/local.mk                    |  1 +
 gnu/services/syncthing.scm      | 26 ++++++++++-------
 4 files changed, 97 insertions(+), 11 deletions(-)
 create mode 100644 gnu/home/services/syncthing.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index dd272636a3..a4993b7ae7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -446,6 +446,7 @@ Top
 * Mail: Mail Home Services.     Services for managing mail.
 * Messaging: Messaging Home Services.  Services for managing messaging.
 * Media: Media Home Services.   Services for managing media.
+* Networking: Networking Home Services.  Networking services.
 * Miscellaneous: Miscellaneous Home Services.  More services.
 
 Platforms
@@ -21226,6 +21227,8 @@ Networking Services
 @end table
 @end deftp
 
+@cindex Syncthing, file synchronization service
+@cindex backup service, Syncthing
 The @code{(gnu services syncthing)} module provides the following services:
 @cindex syncthing
 
@@ -21243,7 +21246,14 @@ Networking Services
          (syncthing-configuration (user "alice")))
 @end lisp
 
+@quotation Note
+This service is also available for Guix Home, where it runs directly
+with your user privileges (@pxref{Networking Home Services,
+@code{home-syncthing-service-type}}).
+@end quotation
+
 See below for details about @code{syncthing-configuration}.
+@end defvar
 
 @deftp {Data Type} syncthing-configuration
 Data type representing the configuration for @code{syncthing-service-type}.
@@ -21273,7 +21283,6 @@ Networking Services
 
 @end table
 @end deftp
-@end defvar
 
 Furthermore, @code{(gnu services ssh)} provides the following services.
 @cindex SSH
@@ -42620,6 +42629,7 @@ Home Services
 * Mail: Mail Home Services.     Services for managing mail.
 * Messaging: Messaging Home Services.  Services for managing messaging.
 * Media: Media Home Services.   Services for managing media.
+* Networking: Networking Home Services.  Networking services.
 * Miscellaneous: Miscellaneous Home Services.  More services.
 @end menu
 @c In addition to that Home Services can provide
@@ -44210,6 +44220,45 @@ Media Home Services
 @end table
 @end deftp
 
+@node Networking Home Services
+@subsection Networking Home Services
+
+This section lists services somewhat networking-related that you may use
+with Guix Home.
+
+@cindex Syncthing, file synchronization service
+@cindex backup service, Syncthing
+The @code{(gnu home services syncthing)} module provides a service to
+set up the @uref{Syncthing, https://syncthing.net} continuous file
+backup service.
+
+@defvar home-syncthing-service-type
+This is the service type for the @command{syncthing} daemon; it is the
+Home counterpart of the @code{syncthing-service-type} system service
+(@pxref{Networking Services, @code{syncthing-service-type}}).  The value
+for this service type is a @command{syncthing-configuration}.
+
+Here is how you would set it up with the default configuration:
+
+@lisp
+(service home-syncthing-service-type)
+@end lisp
+
+For a custom configuration, wrap you @code{syncthing-configuration} in
+@code{for-home}, as in this example:
+
+@lisp
+(service home-syncthing-service-type
+         (for-home
+          (syncthing-configuration (logflags 5))))
+@end lisp
+
+For details about @code{syncthing-configuration}, check out the
+documentation of the system service (@pxref{Networking Services,
+@code{syncthing-service-type}}).
+@end defvar
+
+
 @node Miscellaneous Home Services
 @subsection Miscellaneous Home Services
 
diff --git a/gnu/home/services/syncthing.scm b/gnu/home/services/syncthing.scm
new file mode 100644
index 0000000000..9c9eb94ea1
--- /dev/null
+++ b/gnu/home/services/syncthing.scm
@@ -0,0 +1,30 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu home services syncthing)
+  #:use-module (gnu services)
+  #:use-module (gnu home services)
+  #:use-module (gnu services syncthing)
+  #:export (home-syncthing-service-type)
+  #:re-export (syncthing-configuration
+               syncthing-configuration?))
+
+(define home-syncthing-service-type
+  (service-type
+   (inherit (system->home-service-type syncthing-service-type))
+   (default-value (for-home (syncthing-configuration)))))
diff --git a/gnu/local.mk b/gnu/local.mk
index b496b53a97..d98ecfb7b4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -104,6 +104,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/home/services/shepherd.scm		\
   %D%/home/services/sound.scm			\
   %D%/home/services/ssh.scm			\
+  %D%/home/services/syncthing.scm		\
   %D%/home/services/mcron.scm			\
   %D%/home/services/utils.scm			\
   %D%/home/services/xdg.scm			\
diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
index 8f94aef088..f97a1a2ff4 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -48,32 +48,38 @@ (define-record-type* <syncthing-configuration>
   (group     syncthing-configuration-group     ;string
              (default "users"))
   (home      syncthing-configuration-home      ;string
-             (default #f)))
+             (default #f))
+  (home-service? syncthing-configuration-home-service?
+                 (default for-home?) (innate)))
 
 (define syncthing-shepherd-service
   (match-record-lambda <syncthing-configuration>
-      (syncthing arguments logflags user group home)
+      (syncthing arguments logflags user group home home-service?)
     (list
      (shepherd-service
-      (provision (list (string->symbol (string-append "syncthing-" user))))
+      (provision (if home-service?
+                     '(syncthing)
+                     (list (string->symbol
+                            (string-append "syncthing-" user)))))
       (documentation "Run syncthing.")
-      (requirement '(loopback))
+      (requirement (if home-service? '() '(loopback)))
       (start #~(make-forkexec-constructor
                 (append (list (string-append #$syncthing "/bin/syncthing")
                               "-no-browser"
                               "-no-restart"
                               (string-append "-logflags=" (number->string #$logflags)))
                         '#$arguments)
-                #:user #$user
-                #:group #$group
+                #:user #$(and (not home-service?) user)
+                #:group #$(and (not home-service?) group)
                 #:environment-variables
                 (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user))))
                               "SSL_CERT_DIR=/etc/ssl/certs"
                               "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
-                        (remove (lambda (str)
-                                  (or (string-prefix? "HOME=" str)
-                                      (string-prefix? "SSL_CERT_DIR=" str)
-                                      (string-prefix? "SSL_CERT_FILE=" str)))
+                        (filter (negate       ;XXX: 'remove' is not in (guile)
+                                 (lambda (str)
+                                   (or (string-prefix? "HOME=" str)
+                                       (string-prefix? "SSL_CERT_DIR=" str)
+                                       (string-prefix? "SSL_CERT_FILE=" str))))
                                 (environ)))))
       (respawn? #f)
       (stop #~(make-kill-destructor))))))
-- 
2.41.0





Information forwarded to , guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:08 2023
Received: from localhost ([127.0.0.1]:60140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyt-0005jD-8g
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyn-0005gr-Ft
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyi-0001Qp-9F; Sun, 06 Aug 2023 17:07:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=c4P7TVcuWDK2DdSQqQmIsugTYHnFhBfLGlX+tQFE3E4=; b=SrwvsIS/PF9II1K1hE9Z
 qQg9iipF4AN/GP0hvnINFDZiwlhiPUGLCLbCFgyriw+O03cX6NGeU3xyTQybNXcmk8+NeXUvZ3yNq
 P5JqlDZjjOT3EVLyZoGj+7D1ELed0/qhjhgpOsqkRFt81feRBGKObcevjiMAr6WYVrQK1XjU7Eyt8
 gWxVUF1yTPhluzvePTuob1GYemshARLEwYXoE7UfjRxm+JfQ/yn9ZT0M1cp61SQym0tRStxmi6SUb
 gYHTLFXV4UDOIHOVBrtvGWsXKA4R+3kXFW2IHXjRM2iJZ4ZGyqmqoqzvN8oM1e/6a3jmV9ZRpk69k
 5ANwXJzfomAOfA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 7/8] home: services: Add dicod.
Date: Sun,  6 Aug 2023 23:07:34 +0200
Message-ID: <bdcd223fd6768fb4fe91f11912ae009e2b5dcd32.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: ( <paren@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/home/services/dict.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/services/dict.scm (<dicod-configuration>)[home-service?]: New
field.
(dicod-shepherd-service): Do not map /dev/log when 'home-service?' is
true.  Remove 'user-processes' requirement when 'home-service?' is
true.
(dicod-shepherd-service): Set #:user and #:group to #f when
'home-service?' is true.
* doc/guix.texi (Miscellaneous Home Services): New node.
(Miscellaneous Services): Add cross-reference.
---
 doc/guix.texi              | 45 ++++++++++++++++++++++++++++++++++++++
 gnu/home/services/dict.scm | 32 +++++++++++++++++++++++++++
 gnu/local.mk               |  1 +
 gnu/services/dict.scm      | 27 +++++++++++++++--------
 4 files changed, 96 insertions(+), 9 deletions(-)
 create mode 100644 gnu/home/services/dict.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 1d8ebcd72f..dd272636a3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -446,6 +446,7 @@ Top
 * Mail: Mail Home Services.     Services for managing mail.
 * Messaging: Messaging Home Services.  Services for managing messaging.
 * Media: Media Home Services.   Services for managing media.
+* Miscellaneous: Miscellaneous Home Services.  More services.
 
 Platforms
 
@@ -38723,6 +38724,12 @@ Miscellaneous Services
 You can add @command{open localhost} to your @file{~/.dico} file to make
 @code{localhost} the default server for @command{dico} client
 (@pxref{Initialization File,,, dico, GNU Dico Manual}).
+
+@quotation Note
+This service is also available for Guix Home, where it runs directly
+with your user privileges (@pxref{Miscellaneous Home Services,
+@code{home-dicod-service-type}}).
+@end quotation
 @end defvar
 
 @deftp {Data Type} dicod-configuration
@@ -42613,6 +42620,7 @@ Home Services
 * Mail: Mail Home Services.     Services for managing mail.
 * Messaging: Messaging Home Services.  Services for managing messaging.
 * Media: Media Home Services.   Services for managing media.
+* Miscellaneous: Miscellaneous Home Services.  More services.
 @end menu
 @c In addition to that Home Services can provide
 
@@ -44202,6 +44210,43 @@ Media Home Services
 @end table
 @end deftp
 
+@node Miscellaneous Home Services
+@subsection Miscellaneous Home Services
+
+This section lists Home services that lack a better place.
+
+@subsubheading Dictionary Service
+
+@cindex dictionary service, for Home
+The @code{(gnu home services dict)} module provides the following service:
+
+@defvar home-dicod-service-type
+This is the type of the service that runs the @command{dicod} daemon, an
+implementation of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}).
+
+You can add @command{open localhost} to your @file{~/.dico} file to make
+@code{localhost} the default server for @command{dico} client
+(@pxref{Initialization File,,, dico, GNU Dico Manual}).
+@end defvar
+
+This service is a direct mapping of the @code{dicod-service-type} system
+service (@pxref{Miscellaneous Services, Dictionary Service}).  You can
+use it like this:
+
+@lisp
+(service home-dicod-service-type)
+@end lisp
+
+You may specify a custom configuration by providing a
+@code{dicod-configuration} record, exactly like for
+@code{dicod-service-type}, but wrapping it in @code{for-home}:
+
+@lisp
+(service home-dicod-service-type
+         (for-home
+          (dicod-configuration @dots{})))
+@end lisp
+
 @node Invoking guix home
 @section Invoking @command{guix home}
 
diff --git a/gnu/home/services/dict.scm b/gnu/home/services/dict.scm
new file mode 100644
index 0000000000..b8a4653276
--- /dev/null
+++ b/gnu/home/services/dict.scm
@@ -0,0 +1,32 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Ludovic Courtès <ludo@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu home services dict)
+  #:use-module (gnu home services)
+  #:use-module (gnu services)
+  #:use-module (gnu services dict)
+  #:use-module ((gnu system shadow) #:select (account-service-type))
+  #:export (home-dicod-service-type)
+  #:re-export (dicod-configuration))
+
+(define home-dicod-service-type
+  (service-type
+   (inherit (system->home-service-type
+             (remove-service-extensions dicod-service-type
+                                        (list account-service-type))))
+   (default-value (for-home (dicod-configuration)))))
diff --git a/gnu/local.mk b/gnu/local.mk
index f10713f126..b496b53a97 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -91,6 +91,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/home.scm					\
   %D%/home/services.scm			\
   %D%/home/services/desktop.scm			\
+  %D%/home/services/dict.scm			\
   %D%/home/services/symlink-manager.scm		\
   %D%/home/services/fontutils.scm		\
   %D%/home/services/gnupg.scm			\
diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm
index f542921302..a4e25f5302 100644
--- a/gnu/services/dict.scm
+++ b/gnu/services/dict.scm
@@ -56,7 +56,9 @@ (define-record-type* <dicod-configuration>
   (handlers    dicod-configuration-handlers       ;list of <dicod-handler>
                (default '()))
   (databases   dicod-configuration-databases      ;list of <dicod-database>
-               (default (list %dicod-database:gcide))))
+               (default (list %dicod-database:gcide)))
+  (home-service? dicod-configuration-home-service? ;boolean
+                 (default for-home?) (innate)))
 
 (define-record-type* <dicod-handler>
   dicod-handler make-dicod-handler
@@ -152,20 +154,26 @@ (define (dicod-configuration-file config)
 (define (dicod-shepherd-service config)
   (let* ((dicod.conf (dicod-configuration-file config))
          (interfaces (dicod-configuration-interfaces config))
+         (home-service? (dicod-configuration-home-service? config))
+         (mappings  `(,@(if home-service?
+                            '()
+                            (list (file-system-mapping
+                                   (source "/dev/log")
+                                   (target source))))
+                      ,(file-system-mapping
+                        (source dicod.conf)
+                        (target source))))
          (dicod      (least-authority-wrapper
                       (file-append (dicod-configuration-dico config)
                                    "/bin/dicod")
                       #:name "dicod"
-                      #:mappings (list (file-system-mapping
-                                        (source "/dev/log")
-                                        (target source))
-                                       (file-system-mapping
-                                        (source dicod.conf)
-                                        (target source)))
+                      #:mappings mappings
                       #:namespaces (delq 'net %namespaces))))
     (list (shepherd-service
            (provision '(dicod))
-           (requirement '(user-processes))
+           (requirement (if home-service?
+                            '()
+                            '(user-processes)))
            (documentation "Run the dicod daemon.")
            (start #~(make-inetd-constructor
                      (list #$dicod "--inetd" "--foreground"
@@ -176,7 +184,8 @@ (define (dicod-shepherd-service config)
                               (car (getaddrinfo interface "dict")))))
                           '#$interfaces)
                      #:requirements '#$requirement
-                     #:user "dicod" #:group "dicod"
+                     #:user #$(and (not home-service?) "dicod")
+                     #:group #$(and (not home-service?) "dicod")
                      #:service-name-stem "dicod"))
            (stop #~(make-inetd-destructor))
            (actions (list (shepherd-configuration-action dicod.conf)))))))
-- 
2.41.0





Information forwarded to , guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:07 2023
Received: from localhost ([127.0.0.1]:60138 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkys-0005jA-E5
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:07 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54140)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkym-0005gp-Jv
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyh-0001Qc-Dz; Sun, 06 Aug 2023 17:07:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=ETOIUMrTkUZoCm7DeL/5iMayIzi3BLCgHYt6kxTyd5c=; b=BbHatuEglK5X3xGJ8rYV
 +/GBonmx7IY5v+J80dE67mtN+a2hj8S+8rx4zGOFi66Xp0yNoxFsLSu2RLux1Yvwanw+beXOOKu8o
 ewcg5m3lmDw6ZxUMtDaunMcJr6pl/oCqv/UoE4/3E2iusGxjGwf8wqbRxotEOtDvrkNiGF7M7vGf8
 A2IXwqMSLQ3w2SySZoBQcLECSBObNl+lsbNut8UEhUecjFXw9nSc3MecEZ9NVzfmU4e8ab1xv6BcS
 q955PHdfTg+vLAb9ZVdNVsoJIO1qzw9SPZcpwG/0RqNUnG2yrjH2nOxBkDti7TOh7asxQaWq7OMLH
 WwDxEkj5sJUwhA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 6/8] home: services: mcron: Define as a mapping of the system
 service.
Date: Sun,  6 Aug 2023 23:07:33 +0200
Message-ID: <319a7664fdf2b910f4183ce3c748234a8763e107.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: ( <paren@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/services/mcron.scm (list-of-gexps?): Remove.
(<mcron-configuration>): Rewrite using 'define-record-type*'.
[home-service?]: New field.
[log-file]: Make thunked and changed default value.
(mcron-shepherd-services): Honor 'home-service?' and remove use of
'maybe-value-set?'.
(mcron-service-type): Inherit 'home-service?' from CONFIG.
(generate-doc): Remove.
* gnu/home/services/mcron.scm (list-of-gexp?)
(<home-mcron-configuration>, job-files, shepherd-schedule-action)
(home-mcron-shepherd-services, home-mcron-profile)
(home-mcron-extend, generate-doc): Remove.
(home-mcron-configuration): Turn into a macro.
(home-mcron-service-type): Define in terms of
'system->home-service-type'.
<top level>: Add service type mapping.
---
 gnu/home/services/mcron.scm | 96 ++++---------------------------------
 gnu/services/mcron.scm      | 80 ++++++++++++++-----------------
 2 files changed, 45 insertions(+), 131 deletions(-)

diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm
index f51edd6634..23be44ba07 100644
--- a/gnu/home/services/mcron.scm
+++ b/gnu/home/services/mcron.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2021, 2023 Andrew Tropin <andrew@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
+;;; Copyright © 2023 Ludovic Courtès <ludo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,16 +20,9 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu home services mcron)
-  #:use-module (gnu packages guile-xyz)
   #:use-module (gnu home services)
-  #:use-module (gnu services configuration)
-  #:use-module (gnu services shepherd)
   #:use-module (gnu home services shepherd)
-  #:use-module (guix records)
-  #:use-module (guix gexp)
-  #:use-module (srfi srfi-1)
-  #:use-module (ice-9 match)
-
+  #:use-module (gnu services mcron)               ;for the service mapping
   #:export (home-mcron-configuration
             home-mcron-service-type))
 
@@ -55,86 +49,16 @@ (define-module (gnu home services mcron)
 ;;
 ;;; Code:
 
-(define list-of-gexps?
-  (list-of gexp?))
-
-(define-configuration/no-serialization home-mcron-configuration
-  (mcron (file-like mcron) "The mcron package to use.")
-  (jobs
-   (list-of-gexps '())
-   "This is a list of gexps (@pxref{G-Expressions}), where each gexp
-corresponds to an mcron job specification (@pxref{Syntax, mcron job
-specifications,, mcron, GNU@tie{}mcron}).")
-  (log? (boolean #t) "Log messages to standard output.")
-  (log-format
-   (string "~1@*~a ~a: ~a~%")
-   "@code{(ice-9 format)} format string for log messages.  The default value
-produces messages like \"@samp{@var{pid} @var{name}:
-@var{message}\"} (@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcron}).
-Each message is also prefixed by a timestamp by GNU Shepherd."))
-
-(define job-files (@@ (gnu services mcron) job-files))
-(define shepherd-schedule-action
-  (@@ (gnu services mcron) shepherd-schedule-action))
-
-(define (home-mcron-shepherd-services config)
-  (match-record config <home-mcron-configuration>
-    (mcron jobs log? log-format)
-    (if (null? jobs)
-        '()                                       ;no jobs to run
-        (let ((files (job-files mcron jobs)))
-          (list (shepherd-service
-                 (documentation "User cron jobs.")
-                 (provision '(mcron))
-                 (modules `((srfi srfi-1)
-                            (srfi srfi-26)
-                            (ice-9 popen)         ;for the 'schedule' action
-                            (ice-9 rdelim)
-                            (ice-9 match)
-                            ,@%default-modules))
-                 (start #~(make-forkexec-constructor
-                           (list (string-append #$mcron "/bin/mcron")
-                                 #$@(if log?
-                                        #~("--log" "--log-format" #$log-format)
-                                        #~())
-                                 #$@files)
-                           #:log-file (string-append
-                                       (or (getenv "XDG_STATE_HOME")
-                                           (format #f "~a/.local/state"
-                                                   (getenv "HOME")))
-                                       "/log/mcron.log")))
-                 (stop #~(make-kill-destructor))
-                 (actions
-                  (list (shepherd-schedule-action mcron files)))))))))
-
-(define home-mcron-profile (compose list home-mcron-configuration-mcron))
-
-(define (home-mcron-extend config jobs)
-  (home-mcron-configuration
-   (inherit config)
-   (jobs (append (home-mcron-configuration-jobs config)
-                 jobs))))
+(define-syntax-rule (home-mcron-configuration fields ...)
+  ;; Macro provided for backward compatibility.
+  (for-home (mcron-configuration fields ...)))
 
 (define home-mcron-service-type
-  (service-type (name 'home-mcron)
-                (extensions
-                 (list (service-extension
-                        home-shepherd-service-type
-                        home-mcron-shepherd-services)
-                       (service-extension
-                        home-profile-service-type
-                        home-mcron-profile)))
-                (compose concatenate)
-                (extend home-mcron-extend)
-                (default-value (home-mcron-configuration))
-                (description
-                 "Install and configure the GNU mcron cron job manager.")))
+  (service-type
+   (inherit (system->home-service-type mcron-service-type))
+   (default-value (for-home (mcron-configuration)))))
 
-
-;;;
-;;; Generate documentation.
-;;;
-(define (generate-doc)
-  (configuration->documentation 'home-mcron-configuration))
+(define-service-type-mapping
+  mcron-service-type => home-mcron-service-type)
 
 ;;; mcron.scm ends here
diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm
index 2ef5980e09..db8b539ff5 100644
--- a/gnu/services/mcron.scm
+++ b/gnu/services/mcron.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2016-2020, 2023 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN>
 ;;;
@@ -20,10 +20,8 @@
 
 (define-module (gnu services mcron)
   #:use-module (gnu services)
-  #:use-module (gnu services configuration)
   #:use-module (gnu services shepherd)
   #:use-module (gnu packages guile-xyz)
-  #:use-module (guix deprecation)
   #:use-module (guix records)
   #:use-module (guix gexp)
   #:use-module (srfi srfi-1)
@@ -37,6 +35,7 @@ (define-module (gnu services mcron)
             mcron-configuration-log-file
             mcron-configuration-log-format
             mcron-configuration-date-format
+            mcron-configuration-home-service?
 
             mcron-service-type))
 
@@ -55,40 +54,34 @@ (define-module (gnu services mcron)
 ;;;
 ;;; Code:
 
-(define list-of-gexps?
-  (list-of gexp?))
+;; Configuration of mcron.
+;; XXX: 'define-configuration' cannot be used here due to the need for
+;; 'thunked' and 'innate' fields as well as 'this-mcron-configuration'.
+(define-record-type* <mcron-configuration> mcron-configuration
+  make-mcron-configuration
+  mcron-configuration?
+  this-mcron-configuration
 
-(define-maybe/no-serialization string)
+  (mcron       mcron-configuration-mcron          ;file-like
+               (default mcron))
+  (jobs        mcron-configuration-jobs           ;list of gexps
+               (default '()))
+  (log?        mcron-configuration-log?           ;Boolean
+               (default #t))
+  (log-file    mcron-configuration-log-file       ;string | gexp
+               (thunked)
+               (default
+                 (if (mcron-configuration-home-service?
+                      this-mcron-configuration)
+                     #~(string-append %user-log-dir "/mcron.log")
+                     "/var/log/mcron.log")))
+  (log-format  mcron-configuration-log-format     ;string
+               (default "~1@*~a ~a: ~a~%"))
+  (date-format mcron-configuration-date-format    ;string | #f
+               (default #f))
 
-(define-configuration/no-serialization mcron-configuration
-  (mcron
-   (file-like mcron)
-   "The mcron package to use.")
-
-  (jobs
-   (list-of-gexps '())
-   "This is a list of gexps (@pxref{G-Expressions}), where each gexp
-corresponds to an mcron job specification (@pxref{Syntax, mcron job
-specifications,, mcron, GNU@tie{}mcron}).")
-
-  (log?
-   (boolean #t)
-   "Log messages to standard output.")
-
-  (log-file
-   (string "/var/log/mcron.log")
-   "Log file location.")
-
-  (log-format
-   (string "~1@*~a ~a: ~a~%")
-   "@code{(ice-9 format)} format string for log messages.  The default value
-produces messages like @samp{@var{pid} @var{name}: @var{message}}
-(@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcron}).
-Each message is also prefixed by a timestamp by GNU Shepherd.")
-
-  (date-format
-   maybe-string
-   "@code{(srfi srfi-19)} format string for date."))
+  (home-service? mcron-configuration-home-service?
+                 (default for-home?) (innate)))
 
 (define (job-files mcron jobs)
   "Return a list of file-like object for JOBS, a list of gexps."
@@ -158,13 +151,15 @@ (define (shepherd-schedule-action mcron files)
 
 (define (mcron-shepherd-services config)
   (match-record config <mcron-configuration>
-    (mcron jobs log? log-file log-format date-format)
+    (mcron jobs log? log-file log-format date-format home-service?)
     (if (eq? jobs '())
         '()                             ;nothing to do
         (let ((files (job-files mcron jobs)))
           (list (shepherd-service
                  (provision '(mcron))
-                 (requirement '(user-processes))
+                 (requirement (if home-service?
+                                  '()
+                                  '(user-processes)))
                  (modules `((srfi srfi-1)
                             (srfi srfi-26)
                             (ice-9 popen) ;for the 'schedule' action
@@ -175,7 +170,7 @@ (define (mcron-shepherd-services config)
                            (list #$(file-append mcron "/bin/mcron")
                                  #$@(if log?
                                         `("--log" "--log-format" ,log-format
-                                          ,@(if (maybe-value-set? date-format)
+                                          ,@(if date-format
                                                 (list "--date-format"
                                                       date-format)
                                                 '()))
@@ -209,15 +204,10 @@ (define mcron-service-type
                 (extend (lambda (config jobs)
                           (mcron-configuration
                            (inherit config)
+                           (home-service?
+                            (mcron-configuration-home-service? config))
                            (jobs (append (mcron-configuration-jobs config)
                                          jobs)))))
                 (default-value (mcron-configuration)))) ;empty job list
 
-
-;;;
-;;; Generate documentation.
-;;;
-(define (generate-doc)
-  (configuration->documentation 'mcron-configuration))
-
 ;;; mcron.scm ends here
-- 
2.41.0





Information forwarded to , guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:03 2023
Received: from localhost ([127.0.0.1]:60129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyo-0005i0-9R
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54138)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyl-0005go-Ps
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyg-0001PC-K1; Sun, 06 Aug 2023 17:07:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=p0zm6S+NSAKCFH6tPJFwFQZFE5R75Sv82JSMbkDEkg0=; b=ix3QbJUSs+FFupPilZd0
 Tx3QRlU3QwY+YW+wsYjhq7R65mEE1PEB/nre7Oy/WrjiVpEAlHYovLCHg2iXfqjWtVcQM9pM5z5Or
 AiF1jh3CSc0NDFmh0EtPpmpSwSDy7ZGD4pdmH3/7WkA+3re/a4jQZgpDCcpybOcvxvs0YZxqokHRX
 GiSCn2bdS5KjBWtaagkrpQFpgOOK7AFHk4CJ6eBxqlsXJuel6Yo2klMCP5jvpzAEDmOlrv1yJNLly
 7xkd7pJ+jEIkEVPEDuYCxLVpmMq42G/4R94x2wrRWxYaO7fbgEgyz0f3YHr1W0jJJQ6mipyKNfZzm
 mvw5jGjjgu8Dtw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 5/8] home: services: Support mapping of System services to
 Home services.
Date: Sun,  6 Aug 2023 23:07:32 +0200
Message-ID: <2e33f4ce62f4238a147e1bac16302751efe69c26.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: ( <paren@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/home/services.scm (service-type-mapping)
(system->home-service-type): New procedures.
(define-service-type-mapping, define-service-type-mappings): New macros.
(%system/home-service-type-mapping): New variable.
<top level>: Use 'define-service-type-mappings'.
* gnu/home/services/shepherd.scm <top level>: Likewise.
---
 gnu/home/services.scm          | 69 +++++++++++++++++++++++++++++++++-
 gnu/home/services/shepherd.scm |  4 +-
 2 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 042eba4780..8d53f2f4d3 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -33,6 +33,7 @@ (define-module (gnu home services)
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
   #:use-module (guix modules)
+  #:use-module (guix memoization)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (ice-9 match)
@@ -63,11 +64,16 @@ (define-module (gnu home services)
             lookup-home-service-types
             home-provenance
 
+            define-service-type-mapping
+            system->home-service-type
+
             %initialize-gettext)
 
   #:re-export (service
                service-type
-               service-extension))
+               service-extension
+               for-home
+               for-home?))
 
 ;;; Comment:
 ;;;
@@ -513,6 +519,67 @@ (define home-activation-service-type
 reconfiguration or generation switching.  This service can be extended
 with one gexp, but many times, and all gexps must be idempotent.")))
 
+
+;;;
+;;; Service type graph rewriting.
+;;;
+
+(define (service-type-mapping proc)
+  "Return a procedure that applies PROC to map a service type graph to another
+one."
+  (define (rewrite extension)
+    (match (proc (service-extension-target extension))
+      (#f #f)
+      (target
+       (service-extension target
+                          (service-extension-compute extension)))))
+
+  (define replace
+    (mlambdaq (type)
+      (service-type
+       (inherit type)
+       (name (symbol-append 'home- (service-type-name type)))
+       (location (service-type-location type))
+       (extensions (filter-map rewrite (service-type-extensions type))))))
+
+  replace)
+
+(define %system/home-service-type-mapping
+  ;; Mapping of System to Home services.
+  (make-hash-table))
+
+(define system->home-service-type
+  ;; Map the given System service type to the corresponding Home service type.
+  (let ()
+    (define (replace type)
+      (define replacement
+        (hashq-ref %system/home-service-type-mapping type
+                   *unspecified*))
+
+      (if (eq? replacement *unspecified*)
+          type
+          replacement))
+
+    (service-type-mapping replace)))
+
+(define-syntax define-service-type-mapping
+  (syntax-rules (=>)
+    ((_ system-type => home-type)
+     (hashq-set! %system/home-service-type-mapping
+                 system-type home-type))))
+
+(define-syntax define-service-type-mappings
+  (syntax-rules (=>)
+    ((_ (system-type => home-type) ...)
+     (begin
+       (define-service-type-mapping system-type => home-type)
+       ...))))
+
+(define-service-type-mappings
+  (system-service-type => home-service-type)
+  (activation-service-type => home-activation-service-type)
+  (profile-service-type => home-profile-service-type))
+
 
 ;;;
 ;;; On-change.
diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm
index 5585ef61b2..bd068c37fc 100644
--- a/gnu/home/services/shepherd.scm
+++ b/gnu/home/services/shepherd.scm
@@ -141,7 +141,7 @@ (define (ensure-shepherd-gexp config)
 (define (shepherd-xdg-configuration-files config)
   `(("shepherd/init.scm" ,(home-shepherd-configuration-file config))))
 
-(define-public home-shepherd-service-type
+(define home-shepherd-service-type
   (service-type (name 'home-shepherd)
                 (extensions
                  (list (service-extension
@@ -168,4 +168,6 @@ (define-public home-shepherd-service-type
                 (default-value (home-shepherd-configuration))
                 (description "Configure and install userland Shepherd.")))
 
+(define-service-type-mapping
+  shepherd-root-service-type => home-shepherd-service-type)
 
-- 
2.41.0





Information forwarded to , guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:02 2023
Received: from localhost ([127.0.0.1]:60125 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyn-0005hi-EI
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyl-0005gm-0A
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:07:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyf-0001Ng-Qj; Sun, 06 Aug 2023 17:07:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=/Btq3TtWdV19hY1AtBQ5dUB+m9VRSrUjVIlM9vD5JuI=; b=K/EfFxnDnHlVLFwt4LzJ
 eEW7h/wVS1sep8voj0j0pz5I2NVwDtol2+EDHBvOnyGkG3YFtTX4DlRkGwEnryZZPnTK3Yff0bQuv
 UzOCP9g2Yu2UWQvLDTfBKD2ny0Wxgdr4cqbBhG7LaYTV53CqtTfbILpt2IYMULIHpi1dkDWdW9Zy2
 AclULHn+oe4dyOCfj0v9vVOPxR9+20UwHsOn+dB0A7O5cVupgczoDenhEjlFT0hAXZznbu3BeCkYD
 tIxKvqBgLJQyBYRco7tJCG0Fq7GrCOfysV9yPFGNFL/kdw37ZSqo3MCXEfz3WSsuYWpYu+b73HJsb
 qSDfCcdmn3hqFw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 4/8] services: Define 'for-home'.
Date: Sun,  6 Aug 2023 23:07:31 +0200
Message-ID: <55a8ef59696bd6f80da9e1bc5f8ca940df11eda6.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/services.scm (remove-service-extensions): New procedure.
(for-home?): New syntax parameter.
(for-home): New macro.
---
 gnu/services.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 109e050a23..eb9258977e 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015-2022 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2015-2023 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2016 Chris Marusich <cmmarusich@HIDDEN>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
 ;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@HIDDEN>
@@ -86,6 +86,10 @@ (define-module (gnu services)
             instantiate-missing-services
             fold-services
 
+            remove-service-extensions
+            for-home
+            for-home?
+
             service-error?
             missing-value-service-error?
             missing-value-service-error-type
@@ -1225,4 +1229,23 @@ (define* (fold-services services
                            (G_ "more than one target service of type '~a'")
                            (service-type-name target-type)))))))))
 
+(define (remove-service-extensions type lst)
+  "Return TYPE, a service type, without any of the service extensions
+targeting one of the types in LST."
+  (service-type
+   (inherit type)
+   (extensions (remove (lambda (extension)
+                         (memq (service-extension-target extension) lst))
+                       (service-type-extensions type)))))
+
+(define-syntax-parameter for-home?
+  ;; Whether the configuration being defined is for a Home service.
+  (identifier-syntax #f))
+
+(define-syntax-rule (for-home exp ...)
+  "Mark EXP, which typically defines a service configuration, as targeting a
+Home service rather than a System service."
+  (syntax-parameterize ((for-home? (identifier-syntax #t)))
+    exp ...))
+
 ;;; services.scm ends here.
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:01 2023
Received: from localhost ([127.0.0.1]:60123 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyn-0005hc-3Q
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyk-0005gk-5C
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:07:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkye-0001Lj-VZ; Sun, 06 Aug 2023 17:07:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=nDdToZxcfux/1RriOpjxjYDPb3Xi/MYRkq3pJUezDMc=; b=hG+oYRDwL/S23930QocJ
 UsPPusYrNftgepUPULAnBuWgYa4mdqlhjaaL2+7P7xHvkiO33Is2AB2JrIc82KZzBOz5ErMxRlZ1o
 6Df1BQzlGJDJlxAU9UkmF1Wy7UPVMpF/oTIP3C0oPrhp4CSxbpob4E1vCM+swxUEeiZBkDb+/6iY/
 v3YB43yWlpSmcRwHmg12tEnZqgQp8pL2A9Yo/ezhBtEZrZoSIWjYMBzascEKYW33l6qr3MLJQn/9Y
 l3ABSDbDOEs1E6EK8qeYSY3cTuJTdWsv9kUx49ky/se9joKd09eeYw7wZpFUp4dcolxis/TK5W5z7
 FnD3jRKKHMr3Xg==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 3/8] services: syncthing: Use 'match-record'.
Date: Sun,  6 Aug 2023 23:07:30 +0200
Message-ID: <c9d4ff85ef4a02899d8e8fa2c952d1d3d0dd16ee.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/services/syncthing.scm (syncthing-shepherd-service): Use
'match-record-lambda' instead of 'match-lambda'.
---
 gnu/services/syncthing.scm | 52 +++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
index 7c3d5b027d..8f94aef088 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -51,32 +51,32 @@ (define-record-type* <syncthing-configuration>
              (default #f)))
 
 (define syncthing-shepherd-service
-  (match-lambda
-    (($ <syncthing-configuration> syncthing arguments logflags user group home)
-     (list
-      (shepherd-service
-       (provision (list (string->symbol (string-append "syncthing-" user))))
-       (documentation "Run syncthing.")
-       (requirement '(loopback))
-       (start #~(make-forkexec-constructor
-                 (append (list (string-append #$syncthing "/bin/syncthing")
-                               "-no-browser"
-                               "-no-restart"
-                               (string-append "-logflags=" (number->string #$logflags)))
-                         '#$arguments)
-                 #:user #$user
-                 #:group #$group
-                 #:environment-variables
-                 (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user))))
-                               "SSL_CERT_DIR=/etc/ssl/certs"
-                               "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
-                         (remove (lambda (str)
-                                   (or (string-prefix? "HOME=" str)
-                                       (string-prefix? "SSL_CERT_DIR=" str)
-                                       (string-prefix? "SSL_CERT_FILE=" str)))
-                                 (environ)))))
-       (respawn? #f)
-       (stop #~(make-kill-destructor)))))))
+  (match-record-lambda <syncthing-configuration>
+      (syncthing arguments logflags user group home)
+    (list
+     (shepherd-service
+      (provision (list (string->symbol (string-append "syncthing-" user))))
+      (documentation "Run syncthing.")
+      (requirement '(loopback))
+      (start #~(make-forkexec-constructor
+                (append (list (string-append #$syncthing "/bin/syncthing")
+                              "-no-browser"
+                              "-no-restart"
+                              (string-append "-logflags=" (number->string #$logflags)))
+                        '#$arguments)
+                #:user #$user
+                #:group #$group
+                #:environment-variables
+                (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user))))
+                              "SSL_CERT_DIR=/etc/ssl/certs"
+                              "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
+                        (remove (lambda (str)
+                                  (or (string-prefix? "HOME=" str)
+                                      (string-prefix? "SSL_CERT_DIR=" str)
+                                      (string-prefix? "SSL_CERT_FILE=" str)))
+                                (environ)))))
+      (respawn? #f)
+      (stop #~(make-kill-destructor))))))
 
 (define syncthing-service-type
   (service-type (name 'syncthing)
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:08:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:08:00 2023
Received: from localhost ([127.0.0.1]:60117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyl-0005hD-Fa
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:08:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54108)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyj-0005gi-B8
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:07:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkye-0001LK-5L; Sun, 06 Aug 2023 17:07:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=s4WQB/tfmyS1mU3k9b5GTVQlS/7665GzIsiFRmxmjXQ=; b=FQO8bRCN/15jgvW6vXmM
 n0Bcmorbmm42Ur+mYo+ptB9fwFW5/Rz8ofyhI+ogSXpoLrR2vJDBpEz21Zkx27OaFWZ2l8rYJdjUk
 5WJImPVgIRz5DiUtSK36G6TSq12gOVsUyasMAoQaZD2/vhGFMyz3BG+RkUy8wWp1cxeaW4duoCUG2
 8IJwbZEyoCEGRgbqYqpmQ2roYhP0T44U4tKknRd+zbAs8JUs3KInqgWrk/33+YS1kLQVnRGXTOyGQ
 b8jtquu3gfLNtI5YoPllSuQwC2cHRck2t9qARxTkHDauLlkagzBUVjpAMCZaiLDY5CGqsO4EvGHJK
 VK1OYbm3qSqi7Q==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 2/8] services: dicod: Pre-build the GCIDE index.
Date: Sun,  6 Aug 2023 23:07:29 +0200
Message-ID: <e885dd784b857cf88c5bed519e91d3856248b805.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/services/dict.scm (%dicod-gcide-index): New variable.
(%dicod-database:gcide): Use it.
(%dicod-activation): Remove.
(dicod-shepherd-service): Remove reference to /var/run/dicod.
(dicod-service-type): Remove ACTIVATION-SERVICE-TYPE extension.
---
 gnu/services/dict.scm | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm
index 7d48953ef1..f542921302 100644
--- a/gnu/services/dict.scm
+++ b/gnu/services/dict.scm
@@ -73,12 +73,24 @@ (define-record-type* <dicod-database>
   (complex?    dicod-database-complex?       (default #f))
   (options     dicod-database-options        (default '())))
 
+(define %dicod-gcide-index
+  ;; The GCIDE pre-built index.  The Dico 'gcide' module can build it lazily;
+  ;; do it upfront so there's no need for a writable directory at run-time.
+  (computed-file "dicod-gcide-index"
+                 (with-imported-modules '((guix build utils))
+                   #~(begin
+                       (use-modules (guix build utils))
+                       (mkdir #$output)
+                       (invoke #+(file-append dico "/libexec/idxgcide")
+                               #+(file-append gcide "/share/gcide")
+                               #$output)))))
+
 (define %dicod-database:gcide
   (dicod-database
    (name "gcide")
    (handler "gcide")
    (options (list #~(string-append "dbdir=" #$gcide "/share/gcide")
-                  "idxdir=/var/run/dicod"))))
+                  #~(string-append "idxdir=" #$%dicod-gcide-index)))))
 
 (define %dicod-accounts
   (list (user-group
@@ -137,14 +149,6 @@ (define (dicod-configuration-file config)
 
   (apply mixed-text-file "dicod.conf" (configuration->text config)))
 
-(define %dicod-activation
-  #~(begin
-      (use-modules (guix build utils))
-      (let ((user   (getpwnam "dicod"))
-            (rundir "/var/run/dicod"))
-        (mkdir-p rundir)
-        (chown rundir (passwd:uid user) (passwd:gid user)))))
-
 (define (dicod-shepherd-service config)
   (let* ((dicod.conf (dicod-configuration-file config))
          (interfaces (dicod-configuration-interfaces config))
@@ -153,10 +157,6 @@ (define (dicod-shepherd-service config)
                                    "/bin/dicod")
                       #:name "dicod"
                       #:mappings (list (file-system-mapping
-                                        (source "/var/run/dicod")
-                                        (target source)
-                                        (writable? #t))
-                                       (file-system-mapping
                                         (source "/dev/log")
                                         (target source))
                                        (file-system-mapping
@@ -187,8 +187,6 @@ (define dicod-service-type
    (extensions
     (list (service-extension account-service-type
                              (const %dicod-accounts))
-          (service-extension activation-service-type
-                             (const %dicod-activation))
           (service-extension shepherd-root-service-type
                              dicod-shepherd-service)))
    (default-value (dicod-configuration))
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at 65119 <at> debbugs.gnu.org:


Received: (at 65119) by debbugs.gnu.org; 6 Aug 2023 21:07:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:07:59 2023
Received: from localhost ([127.0.0.1]:60113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkyk-0005hA-VN
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:07:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkyj-0005gh-1H
 for 65119 <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:07:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkyd-0001KF-Bg; Sun, 06 Aug 2023 17:07:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=f0S4euUQyfFc7dsUsVwhlg2qZBLmprMXarjNkyW8rFM=; b=WBEDwVTD0K3Y/mj8y1vv
 bhoIybbpzZb3SOlVuGDkwv0I+clb2uHQ6ynG1FJxrRpxC6nd7zGYR0F/1qyIbKMFHxWRdNPmxhzLu
 G/9X4Cl/PhlRBJot5PRaPsgoymnJOrAK4/6fc2CXI3s3RfnJcH3jQ68ANVrahAz5y/pHXBLJvwR6S
 +r1gQgIaOCtaX0O1h/FLFoaJ4pJrnj/2CSqmvrhG2Av6Qc+1SwQYZmpd5wW8baBOu9oBzI6fDh0/j
 hsKodjPNI45jqmQskybjDLWVTnQsLt6F/hfzCuyw1AKLpRkXyoAT9SDJxNuuhizvEBKOv2Gp3SNvO
 6qYgBQnmNh406w==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 65119 <at> debbugs.gnu.org
Subject: [PATCH 1/8] services: dicod: Remove Shepherd < 0.9.0 compatibility
 layer.
Date: Sun,  6 Aug 2023 23:07:28 +0200
Message-ID: <5301257cba680ba2d4ab7115c1712090276a1f46.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <cover.1691355218.git.ludo@HIDDEN>
References: <cover.1691355218.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65119
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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: -3.3 (---)

* gnu/services/dict.scm (dicod-shepherd-service): Use
'make-inetd-constructor' and 'make-inetd-destructor' unconditionally.
---
 gnu/services/dict.scm | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm
index 23e1d36364..7d48953ef1 100644
--- a/gnu/services/dict.scm
+++ b/gnu/services/dict.scm
@@ -167,25 +167,18 @@ (define (dicod-shepherd-service config)
            (provision '(dicod))
            (requirement '(user-processes))
            (documentation "Run the dicod daemon.")
-           (start #~(if (defined? 'make-inetd-constructor)
-                        (make-inetd-constructor
-                         (list #$dicod "--inetd" "--foreground"
-                               (string-append "--config=" #$dicod.conf))
-                         (map (lambda (interface)
-                                (endpoint
-                                 (addrinfo:addr
-                                  (car (getaddrinfo interface "dict")))))
-                              '#$interfaces)
-                         #:requirements '#$requirement
-                         #:user "dicod" #:group "dicod"
-                         #:service-name-stem "dicod")
-                        (make-forkexec-constructor
-                         (list #$dicod "--foreground"
-                               (string-append "--config=" #$dicod.conf))
-                         #:user "dicod" #:group "dicod")))
-           (stop #~(if (defined? 'make-inetd-destructor)
-                       (make-inetd-destructor)
-                       (make-kill-destructor)))
+           (start #~(make-inetd-constructor
+                     (list #$dicod "--inetd" "--foreground"
+                           (string-append "--config=" #$dicod.conf))
+                     (map (lambda (interface)
+                            (endpoint
+                             (addrinfo:addr
+                              (car (getaddrinfo interface "dict")))))
+                          '#$interfaces)
+                     #:requirements '#$requirement
+                     #:user "dicod" #:group "dicod"
+                     #:service-name-stem "dicod"))
+           (stop #~(make-inetd-destructor))
            (actions (list (shepherd-configuration-action dicod.conf)))))))
 
 (define dicod-service-type
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Aug 2023 21:05:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 17:05:24 2023
Received: from localhost ([127.0.0.1]:60099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSkwF-0005cY-Sa
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:05:24 -0400
Received: from lists.gnu.org ([2001:470:142::17]:53014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qSkwB-0005cD-D3
 for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 17:05:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qSkw3-0006Er-NN
 for guix-patches@HIDDEN; Sun, 06 Aug 2023 17:05:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qSkw1-0000lb-Un; Sun, 06 Aug 2023 17:05:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=LqBwwaAW9PDUjU244nctEWf4WIWglETS9vJq2W1i6j4=; b=ocRSVB7EU6J5+3
 AUq7GvOwJu+HT3EUCEb4B5iW/ZnALF3bZwo+qpJ3CA2mKmBBykBAy8zhrR+KD1yaJoTuzaePn8kHP
 eTVQQJZmgbKHDJhf4VOka/KoZEKS4MbQALsKcsgo5m3kqNLrjjAcHd8hgWttHPpQctNT7/WIqcBGC
 b4C4K112DiKU1EbgZL/Jwh18cIARZ6Uj2zcZIuXBU1zMHMgXxeryO1kq/q/Ki2OtBRvrbbOjlS3CC
 nwWFNygnWIVYaZg8N2wox5y7+qxDx2jQchVppFrjno369tmA9XW/bdkAuPzdO9gw3WfXNxw1MYt6u
 TBlQvmSsnUZEU88Z8laQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/8] Sharing service code between Home and System
Date: Sun,  6 Aug 2023 23:04:54 +0200
Message-ID: <cover.1691355218.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.41.0
X-Debbugs-Cc: 63758 <at> debbugs.gnu.org, 62401 <at> debbugs.gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: ( <paren@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
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 (-)

Hello Guix!

Some services make as much sense as a System and as a Home service.
Two examples that came up recently are Syncthing and dicod:

  https://issues.guix.gnu.org/63758
  https://issues.guix.gnu.org/62401

In these cases, we’d rather avoid code duplication and have a common
code base for both the System and the Home service.

This patch lets us map System services to Home and uses the new
mechanism for three services: mcron, dicod, and syncthing.

Feedback welcome!

Ludo’.

Ludovic Courtès (8):
  services: dicod: Remove Shepherd < 0.9.0 compatibility layer.
  services: dicod: Pre-build the GCIDE index.
  services: syncthing: Use 'match-record'.
  services: Define 'for-home'.
  home: services: Support mapping of System services to Home services.
  home: services: mcron: Define as a mapping of the system service.
  home: services: Add dicod.
  home: services: Add Syncthing.

 doc/guix.texi                   | 96 ++++++++++++++++++++++++++++++++-
 gnu/home/services.scm           | 69 +++++++++++++++++++++++-
 gnu/home/services/dict.scm      | 32 +++++++++++
 gnu/home/services/mcron.scm     | 96 ++++-----------------------------
 gnu/home/services/shepherd.scm  |  4 +-
 gnu/home/services/syncthing.scm | 30 +++++++++++
 gnu/local.mk                    |  2 +
 gnu/services.scm                | 25 ++++++++-
 gnu/services/dict.scm           | 84 ++++++++++++++---------------
 gnu/services/mcron.scm          | 80 ++++++++++++---------------
 gnu/services/syncthing.scm      | 56 ++++++++++---------
 11 files changed, 372 insertions(+), 202 deletions(-)
 create mode 100644 gnu/home/services/dict.scm
 create mode 100644 gnu/home/services/syncthing.scm


base-commit: 0ab46ef3f9719f03d9b191a16e5aa91619e95451
-- 
2.41.0





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to , guix-patches@HIDDEN. Full text available.
Report forwarded to , guix-patches@HIDDEN:
bug#65119; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 17 Sep 2023 10:30:02 UTC

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