GNU bug report logs - #49419
[PATCH 0/4] Essential home services

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: Andrew Tropin <andrew@HIDDEN>; Keywords: patch; merged with #49546, #49547, #49548, #49549; dated Mon, 5 Jul 2021 15:36:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:15:47 2021
Received: from localhost ([127.0.0.1]:60216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5Wrq-0000fb-PA
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:47 -0400
Received: from mail-lj1-f179.google.com ([209.85.208.179]:34735)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m5Wro-0000XA-M0
 for 49419 <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:45 -0400
Received: by mail-lj1-f179.google.com with SMTP id y7so26961257ljm.1
 for <49419 <at> debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:date:message-id:mime-version;
 bh=E1FcXcmKek67yaPkdPAw2a7MKWy1GQT4CM0PuDuKADY=;
 b=dmZAXJBrYH8bT0hbf87mCXq4XWeKleg7otUefIXTEgomEZqg0aO9cIiJkc4UpyRtOU
 Z6fJgSp/mX2Qgo9TVpIDgIfBCfd5CWLWLg0a6Yg5VOVspxnjLBJ6otYuYic//MfA7UUD
 NWae1Zk5A+ZhKssG247S8/tnqQ8e+UudrJLwhUIZRy/KIHaYEjOdi+qp3IQl5SCpRG0m
 8k139AoV7vnI0+mLYrMeZImDbQCd+Xo74HFxMGG7oxoBsiPNeB11ajoxjg6uZcXt8BjA
 3zWcqoYEtN/9lHc7fc02rm/vHQGMSnkLC5ybPuesyV5JjavoYXavk3/rbQ7/YgMCGwa/
 UkEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id
 :mime-version;
 bh=E1FcXcmKek67yaPkdPAw2a7MKWy1GQT4CM0PuDuKADY=;
 b=Ikbn5ILg4WGtBZCaENeyxPOBouO6tuHYt110z4KQt8V6bFy7GaPB4dsOCEAwpJD2qb
 A0KRuRFrYJQBDKOerLGLL+olRRq3xSsbO1jJEKL4XkcjcCttSNNHt57+JvUJIOfJ0/LD
 CMtnxrUoHwPWzhQtHWWVEP9hvvkspSMCs40y+kJ+SCnksUerMv3d70/InWnZV+fl2QKV
 OkcElX+2CKmqPZ/TrrIz5FsZOXaxcgDXo/ZJOZWNVRUDHroJuztGC7Kez4ygKA92gR/T
 S9GqWZJTnInH1qOK7cK8i7FpK7dHVzeVxOWIuzGXEsCReDYeze+qio8hO0TLKEqzKnvD
 HuTA==
X-Gm-Message-State: AOAM531sDWmcFjTiox+/rilvMZxhGstPJb8Nvju+dLeWm8wW7zGQguD4
 PkvPlJR00KPZCCfzydZMiHaDKvb/GwQnaQ==
X-Google-Smtp-Source: ABdhPJxfTfiLY71FMRk6YgoXzhqqpDGHC+LZCfpHZkjtNaJGolWGCEbtgXmzIOxAK1IG+sdMEHYSag==
X-Received: by 2002:a2e:3508:: with SMTP id z8mr23100604ljz.7.1626714938371;
 Mon, 19 Jul 2021 10:15:38 -0700 (PDT)
Received: from localhost ([85.249.24.60])
 by smtp.gmail.com with ESMTPSA id j15sm2156159lja.21.2021.07.19.10.15.37
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Jul 2021 10:15:37 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH v3 4/4] home-services: Add fold-home-service-types function
In-Reply-To: <87v956g1g5.fsf@HIDDEN>
Date: Mon, 5 Jul 2021 18:41:45 +0300
Message-ID: <87pmveg17l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * gnu/home-services.scm (parent-directory,
 %guix-home-root-directory, 
 %service-type-path, all-home-service-modules, fold-home-service-types): New
 variables. --- gnu/home-services.scm | 26 ++++++++++++ [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
 date
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.208.179 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.208.179 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 49419
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.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * gnu/home-services.scm (parent-directory, %guix-home-root-directory,
    %service-type-path, all-home-service-modules, fold-home-service-types): New
    variables. --- gnu/home-services.scm | 26 ++++++++++++ [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.208.179 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.208.179 listed in list.dnswl.org]
  2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
                             date
  0.0 SPF_NONE               SPF: sender does not publish an SPF Record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


* gnu/home-services.scm (parent-directory, %guix-home-root-directory,
%service-type-path, all-home-service-modules, fold-home-service-types): New
variables.
=2D--
 gnu/home-services.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 8aa9adeaaf..9afb70f0a7 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -449,3 +449,29 @@ environment, and its configuration file, when availabl=
e.")))
=20
 (define sexp->home-provenance sexp->system-provenance)
 (define home-provenance system-provenance)
+
+
+;;;
+;;; Searching
+;;;
+
+(define (parent-directory directory)
+  "Get the parent directory of DIRECTORY"
+  (string-join (drop-right (string-split directory #\/) 1) "/"))
+
+(define %guix-home-root-directory
+  ;; Absolute file name of the module hierarchy.
+  (parent-directory (dirname (search-path %load-path "gnu/home-services.sc=
m"))))
+
+(define %service-type-path
+  ;; Search path for service types.
+  (make-parameter `((,%guix-home-root-directory . "gnu/home-services"))))
+
+(define (all-home-service-modules)
+  "Return the default set of home-service modules."
+  (cons (resolve-interface '(gnu home-services))
+        (all-modules (%service-type-path)
+                     #:warn warn-about-load-error)))
+
+(define* (fold-home-service-types proc seed)
+  (fold-service-types proc seed (all-home-service-modules)))
=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmD1Nt4PHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wAa8P/iV63UYsf+PUc8z+kUAjP3jvCCEvF3SGuuw7
7eZEMFXScQThWecZYlaUlBKWZEizgWpYHbE3TEdqR2dltARWmsWyxsjZ8VkfCa3b
2PfVeVQfE4qBMqgjCmiNYYWpE8iuSi0Fm2TADrpOwXxjJbTZTAUVwX5+yQa1eiN5
mGjBbr0BTvm/dY84XzPcGmKczRX2xJ9xhh8JBR55PaGq1cyI4EIOLN/64sfS2jBv
XwNHN1EBQJTGCPCcmqhbdU/x5Bsz+0p6FwJH+teZIhbjJhfQtaXfq7Cnr3Y5Rty5
ONigtsIMalKmZ0F94XDwlYoTTFpGdtTGK4kZQ4G2qVksWu28ERVIS/Xg5X/oLbpJ
XIxpvg0KrKldoPciD7Vlqwh4fBC9YFWBggKh/iFWckjYsshoVNLbeTgyBDkDWMDO
DOvyfY66LDXuUsLbaRVJ+eRqZlD/nWKWeYBVDLyLiXDtleDkny4Q7urd9sb4yf2C
SZ4osEcT3I7zqYvUEVpecZI6E8BqUSs8RtSTvEWw0IG/CDf0y70AwTBR7ze+8Y5e
R7J7Gs4Y8jDMK++Io885BCS++L+37oZwBxUo3quzxodbUn7im3w2CfZsReB3BxLc
bFZYiErIa8uYQYIoFTpHDLL2a6mZi9/SUCvf8ZWhZqd0wKtryfaW49aPQr6ulob2
zNpJD4Q4
=0zO+
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:15:41 2021
Received: from localhost ([127.0.0.1]:60213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5Wrl-0000Zp-FJ
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:41 -0400
Received: from mail-lj1-f174.google.com ([209.85.208.174]:33589)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m5Wrj-0000S1-IC
 for 49419 <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:39 -0400
Received: by mail-lj1-f174.google.com with SMTP id u14so27428649ljh.0
 for <49419 <at> debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:date:message-id:mime-version;
 bh=a/lytMsQTL/htua872I/xvcPbS8lCGq8gJM10eGky7s=;
 b=T82znJX8JdtklC7TfbGZ2Zy2j87YQqaih6YsZydELQ4uLG3z01jT6zFTTFywNnTesL
 S8CxKNpL4+0uvR9BkWIUj/McLJR0UDC3bbeC4K/K5AYPYURzkPTwcZXBW7mD+PHPBiBs
 AdPMnEpZQHvc8WT4ELlC2JEeN/eRLEoN+puJnHbJduFgpvGrXq3px8LTTfbR5jtn2pfV
 IuDD7hJfb43gFiplwMKh0tsvd/m7AcSxWogeuE0yAug/R9e9LSmz7t062cOhm+B8gCFv
 eE3kiPCV4ohkqqLR2FXWBPwmwqSmlGosFNCCIa1RxsTBNP3GAPWhQjc7ZJemHPSC4e5O
 PKsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id
 :mime-version;
 bh=a/lytMsQTL/htua872I/xvcPbS8lCGq8gJM10eGky7s=;
 b=aMvGxuOJVmEgAJHvEZLz1gX5JSLc5HVphmPX2NZOKSvC9VNRSomUOya5GloloAN8Zh
 JNkhPuhRgyE9upSrWBLWknyEoq80znS05Em00SJSQfrokIjzhXCz3w0YjVpK19WtBy+O
 pLAl4ESvY33jfDFVlPiOVlrkJ+ZV8Fr4Qc37teNj+4fyKOsePkpTD7QwEuHikJGR4wgI
 aHiXJ7AHi86zvSbZdBIkhs/vHA9oRcCpnV/AwOQCer2tJYIxMIBqm3OriKczhiAwPtlj
 takywOkRZxFnptTGGErezGf5n2H3fJIpOjU7cvWYTb+HkvpZzmJ4GgZZmLsyysqMquyL
 CyeA==
X-Gm-Message-State: AOAM5322dowmOoPzBxtjs1GfQ4l93tOjGLffib8BJFowSwmpB1X0utWM
 3Y1wUiospkf+3Usu3fK1qNRCFaSgHggdJQ==
X-Google-Smtp-Source: ABdhPJzunp2iNMuxxslQkuLfknJatkrIexBf53E+zbv7usaQJGdwwzpekouBWATJS4OD+yhujGUvgw==
X-Received: by 2002:a2e:9a8e:: with SMTP id p14mr12927665lji.69.1626714933401; 
 Mon, 19 Jul 2021 10:15:33 -0700 (PDT)
Received: from localhost ([85.249.24.60])
 by smtp.gmail.com with ESMTPSA id p13sm1337910lfr.7.2021.07.19.10.15.32
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Jul 2021 10:15:32 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH v3 3/4] home-services: Add home-provenance-service-type
In-Reply-To: <87v956g1g5.fsf@HIDDEN>
Date: Mon, 5 Jul 2021 18:41:07 +0300
Message-ID: <87r1fug18l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * gnu/home-services.scm (home-provenance-service-type,
 sexp->home-provenance, 
 home-provenance): New variables. --- gnu/home-services.scm | 27
 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions( [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
 date
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.208.174 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.208.174 listed in wl.mailspike.net]
X-Debbugs-Envelope-To: 49419
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.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * gnu/home-services.scm (home-provenance-service-type, sexp->home-provenance,
    home-provenance): New variables. --- gnu/home-services.scm | 27 ++++++++++++++++++++++++++-
    1 file changed, 26 insertions( [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.208.174 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.208.174 listed in list.dnswl.org]
  2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
                             date
  0.0 SPF_NONE               SPF: sender does not publish an SPF Record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


* gnu/home-services.scm (home-provenance-service-type, sexp->home-provenanc=
e,
home-provenance): New variables.
=2D--
 gnu/home-services.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index bcb6dd80df..8aa9adeaaf 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -38,7 +38,10 @@
 	    home-files-service-type
 	    home-run-on-first-login-service-type
             home-activation-service-type
=2D            home-run-on-change-service-type)
+            home-run-on-change-service-type
+            home-provenance-service-type
+
+            fold-home-service-types)
=20
   #:re-export (service
 	       service-type
@@ -424,3 +427,25 @@ G-expressions to run if the specified files have chang=
ed since the
 last generation.  The extension should be a list of lists where the
 first element is the pattern for file or directory that expected to be
 changed, and the second element is the G-expression to be evaluated.")))
+
+
+;;;
+;;; Provenance tracking.
+;;;
+
+(define home-provenance-service-type
+  (service-type
+   (name 'home-provenance)
+   (extensions
+    (list (service-extension
+           home-service-type
+           (service-extension-compute
+            (first (service-type-extensions provenance-service-type))))))
+   (default-value #f)                ;the HE config file
+   (description "\
+Store provenance information about the home environment in the home
+environment itself: the channels used when building the home
+environment, and its configuration file, when available.")))
+
+(define sexp->home-provenance sexp->system-provenance)
+(define home-provenance system-provenance)
=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmD1NroPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wlcUP/jiO4UrQ/hKe0FdL7bJZ7m27MvvA1Kqudb6c
LxDWsYDywZla8t9BSNhNZvH0iwKCnKuOr0mP4+aO1nGZ1qXSB1oQ+pLBw/kvXVAi
DSxYFmo3YCZIvIxJLuewz7OlyoRsA7AHFMsgZIyATTbQKo2TggjM8IZwtEFRWqLP
LI30Y1zutLyLrHP6t/1BGozam/wq7db03/UuBtngINP44EUhKc/yezDVUBcotila
hKHqxJGHD6qniDZf77FZXiytjLRqlgQaEZQ8vMmwX6N5geDIfcnZNUoE+aZ4YQCS
XDlW3Nq+J0MxMzqtu5maGF+LoQFJ0LDDao8ryw/qasUi0U0hrA0DGkKwDPlNCcer
LaxEL3KbzjuFUC6cISzNUUd/HOt0Fl+Ri2oBjHWTGs7QTUKecu5Yj9zW47beAtaG
pH9AQgUHu/rd95OrqOT+i+8AXRcaLAbXELAu1Lcgupdwmu/N6vHLV+f7W6CS7arx
XXBhqv9hwmUs4VoYr8JRQt7JdAKaHhnqCicaqKZHAX+bhwxzKcQqyydSIvYrBpP3
1qiiMBJt7S4mHIDBorIw34gS9CasQPgkiU3ItPuVHFDm8lljYdIQ8p9hV6tlRzZZ
M127UjSd8yhx/bSUMMF+WZMiYiJSo/Q4JSXkNigRYwakOvXFF5SnMcMw9QkjBZYy
L9cuLKsp
=bg7c
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:15:37 2021
Received: from localhost ([127.0.0.1]:60210 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5Wrh-0000Ud-0M
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:37 -0400
Received: from mail-lf1-f51.google.com ([209.85.167.51]:45719)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m5Wre-0000Mo-S1
 for 49419 <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:35 -0400
Received: by mail-lf1-f51.google.com with SMTP id s13so9973956lfi.12
 for <49419 <at> debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:date:message-id:mime-version;
 bh=4T1NvBI/PBjgT7dYtoDFyHLWKROkJqiISaqS3KrtH4M=;
 b=byObvKyvh7JyRQIf7jIgzzgCkdixnJuN8fgL960XfnKaKwwqiz/x2BAjEUVh4/7Dad
 6FEqotJBJa+uTEatR46eVhhNkS5eEKGbxJCD88iWLH45jNx0GKMzisJZE6YO4FF7/CqH
 Yr8uR/ivaEd3fhbDjqxr5qSYoXuvX+/k4F696APGrICzdPCERwTh4oL2BXQ427fhjiuH
 Val6Vc2W3V/YCuZuERFhBg1U1Ea0UkYn8eyMRKiRsH+VZjBnkWxl6ovPrAlC+zJTguqM
 TTB2h18l59MFOMOem4RmeuY7dXRadQ0AhTZLWy6yj17OugxBenQOo9HtLLTvpfvIObhE
 r8/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id
 :mime-version;
 bh=4T1NvBI/PBjgT7dYtoDFyHLWKROkJqiISaqS3KrtH4M=;
 b=iu8MEYcqaE8N0bn8EmWAWnZyVeETLi/Q3/2+ULRN0/97bgwdRCKUCXk9nnd/EEGftf
 20fKl8dlV0C0YMAlKbNUFQtdUv0xbAP3piEs0yc8OVyMFkYR6s3rwVMxH3W9LTdPe2Y3
 sRi4KEqRlZ73z8eHf+V73bGYz3WI4s7Jh3xEo20bO8Di1etNYjaBPxVgROWGzrBsqO8s
 ETyWzfmZ/S8AoFz+N779Z3H2nZfeH6TbGc6FGERx2rjFZmBR5e+nxpz4L1qcE1521XyL
 etaLaAII7dSL6O7Mw694zncaiRRNC/A07nO+4gKr/8mPSNjMmxnI80JsS1qYIxUpADer
 mEDA==
X-Gm-Message-State: AOAM531hyhH1XpGAoJ3Pp6cohcZT/Nxkj5oUK4N8RC/6C8EtmhCB4Jli
 sUQKKAbH60aaB2yQenHOKa2vgfGHBguD9g==
X-Google-Smtp-Source: ABdhPJwpPVOQc5sovcU4Xyma7Rq5M1me3at9F/mwKO2OEQckIQcDqvzYamGDoYbzhfkThjt1jwPmoA==
X-Received: by 2002:ac2:4187:: with SMTP id z7mr18572970lfh.574.1626714928816; 
 Mon, 19 Jul 2021 10:15:28 -0700 (PDT)
Received: from localhost ([85.249.24.60])
 by smtp.gmail.com with ESMTPSA id x19sm1331004lfd.275.2021.07.19.10.15.27
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Jul 2021 10:15:28 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH v3 2/4] home-services: Add home-run-on-change-service-type
In-Reply-To: <87v956g1g5.fsf@HIDDEN>
Date: Mon, 5 Jul 2021 18:39:44 +0300
Message-ID: <87sg0ag19m.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Service allows to trigger actions during activation if file
 or directory specified by pattern is changed. --- gnu/home-services.scm |
 100 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
 date
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.167.51 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.167.51 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 49419
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.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Service allows to trigger actions during activation if file
    or directory specified by pattern is changed. --- gnu/home-services.scm |
    100 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.167.51 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.167.51 listed in list.dnswl.org]
  2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
                             date
  0.0 SPF_NONE               SPF: sender does not publish an SPF Record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


Service allows to trigger actions during activation if file or directory
specified by pattern is changed.
=2D--
 gnu/home-services.scm | 100 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 99 insertions(+), 1 deletion(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index a89a061a81..bcb6dd80df 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -37,7 +37,8 @@
 	    home-environment-variables-service-type
 	    home-files-service-type
 	    home-run-on-first-login-service-type
=2D            home-activation-service-type)
+            home-activation-service-type
+            home-run-on-change-service-type)
=20
   #:re-export (service
 	       service-type
@@ -326,3 +327,100 @@ directory.  @command{activate} script automatically c=
alled during
 reconfiguration or generation switching.  This service can be extended
 with one gexp, but many times, and all gexps must be idempotent.")))
=20
+
+;;;
+;;; On-change.
+;;;
+
+(define (compute-on-change-gexp eval-gexps? pattern-gexp-tuples)
+  #~(begin
+      (define (equal-regulars? file1 file2)
+        "Check if FILE1 and FILE2 are bit for bit identical."
+        (let* ((cmp-binary #$(file-append
+                              (@ (gnu packages base) diffutils) "/bin/cmp"=
))
+               (stats1     (lstat file1))
+               (stats2     (lstat file2)))
+          (cond
+           ((=3D (stat:ino stats1) (stat:ino stats2))         #t)
+           ((not (=3D (stat:size stats1) (stat:size stats2))) #f)
+
+           (else (=3D (system* cmp-binary file1 file2) 0)))))
+
+      (define (equal-symlinks? symlink1 symlink2)
+        "Check if SYMLINK1 and SYMLINK2 are pointing to the same target."
+        (string=3D? (readlink symlink1) (readlink symlink2)))
+
+      (define (equal-directories? dir1 dir2)
+        "Check if DIR1 and DIR2 have the same content."
+        (define (ordinary-file file)
+          (not (or (string=3D? file ".")
+                   (string=3D? file ".."))))
+        (let* ((files1 (scandir dir1 ordinary-file))
+               (files2 (scandir dir2 ordinary-file)))
+          (if (equal? files1 files2)
+              (map (lambda (file)
+                     (equal-files?
+                      (string-append dir1 "/" file)
+                      (string-append dir2 "/" file)))
+                   files1)
+              #f)))
+
+      (define (equal-files? file1 file2)
+        "Compares files, symlinks or directories of the same type."
+        (case (file-type file1)
+          ((directory) (equal-directories? file1 file2))
+          ((symlink) (equal-symlinks? file1 file2))
+          ((regular) (equal-regulars? file1 file2))
+          (else
+           (display "The file type is unsupported by on-change service.\n")
+           #f)))
+
+      (define (file-type file)
+        (stat:type (lstat file)))
+
+      (define (something-changed? file1 file2)
+        (cond
+         ((and (not (file-exists? file1))
+               (not (file-exists? file2))) #f)
+         ((or  (not (file-exists? file1))
+               (not (file-exists? file2))) #t)
+
+         ((not (eq? (file-type file1) (file-type file2))) #t)
+
+         (else
+          (not (equal-files? file1 file2)))))
+
+      (define expressions-to-eval
+        (map
+         (lambda (x)
+           (let* ((file1 (string-append (getenv "GUIX_OLD_HOME") "/" (car =
x)))
+                  (file2 (string-append (getenv "GUIX_NEW_HOME") "/" (car =
x)))
+                  (_ (format #t "Comparing ~a and\n~10t~a..." file1 file2))
+                  (any-changes? (something-changed? file1 file2))
+                  (_ (format #t " done (~a)\n"
+                             (if any-changes? "changed" "same"))))
+             (if any-changes? (cadr x) "")))
+         '#$pattern-gexp-tuples))
+
+      (if #$eval-gexps?
+          (begin
+            (display "Evaling on-change gexps.\n\n")
+            (for-each primitive-eval expressions-to-eval)
+            (display "On-change gexps evaluation finished.\n\n"))
+          (display "\
+On-change gexps won't evaluated, disabled by service configuration.\n"))))
+
+(define home-run-on-change-service-type
+  (service-type (name 'home-run-on-change)
+                (extensions
+                 (list (service-extension
+                        home-activation-service-type
+                        identity)))
+                (compose concatenate)
+                (extend compute-on-change-gexp)
+                (default-value #t)
+                (description "\
+G-expressions to run if the specified files have changed since the
+last generation.  The extension should be a list of lists where the
+first element is the pattern for file or directory that expected to be
+changed, and the second element is the G-expression to be evaluated.")))
=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmD1NpUPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wl0QP/0TbNHav4kQ7KiQKF9M3HPWz3qNeLMO+SgBs
MGx/1kApFVTrph8Ua2u17IRKlvxggxzrj2wOjHgs5z0pauMx7s2sdKQ4ficHIEqv
wuTdo5xI0/eWkYY+fBVd3ErYtSUxv3uqZz5SgJUeq/rUtCul7u1EC0bTDn95aLwX
6NDcb9AwuWCdKUKF+VBODMvdsc4ve34oddlYbVFA7ct6SP8O7KclcUl/p69CHwND
UCzSOrq6D3Nt2pOqbwjLnmhWQr+nJFIoLqRlqf0sBxZBMX6YNk37QqEygVuzvfCZ
vuszh1yjfDggbgd0DeUqAiVI03KO9QgO1Xr1ZlmUOJsdhqy1xqdG8ifu4hoBc2Cb
bcLxj/7Ei6/u3p8+Ls95n9i/C3ir/gGXtyBcNBnYJoPEL7rOEJGstv4VMNF8cMR1
12PAzO5edQbLFaMNLGhKyOncQPDQshQJWaAr7oybXG7GoyJ3uPmWLBSJi+8lLAUi
jbmn8GIrY1x9KyFpVNznjkQ90FQpCAJQwCO0vKnPErhisA4FyKR7NA2d/1Z2djnX
sGQNU04j1JA8TkYNsW6o+WKXkaUqugZGBfc3460MGFBaqA0DNqvj5lisXpRb3R7T
xZIorW8/rojQGqNTQr4qogX5RTQo1I0FoUuHgLvDJ3BA+EAA33zgwlsXzkntXSC8
nU9CQUD/
=J3I4
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:15:33 2021
Received: from localhost ([127.0.0.1]:60207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5Wrc-0000Pk-16
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:32 -0400
Received: from mail-lf1-f46.google.com ([209.85.167.46]:35478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m5Wra-0000Hk-5J
 for 49419 <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:31 -0400
Received: by mail-lf1-f46.google.com with SMTP id i5so31484648lfe.2
 for <49419 <at> debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:date:message-id:mime-version;
 bh=mGKammPXpQo7ZmQA4JaaWKm3bImCdj++E7lhep3Q1Zk=;
 b=y5QoMyr5diYodXu2q8Cw/Y+WZuJn9T75eE3En52oLPvNsR1wP8LhnitZrG70+mT2c6
 LM8d8EpSqwtS4lgSV4RqP+qH37efTaEfI3wXcpHd2kV9vHyI9gpaaUA5m96BSdu9XaZl
 NItf8JnX8gqCh7S6yqEqScOTXL9OIo0spcGET+DH+UXL08wbDF9h4zodJ8XrlXhIW0kZ
 9hWvU7BZgG8czKITRqH5L0vxPqx1DoVJVGc2nNZus3WyK4mJl09tg7RvH7XThz1k+90f
 xB6XhXQ8KNxMXmgcEFunGVdhgYk2X5GrDZCUw2uzTNOXE+KbVPLANPB8B5B2G8gC7N1Y
 TjLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id
 :mime-version;
 bh=mGKammPXpQo7ZmQA4JaaWKm3bImCdj++E7lhep3Q1Zk=;
 b=ZbRaD24esdVm1E8csVwmZcKqmZ9/u6XEojWmd3XuwY1XOEoXnBjtzH5UjjtYn+bEDw
 Y3zDePG4vINJrXyqATcNngWwo1HcVQiDhGnHyqLBXWcvCYXIZFLqwKQHHJD9EFYvA8Rn
 SOzyhEB7fDkCSmkpR8Vgy3U7+LB0NQE2WhiCrySnXqY98lOrvVrSDI1GtXqTdXainZwS
 lrI7BoGkQneJ76wU72SjgZfN0BB0qi7wQsMnsTzsEmtpSarEPf9paVI64BXiY13xcMmQ
 Afr0Iv1yst+he+p2beijJv2l6I2OFM8bzumIoT3a/CRmZmAxsMpQD7XW3HeTIBLAJyTu
 vpjQ==
X-Gm-Message-State: AOAM530WnRVWuJpqRweuRNPxIoID7YS+AUynB9Y5l5FRHLuF5rXRJmjb
 2Odb0lHbT8ypNfUtHlXb//MsILq5borLmA==
X-Google-Smtp-Source: ABdhPJyqQuop3rDZ+RzazCQDc67a7qXEbVGwhUi7LVoTudAFdrKKgdZrZZzVP3+flIE0ANZfOtRY9A==
X-Received: by 2002:a05:6512:1517:: with SMTP id
 bq23mr6342528lfb.48.1626714923963; 
 Mon, 19 Jul 2021 10:15:23 -0700 (PDT)
Received: from localhost ([85.249.24.60])
 by smtp.gmail.com with ESMTPSA id s14sm2166019ljj.88.2021.07.19.10.15.22
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Jul 2021 10:15:23 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH v3 1/4] home-services: Add most essential home services
In-Reply-To: <87v956g1g5.fsf@HIDDEN>
Date: Mon, 5 Jul 2021 18:37:13 +0300
Message-ID: <87tukqg1am.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 4.1 (++++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: home-service-type is a root of home services DAG.
 home-profile-service-type
 is almost the same as profile-service-type,
 at least for now. home-environment-variables-service-type
 generates a @file{setup-environment} shell script, which is expected to be
 sourced by login shell or other program, which starts early and spawns all
 other proc [...] 
 Content analysis details:   (4.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
 date
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.167.46 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.167.46 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 49419
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.1 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  home-service-type is a root of home services DAG. home-profile-service-type
    is almost the same as profile-service-type, at least for now. home-environment-variables-service-type
    generates a @file{setup-environment} shell script, which is expected to be
    sourced by login shell or other program, which starts early and spawns all
    other proc [...] 
 
 Content analysis details:   (3.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.167.46 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.167.46 listed in list.dnswl.org]
  2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
                             date
  0.0 SPF_NONE               SPF: sender does not publish an SPF Record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

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


home-service-type is a root of home services DAG.

home-profile-service-type is almost the same as profile-service-type, at le=
ast
for now.

home-environment-variables-service-type generates a @file{setup-environment}
shell script, which is expected to be sourced by login shell or other progr=
am,
which starts early and spawns all other processes.  Home services for shells
automatically add code for sourcing this file, if person do not use those h=
ome
services they have to source this script manually in their's shell *profile
file (details described in the manual).

home-files-service-type is similar to etc-service-type, but doesn't extend
home-activation, because deploy mechanism for config files is pluggable and
can be different for different home environments: The default one is called
symlink-manager (will be introudced in a separate patch series), which crea=
tes
links for various dotfiles (like $XDG_CONFIG_HOME/$APP/...) to store, but is
possible to implement alternative approaches like read-only home from Julie=
n's
guix-home-manager.

home-run-on-first-login-service-type provides an @file{on-first-login} guile
script, which runs provided gexps once, when user makes first login.  It can
be used to start user's Shepherd and maybe some other process.  It relies on
assumption that /run/user/$UID will be created on login by some login
manager (elogind for example).

home-activation-service-type provides an @file{activate} guile script, which
do three main things:

=2D Sets environment variables to the values declared in
@file{setup-environment} shell script.  It's necessary, because user can set
for example XDG_CONFIG_HOME and it should be respected by activation gexp of
symlink-manager.

=2D Sets GUIX_NEW_HOME and possibly GUIX_OLD_HOME vars to paths in the stor=
e.
Later those variables can be used by activation gexps, for example by
symlink-manager or run-on-change services.

=2D Run all activation gexps provided by other home services.
=2D--
 gnu/home-services.scm | 328 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 328 insertions(+)
 create mode 100644 gnu/home-services.scm

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
new file mode 100644
index 0000000000..a89a061a81
=2D-- /dev/null
+++ b/gnu/home-services.scm
@@ -0,0 +1,328 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 Andrew Tropin <andrew@HIDDEN>
+;;; Copyright =C2=A9 2021 Xinglu Chen <public@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)
+  #:use-module (gnu services)
+  #:use-module (guix channels)
+  #:use-module (guix monads)
+  #:use-module (guix store)
+  #:use-module (guix gexp)
+  #:use-module (guix profiles)
+  #:use-module (guix sets)
+  #:use-module (guix ui)
+  #:use-module (guix discovery)
+  #:use-module (guix diagnostics)
+
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
+
+  #:export (home-service-type
+	    home-profile-service-type
+	    home-environment-variables-service-type
+	    home-files-service-type
+	    home-run-on-first-login-service-type
+            home-activation-service-type)
+
+  #:re-export (service
+	       service-type
+	       service-extension))
+
+;;; Comment:
+;;;
+;;; This module is similar to (gnu system services) module, but
+;;; provides Home Services, which are supposed to be used for building
+;;; home-environment.
+;;;
+;;; Home Services use the same extension as System Services.  Consult
+;;; (gnu system services) module or manual for more information.
+;;;
+;;; Code:
+
+
+(define (home-derivation entries mextensions)
+  "Return as a monadic value the derivation of the 'home'
+directory containing the given entries."
+  (mlet %store-monad ((extensions (mapm/accumulate-builds identity
+                                                          mextensions)))
+    (lower-object
+     (file-union "home" (append entries (concatenate extensions))))))
+
+(define home-service-type
+  ;; This is the ultimate service type, the root of the home service
+  ;; DAG.  The service of this type is extended by monadic name/item
+  ;; pairs.  These items end up in the "home-environment directory" as
+  ;; returned by 'home-environment-derivation'.
+  (service-type (name 'home)
+                (extensions '())
+                (compose identity)
+                (extend home-derivation)
+		(default-value '())
+                (description
+                 "Build the home environment top-level directory,
+which in turn refers to everything the home environment needs: its
+packages, configuration files, activation script, and so on.")))
+
+(define (packages->profile-entry packages)
+  "Return a system entry for the profile containing PACKAGES."
+  ;; XXX: 'mlet' is needed here for one reason: to get the proper
+  ;; '%current-target' and '%current-target-system' bindings when
+  ;; 'packages->manifest' is called, and thus when the 'package-inputs'
+  ;; etc. procedures are called on PACKAGES.  That way, conditionals in th=
ose
+  ;; inputs see the "correct" value of these two parameters.  See
+  ;; <https://issues.guix.gnu.org/44952>.
+  (mlet %store-monad ((_ (current-target-system)))
+    (return `(("profile" ,(profile
+                           (content (packages->manifest
+                                     (map identity
+                                     ;;(options->transformation transforma=
tions)
+                                     (delete-duplicates packages eq?))))))=
))))
+
+;; MAYBE: Add a list of transformations for packages.  It's better to
+;; place it in home-profile-service-type to affect all profile
+;; packages and prevent conflicts, when other packages relies on
+;; non-transformed version of package.
+(define home-profile-service-type
+  (service-type (name 'home-profile)
+                (extensions
+                 (list (service-extension home-service-type
+                                          packages->profile-entry)))
+                (compose concatenate)
+                (extend append)
+                (description
+                 "This is the @dfn{home profile} and can be found in
+@file{~/.guix-home/profile}.  It contains packages and
+configuration files that the user has declared in their
+@code{home-environment} record.")))
+
+(define (environment-variables->setup-environment-script vars)
+  "Return a file that can be sourced by a POSIX compliant shell which
+initializes the environment.  The file will source the home
+environment profile, set some default environment variables, and set
+environment variables provided in @code{vars}.  @code{vars} is a list
+of pairs (@code{(key . value)}), @code{key} is a string and
+@code{value} is a string or gexp.
+
+If value is @code{#f} variable will be omitted.
+If value is @code{#t} variable will be just exported.
+For any other, value variable will be set to the @code{value} and
+exported."
+  (define (warn-about-duplicate-defenitions)
+    (fold
+     (lambda (x acc)
+       (when (equal? (car x) (car acc))
+	 (warning
+	  (G_ "duplicate definition for `~a' environment variable ~%") (car x)))
+       x)
+     (cons "" "")
+     (sort vars (lambda (a b)
+		  (string<? (car a) (car b))))))
+
+  (warn-about-duplicate-defenitions)
+  (with-monad
+   %store-monad
+   (return
+    `(("setup-environment"
+       ;; TODO: It's necessary to source ~/.guix-profile too
+       ;; on foreign distros
+       ,(apply mixed-text-file "setup-environment"
+	       "\
+HOME_ENVIRONMENT=3D$HOME/.guix-home
+GUIX_PROFILE=3D\"$HOME_ENVIRONMENT/profile\"
+PROFILE_FILE=3D\"$HOME_ENVIRONMENT/profile/etc/profile\"
+[ -f $PROFILE_FILE ] && . $PROFILE_FILE
+
+case $XDG_DATA_DIRS in
+  *$HOME_ENVIRONMENT/profile/share*) ;;
+  *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS=
 ;;
+esac
+case $MANPATH in
+  *$HOME_ENVIRONMENT/profile/share/man*) ;;
+  *) export MANPATH=3D$HOME_ENVIRONMENT/profile/share/man:$MANPATH
+esac
+case $INFOPATH in
+  *$HOME_ENVIRONMENT/profile/share/info*) ;;
+  *) export INFOPATH=3D$HOME_ENVIRONMENT/profile/share/info:$INFOPATH ;;
+esac
+case $XDG_CONFIG_DIRS in
+  *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
+  *) export XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFI=
G_DIRS ;;
+esac
+case $XCURSOR_PATH in
+  *$HOME_ENVIRONMENT/profile/share/icons*) ;;
+  *) export XCURSOR_PATH=3D$HOME_ENVIRONMENT/profile/share/icons:$XCURSOR_=
PATH ;;
+esac
+
+"
+
+	       (append-map
+		(match-lambda
+		  ((key . #f)
+		   '())
+		  ((key . #t)
+		   (list "export " key "\n"))
+		  ((key . value)
+                   (list "export " key "=3D" value "\n")))
+		vars)))))))
+
+(define home-environment-variables-service-type
+  (service-type (name 'home-environment-variables)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        environment-variables->setup-environment-script)))
+                (compose concatenate)
+                (extend append)
+		(default-value '())
+                (description "Set the environment variables.")))
+
+(define (files->files-directory files)
+  "Return a @code{files} directory that contains FILES."
+  (define (assert-no-duplicates files)
+    (let loop ((files files)
+               (seen (set)))
+      (match files
+        (() #t)
+        (((file _) rest ...)
+         (when (set-contains? seen file)
+           (raise (formatted-message (G_ "duplicate '~a' entry for files/")
+                                     file)))
+         (loop rest (set-insert file seen))))))
+
+  ;; Detect duplicates early instead of letting them through, eventually
+  ;; leading to a build failure of "files.drv".
+  (assert-no-duplicates files)
+
+  (file-union "files" files))
+
+(define (files-entry files)
+  "Return an entry for the @file{~/.guix-home/files}
+directory containing FILES."
+  (with-monad %store-monad
+    (return `(("files" ,(files->files-directory files))))))
+
+(define home-files-service-type
+  (service-type (name 'home-files)
+                (extensions
+                 (list (service-extension home-service-type
+                                          files-entry)))
+                (compose concatenate)
+                (extend append)
+		(default-value '())
+                (description "Configuration files for programs that
+will be put in @file{~/.guix-home/files}.")))
+
+(define (compute-on-first-login-script _ gexps)
+  (gexp->script
+   "on-first-login"
+   #~(let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR")
+				 (format #f "/run/user/~a" (getuid))))
+	    (flag-file-path (string-append
+			     xdg-runtime-dir "/on-first-login-executed"))
+	    (touch (lambda (file-name)
+		     (call-with-output-file file-name (const #t)))))
+       ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick
+       ;; allows to launch on-first-login script on first login only
+       ;; after complete logout/reboot.
+       (when (not (file-exists? flag-file-path))
+	 (begin #$@gexps (touch flag-file-path))))))
+
+(define (on-first-login-script-entry m-on-first-login)
+  "Return, as a monadic value, an entry for the on-first-login script
+in the home environment directory."
+  (mlet %store-monad ((on-first-login m-on-first-login))
+	(return `(("on-first-login" ,on-first-login)))))
+
+(define home-run-on-first-login-service-type
+  (service-type (name 'home-run-on-first-login)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        on-first-login-script-entry)))
+                (compose identity)
+                (extend compute-on-first-login-script)
+		(default-value #f)
+                (description "Run gexps on first user login.  Can be
+extended with one gexp.")))
+
+
+(define (compute-activation-script init-gexp gexps)
+  (gexp->script
+   "activate"
+   #~(let* ((he-init-file (lambda (he) (string-append he "/setup-environme=
nt")))
+            (he-path (string-append (getenv "HOME") "/.guix-home"))
+            (new-home-env (getenv "GUIX_NEW_HOME"))
+            (new-home (or new-home-env
+                          ;; Path of the activation file if called interac=
tively
+                          (dirname (car (command-line)))))
+            (old-home-env (getenv "GUIX_OLD_HOME"))
+            (old-home (or old-home-env
+                          (if (file-exists? (he-init-file he-path))
+                              (readlink he-path)
+                              #f))))
+       (if (file-exists? (he-init-file new-home))
+           (let* ((port   ((@ (ice-9 popen) open-input-pipe)
+		           (format #f "source ~a && env"
+                                   (he-init-file new-home))))
+	          (result ((@ (ice-9 rdelim) read-delimited) "" port))
+	          (vars (map (lambda (x)
+                               (let ((si (string-index x #\=3D)))
+                                 (cons (string-take x si)
+                                       (string-drop x (1+ si)))))
+			     ((@ (srfi srfi-1) remove)
+			      string-null?
+                              (string-split result #\newline)))))
+	     (close-port port)
+	     (map (lambda (x) (setenv (car x) (cdr x))) vars)
+
+             (setenv "GUIX_NEW_HOME" new-home)
+             (setenv "GUIX_OLD_HOME" old-home)
+
+             #$@gexps
+
+             ;; Do not unset env variable if it was set outside.
+             (unless new-home-env (setenv "GUIX_NEW_HOME" #f))
+             (unless old-home-env (setenv "GUIX_OLD_HOME" #f)))
+           (format #t "\
+Activation script was either called or loaded by file from this direcotry:
+~a
+It doesn't seem that home environment is somewhere around.
+Make sure that you call ./activate by symlink from -home store item.\n"
+                   new-home)))))
+
+(define (activation-script-entry m-activation)
+  "Return, as a monadic value, an entry for the activation script
+in the home environment directory."
+  (mlet %store-monad ((activation m-activation))
+    (return `(("activate" ,activation)))))
+
+(define home-activation-service-type
+  (service-type (name 'home-activation)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        activation-script-entry)))
+                (compose identity)
+                (extend compute-activation-script)
+		(default-value #f)
+                (description "Run gexps to activate the current
+generation of home environment and update the state of the home
+directory.  @command{activate} script automatically called during
+reconfiguration or generation switching.  This service can be extended
+with one gexp, but many times, and all gexps must be idempotent.")))
+
=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmD1NnEPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wKj0P/1yJqD1Co76x/igTqNPHhMpJLsQKUHjm3CyD
DsxZwnO+UuMA3by1lXaBTAyic66yHmnPgE7IPz4pozwAE2Xva8ABBqdPVaexMJzP
0/tQ/gCo3/QNhU1buCzh8NGVkXXiPhwl0m1mf0OGCRGokrR3igYOaFOpmhHxFqhk
y6SBOu4/dtiIgtr2RpmXdqEQXz+PrPjDm45R2ECAKiPrMmxJ7gxEa9wg8j1f5MAV
2ZA6iibuOEszlxsmBS4BMCRy3bqxrX4PH5zGiUJpnTlE8adbYYszl8ZsWfv0uKeA
EJ3jLxr5djLvKwWkNEHPsjP9LEoAdW5pkcz/5MYVu8vws7ipKuHJlG2BdNtjHKFz
jbgQbPKkwJm9+W81rIUoOCUloe6rcfWYIE6UUH5xiMtd7xRv5xqyF60YUfLOgKKi
KR5D6a+pFpZdErdfF3wLYTbdGkGEw+FdC7x8OWUmpXWWBoyX4V44Tqd5o5eQ7c7l
OM2559idBWCNT7BV+ycYrpksV3YTUlK8qMk5vxO8MRKfhRGAOYN9sYwpziksjk0J
ahaMNpcgaXlSbAHOlwUmdT6LuHCZsdm8r1cmN99ztQpnOlLPxB8/QXoTijNBb/ja
NIVghlpSaTt6YItOV8gT5gWf5kKDpuVUs4CnezV+fzigQJhKGweel79ZtBHOA4ud
LSK5fIIb
=5c5Y
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:15:27 2021
Received: from localhost ([127.0.0.1]:60204 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5WrW-0000JZ-Oi
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:26 -0400
Received: from mail-lf1-f53.google.com ([209.85.167.53]:43607)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m5WrV-0000Cp-J9
 for 49419 <at> debbugs.gnu.org; Mon, 19 Jul 2021 13:15:26 -0400
Received: by mail-lf1-f53.google.com with SMTP id f30so24893629lfv.10
 for <49419 <at> debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=N0sIKiEZW9HwdEwp5vG0f6MyNB6YPhE7x20t9iW3g7A=;
 b=P2Nlb20fHGkRf5LZC+r5gEKTylfQReREpq0AT63viN9ZwV9CQEFbBAh/AHFAJjhDcN
 8X1q8/WnWY/fsjZuuyVjgOLxbNrHch3pOPOKPoHvlDdYrv5yVnibl/JTtsBGJGkOzVm2
 fRmMDTHFoJzea3GU3aBUEQiQLAUXi5dkTjj1Vcwb+yP0VIPA0OBhXHjo28Vql1QpaCPj
 ope29m6xyjeuxaPSZPcQoMXYjAsOxVOC4zItUiJhHicbg5JgnX/3z+86D63wXQDvLKZg
 LXVPLkAlaO9qeDbmth6/I2LboTqSV912Q9b1zWuuyaU9pqj0qUbhlX2E+hKZFd69FW6Z
 xxlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=N0sIKiEZW9HwdEwp5vG0f6MyNB6YPhE7x20t9iW3g7A=;
 b=ulyKXvFrkSAe3zz/4yGUOVH5tkXa7vAAxsD58BBD+RPtStSUtgj7xs95AkScvQpEZK
 kdM7stAUi4F68ljw+gXC8vuYSjuE7LyzfcrdJfpEWf0DsK+xGbSAkz42QLlT6wfDDVSX
 wvi+1Rj/maCuQk12KZg1vkdcfUj2CNqbVXUMuuW2icuDPyCTkJnZUnqiF5a8XZbY5Tp9
 nKphyDvb5SMtSNuVPdOUDa5TFM/kwGIcLjcQofZhQ3xcW1l15mh6ATjMqFJmvZR9AeYO
 ptc/CjJ/zN0Z9NT7QVHmfys+77lHEWAborYSr3kIOxv7iUcSo9mRlKqqLTb3dVc30tN4
 Jlew==
X-Gm-Message-State: AOAM532fuIjyV6kz9QyLkZI6TyApF5vyLkfGU+gIIXpoNx5dn891/EaD
 3Kx9ugMVcMxSS0vJVSjAHXX9fM3jlZlucQ==
X-Google-Smtp-Source: ABdhPJy+bvr8h6Ai5QFnDgRQqXOrVtP2gwsIjNE+i0WVfombgDtQ6uhWpDxusAujOQ6htaDA7mnn8Q==
X-Received: by 2002:a19:6d01:: with SMTP id i1mr18926886lfc.422.1626714919069; 
 Mon, 19 Jul 2021 10:15:19 -0700 (PDT)
Received: from localhost ([85.249.24.60])
 by smtp.gmail.com with ESMTPSA id t18sm1345092lfk.54.2021.07.19.10.15.17
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Jul 2021 10:15:18 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH v3 0/4] Essential home services
Date: Mon, 19 Jul 2021 11:04:01 +0300
Message-ID: <87v956g1g5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Diff with v2: Prevents unecessary calls to system* Please,
 when review finished, apply against guix-home-wip branch. Andrew Tropin (4):
 home-services: Add most essential home services home-services: Add
 home-run-on-change-service-type
 home-services: Add home-provenance-service-type home-services: Add
 fold-home-servi [...] 
 Content analysis details:   (1.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 1.1 DATE_IN_PAST_06_12     Date: is 6 to 12 hours before Received: date
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.167.53 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.167.53 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 49419
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: 0.1 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


Diff with v2: Prevents unecessary calls to system*

Please, when review finished, apply against guix-home-wip branch.

Andrew Tropin (4):
  home-services: Add most essential home services
  home-services: Add home-run-on-change-service-type
  home-services: Add home-provenance-service-type
  home-services: Add fold-home-service-types function

 gnu/home-services.scm | 477 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 477 insertions(+)
 create mode 100644 gnu/home-services.scm

=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmD1NaoPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wwj8P/jeXT/IFM9lgtSkUcbFs+hEsgmTiwwolgNZq
5Uw8+r8gu+xBA6O3emVaDueU4EqQSpskgrYq7OQg0bu4nULvvDBMCC00pDpN+8zF
X9JD28MBfN7s+bWcu3PgXYFuRBF/hr6S1Vq/HBUfdZUNWi6CUee/XvXWwsTY4Ob7
PBuD+tD2MMe8qNmHI/+wLDnKSCQTZK5j0oCNZtgPik8zjOx82FqEW5ahCrjjkWgC
USe3RWTFLoNvjwAFP7lJS6EQvg0T3RL1dEYxul7qFXjyS+TMr2yW/vnBB9GpY0fC
akD2g9dUoUB/HXKQpZVJP5HZzGfWuCMfNh2ja4YAdM9OkGYNAxWBRikdsOsyOuN7
syZLQRdOdWZol4isLYwWUfoeNu2EcYuw0XdmoUMM6jKwBqx/ybd8hNrHX7iHz7qu
lYPyOJ3gLC82UC+7XiQZE5vZnw0DbOLvckd9LeeDiSQKwHWBb88ye4y7r9FlnI+S
aU2Vd7SJ7Qdg4GSYmIA2Vz+G2CiUV3TM3vi0NYVziMSQIIvgLtkhA05gE44uUIm/
mlM94rKKoEeBni4DaHK1e+htJLRfwiMLJL4ODEG1T61NZVHnB+TExrHd6KYh96Eg
kUL7DStwYJOR1qvFLu7uqLz9cQpCqNwtURBsWJJ/DmFhEMuKxqxNRfmJABbEzxjo
IBucrAH9
=REso
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#49419; Package guix-patches. Full text available.
Merged 49419 49546 49547 49548 49549. Request was from Andrew Tropin <andrew@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 13 Jul 2021 18:17:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 13 14:17:30 2021
Received: from localhost ([127.0.0.1]:41951 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m3MyI-0000Em-81
	for submit <at> debbugs.gnu.org; Tue, 13 Jul 2021 14:17:30 -0400
Received: from lists.gnu.org ([209.51.188.17]:40640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m3MyF-0000Cq-Ux
 for submit <at> debbugs.gnu.org; Tue, 13 Jul 2021 14:17:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36378)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1m3MyE-0004BM-KK
 for guix-patches@HIDDEN; Tue, 13 Jul 2021 14:17:27 -0400
Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:36610)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1m3MyA-0006X8-J3
 for guix-patches@HIDDEN; Tue, 13 Jul 2021 14:17:26 -0400
Received: by mail-lj1-x234.google.com with SMTP id a6so31386465ljq.3
 for <guix-patches@HIDDEN>; Tue, 13 Jul 2021 11:17:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:date:message-id:mime-version;
 bh=5g3HnwpxvdRiWwb9eSNSiDw4/E0PBJ/itynzSZzkrP4=;
 b=vP8bJKMmF4VxeDB351g4L2xDxiaDGICRRjQVi6mWhyQpP/5VBIpKWzVXdLugaJjSP6
 LqA5aPHTQssFNGKFvTQuAVHfJcpNGZPeZV42Eo0EjeNL1UTvAsajsNI0wepxnNh3C7mL
 iuHZe0xpmiLSvLegRPu+6p7dO/K7Cc0J5l7jlhpESermn308Y6bNOCrDl9vuMsyKiyVH
 Lv+bGTwGvyqSeDCh0HJY5k9/UNOBi1xvS7hoCRbLtGMnwey43Xu8MKpmWuXY3bykxLw5
 aWFbne5mFJ//Lx/gMFFOzUrsX44Wb/MoIi5uXqS3OymPVmhg763V4V8nxdkyUs7kt+3V
 Aukw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:date:message-id
 :mime-version;
 bh=5g3HnwpxvdRiWwb9eSNSiDw4/E0PBJ/itynzSZzkrP4=;
 b=uZIL4etD8U9NsCrTQghzUdLSDMpGKMBPbWHWZFmGgTVcSvvZXDhu6MGU7BZYVV+rye
 aYmfsRFyBh+Lnvzi15DlwRrIthaA3s7du4bFi3PXjBA7r6/rv4+AnRT4u4rd+rSYlWeR
 ChlwZIpTPiaDai6WrKpa9d/61K4y5UUh4pyihzuPZL2GrDCOJC54S5chOIcBAiMKDVo7
 lxxA5ce0V3v0oo4OZtCH1M0x4zGFUgW91zic6NChoB9ZSYmGx06BVoAVm5xhbCwQeOIV
 viTdLjVDAfgQlysqj4MbI7okSpjNdAoa+SrDsUAcWYbQD7PNpWULEBogfIbRhNRAy92S
 n80Q==
X-Gm-Message-State: AOAM5335yp4ZgiUrpD7CiaT+Gv+VvOHkKtch1EIVnssmI3RCvoEeizOd
 Kee11fyIYK/2p/DiGkk5qDxBrlsI0JcwqA==
X-Google-Smtp-Source: ABdhPJyVb1pKG8BnNhhwjvbKUgghyXk2mb2ocR+6vEHk998RebgnNAfB1B1rKPZ09sFm4aMzwjHhUQ==
X-Received: by 2002:a2e:2405:: with SMTP id k5mr5052743ljk.259.1626200237103; 
 Tue, 13 Jul 2021 11:17:17 -0700 (PDT)
Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92])
 by smtp.gmail.com with ESMTPSA id l7sm1513081lfg.203.2021.07.13.11.17.15
 for <guix-patches@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 13 Jul 2021 11:17:16 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH v2 0/4] Essential home services
In-Reply-To: <87y2akhiz1.fsf@HIDDEN>
Date: Tue, 13 Jul 2021 19:17:20 +0300
Message-ID: <87bl76m6b7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: none client-ip=2a00:1450:4864:20::234;
 envelope-from=andrew@HIDDEN; helo=mail-lj1-x234.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
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 (---)


Changes since v1: Use @ instead of @@

Andrew Tropin (4):
  home-services: Add most essential home services
  home-services: Add home-run-on-change-service-type
  home-services: Add home-provenance-service-type
  home-services: Add fold-home-service-types function

 gnu/home-services.scm | 472 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 472 insertions(+)
 create mode 100644 gnu/home-services.scm

-- 
2.32.0





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

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


Received: (at 49419) by debbugs.gnu.org; 6 Jul 2021 08:26:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 06 04:26:36 2021
Received: from localhost ([127.0.0.1]:47241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0gPc-0006xM-Op
	for submit <at> debbugs.gnu.org; Tue, 06 Jul 2021 04:26:36 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:35564)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1m0gPa-0006xB-CL
 for 49419 <at> debbugs.gnu.org; Tue, 06 Jul 2021 04:26:35 -0400
Received: from butterfly.local ([188.189.183.17])
 by andre.telenet-ops.be with bizsmtp
 id RkSY250050NwAes01kSYdW; Tue, 06 Jul 2021 10:26:33 +0200
Message-ID: <886f64b82885530b655dbc619255a1a86eb15f8a.camel@HIDDEN>
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
From: Maxime Devos <maximedevos@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>, 49419 <at> debbugs.gnu.org
Date: Tue, 06 Jul 2021 10:26:31 +0200
In-Reply-To: <87im1nhq9t.fsf@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
 <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
 <87mtr0hgx0.fsf@HIDDEN>
 <6b465d9991c15eb9fc9f8def6aa3293a872352c1.camel@HIDDEN>
 <87im1nhq9t.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-AKx809G3dPTIVijCuBcq"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1625559993; bh=Bj8W3kKa4h14StRMAZu93Kjxl9HGgygD6WVQ3ye5J8M=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=SP4l5gdEwUHcKyB/Wo+J6FYeEwc5epyVbJ6jlxZNIzGBqMFt9ExuzOiQ4LHV2Sdk9
 DgNvmNAfuYOdUfurQCBRHndgUgzMkgL2YaANPPeTS6JB0dhr/Kd+xbR97JXBFSEHQd
 ngqOAfN5oVuJPxz9KVi6uXxZ2AfrFrlxcTKij7BSOx3tDLtxdvvoMSg58PXKxEiF6L
 Tj+D/TgMP+wGlhYYCJZU5h+4oD2K6/8/lop41eOsUsHElTjlbXeGEdx0Jeju5HWWgT
 rt/hRDENK122KiPi6lNtCaaIKnpHtmxNpWB8WRBMJNaZfW2B8b+Ejd6joN9hf0sLAg
 Jxym+AlAOc80A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49419
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 (-)


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

Andrew Tropin schreef op di 06-07-2021 om 10:09 [+0300]:
> Another question: Is it better to inline or attach patches?

FWIW, I can read both just fine in my e-mail application (evolution).
When it's inline, I can read the patch directly but also have
an option to save it somewhere.  When it is attached, there is some
button for =E2=80=98expanding=E2=80=99 the attachement so I can read it.  B=
oth
work for me.  I don't know about other mail applications.

Greetings,
Maxime.

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

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOQTtxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jwLAP0b/7TI/JGpTswqazHP6L/QRTBi
QuRtl3l7ZqfFsGzDtQEA5/z56HnhMkpP648HcjzCgjrGU+uj+vJ3+GktqMPHQAs=
=j9HV
-----END PGP SIGNATURE-----

--=-AKx809G3dPTIVijCuBcq--





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

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


Received: (at 49419) by debbugs.gnu.org; 6 Jul 2021 07:23:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 06 03:23:28 2021
Received: from localhost ([127.0.0.1]:47162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0fQW-0005JH-Lg
	for submit <at> debbugs.gnu.org; Tue, 06 Jul 2021 03:23:28 -0400
Received: from mail-lf1-f44.google.com ([209.85.167.44]:33481)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0fQU-0005J1-21
 for 49419 <at> debbugs.gnu.org; Tue, 06 Jul 2021 03:23:26 -0400
Received: by mail-lf1-f44.google.com with SMTP id t17so36706809lfq.0
 for <49419 <at> debbugs.gnu.org>; Tue, 06 Jul 2021 00:23:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:references:date:message-id:mime-version;
 bh=7lUQP/fpEOKv5wVmwNGt1oRKRbD56nqF/IDoIFiqVp8=;
 b=ftP3bYWwppQ2zx8VL4cpzmBfkhGoLq20G1S3Wpj8dimiN8piu7OLvi4Dg+C3dWwFz+
 WlHoGDhAk5Mkqx8uJVre/XeM8JBP37yim3DCeDJvuvAN8oysvhrXB2xq0jATQxTdiJGW
 bWApb7rSXJiZ0gq20g3HrpBu12MW2efZ+pycvZo5hBoH5nVUeedZXg9D11n7ebU4UMwr
 +gzb0WTW0z2M0fE/A2wz1bdIFglvm0X6JeUQLGkgSH89hk9LyLT/MfwxLlQlv5wE5FmW
 ZxKcJAf2dx2yEHCc7IbhxSDHW/nlW8OhtXZ1f9e3Z37ftD3a62a7s1cDZrUUehNymiSU
 g5og==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:references:date
 :message-id:mime-version;
 bh=7lUQP/fpEOKv5wVmwNGt1oRKRbD56nqF/IDoIFiqVp8=;
 b=SEfY7PJXk5dyRydqz3yy9RjA16ZCNPMNPnpendWg5EzZ8dWWOTuXXayIdaGEd59ddM
 R4dgcKZTDdaZepeSzAsLDNAEmh94lXXW7vWZGmF0sYYjZQedWcg1qOkNLBR/HMPMnUnb
 pPrra4QrAEhPu9av9czQKIkTjv1ywHKx1dBgzJ/RpH6jt9LMu+yp9Xj/H2pB8JNboeGS
 GrLnCFVcT+yDLlzmeRJwvCsk0fe2OWmH9wT/pG6G70WN6LvDn6TJzAIEpsWPKul3TMGK
 YfJpxa+k4f8P64FpifoTgCJlj9i4eUkBlaiBh4iXEOHBGgvqhupb2svJTkvNXImjra9d
 Hujw==
X-Gm-Message-State: AOAM532qkTbm3mMHLAgEky7PYrjEqtdaWW2ZZjOqTFqqAe5IDQZIZc0k
 jfWI3nP7vNBE+tENUnMAbvsJnKtt6NtHbg==
X-Google-Smtp-Source: ABdhPJyj45WrCT03llE9sGUxZAKTKxbswtuSQAx8muInqtypbnuTbcVKOKmeSmU6is6UyPS6Ent0TQ==
X-Received: by 2002:ac2:43a9:: with SMTP id t9mr2742533lfl.568.1625556199657; 
 Tue, 06 Jul 2021 00:23:19 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id b43sm1398208ljr.55.2021.07.06.00.23.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 06 Jul 2021 00:23:18 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>, 49419 <at> debbugs.gnu.org
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
In-Reply-To: <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
 <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
Date: Tue, 06 Jul 2021 10:23:15 +0300
Message-ID: <878s2jsy70.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain

Maxime Devos <maximedevos@HIDDEN> writes:

> Hi,
>
> Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]:
>> +       (if (file-exists? (he-init-file new-home))
>> +           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
>> +                          (format #f "source ~a && env"
>> +                                   (he-init-file new-home))))
>> +                 (result ((@@ (ice-9 rdelim) read-delimited) "" port))
>> +                 (vars (map (lambda (x)
>> +                               (let ((si (string-index x #\=)))
>> +                                 (cons (string-take x si)
>> +                                       (string-drop x (1+ si)))))
>> +                            ((@@ (srfi srfi-1) remove)
>> +                             string-null?
>> +                              (string-split result #\newline)))))
>
> Why are you using @@ here?  'open-input-pipe', 'read-delimited' and 'remove'
> are exported variables, so you can just use @ instead of the magic evil @@
> operator.

Addressed the issue with the following patch.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-toberebased-home-services-Use-instead-of.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: patch changing @@ to @

From=2027998096bf5b4ccd1c66ef71c1280faf0e11be72 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Mon, 5 Jul 2021 19:22:40 +0300
Subject: [PATCH] (toberebased) home-services: Use @ instead of @@

=2D--
 gnu/home-services.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index a06cd72459..78e5603edf 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -280,15 +280,15 @@ extended with one gexp.")))
                               (readlink he-path)
                               #f))))
        (if (file-exists? (he-init-file new-home))
=2D           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
+           (let* ((port   ((@ (ice-9 popen) open-input-pipe)
 		           (format #f "source ~a && env"
                                    (he-init-file new-home))))
=2D	          (result ((@@ (ice-9 rdelim) read-delimited) "" port))
+	          (result ((@ (ice-9 rdelim) read-delimited) "" port))
 	          (vars (map (lambda (x)
                                (let ((si (string-index x #\=3D)))
                                  (cons (string-take x si)
                                        (string-drop x (1+ si)))))
=2D			     ((@@ (srfi srfi-1) remove)
+			     ((@ (srfi srfi-1) remove)
 			      string-null?
                               (string-split result #\newline)))))
 	     (close-port port)
@@ -340,7 +340,7 @@ with one gexp, but many times, and all gexps must be id=
empotent.")))
       (define (equal-regulars? file1 file2)
         "Check if FILE1 and FILE2 are bit for bit identical."
         (let* ((cmp-binary #$(file-append
=2D                              (@@ (gnu packages base) diffutils) "/bin/c=
mp"))
+                              (@ (gnu packages base) diffutils) "/bin/cmp"=
))
                (status (system* cmp-binary file1 file2)))
           (=3D status 0)))
=20
=2D-=20
2.32.0


--=-=-=
Content-Type: text/plain


I can use different methods to attach/prepare/send patches and reply to
the reviews, sorry for any inconveniences in advance) I'll stick to some
approach, once I'll practice a few of them.

--=-=-=--

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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDkBOMPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wgsAP/2YH58b0q9Rwo1pA5CpCUrbFL5YdMvnt+Xxg
KMssxCwcFWAdXj8sDGULjlU/QzyErBuFaCscUJN0pQNL1Ku3/+9oDVyAKNei94UN
YMY5fX3Fa54VyU2IMItSN7n+fQM0BqEX9h0qplB+4V/NdIy5LedDz7N4WtNMY9B3
DH+co6rkaWWvzUnrUQigHSVzKLmqs4WWo+joa04RVumdmqiGCHAteNSS9dzaq28I
PKVFBj5uW6e9BCWaj5rFYYJJ901NbYQ1LrN0OaIemDfxg1fOB1vZigbQdPMJHLlc
Qy3rvXGG1WewT+fN5x+QUx2TpPIzmZvOh/UBjkGbJvmrxlSotMG+Ewyq1422VXGa
zAoK8H+Pbi5VycffCLp4suKq/1m6TpRM6TFYOc+Toz2tRKKwzgVTq1Ry9ygwsYTz
a8Ow/Apk+wS97iTztjrET0119AQG3yHAp4lhXctfHN3g18mw9wekebJnbGjdGi8E
in/S3bhenElchbIHoujOOr5SjYdUX1H7EJZbaWizsFJLJJn9wl/AHgazxzFYRzfA
pv6bZzFigWPeD+9Io9wKpLu69cp0i+kmqNWDVUNspyrGrUZJueXLzjnLpiOmkK/W
xtMhPAfzw3UKecsq7fSl+O7vgS0opWsFHSB/I6hARxCWZHpe5koy0DqOB75GfbrJ
YKB45Xfx
=5gVZ
-----END PGP SIGNATURE-----
--==-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 6 Jul 2021 07:10:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 06 03:10:04 2021
Received: from localhost ([127.0.0.1]:47148 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0fDY-0004vq-2G
	for submit <at> debbugs.gnu.org; Tue, 06 Jul 2021 03:10:04 -0400
Received: from mail-lf1-f44.google.com ([209.85.167.44]:33570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0fDV-0004vG-Jy
 for 49419 <at> debbugs.gnu.org; Tue, 06 Jul 2021 03:10:02 -0400
Received: by mail-lf1-f44.google.com with SMTP id t17so36650136lfq.0
 for <49419 <at> debbugs.gnu.org>; Tue, 06 Jul 2021 00:10:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:references:date:message-id:mime-version;
 bh=EtZjUjIZ6TFs0wFNroqBvc/oncyppmt1ks0yKhftJwo=;
 b=dHS4OeY6rT4oKdv08REv4dth5uzqQlt0AgK0wHiKj8DOq7Wa8Z7nB/gAyGKKSpFD3W
 LdkEIdtF8m6s3ZMXyahEe3dr5K8i4yB1xN3H6xWOcY6V/jlxSxH6f23aEf8DT7mYSSzG
 y4FOPHvlscpMicziHidW903Uh3trNALK1PqHbIzWhdiiR+sevNm/H9sbBvcnJ4sP2ADi
 CSKuluiIM1FJEpedebYNj+ljX3aq4xon9I3q/sWgNoC8HWdsH/LD6qhDM05xndv7DrY+
 yib0INCGE08sIsqQy8fulnyhzdiYaQWlJoK+oB3VnotMVN7NO6MK3p6HO17+3xP4shiT
 EO0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:references:date
 :message-id:mime-version;
 bh=EtZjUjIZ6TFs0wFNroqBvc/oncyppmt1ks0yKhftJwo=;
 b=LkIS+uyx0eycaaBS5yVk/ejPVDaupWR6clf04dYNhuBhy+ebHb9pYLQFzDm7eGDRn6
 3kZACx2KSiqGT/mOK6Y4qc6enE/aI+eqLTFWo7NfsgDUH4zDTObEuGbdZr1Q6oBs3sZe
 WthhkOqQlA25aG+KVqNUa04GltZk8Y9UUOlG6Id/KbQcun3fB9BcviPu4rKplCVK2tCl
 bctqTqpLBvYgS3MN31YtCv+Epn8G2CvioQlqZn8uuFbmccDvy70UHr3PihofQOme2XVG
 a6pr3mviDsLD7X4CqfURCZYOn+yjof9uVtsZ/NHWq6OH1YimvaYrC3Ce7/O3pUphTxYd
 aHDw==
X-Gm-Message-State: AOAM532HcG5+r/0F/tbv/LNh8MM53YynP+H4MbHiYkqf8jmM+pI3n73D
 kmQq0enoynTtkIbZpD8j/oD/DxipuYMvYA==
X-Google-Smtp-Source: ABdhPJxnZ2obTi1AXQGtyt1ng20ukrdn2GM5RECFtfRMP37c1mWuBH+Q6QQEj9st8ILd6vG2PvaR3A==
X-Received: by 2002:a05:6512:1056:: with SMTP id
 c22mr1622551lfb.187.1625555394166; 
 Tue, 06 Jul 2021 00:09:54 -0700 (PDT)
Received: from ixy (109-252-117-164.nat.spd-mgts.ru. [109.252.117.164])
 by smtp.gmail.com with ESMTPSA id m6sm1304669lfu.238.2021.07.06.00.09.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 06 Jul 2021 00:09:53 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>, 49419 <at> debbugs.gnu.org
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
In-Reply-To: <6b465d9991c15eb9fc9f8def6aa3293a872352c1.camel@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
 <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
 <87mtr0hgx0.fsf@HIDDEN>
 <6b465d9991c15eb9fc9f8def6aa3293a872352c1.camel@HIDDEN>
Date: Tue, 06 Jul 2021 10:09:50 +0300
Message-ID: <87im1nhq9t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

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

Maxime Devos <maximedevos@HIDDEN> writes:

> Andrew Tropin schreef op ma 05-07-2021 om 19:19 [+0300]:
>> Maxime Devos <maximedevos@HIDDEN> writes:
>>=20
>> [...]
>>
>> BTW, how to add changes to the patches?  Do I need to resend a
>> particular patch with required updates or have to wait other reviews and
>> send a v2 patch series?
>
> I would do a combination of those: reply to the mail of the reviewer with=
 a
> revised patch attached.  When you have received a =E2=80=98sufficient=E2=
=80=99 number of reviews
> from others on the other patches in the series as well, send a v2.
>
> Some benefits of this method:
>
>   (1) it should be clear which patches should be applied,
>       as the number of 'revised patches' without sending a new series
>       version is limited.
>
>       This is also the case if you send a new version after each little c=
hange,
>       but can easily become _not_ the cas if you always respond with a re=
vised
>       patch without starting a new series version.
>
>   (2) you don't clutter the mailboxes with new version after new version
>       after each little change.
>
>       This is particularily important if you have large patch series (say=
 13 or
>       more patches), which doesn't seem to apply here.
>
> WDYT?

I came up with one more approach: I can send a patch, which address the
issues reviewer mentioned and after getting more reviews from other
peers I can rebase my original commits and incorparate all the
later patches to them and prepare v2 series.

[PATCH 0/4]
[PATCH 1/4]
fix1 to address issue from subthread1 reported by r1
fix2 to address issue from subthread2 reported by r2
fix3 to address issue from subthread2 came during discussion with r1 and r2
[PATCH 2/4]
...

Such approach makes it clear how the comments were addressed, because
now you see a diff, not the whole new patch.  On the other hand it can
be a little harder to reply, because you don't have the latest version
of the patch, but have only original patch and updates to it, so you
need to pick, which one you want to reply to.

I will try this one, to find its weak points.  It's better to practice
on this small patch series, rather something huge)

Another question: Is it better to inline or attach patches?

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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDkAb4PHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wjAMP/3HfCFMBPLkyY3E8LrGZ5y9Y5x4ezbdnvC+I
GeVjML5vMzVQ1RI/eIvtzfF2pCxN1ID+41gFvRv+fJ6JWceu0uwMWhOK9mktkKBG
V5+gB6aX1CuCoVh4ekIt1DcT6TeQlUvE06y6196xspCeCI0OpnH2FJNfvU3Y+reC
1wK6oL5ch9kKjyF+09U/U8DRWyEc1GSrETM7DQ6i5dYiy7l8KVNgbj7THRHI36as
ia5Fw8axZ1uoXPFDqmnbuHuCuGP5ch98e+0K2jJL7+1cysPjtbkzzeXAHKNsVo/l
AH5DhN38zy/Jnsyv55Kdkb6MF9BR+Dehm8aRJoFrAoFzBTgJw7zGRSB4OvwLLdSg
+n7hy8+EGmX8XU4psLS4r1isXTScCiela1rNq/P6t3xmOlP8xNkZ2t/VAg9qeqca
c3pkXtOHjTYlp5eyo1/jPr6Uto2uJL6CkPAJZyyeX8VT7wRvduYLratJ3c33xYnH
tjLVOqdoJwOEPcEu0rnt05y/VbSNsUSz7P/RO9YUDqBI/w913EgN8hz3uR5f8L2/
fZpUfdnUYlcQ1LH2Vbj8UIEIf7c65To+14dQUunoN3z8nwR2pPfO5SCbmjZBFzii
/2IG36ozJ1XL6x9lu79hDkkXJkVQkW50kGuDsM89j86AASgThs4AtWusSma2nqrm
oBqdTYd4
=ePjX
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 19:19:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 15:19:23 2021
Received: from localhost ([127.0.0.1]:46678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0U7n-0003tS-1g
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 15:19:23 -0400
Received: from baptiste.telenet-ops.be ([195.130.132.51]:50062)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1m0U7j-0003tI-Tq
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 15:19:21 -0400
Received: from butterfly.local ([188.189.37.160])
 by baptiste.telenet-ops.be with bizsmtp
 id RXKH2500K3TK16401XKJFm; Mon, 05 Jul 2021 21:19:18 +0200
Message-ID: <6b465d9991c15eb9fc9f8def6aa3293a872352c1.camel@HIDDEN>
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
From: Maxime Devos <maximedevos@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>, 49419 <at> debbugs.gnu.org
Date: Mon, 05 Jul 2021 21:19:08 +0200
In-Reply-To: <87mtr0hgx0.fsf@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
 <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
 <87mtr0hgx0.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-H9RfrdrPeTU78y1htctg"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1625512758; bh=pq7CCp8JsaNK220A9jHMRfFxF8ebQjQGoGOKnPgr1ok=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=cIC05MIWOEeSFAWcJPBCEm5V71kEGSiU4zSCh3dVhidaY53NJS11HfI/8+KO0tvZd
 brKGy30FBBl2c9vtLDliqYrb7KBBnWN3mz516Bdy+ipX5NSrIXID/15lmm+nD2zFnQ
 iuB+YFt+bwcjmkqPd8a1a/1oKwEA3NwIkRbfw3i/DfKS+iMRm6ZgQT0S67zVrv5DKA
 5SifUEyU5fbJYqCT4K5rbhrAl8Y7UvkC3Yb4qxrj908z9UIpgICoD7ILG/JRTYY6oH
 m5J00piSDhkN/nM1vxkmMBB9z0Cex1g8/mvZFfwWkXitniBWp4Y4CQnFZWZcm6kAdS
 oCdv9T0c2gH1g==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49419
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 (-)


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

Andrew Tropin schreef op ma 05-07-2021 om 19:19 [+0300]:
> Maxime Devos <maximedevos@HIDDEN> writes:
>=20
> [...]
>
> BTW, how to add changes to the patches?  Do I need to resend a
> particular patch with required updates or have to wait other reviews and
> send a v2 patch series?

I would do a combination of those: reply to the mail of the reviewer with a
revised patch attached.  When you have received a =E2=80=98sufficient=E2=80=
=99 number of reviews
from others on the other patches in the series as well, send a v2.

Some benefits of this method:

  (1) it should be clear which patches should be applied,
      as the number of 'revised patches' without sending a new series
      version is limited.

      This is also the case if you send a new version after each little cha=
nge,
      but can easily become _not_ the cas if you always respond with a revi=
sed
      patch without starting a new series version.

  (2) you don't clutter the mailboxes with new version after new version
      after each little change.

      This is particularily important if you have large patch series (say 1=
3 or
      more patches), which doesn't seem to apply here.

WDYT?

Greetings,
Maxime.

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

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYONbLRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rqyAQCmkk6yS83y0pMlfQLcCbtOBXhB
ftqfGvZNgXttITIrmwD+OUdsc1bXq9uZ5vjhSY45kTNzNBtwhiYB5tQMTCMzDA4=
=Y7+e
-----END PGP SIGNATURE-----

--=-H9RfrdrPeTU78y1htctg--





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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 16:19:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 12:19:50 2021
Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0RK2-0007u1-Iu
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 12:19:50 -0400
Received: from mail-lj1-f179.google.com ([209.85.208.179]:33673)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0RK1-0007tk-6E
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 12:19:49 -0400
Received: by mail-lj1-f179.google.com with SMTP id w11so25399102ljh.0
 for <49419 <at> debbugs.gnu.org>; Mon, 05 Jul 2021 09:19:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:in-reply-to:references:date:message-id:mime-version;
 bh=s5XcUS/JJ2v5gY5QMB17hYsmnMdlc1qPu3b35EeibjM=;
 b=xisbRjggTb67FhaAZ/gGjGAJMq+UBbwkNTCgpvr98LxBjp4EAs0+J8wA11jLirOL5e
 w4JED2odX4dJdxZZfxH096v9+di4u8/8QNWCI7YGHSJC4MK7QgNvN+pME+n6J39eXTBC
 HfQVfhzVebZI1JplkepPeHv3qMKpt5dFUej+ry3r+Kys8NiuewOw8r7ev1LjkhqldKBF
 uqSSFfXlj5iKKLt8PbfhLYIcr9Wh2GgdPnUgozlQBp9G/CpzATomta66YqB3vEtNCimZ
 QRUWYRMJLWIIVW8yotcxtUe8rVvf1yOWzgVLU/YsGOkTG5MMrUokXAPbuRLH1V0bENIj
 ipbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:in-reply-to:references:date
 :message-id:mime-version;
 bh=s5XcUS/JJ2v5gY5QMB17hYsmnMdlc1qPu3b35EeibjM=;
 b=rB+tkiEjx+TxkMJPKtsQhUrGGiaQ9rifNdC0gCML+NtU4wfvKVDYhF8vuYI62t42iE
 q2sT3llRYLr6D+njtVavFwmktS8z9Aa5k2lRvniNolV1m4xF8zUYSbc+fUtAZchLSDV1
 XKVuJ4KWUPAzJgO6mn3X2zBvNNiciM6/28nHI3/zlFBn3XTpa/jXA65aJWpChpLtVCtu
 YjW4JyXYNKhnzEY3UBE8H3wFLWXyvgei+45vbIy1IcAqw3JUMpqdJ2J4OGf8rCDtPajx
 WWNumE9h5igrAhJJpJmqGh5mjqxEbJtl2saVG22NBw+NDI31jYZYAJUz0+CIncdq5iar
 z1WQ==
X-Gm-Message-State: AOAM5300UU1CfeVqcFEf4PyVC0Rrm644WwRHe0RDwm5C/Wzs61uwy6qP
 S5UT3nMoS5lR0kbObR/x4cn0E1KOxRytoA==
X-Google-Smtp-Source: ABdhPJziGjBhHdkc1eVNsCNFRt7JLwBavKYRG3Qxsdl8k376RhEmcOdh+BMu/qmkTYmByvccA9iRCw==
X-Received: by 2002:a2e:7602:: with SMTP id r2mr11651247ljc.271.1625501982500; 
 Mon, 05 Jul 2021 09:19:42 -0700 (PDT)
Received: from ixy (109-252-117-164.nat.spd-mgts.ru. [109.252.117.164])
 by smtp.gmail.com with ESMTPSA id p3sm1208597lfa.100.2021.07.05.09.19.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 09:19:41 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>, 49419 <at> debbugs.gnu.org
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
In-Reply-To: <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
 <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
Date: Mon, 05 Jul 2021 19:19:39 +0300
Message-ID: <87mtr0hgx0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

--=-=-=
Content-Type: text/plain

Maxime Devos <maximedevos@HIDDEN> writes:

> Hi,
>
> Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]:
>> +       (if (file-exists? (he-init-file new-home))
>> +           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
>> +                          (format #f "source ~a && env"
>> +                                   (he-init-file new-home))))
>> +                 (result ((@@ (ice-9 rdelim) read-delimited) "" port))
>> +                 (vars (map (lambda (x)
>> +                               (let ((si (string-index x #\=)))
>> +                                 (cons (string-take x si)
>> +                                       (string-drop x (1+ si)))))
>> +                            ((@@ (srfi srfi-1) remove)
>> +                             string-null?
>> +                              (string-split result #\newline)))))
>
> Why are you using @@ here?  'open-input-pipe', 'read-delimited' and 'remove'
> are exported variables, so you can just use @ instead of the magic evil @@
> operator.

Because of a bad habbit, I needed it once and after that started to use
it uncoditionally.  It should be @, thanks for pointing!

BTW, how to add changes to the patches?  Do I need to resend a
particular patch with required updates or have to wait other reviews and
send a v2 patch series?

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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjMRsPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wZT4QAJEov57pZfK3lU4JxmmbjrSO8VcmU9d2OmDw
8u4ZFeYOgC+U+QJjGEzXnZNW4QuxZGfOwtC9oxCyAqMXFwMc+hKUL28BG1fBRDH9
kl6Gpn5NzARZt6Ou1xfBYXyqO+iTYzjYo8mKfdKDDI9PAi2dVSeAvkAVZ69QCm/f
K5AuJnZGpfRceGs60p85i88T8IsSWXC72RnJ9osYYCHosvboNCv5YE5UxLbXH/8T
PYMI6tqZvRg6UNtpPUiwLNocLDDghM62Zyb2Q+5iDGcX8ZOkiYLKqq7CgLZBK0kY
Khv4wjJHjFIr7g3/1dFrWQqXzW8uJsGZZY5OvG5cPrcdX3hjFnf4WWPRYxwi+/JK
afyejohUi45464OO8lo0hy+eouE4PcDSwFu4vJhLZORr49zCzIueMXhcBLk/M7++
3CGd4ow30StzUnm/YBxyhh+dku9YXJHXsJNxQV5Wi8q5Nsuk13B1MGLoek054FJt
bD5otRkNqW1gBQLRhles4znt05fLYHKlMESRXRSwUtiTEeO7KEnLyRyRIE6ewk++
l/et9h/fnyHECpvk+imvn2PmVwKyhWtSKyE0/WBxchVCrUnZJwB5bGQJ11XuWM8Y
P5MjEXvboCVwwI5cV6wTInCVRbTqpbQgHxUx3F7itoIqwlLNhky3cbUDLkqg+IS4
Och3Ic1x
=dxhj
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 15:47:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:47:29 2021
Received: from localhost ([127.0.0.1]:46525 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0Qoj-0006vg-8N
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:47:29 -0400
Received: from laurent.telenet-ops.be ([195.130.137.89]:42862)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1m0Qoh-0006vV-IX
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:47:28 -0400
Received: from butterfly.local ([188.189.1.51])
 by laurent.telenet-ops.be with bizsmtp
 id RTnR25005161ovQ01TnR2C; Mon, 05 Jul 2021 17:47:26 +0200
Message-ID: <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@HIDDEN>
Subject: Re: [bug#49419] [PATCH 1/4] home-services: Add most essential home
 services
From: Maxime Devos <maximedevos@HIDDEN>
To: Andrew Tropin <andrew@HIDDEN>, 49419 <at> debbugs.gnu.org
Date: Mon, 05 Jul 2021 17:47:25 +0200
In-Reply-To: <87wnq4hivq.fsf@HIDDEN>
References: <87y2akhiz1.fsf@HIDDEN> <87wnq4hivq.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-PBWylzHqCTQHaeEZzIQb"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1625500046; bh=41cgcUDeX9pbpD9BOUewqG0qYLWS8j4aMrWZ1r4Iy3k=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=r8+zbdjO9yZ5pUb5ad9QI5hJ1jHIF3lzaPJXe8eALzo1BvEhHKxgHFfbrAHLeFu/t
 mWOJgyefcvGEubOozcUDK3NV10SactJwPS1aDcdB1ujTOs9544zk5gPe1JQS3zuDRY
 BZtLRnX8BCe1Eq0tXz3mAMlgrwIlQSgBLF1j/VIu4ywVI8Li06KFvSS51bbJ533Qrz
 y5tTKzOg8QYA9QLFnrunRbW8xkiIOssyGQ9fDCoESaXeLrKKEN1FJIBztOubw3j+y5
 1RTZfwK1T/1RPzdf/ie/W1lSPZRFiNY0WXc0P72Klp3GX/5rUMGiZ9GSGElwbDx56p
 thEL2+WwPAUdg==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49419
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 (-)


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

Hi,

Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]:
> +       (if (file-exists? (he-init-file new-home))
> +           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
> +                          (format #f "source ~a && env"
> +                                   (he-init-file new-home))))
> +                 (result ((@@ (ice-9 rdelim) read-delimited) "" port))
> +                 (vars (map (lambda (x)
> +                               (let ((si (string-index x #\=3D)))
> +                                 (cons (string-take x si)
> +                                       (string-drop x (1+ si)))))
> +                            ((@@ (srfi srfi-1) remove)
> +                             string-null?
> +                              (string-split result #\newline)))))

Why are you using @@ here?  'open-input-pipe', 'read-delimited' and 'remove=
'
are exported variables, so you can just use @ instead of the magic evil @@
operator.

=46rom the guile manual:

 -- syntax: @ module-name binding-name
     Refer to the binding named BINDING-NAME in module MODULE-NAME.  The
     binding must have been exported by the module.

 -- syntax: @@ module-name binding-name
     Refer to the binding named BINDING-NAME in module MODULE-NAME.  The
     binding must not have been exported by the module.  This syntax is
     only intended for debugging purposes or as a last resort.  *Note
     Declarative Modules::, for some limitations on the use of =E2=80=98@@=
=E2=80=99.

Greetings,
Maxime.

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

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOMpjRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gQOAPsFGFgW0cLP4W/e7uwZbt03DBOA
fxqtbIow4lZzBZnzuwEAudd2ldnndceENw+2HPKFVb7MVWUMg97zzFX4fXgADAc=
=CSiP
-----END PGP SIGNATURE-----

--=-PBWylzHqCTQHaeEZzIQb--





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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 15:41:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:41:56 2021
Received: from localhost ([127.0.0.1]:46514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0QjM-0006lt-8r
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:41:56 -0400
Received: from mail-lf1-f48.google.com ([209.85.167.48]:40555)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0QjK-0006lb-5y
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:41:54 -0400
Received: by mail-lf1-f48.google.com with SMTP id q18so33137168lfc.7
 for <49419 <at> debbugs.gnu.org>; Mon, 05 Jul 2021 08:41:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=OTM/NfLS28K1HZuhTzrT9b9se42Y6/V4cVqAWD8LQag=;
 b=O4R7fUQHRH48IOHQfxpGOLIqoYae1jf+xaAxDm+m2femv/zRGVOjZXAtzs4285Fw2g
 1x9d15Lrvzhg5VFBNt9QawrjQFCudu+aXwqRtPduTbx/QbBrok4c94ZoSG81NtuuaL9o
 yfnlVf82dg5TZXrrvZ5FP+NI5UlF2iMfo89c/4LeOpt3beSt4qcLLQ/7o8h8DCgTdFAx
 AP/xcia4XfcwKBRDJjYvWY+B1+BfxfrkUwWblWMI7aE9Ht7DTRV6sA1t1o6NkaVB8DJO
 3uC8sGZwW7jTrIZOgzkRSMJLjvzy/G29lxtaIIEIqObAqTN3YzZqViJYlrn5tn0UqOX8
 E7vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=OTM/NfLS28K1HZuhTzrT9b9se42Y6/V4cVqAWD8LQag=;
 b=XhE9/a/7SwDcQtEhwspZCJh+lvRo5tZVXP/NnHvOUFH/g/anY4E5Y6ZF1LKeNEasdf
 kPgI3JY5n9bwi3fgGxJ/Y/1Y7EfxABizegTtwbUsz2uJ3UUPnh5zq51tce+9ysjtrMAR
 Gu09+iwC2whGdJpO6xRfUTF+cr2CiEVPAi4Ijf1mKMvTDeMdmg8b3F5OBsF0ntkQ/VyF
 aE73+D4GqA1qP113J9+J0HXiQA1uuLr7Hi/85EgG6Q4rijEO2TnnqOsOGXjVfR2YIqUZ
 53on0EY4KUzu2rDF7gYAT1ciYKcNwdEiaTPe2lRHPAGSMgU7tOwuotIeXxPIN8lYk6ew
 e44g==
X-Gm-Message-State: AOAM530/XgxIJ56tFECe+bIi1J58G0wtV2eOHnyZ9DJnlRZeANQ4aN44
 JEiV/s6vZp8Q/jyWJ8UGHReyn/DxpFVfBQ==
X-Google-Smtp-Source: ABdhPJyIIaYNAprn7ubbkL4iqg8fbImP7kG5ix0KgDcFbESGTfxh63+ugv9OKBRPBlXvE3Q8xxECNA==
X-Received: by 2002:a19:f807:: with SMTP id a7mr11243949lff.149.1625499708129; 
 Mon, 05 Jul 2021 08:41:48 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id y1sm1293242ljc.29.2021.07.05.08.41.47
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 08:41:47 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH 4/4] home-services: Add fold-home-service-types function
Date: Mon, 05 Jul 2021 18:41:45 +0300
Message-ID: <87pmvwhio6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

* gnu/home-services.scm (parent-directory, %guix-home-root-directory,
%service-type-path, all-home-service-modules, fold-home-service-types): New
variables.
=2D--
 gnu/home-services.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 20a9537650..a06cd72459 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -444,3 +444,29 @@ environment, and its configuration file, when availabl=
e.")))
=20
 (define sexp->home-provenance sexp->system-provenance)
 (define home-provenance system-provenance)
+
+
+;;;
+;;; Searching
+;;;
+
+(define (parent-directory directory)
+  "Get the parent directory of DIRECTORY"
+  (string-join (drop-right (string-split directory #\/) 1) "/"))
+
+(define %guix-home-root-directory
+  ;; Absolute file name of the module hierarchy.
+  (parent-directory (dirname (search-path %load-path "gnu/home-services.sc=
m"))))
+
+(define %service-type-path
+  ;; Search path for service types.
+  (make-parameter `((,%guix-home-root-directory . "gnu/home-services"))))
+
+(define (all-home-service-modules)
+  "Return the default set of home-service modules."
+  (cons (resolve-interface '(gnu home-services))
+        (all-modules (%service-type-path)
+                     #:warn warn-about-load-error)))
+
+(define* (fold-home-service-types proc seed)
+  (fold-service-types proc seed (all-home-service-modules)))
=2D-=20
2.32.0


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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjKDkPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wnIgP/isEncoPbwrs77ZNLilDgzqLXZzFPMsZembM
kHKhSufjTTuDdvutWFZJGXPDjoGchJCp2/jIlQmQ2qRrZ2CfhLvUVnAnHQbt1oSI
wh8XecyKY2ML4QjV1J9jkXH4XcLKkrAlqkbVeXNXcrtJFTZdPlbcUdsaR0PKJ5xC
O2cb2+qcMGf6wof3tJjxkKzqS3wVEwOKRWHad5dik/F3FdYM6UcsRxNr9Qhcb8yM
oqS3ccjAznkH+NZehl4JqeIUqVewlhQYb8gn8zTEA1paFLBfZxYFALjDxKhdB5MR
kekSlIPRkDJavuQKNogL9Rui9N2dOiwuxWXCiPLdql8/mYTEazTFMm4Cm/1Kw6zt
4BouLKAVfRJpO5/bK6Z/eaKxRgf/fTsXQu+UM7G242ahR8oflAve9Txuno/TtDDJ
tU0ZzHoY2jPfV8MCV8D8xGKudbjHSzunHlMfvUoLTiF4WLzhuEuX7eKgo0yP3IuZ
T64LgwHzaKkDStMgYyomxVEJhSL4WWYZxYyFaftVGMj8RFhzvKlUySXZFF5tkLgw
pxB2xgT50qaP+PMXePOorSyIgS6+IQveV+auRjbfCpaCjEriWnJk+4hYRHLyRPQr
zTY9BrY5JV86PCn6YbAKqZaiFImM5CGZJFAx/7AQaheo5laeiv+Lt/n4dwv/lV9f
ogLILU0w
=L4cH
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 15:41:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:41:18 2021
Received: from localhost ([127.0.0.1]:46511 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0Qij-0006ku-WA
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:41:18 -0400
Received: from mail-lj1-f171.google.com ([209.85.208.171]:37430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0Qii-0006kh-PO
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:41:17 -0400
Received: by mail-lj1-f171.google.com with SMTP id k8so25141055lja.4
 for <49419 <at> debbugs.gnu.org>; Mon, 05 Jul 2021 08:41:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=bdHvBm0ThHKYKK9a/VSWh3+Kmiw7MCeF7dEvTLC4654=;
 b=fxbFZOm13fbaTFuGbxMle/FePkrbLm4YDSrGO7dsXaqlJw+UHdfNSI+D0lVxZmRqZH
 SPiSgXjboPsZeK/b+po65BpGNsb1J6PTtOQF5qEoZfljsWUGUmpTj2A40XyGb9P/reXJ
 GwV58MZlIjUZmX/hlvb1cC7l2y02ScstZZyPg5Fny+fMz6kX0gr1URCFv26youbcpc6/
 UAsbT/3b5Gsws0I5SRmyqqaWWikOiWWV4zHBb3b6+mht4+WKMJBAQTdZxesS88AfKlBS
 3DFclBRLMmEfCuCHtT9BnTUxvBFVSWUKVEnhApZJGYk8OUyqEi4jiqlfw23iws7QRC4p
 iOtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=bdHvBm0ThHKYKK9a/VSWh3+Kmiw7MCeF7dEvTLC4654=;
 b=GrFJ9z+pt6mnYVGHSocH/RlStoakVt3yTNSLsvlPHm0SCihZRhxvLYd9/WnOQjCS+P
 wVORAEX3ui7wNwbhkbKdNJ37uaZ71SY74s2s7umWeZuYOfUlVI+fTIdaU2+8stJEOwbX
 IO9zIR4pW1Lr4WH56S1O7bADS5+Lwo9/mEvNSbyGjy2fw3d9Oz2u37jjJ5W7uYTeGj64
 NKkJDzFbRkq4qF6FrAx52vvrLi2PO/3gGb7JIlbOn4ddeDqo4w0sWQrf876UvXSFqlPn
 LzB8Z135gwjd3M9Vqbo/VSsr4bcGvlHTZZlOHvhjaxmx2BTbXNDGTeQ0KhsVpwdAGdRw
 IKnQ==
X-Gm-Message-State: AOAM530Ur2idepbLeTAmJYTSvs3cLhu3TqdlQdAMnxxvcQJnmbmZpMTG
 OoL0SdTj2vWgCKfzEpu4x0ufrBoVkyS8Ew==
X-Google-Smtp-Source: ABdhPJzI6pN7sspy+bXsrrketO/YK9Fbd8nEIWty4gWfH24c6Gn0j++XPkxXmEafV8cPYqdOkVpYGA==
X-Received: by 2002:a2e:3e07:: with SMTP id l7mr11475368lja.131.1625499670354; 
 Mon, 05 Jul 2021 08:41:10 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id u2sm1119646lff.37.2021.07.05.08.41.08
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 08:41:09 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH 3/4] home-services: Add home-provenance-service-type
Date: Mon, 05 Jul 2021 18:41:07 +0300
Message-ID: <87sg0ship8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

* gnu/home-services.scm (home-provenance-service-type, sexp->home-provenanc=
e,
home-provenance): New variables.
=2D--
 gnu/home-services.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 002a003d65..20a9537650 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -38,7 +38,10 @@
 	    home-files-service-type
 	    home-run-on-first-login-service-type
             home-activation-service-type
=2D            home-run-on-change-service-type)
+            home-run-on-change-service-type
+            home-provenance-service-type
+
+            fold-home-service-types)
=20
   #:re-export (service
 	       service-type
@@ -419,3 +422,25 @@ G-expressions to run if the specified files have chang=
ed since the
 last generation.  The extension should be a list of lists where the
 first element is the pattern for file or directory that expected to be
 changed, and the second element is the G-expression to be evaluated.")))
+
+
+;;;
+;;; Provenance tracking.
+;;;
+
+(define home-provenance-service-type
+  (service-type
+   (name 'home-provenance)
+   (extensions
+    (list (service-extension
+           home-service-type
+           (service-extension-compute
+            (first (service-type-extensions provenance-service-type))))))
+   (default-value #f)                ;the HE config file
+   (description "\
+Store provenance information about the home environment in the home
+environment itself: the channels used when building the home
+environment, and its configuration file, when available.")))
+
+(define sexp->home-provenance sexp->system-provenance)
+(define home-provenance system-provenance)
=2D-=20
2.32.0



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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjKBMPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wFgQP/25DCZPMwKYLNPaIz+QqKQODiND/L+UK+UMS
arAdMlZIEQoDaUXU+5e7ekzxhIwOXcF1MIXAjeGX/VogNDRFmk8btSUndXlcBr4f
bjpPn1DOof8QwZIZJ1/TKcC+pz7uNA4s0q6/MjZLn4XxJHz4eaqMip+CnKUBTIIQ
FTO0Z9KMFUhwDNIprBCM1t/JpGlDLdCRAIxeV6LCoYCOWskEVLAa76JrrJ7kI9p3
U4uezVeLlVCET6RKgy8IkZM6w9e+Gk8VFz4nAwJ2FpdLxYir8J5wC0pCkImhrOR5
g2ksdmLLS7u88jKdIfHVCrGqRQ7kA4MLVhHzCXRnu9ZlZ/wm8gz4NYWVPeT173VK
lFYcXTi83B4MCxuzj3JXijNcWDQK1Q814k6PwhqHoxLziRDCyvPgwwwRSpPTtZRQ
ChC8FB8C4bc/vA4KEJA9wwJjydUMpkZ3q3dvzZBqKFpzbIJKygrTUToUk7dAjo96
fYBzqVwqfECvVNERnelc3Vrak4Ad55cZLWiQ/62U7pp2ZprlUJg4hjeycihmvK3Q
ciQZ8G5gWGx8fhR8k/BUcZSAgp34wy4sRaXPU19irPgpuAWZPGub5DM2t5CIVJh3
hsF5RKJM5COmAB2XDnsppkSpdC6H/67jCT1aNUyqUBQ0wBMexMG26R+2nOdiSLGB
KeqwmUsw
=EObI
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 15:39:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:39:54 2021
Received: from localhost ([127.0.0.1]:46506 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0QhO-0006hw-HS
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:39:54 -0400
Received: from mail-lf1-f45.google.com ([209.85.167.45]:47101)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0QhN-0006hj-Aa
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:39:53 -0400
Received: by mail-lf1-f45.google.com with SMTP id p21so11405270lfj.13
 for <49419 <at> debbugs.gnu.org>; Mon, 05 Jul 2021 08:39:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=olmO8mEMNwH4BVsJGexsIySLLrOtlHomIvmMBQz/qWo=;
 b=ucVJhbYCfmkKeVxCGSZFV64NTvUTibFoDAcun5FDSjX0wkRj3d/YypGva/TAe0Tj3v
 /bOJRNBGYux3ECCXNS3chjxK0t3V1tEloSnVPMix78BbermrY6S9JCmhUHwTAqqjQvoP
 Irww3vdndUiiJXumJCUr86x3K3SOrgm34M93cGyjGhfWrcilFqNK6lcHPVwWo8Q5EUpr
 G1fUFLsixtnXJXSOLntZ1GD/gj3cq4XmiJEHUj9VNy/6FJk45ki0KRjPAOvqVHcPS43b
 kPuiVzjwTFSEufif9Tu4XBZO5lE8Ce7e8LAmd3797gg7Xye/lhkKUkVeFilUsYff2yhp
 OV0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=olmO8mEMNwH4BVsJGexsIySLLrOtlHomIvmMBQz/qWo=;
 b=hdiOLJgVmG6eFP6jomCxcvzWiUiEeNfSOR4ISMnkjPxi9DSPimZLPPATPE3AcI+5aY
 SR6iNrrxauf5Y6xHoZzslPflq0sm3oMttce+hmYa/J2t+WGNQbXqoYr2cUWcH9qbDYC/
 zag00ucqDi9Tx8Vk46C3qkId9yJnBd5fDkOufRjDP0cADVY2iNoiIisIMPkiLIb5WbZ/
 c/k9aPxzxTQKecWSBIEAyJEaoLJYQzMOsZKTESxhqPb5JVCxAP1EB9xJ9HGjLKiKh6vi
 jjSo+hKMdEqPObk/TiDL4G3msxjX9OOsguLznCnI/fJ/OQUhcV0fNyqzKOgpOlC/6Ey9
 Sbag==
X-Gm-Message-State: AOAM532y1+WvYxzs9MrLxYe1OG5kdUTSQ0X1gE/DEvPuxj5ZZ2vDzbnE
 1P9wEHJbOeFBBayZ8mksbJQSABBdlVG6Cw==
X-Google-Smtp-Source: ABdhPJxmQJ+1EqoPiIjE6I8Oe/pgroF+qdPArWhwATYNKEFFP/BhLB0kD5lSIMKnTILeG4Hpqrf/9Q==
X-Received: by 2002:ac2:5a4c:: with SMTP id r12mr9475789lfn.498.1625499586863; 
 Mon, 05 Jul 2021 08:39:46 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id u3sm212824lfu.241.2021.07.05.08.39.45
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 08:39:46 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH 2/4] home-services: Add home-run-on-change-service-type
Date: Mon, 05 Jul 2021 18:39:44 +0300
Message-ID: <87v95ohirj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49419
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 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Service allows to trigger actions during activation if file or directory
specified by pattern is changed.
=2D--
 gnu/home-services.scm | 95 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 94 insertions(+), 1 deletion(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 44a7e68934..002a003d65 100644
=2D-- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -37,7 +37,8 @@
 	    home-environment-variables-service-type
 	    home-files-service-type
 	    home-run-on-first-login-service-type
=2D            home-activation-service-type)
+            home-activation-service-type
+            home-run-on-change-service-type)
=20
   #:re-export (service
 	       service-type
@@ -326,3 +327,95 @@ directory.  @command{activate} script automatically ca=
lled during
 reconfiguration or generation switching.  This service can be extended
 with one gexp, but many times, and all gexps must be idempotent.")))
=20
+
+;;;
+;;; On-change.
+;;;
+
+(define (compute-on-change-gexp eval-gexps? pattern-gexp-tuples)
+  #~(begin
+      (define (equal-regulars? file1 file2)
+        "Check if FILE1 and FILE2 are bit for bit identical."
+        (let* ((cmp-binary #$(file-append
+                              (@@ (gnu packages base) diffutils) "/bin/cmp=
"))
+               (status (system* cmp-binary file1 file2)))
+          (=3D status 0)))
+
+      (define (equal-symlinks? symlink1 symlink2)
+        "Check if SYMLINK1 and SYMLINK2 are pointing to the same target."
+        (string=3D? (readlink symlink1) (readlink symlink2)))
+
+      (define (equal-directories? dir1 dir2)
+        "Check if DIR1 and DIR2 have the same content."
+        (define (ordinary-file file)
+          (not (or (string=3D? file ".")
+                   (string=3D? file ".."))))
+        (let* ((files1 (scandir dir1 ordinary-file))
+               (files2 (scandir dir2 ordinary-file)))
+          (if (equal? files1 files2)
+              (map (lambda (file)
+                     (equal-files?
+                      (string-append dir1 "/" file)
+                      (string-append dir2 "/" file)))
+                   files1)
+              #f)))
+
+      (define (equal-files? file1 file2)
+        "Compares files, symlinks or directories of the same type."
+        (case (file-type file1)
+          ((directory) (equal-directories? file1 file2))
+          ((symlink) (equal-symlinks? file1 file2))
+          ((regular) (equal-regulars? file1 file2))
+          (else
+           (display "The file type is unsupported by on-change service.\n")
+           #f)))
+
+      (define (file-type file)
+        (stat:type (lstat file)))
+
+      (define (something-changed? file1 file2)
+        (cond
+         ((and (not (file-exists? file1))
+               (not (file-exists? file2))) #f)
+         ((or  (not (file-exists? file1))
+               (not (file-exists? file2))) #t)
+
+         ((not (eq? (file-type file1) (file-type file2))) #t)
+
+         (else
+          (not (equal-files? file1 file2)))))
+
+      (define expressions-to-eval
+        (map
+         (lambda (x)
+           (let* ((file1 (string-append (getenv "GUIX_OLD_HOME") "/" (car =
x)))
+                  (file2 (string-append (getenv "GUIX_NEW_HOME") "/" (car =
x)))
+                  (_ (format #t "Comparing ~a and\n~10t~a..." file1 file2))
+                  (any-changes? (something-changed? file1 file2))
+                  (_ (format #t " done (~a)\n"
+                             (if any-changes? "changed" "same"))))
+             (if any-changes? (cadr x) "")))
+         '#$pattern-gexp-tuples))
+
+      (if #$eval-gexps?
+          (begin
+            (display "Evaling on-change gexps.\n\n")
+            (for-each primitive-eval expressions-to-eval)
+            (display "On-change gexps evaluation finished.\n\n"))
+          (display "\
+On-change gexps won't evaluated, disabled by service configuration.\n"))))
+
+(define home-run-on-change-service-type
+  (service-type (name 'home-run-on-change)
+                (extensions
+                 (list (service-extension
+                        home-activation-service-type
+                        identity)))
+                (compose concatenate)
+                (extend compute-on-change-gexp)
+                (default-value #t)
+                (description "\
+G-expressions to run if the specified files have changed since the
+last generation.  The extension should be a list of lists where the
+first element is the pattern for file or directory that expected to be
+changed, and the second element is the G-expression to be evaluated.")))
=2D-=20
2.32.0



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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjJ8APHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6waMIP/iftqlC/BHYKJZUXuGla6gqEyIZy495xHJGq
ZPHSZaIcqnGjTx2A7J5+w6xTsDgnRzTAzXtJ+7Wx31sS3mk1noVSBDVxA7HGsFu4
KUP/gjjRxm9qsegRtWWrvHjDrRpmTfG460/HOvS5b80gVlr0o8A1UL/O7fElPqk9
rr0vbx18f/FB+m0EwiApk2g26ORrHEDL4YhIT+fvW3JxgGTCTVUF+T6DyiRa2wKa
cIH6pVi2DFzNEIECfbi6adWkNNLgX/PY+shrQJZTVopDPRu0oND04wL/TZWvryfK
BW9Gigi6Ma2iSj47qn1+RicUKNZi6NJgnv+jUBngSxhFDWfQBLJgMJKgGB6agNFW
gLcwFTe6KHdgrOu2oiH9Cc4uhUQw+g3ddCR8mfkSvST/RafMWgOrptFWspHrLfMH
F3uTMGlUJ76m+9sjdFkgI4vdvzWSX96M94ddkWFJFSG0KhRtqQ9kCf01MM7bRDFL
QRtQ7zhgUOoAQlz5xSs5aTh+2FkGf0Xdd5itUP8IGXzYhtQLvm2/HhaRF035YoDu
c4qWmvS5454VG152u1Bz/QsM95uxZSEPChqEIyquSFcyX5WUQHDVa2e6RoO1DmFY
EBYy4XwnzCKaLpWvarC3z9E7SCYJIBkSqb4oV3OLtklHiADFSu8LD7UdYmK8vKFU
JytNaSV7
=Zq/L
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 49419) by debbugs.gnu.org; 5 Jul 2021 15:37:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:37:26 2021
Received: from localhost ([127.0.0.1]:46502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0Qez-0006eF-IU
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:37:26 -0400
Received: from mail-lf1-f41.google.com ([209.85.167.41]:46628)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0Qex-0006e0-EG
 for 49419 <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:37:24 -0400
Received: by mail-lf1-f41.google.com with SMTP id p21so11394538lfj.13
 for <49419 <at> debbugs.gnu.org>; Mon, 05 Jul 2021 08:37:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=iyJgr5O2mkA2akelmDVgRasC8dLxHj56J3bChxqZo0g=;
 b=m6CoXxGwRUyFJiVM9vk3TWmiuGmujHMdqfL/jYYfWF5+OgTLnwpH0UfIBRCwgml3Ma
 /yF/J4hiTDa+WaEL1A4OuUusfCRounceMQvFKUolQbeAu8L4gBXn9d079e/rwY1CL5d6
 lMMiduBDcGPTlK9brPphRq2CKFRXy8J+X1h5VGgKUKRZ+sWjOvmBV8VhIvI4vHwhYl+Z
 oBfMHqjA/0s2etAPXtDRjFbjQmMkt16zzGXZwMSxLkF4uO9x6h9nw0omXOH8hWrQGVty
 T5LwAzNnypU1AW9WX5LYWmEUz8nsgpJmGM7iQPIDeqgFv7oa76PTKLMJuygBwXUm7ljs
 4Z2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=iyJgr5O2mkA2akelmDVgRasC8dLxHj56J3bChxqZo0g=;
 b=pqwWv1Oe35eBxr5+v3lfmS3G4BSP53AQFS46p3kKqy72ASFlGmZC0kRYOnAI81CUjj
 lDrVOh72Ko/nHvw79fFc8T+U76s9sfdtJYji5dnQyFrH4qodw7yt8ia0niCzq61zmN1W
 vFmNMIxaro7SdTo5CQBmmzq7jv3YXH3qVYTaqO6ZPDMAAiAQNff2mFquDzXRU9dgtb78
 WOKpYnyQhy02wF24Qb37PmX9uae2B8DDzVOuD7QR6M3rUOmWn5dnzQHw7Q1kDwujR0lR
 mOB7VpV9xol7B9JrpGuvcB/ziZP3Lwzo0J7Dq6YMedp27SAx6tUbyMbcdlv3IlYu0qo+
 ii8g==
X-Gm-Message-State: AOAM53277UTkEtinUvSELSfAy4m4zJjxoaFiNs5vJ8FvOu8o0tMVPV+F
 LjCA+F9I3ehjZpkckTee7za3UH2Tm3vfIA==
X-Google-Smtp-Source: ABdhPJw3wkgbKtETRvOFpi15aAvxLqPpQIU+zj3kvFdPAuLp1b2ykJOsTWaAG+i7U1irkpFwCgiflg==
X-Received: by 2002:a05:6512:23a6:: with SMTP id
 c38mr11363573lfv.78.1625499436903; 
 Mon, 05 Jul 2021 08:37:16 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id f2sm1069763lft.225.2021.07.05.08.37.15
 for <49419 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 08:37:16 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: 49419 <at> debbugs.gnu.org
Subject: [PATCH 1/4] home-services: Add most essential home services
Date: Mon, 05 Jul 2021 18:37:13 +0300
Message-ID: <87wnq4hivq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: home-service-type is a root of home services DAG.
 home-profile-service-type
 is almost the same as profile-service-type,
 at least for now. home-environment-variables-service-type
 generates a @file{setup-environment} shell script, which is expected to be
 sourced by login shell or other program, which starts early and spawns all
 other proc [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.167.41 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.167.41 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 49419
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 (+)

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

home-service-type is a root of home services DAG.

home-profile-service-type is almost the same as profile-service-type, at le=
ast
for now.

home-environment-variables-service-type generates a @file{setup-environment}
shell script, which is expected to be sourced by login shell or other progr=
am,
which starts early and spawns all other processes.  Home services for shells
automatically add code for sourcing this file, if person do not use those h=
ome
services they have to source this script manually in their's shell *profile
file (details described in the manual).

home-files-service-type is similar to etc-service-type, but doesn't extend
home-activation, because deploy mechanism for config files is pluggable and
can be different for different home environments: The default one is called
symlink-manager (will be introudced in a separate patch series), which crea=
tes
links for various dotfiles (like $XDG_CONFIG_HOME/$APP/...) to store, but is
possible to implement alternative approaches like read-only home from Julie=
n's
guix-home-manager.

home-run-on-first-login-service-type provides an @file{on-first-login} guile
script, which runs provided gexps once, when user makes first login.  It can
be used to start user's Shepherd and maybe some other process.  It relies on
assumption that /run/user/$UID will be created on login by some login
manager (elogind for example).

home-activation-service-type provides an @file{activate} guile script, which
do three main things:

=2D Sets environment variables to the values declared in
@file{setup-environment} shell script.  It's necessary, because user can set
for example XDG_CONFIG_HOME and it should be respected by activation gexp of
symlink-manager.

=2D Sets GUIX_NEW_HOME and possibly GUIX_OLD_HOME vars to paths in the stor=
e.
Later those variables can be used by activation gexps, for example by
symlink-manager or run-on-change services.

=2D Run all activation gexps provided by other home services.
=2D--
 gnu/home-services.scm | 328 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 328 insertions(+)
 create mode 100644 gnu/home-services.scm

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
new file mode 100644
index 0000000000..44a7e68934
=2D-- /dev/null
+++ b/gnu/home-services.scm
@@ -0,0 +1,328 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 Andrew Tropin <andrew@HIDDEN>
+;;; Copyright =C2=A9 2021 Xinglu Chen <public@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)
+  #:use-module (gnu services)
+  #:use-module (guix channels)
+  #:use-module (guix monads)
+  #:use-module (guix store)
+  #:use-module (guix gexp)
+  #:use-module (guix profiles)
+  #:use-module (guix sets)
+  #:use-module (guix ui)
+  #:use-module (guix discovery)
+  #:use-module (guix diagnostics)
+
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
+
+  #:export (home-service-type
+	    home-profile-service-type
+	    home-environment-variables-service-type
+	    home-files-service-type
+	    home-run-on-first-login-service-type
+            home-activation-service-type)
+
+  #:re-export (service
+	       service-type
+	       service-extension))
+
+;;; Comment:
+;;;
+;;; This module is similar to (gnu system services) module, but
+;;; provides Home Services, which are supposed to be used for building
+;;; home-environment.
+;;;
+;;; Home Services use the same extension as System Services.  Consult
+;;; (gnu system services) module or manual for more information.
+;;;
+;;; Code:
+
+
+(define (home-derivation entries mextensions)
+  "Return as a monadic value the derivation of the 'home'
+directory containing the given entries."
+  (mlet %store-monad ((extensions (mapm/accumulate-builds identity
+                                                          mextensions)))
+    (lower-object
+     (file-union "home" (append entries (concatenate extensions))))))
+
+(define home-service-type
+  ;; This is the ultimate service type, the root of the home service
+  ;; DAG.  The service of this type is extended by monadic name/item
+  ;; pairs.  These items end up in the "home-environment directory" as
+  ;; returned by 'home-environment-derivation'.
+  (service-type (name 'home)
+                (extensions '())
+                (compose identity)
+                (extend home-derivation)
+		(default-value '())
+                (description
+                 "Build the home environment top-level directory,
+which in turn refers to everything the home environment needs: its
+packages, configuration files, activation script, and so on.")))
+
+(define (packages->profile-entry packages)
+  "Return a system entry for the profile containing PACKAGES."
+  ;; XXX: 'mlet' is needed here for one reason: to get the proper
+  ;; '%current-target' and '%current-target-system' bindings when
+  ;; 'packages->manifest' is called, and thus when the 'package-inputs'
+  ;; etc. procedures are called on PACKAGES.  That way, conditionals in th=
ose
+  ;; inputs see the "correct" value of these two parameters.  See
+  ;; <https://issues.guix.gnu.org/44952>.
+  (mlet %store-monad ((_ (current-target-system)))
+    (return `(("profile" ,(profile
+                           (content (packages->manifest
+                                     (map identity
+                                     ;;(options->transformation transforma=
tions)
+                                     (delete-duplicates packages eq?))))))=
))))
+
+;; MAYBE: Add a list of transformations for packages.  It's better to
+;; place it in home-profile-service-type to affect all profile
+;; packages and prevent conflicts, when other packages relies on
+;; non-transformed version of package.
+(define home-profile-service-type
+  (service-type (name 'home-profile)
+                (extensions
+                 (list (service-extension home-service-type
+                                          packages->profile-entry)))
+                (compose concatenate)
+                (extend append)
+                (description
+                 "This is the @dfn{home profile} and can be found in
+@file{~/.guix-home/profile}.  It contains packages and
+configuration files that the user has declared in their
+@code{home-environment} record.")))
+
+(define (environment-variables->setup-environment-script vars)
+  "Return a file that can be sourced by a POSIX compliant shell which
+initializes the environment.  The file will source the home
+environment profile, set some default environment variables, and set
+environment variables provided in @code{vars}.  @code{vars} is a list
+of pairs (@code{(key . value)}), @code{key} is a string and
+@code{value} is a string or gexp.
+
+If value is @code{#f} variable will be omitted.
+If value is @code{#t} variable will be just exported.
+For any other, value variable will be set to the @code{value} and
+exported."
+  (define (warn-about-duplicate-defenitions)
+    (fold
+     (lambda (x acc)
+       (when (equal? (car x) (car acc))
+	 (warning
+	  (G_ "duplicate definition for `~a' environment variable ~%") (car x)))
+       x)
+     (cons "" "")
+     (sort vars (lambda (a b)
+		  (string<? (car a) (car b))))))
+
+  (warn-about-duplicate-defenitions)
+  (with-monad
+   %store-monad
+   (return
+    `(("setup-environment"
+       ;; TODO: It's necessary to source ~/.guix-profile too
+       ;; on foreign distros
+       ,(apply mixed-text-file "setup-environment"
+	       "\
+HOME_ENVIRONMENT=3D$HOME/.guix-home
+GUIX_PROFILE=3D\"$HOME_ENVIRONMENT/profile\"
+PROFILE_FILE=3D\"$HOME_ENVIRONMENT/profile/etc/profile\"
+[ -f $PROFILE_FILE ] && . $PROFILE_FILE
+
+case $XDG_DATA_DIRS in
+  *$HOME_ENVIRONMENT/profile/share*) ;;
+  *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS=
 ;;
+esac
+case $MANPATH in
+  *$HOME_ENVIRONMENT/profile/share/man*) ;;
+  *) export MANPATH=3D$HOME_ENVIRONMENT/profile/share/man:$MANPATH
+esac
+case $INFOPATH in
+  *$HOME_ENVIRONMENT/profile/share/info*) ;;
+  *) export INFOPATH=3D$HOME_ENVIRONMENT/profile/share/info:$INFOPATH ;;
+esac
+case $XDG_CONFIG_DIRS in
+  *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
+  *) export XDG_CONFIG_DIRS=3D$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFI=
G_DIRS ;;
+esac
+case $XCURSOR_PATH in
+  *$HOME_ENVIRONMENT/profile/share/icons*) ;;
+  *) export XCURSOR_PATH=3D$HOME_ENVIRONMENT/profile/share/icons:$XCURSOR_=
PATH ;;
+esac
+
+"
+
+	       (append-map
+		(match-lambda
+		  ((key . #f)
+		   '())
+		  ((key . #t)
+		   (list "export " key "\n"))
+		  ((key . value)
+                   (list "export " key "=3D" value "\n")))
+		vars)))))))
+
+(define home-environment-variables-service-type
+  (service-type (name 'home-environment-variables)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        environment-variables->setup-environment-script)))
+                (compose concatenate)
+                (extend append)
+		(default-value '())
+                (description "Set the environment variables.")))
+
+(define (files->files-directory files)
+  "Return a @code{files} directory that contains FILES."
+  (define (assert-no-duplicates files)
+    (let loop ((files files)
+               (seen (set)))
+      (match files
+        (() #t)
+        (((file _) rest ...)
+         (when (set-contains? seen file)
+           (raise (formatted-message (G_ "duplicate '~a' entry for files/")
+                                     file)))
+         (loop rest (set-insert file seen))))))
+
+  ;; Detect duplicates early instead of letting them through, eventually
+  ;; leading to a build failure of "files.drv".
+  (assert-no-duplicates files)
+
+  (file-union "files" files))
+
+(define (files-entry files)
+  "Return an entry for the @file{~/.guix-home/files}
+directory containing FILES."
+  (with-monad %store-monad
+    (return `(("files" ,(files->files-directory files))))))
+
+(define home-files-service-type
+  (service-type (name 'home-files)
+                (extensions
+                 (list (service-extension home-service-type
+                                          files-entry)))
+                (compose concatenate)
+                (extend append)
+		(default-value '())
+                (description "Configuration files for programs that
+will be put in @file{~/.guix-home/files}.")))
+
+(define (compute-on-first-login-script _ gexps)
+  (gexp->script
+   "on-first-login"
+   #~(let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR")
+				 (format #f "/run/user/~a" (getuid))))
+	    (flag-file-path (string-append
+			     xdg-runtime-dir "/on-first-login-executed"))
+	    (touch (lambda (file-name)
+		     (call-with-output-file file-name (const #t)))))
+       ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick
+       ;; allows to launch on-first-login script on first login only
+       ;; after complete logout/reboot.
+       (when (not (file-exists? flag-file-path))
+	 (begin #$@gexps (touch flag-file-path))))))
+
+(define (on-first-login-script-entry m-on-first-login)
+  "Return, as a monadic value, an entry for the on-first-login script
+in the home environment directory."
+  (mlet %store-monad ((on-first-login m-on-first-login))
+	(return `(("on-first-login" ,on-first-login)))))
+
+(define home-run-on-first-login-service-type
+  (service-type (name 'home-run-on-first-login)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        on-first-login-script-entry)))
+                (compose identity)
+                (extend compute-on-first-login-script)
+		(default-value #f)
+                (description "Run gexps on first user login.  Can be
+extended with one gexp.")))
+
+
+(define (compute-activation-script init-gexp gexps)
+  (gexp->script
+   "activate"
+   #~(let* ((he-init-file (lambda (he) (string-append he "/setup-environme=
nt")))
+            (he-path (string-append (getenv "HOME") "/.guix-home"))
+            (new-home-env (getenv "GUIX_NEW_HOME"))
+            (new-home (or new-home-env
+                          ;; Path of the activation file if called interac=
tively
+                          (dirname (car (command-line)))))
+            (old-home-env (getenv "GUIX_OLD_HOME"))
+            (old-home (or old-home-env
+                          (if (file-exists? (he-init-file he-path))
+                              (readlink he-path)
+                              #f))))
+       (if (file-exists? (he-init-file new-home))
+           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
+		           (format #f "source ~a && env"
+                                   (he-init-file new-home))))
+	          (result ((@@ (ice-9 rdelim) read-delimited) "" port))
+	          (vars (map (lambda (x)
+                               (let ((si (string-index x #\=3D)))
+                                 (cons (string-take x si)
+                                       (string-drop x (1+ si)))))
+			     ((@@ (srfi srfi-1) remove)
+			      string-null?
+                              (string-split result #\newline)))))
+	     (close-port port)
+	     (map (lambda (x) (setenv (car x) (cdr x))) vars)
+
+             (setenv "GUIX_NEW_HOME" new-home)
+             (setenv "GUIX_OLD_HOME" old-home)
+
+             #$@gexps
+
+             ;; Do not unset env variable if it was set outside.
+             (unless new-home-env (setenv "GUIX_NEW_HOME" #f))
+             (unless old-home-env (setenv "GUIX_OLD_HOME" #f)))
+           (format #t "\
+Activation script was either called or loaded by file from this direcotry:
+~a
+It doesn't seem that home environment is somewhere around.
+Make sure that you call ./activate by symlink from -home store item.\n"
+                   new-home)))))
+
+(define (activation-script-entry m-activation)
+  "Return, as a monadic value, an entry for the activation script
+in the home environment directory."
+  (mlet %store-monad ((activation m-activation))
+    (return `(("activate" ,activation)))))
+
+(define home-activation-service-type
+  (service-type (name 'home-activation)
+                (extensions
+                 (list (service-extension
+			home-service-type
+                        activation-script-entry)))
+                (compose identity)
+                (extend compute-activation-script)
+		(default-value #f)
+                (description "Run gexps to activate the current
+generation of home environment and update the state of the home
+directory.  @command{activate} script automatically called during
+reconfiguration or generation switching.  This service can be extended
+with one gexp, but many times, and all gexps must be idempotent.")))
+
=2D-=20
2.32.0



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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjJykPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wEhQP/jgDYw5Erlq3nGRdfwKsKGBLkdYphrx1CE+5
qqdZ3u4IGd66O9gKskHtz9BR1Hr8rY/DPc8ZpUYob7TrmwCPgDRv8GWqnzYAaIBh
cr0ga65Do5mBWNUqGbvV/m95qdXcxMhgx0A6sMjNmvI9y5/TMP1HSN+IXZh4AfUe
db//TBBOhK1hGOkHhepPzekJkOYlz0JYMgsTwYJ6kFMx7tKMI3nawMcEjZBBQ48R
24gvmgKfaGrtnmdpR8EcUqC/odRzo9TEabIDhH9rQefW8JAbq8+G8WltLqfckeZQ
/u3MFov2fulXHvEwc5GhKCiRfqrJEc2rVvVJJKJjW1NYkHeJ8ad/6Kd58j7N1tzF
iyMoVZq2e4B207064pIoj3vA4ZepJ3BG5c81HBvBNFjuKJtKRaAACdtNIhJvwFtX
YR/M243/lvBbkk+Ms2it73k1xBfvr0YEpC2A13E6AEd8XgP9+kDauydy4x4396lW
OqbI5nTW39vb+jCfkCxoUWTaTeBqFxq6RkUps1lsKw0K2aXaQKbwldvB5c2BGuhm
1pqCn7ty2tjUu/g8e+t0MLOP6OFAG/9otrREouFs2Q2YC86vEtdrvYqZoFTpBsC5
7PKkNmopJZP/w2dNXI7pKml3T7Z5NfsVah1uM9ewGUYBjc3bLDE4HVja2kesXngB
Kf+rUERt
=bWHO
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at submit) by debbugs.gnu.org; 5 Jul 2021 15:35:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 05 11:35:26 2021
Received: from localhost ([127.0.0.1]:46496 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m0Qd4-0006aj-8G
	for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:35:26 -0400
Received: from lists.gnu.org ([209.51.188.17]:49092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1m0Qd3-0006ac-7b
 for submit <at> debbugs.gnu.org; Mon, 05 Jul 2021 11:35:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56712)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1m0Qd0-0005UV-04
 for guix-patches@HIDDEN; Mon, 05 Jul 2021 11:35:24 -0400
Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:45873)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1m0Qcy-0004D9-2i
 for guix-patches@HIDDEN; Mon, 05 Jul 2021 11:35:21 -0400
Received: by mail-lj1-x236.google.com with SMTP id b40so5374391ljf.12
 for <guix-patches@HIDDEN>; Mon, 05 Jul 2021 08:35:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=AqJjcBG2FHSqRnB2NMcOV4eW/nrRReajiMUiXV62Uk4=;
 b=l8/XG17RX4sxdJoILvubs6KdomC6edkp3H3WXwCXABm+ayiBV/+o+eH8dvW7I9zzAw
 IetUQjayqhkhUZp3JfGXy7yvgnr77Yfya4BbUnNVcgAPaGvf5UQDsOmED3T1boG/1/8n
 0b7GV6tQRN4C47XQSXgyYjruO07j8JdJJMCbFM5wTQuSHUiy8KTUiF4zWb5/MYNeKAYN
 8N1zPeo3nojF+70qE+UwoNx2C4bGpVCB5l380G9ZngK3UGXMqRGPRhdyY59tO4Ri1bQU
 9oIPoMGq8MPVnaZjUfmZYW6P/LtLViZtSXYwPDGrA6fP0YVzEPY1C3NQ7uEsEAHft8EZ
 Z7GQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=AqJjcBG2FHSqRnB2NMcOV4eW/nrRReajiMUiXV62Uk4=;
 b=taud6/ncxtxjnF8LetIJRSA/AauwO9JBDSvAPMGHzTwUspjSHZEOHWFqq2Jovc+G2P
 bDM3KKJjXBfD7GqZgfvsw9dQ5Y4ljDRIqv/GvzuLZmOp0KSSMIqRkiV7fR0BeJq3yQkP
 9J0WdL+cTsOWqfpdR9CGo/g+oZ9ABMfW7EKBzF1Q84VFYTyen5FNgl2BqLeTkPNBWUDf
 Hjr9Uk8BxfsoDT8m8rkA7QbvOnig2sAhgYUyr5FEGZUKe5B9t0rhFYeoQhhRFFRuPtfD
 4Llr8QOW8ENm7O125G6aixYfPGMKOfpMrcbxrNEPOmPif4Gnq3T5P5VCfja7TLIY1tSj
 i2Pw==
X-Gm-Message-State: AOAM533yLD4HGykS0FsxFacntYXGXhDEhNIQJgZF3vJY5+dAQNEwpqdL
 sD5i/8ZXuM/M+cl+bkOB74Mzm6Myfa2XxQ==
X-Google-Smtp-Source: ABdhPJzpfy2yPL6knzsTfmjmsgf7IxKaU2MIGt/zFScuH+Q5I6BN0+FidgiPuPvIeqwnX358qSI/1g==
X-Received: by 2002:a2e:8e21:: with SMTP id r1mr7638025ljk.356.1625499317869; 
 Mon, 05 Jul 2021 08:35:17 -0700 (PDT)
Received: from ixy ([109.252.117.164])
 by smtp.gmail.com with ESMTPSA id c5sm1120366lff.86.2021.07.05.08.35.16
 for <guix-patches@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jul 2021 08:35:16 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/4] Essential home services
Date: Mon, 05 Jul 2021 18:35:14 +0300
Message-ID: <87y2akhiz1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Received-SPF: none client-ip=2a00:1450:4864:20::236;
 envelope-from=andrew@HIDDEN; helo=mail-lj1-x236.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
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 (---)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This patch series contains most crucial home services and few helper functi=
ons
required for Guix Home.

Andrew Tropin (4):
  home-services: Add most essential home services
  home-services: Add home-run-on-change-service-type
  home-services: Add home-provenance-service-type
  home-services: Add fold-home-service-types function

 gnu/home-services.scm | 472 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 472 insertions(+)
 create mode 100644 gnu/home-services.scm

=2D-=20
2.32.0




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

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

iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmDjJrIPHGFuZHJld0B0
cm9wLmluAAoJECII0glYwd6wHSgP/iGWNsxcvgbodO7ee4UwF8pTKG24ulIlYHC/
AJ2ifrYwaX+EcrBS9nZ2/PkQZR6a+/+YEUXmS5Ys1akuDNbyQLRL+F6YXyyjsIH1
2Ko4mg0QpppSwpTOtwFzQSv0HYH7PURh8cjDeD63qKvzKhhrH59nyrBf/ePeWW14
KSap8Ant7ULNUM1kp86bFBbXGeEh7wf7NH9ftsBnpp947xUKc4RnhOeQyC/wg7Xl
zHSOY2ACJ/0hbt+i0nzM/yNqnINaSYkAxQga0M4g2sRYbIskcvdwVgonGDkaaCjV
qHp9a3Ugru5oKVGNlf52E4PkdVMIIctAmHGL7Eh1yyl11FZNUvtjoShYQCAcYOBd
bjpwq2O4UX+0CU+SnBw++2KWNj+j3ENdWW27fpPYo7/KUrFUIRTSVa6vodOXw1q3
nvMHv+Cqz6fcZeWHwHLoPIcwcjk76kPNplIvAlImva/BpY4cwdU5/ptzuSGH2dsn
AwIpue1PE5gWDVLfv2Lu7QUqOTQvcfaI+yOtEWwuvjt788XwsOcB6C3oWJIb+nsV
qr/A9SKdgT5/VVKMy1kaJCKVyuFxpqP6XzzBVsfSjVp8qlM7399EUr6IKVXxldTJ
qAmvUYBHajBP0YyGs8dX/yWSfJMnQurtUlpnQ/kMKpMtetjE0luFL2VVB8KnEqth
H6tLhYZx
=T9SZ
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Andrew Tropin <andrew@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#49419; 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: Mon, 19 Jul 2021 17:15:01 UTC

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