GNU bug report logs - #50873
[PATCH 0/5] Fixes to ‘guix home import’

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: Xinglu Chen <public@HIDDEN>; Keywords: patch; dated Tue, 28 Sep 2021 17:34:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 50873) by debbugs.gnu.org; 11 Oct 2021 13:01:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 11 09:01:00 2021
Received: from localhost ([127.0.0.1]:57081 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZuvM-0002Ac-04
	for submit <at> debbugs.gnu.org; Mon, 11 Oct 2021 09:01:00 -0400
Received: from mail-lf1-f53.google.com ([209.85.167.53]:46675)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <go.wigust@HIDDEN>) id 1mZuvK-00023X-1N
 for 50873 <at> debbugs.gnu.org; Mon, 11 Oct 2021 09:00:58 -0400
Received: by mail-lf1-f53.google.com with SMTP id i24so71769922lfj.13
 for <50873 <at> debbugs.gnu.org>; Mon, 11 Oct 2021 06:00:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=N9oM6jLwn+levB3mCIr0WAoLQCtg0GErxOmIfvp2iqU=;
 b=lN+zq/HMjeWxWRGMH+lGkNNSdVWmdhQresWuceKbi9iWpfTYekulxiIaqRm7NbgKBE
 WiFna5dbhvoCDVjrpDl731ZLtpEJDAIu8K2K8oE5LMekiHs8FCxZOO4ezDpjhtYuaRrd
 Wt4jLEQ1FJGYl0Z5kQcVEFvdc2Spr9eLrrCroVXzBL++tCBF+Yk3m2T/sd9zrIIYbVkF
 m47YX9H2O83w7tU72qjVXYA/1Iy0okiNgz1TDO2/H8pHuDh1ect2E72yt+z6MHQP2Sob
 ZeCaWjLRfXgRqC2i4OuaxdKJ3GjlkAGaY/2gQssLGVpuNPlsKp9lLlhkx+5xbKQInV8t
 sBtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=N9oM6jLwn+levB3mCIr0WAoLQCtg0GErxOmIfvp2iqU=;
 b=v8PQz2VZDbKeFM7vCVXQiseUDj/ECGmzRLnN45SNllTaectmhs1pOf9sRF/REYMFJD
 KYB/Pm3NDSlkvk6jsgjpDdir8KH8Yr4rgUhdUmh61REiBubVY1ZaFdZ7O/EGthfFXHkr
 wvJJua5+TD9ZaxpuWefcUi+mnUc2qBf+GIv5McvIRg8D2l8NahtV/AHV8fBGedx6pxNQ
 bVlZMTN1JWbgftgTlv/XfcXAp3D0bWdeSGfmea8yDTlshMaIaHRw91hnOWU+seqq/dzv
 rqjSxUJVYW/ikv8E+ROs/z3W4k+g3+ZdAjQLZ3ygNAImELHkvaV2AQl7EGPgYj+IEZja
 sNXw==
X-Gm-Message-State: AOAM531y04xiS5q10BpXHdQ+COWYSmsFEOS1/oncvdAsWBwtRmtVYNiU
 VxZweyVfkxVhBgvFGkZ3y2g=
X-Google-Smtp-Source: ABdhPJyjMwAPxhiFcPuLOhmxKac9a8C1SAY6IBoBp2Uv/5w8Z+ibOtznTgBDrIyxdzdEzd8lBGXviQ==
X-Received: by 2002:a2e:a415:: with SMTP id p21mr132329ljn.384.1633957245188; 
 Mon, 11 Oct 2021 06:00:45 -0700 (PDT)
Received: from guixsd ([88.201.161.72])
 by smtp.gmail.com with ESMTPSA id m3sm729959lfh.2.2021.10.11.06.00.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 11 Oct 2021 06:00:44 -0700 (PDT)
From: Oleg Pykhalov <go.wigust@HIDDEN>
To: Xinglu Chen <public@HIDDEN>
Subject: Re: bug#50873: [PATCH 0/5] Fixes to =?utf-8?Q?=E2=80=98guix?= home
 =?utf-8?Q?import=E2=80=99?=
References: <cover.1632849969.git.public@HIDDEN>
 <197cab14424f4d28ece9e80981d2a4e142dc4791.1633861021.git.public@HIDDEN>
Date: Mon, 11 Oct 2021 16:00:43 +0300
In-Reply-To: <197cab14424f4d28ece9e80981d2a4e142dc4791.1633861021.git.public@HIDDEN>
 (Xinglu Chen's message of "Sun, 10 Oct 2021 12:20:49 +0200")
Message-ID: <87mtnf1zt0.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
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:  Hi, Xinglu Chen writes: […] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (go.wigust[at]gmail.com)
  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.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: 50873
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 50873 <at> debbugs.gnu.org,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

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

Hi,

Xinglu Chen <public@HIDDEN> writes:

[=E2=80=A6]

> +;; Helpers for checking and generating home environments.
> +
> +(%destination-directory "/tmp/guix-config")
> +(mkdir-p (%destination-directory))
> +
> +(define %temporary-home-directory "/tmp/guix-home-import-test")

Better use temporary directory like in tests/opam.scm.

=2D-8<---------------cut here---------------start------------->8---
(define-module ...
  #:use-module ((guix build syscalls) #:select (mkdtemp!))
  ...)

(mkdtemp! "/tmp/guix-home-import-test.XXXXXX")
=2D-8<---------------cut here---------------end--------------->8---

> +
> +(define-syntax-rule (define-home-environment-matcher name pattern)
> +  (define (name obj)
> +    (match obj
> +      (pattern #t)
> +      (x (pk 'fail x #f)))))
> +
> +(define (create-temporary-home files-alist)
> +  "Create a temporary home directory in '%temporary-home-directory'.
> +FILES-ALIST is an association list of files and the content of the
> +corresponding file."
> +  (define (create-file file content)
> +    (let ((absolute-path (string-append %temporary-home-directory "/" fi=
le)))
> +      (unless (file-exists? absolute-path)
> +        (mkdir-p (pk (dirname absolute-path))))
> +      (call-with-output-file (pk absolute-path)
> +        (cut display content <>))))

Do we need those 'pk' calls?

[=E2=80=A6]

> +(define-home-environment-matcher match-home-environment-bash-service
> +  ('begin
> +    ('use-modules
> +     ('gnu 'home)
> +     ('gnu 'packages)
> +     ('gnu 'home 'services 'shells))
> +    ('home-environment
> +     ('packages
> +      ('map 'specification->package
> +            ('list)))
> +     ('services
> +      ('list ('service
> +              'home-bash-service-type
> +              ('home-bash-configuration
> +               ('bashrc
> +                ('list ('local-file "/tmp/guix-config/.bashrc"))))))))))

We should use '%temporary-home-directory' if we use 'mkdtemp!'.

> +
> +(test-assert "manifest->code: No services"
> +  (eval-test-with-home-environment
> +   '()
> +   (make-manifest (list guile-2.0.9 gcc glibc))
> +   match-home-environment-no-services))
> +
> +(test-assert "manifest->code: No packages nor services"
> +  (eval-test-with-home-environment
> +   '()
> +   (make-manifest '())
> +   match-home-environment-no-services-nor-packages))
> +
> +(test-assert "manifest->code: Bash service"
> +  (eval-test-with-home-environment
> +   '((".bashrc" . "echo 'hello guix'"))
> +   (make-manifest '())
> +   match-home-environment-bash-service))
> +
> +(test-end "home-import")

I tried to use 'guix home import /tmp/foo', where '/tmp/foo' is an empty
directory.  Then a pasted the generated code to '/tmp/foo/home.scm'
file.

=2D-8<---------------cut here---------------start------------->8---
oleg@guixsd ~/src/guix [env]$ ./pre-inst-env guix home build /tmp/foo/home.=
scm
/tmp/foo/home.scm:487:11: error: service: unbound variable
hint: Did you forget `(use-modules (gnu services))'?
=2D-8<---------------cut here---------------end--------------->8---

OK, added missing (use-modules (gnu services)).

=2D-8<---------------cut here---------------start------------->8---
oleg@guixsd ~/src/guix [env]$ ./pre-inst-env guix home build /tmp/foo/home.=
scm
/tmp/foo/home.scm:491:29: error: local-file: unbound variable
hint: Did you forget `(use-modules (guix gexp))'?
=2D-8<---------------cut here---------------end--------------->8---

OK, added missing (use-modules (guix gexp))

=2D-8<---------------cut here---------------start------------->8---
oleg@guixsd ~/src/guix [env]$
oleg@guixsd ~/src/guix [env]$ ./pre-inst-env guix home build /tmp/foo/home.=
scm
guix home: error: invalid name: `.bashrc'
=2D-8<---------------cut here---------------end--------------->8---

Now, I need to rename .bashrc to dot-bashrc and .bash_profile to
dot-bash_profile.  Maybe we should save all dot file with a 'dot-'
prefix by default?

Oleg.

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

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

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmFkNXsUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+py98BAAw2qrJNXtEuNXJyUws9obypmDH2aB
NtX29V0AjXhmVpoY60rv41I8OVeammAMLAX9974u8Lka1vNfiVKd14JkHqRutKur
I6qPbgBjUCI0MSDwl2MrUbq9y/QMw9fmo/PSY+TXE6Zfzg7hN2XLMllwfKVSD5JV
rSE67+OybUDPI2Nopx6TEJydwTGdBiRVQBWo4nw7fhqzWYXQtkNoe/BeoAwoybLF
wW8+rL9JyISch66f2TSduyVcHXp8F07r9hzCb9S9PqpiQ6EtaVUJC37uJ/jW5b3a
Q7r/EVygZMD4bHX5qz5gOe+Cu5HoXUuz/07q2S+E9spjZ+1hVGUltEm6oPU8xLjU
/FN9dbMuSLZfzew3UoE6NqNa4bNDjSM5LRO2ZIi3E9N8WCj5ggJVgXziEsns94Aa
D0obuR9lPATcXzK2XTqdpGK1jdvDKeaNfZQA7gnkIkV1TMbj2p2u2dFVdaM5zjcU
tWOLC/6ypLZMlo+g/RygeMWWAW2mba2Yz+05kzaIxucgXxx51fYJWVX8LBuR5+XM
pQwwB6W9jEicJu07RFfE357mj4LPuRhfV071ngKi4UTtoz+MxYE9TE6pu9BGPp8z
qo3UU9zODk4HZD4NL2dkQEOTesoWXfIdW8MYoxhaKgxYMmEKxg8eLBPopu4EUJE2
gmEGq1y7C00Eb/k=
=mkRy
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:58 2021
Received: from localhost ([127.0.0.1]:54508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwv-0003OB-TK
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:58 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39886
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwt-0003Nx-FM
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:56 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861249;
 bh=TRr6MgO4gfeLa5SQBiDASq5mQZaXwVvBljA0qIiTiec=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=uZMJiQMtR1qb4MqFprIh5MsVWnjj6nw1Y6fHkup5hcIaLJ6VM5NGDeeWFrOFQ9UP1
 Mlkj4TJIwnRqNBymDYSgPBPOp1YoK6rOsHX7pxSj7Ca8hX5CAMl82lM6siBPa4lGAx
 G3o+tFyQIjQJkXSnrMfiF5plOVc0H4m9g4cF22X4=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 7/7] =?UTF-8?q?Add=20tests=20for=20=E2=80=98guix=20home=20?=
 =?UTF-8?q?import=E2=80=99.?=
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <197cab14424f4d28ece9e80981d2a4e142dc4791.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:49 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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: * tests/home-import.scm: New file. * Makefile.am (SCM_TESTS):
 Add it. --- Makefile.am | 1 + guix/scripts/home/import.scm | 5 +-
 tests/home-import.scm
 | 174 +++++++++++++++++++++++++++++++++++ 3 files [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  * tests/home-import.scm: New file. * Makefile.am (SCM_TESTS):
    Add it. --- Makefile.am | 1 + guix/scripts/home/import.scm | 5 +- tests/home-import.scm
    | 174 +++++++++++++++++++++++++++++++++++ 3 files [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

* tests/home-import.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
---
 Makefile.am                  |   1 +
 guix/scripts/home/import.scm |   5 +-
 tests/home-import.scm        | 174 +++++++++++++++++++++++++++++++++++
 3 files changed, 179 insertions(+), 1 deletion(-)
 create mode 100644 tests/home-import.scm

diff --git a/Makefile.am b/Makefile.am
index 635147efc1..f93199e561 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -474,6 +474,7 @@ SCM_TESTS =3D					\
   tests/graph.scm				\
   tests/gremlin.scm				\
   tests/hackage.scm				\
+  tests/home-import.scm				\
   tests/import-git.scm				\
   tests/import-utils.scm			\
   tests/inferior.scm				\
diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index b892ae3dfa..c68cfb9e78 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -28,7 +28,10 @@ (define-module (guix scripts home import)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:export (import-manifest
-            %destination-directory))
+            %destination-directory
+
+            ;; For tests.
+            manifest->code))
=20
 ;;; Commentary:
 ;;;
diff --git a/tests/home-import.scm b/tests/home-import.scm
new file mode 100644
index 0000000000..8d141bba0f
--- /dev/null
+++ b/tests/home-import.scm
@@ -0,0 +1,174 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; 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 (test-home-import)
+  #:use-module (guix scripts home import)
+  #:use-module (guix utils)
+  #:use-module (guix build utils)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:use-module ((guix profiles) #:hide (manifest->code))
+  #:use-module (gnu packages)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-64))
+
+;; Test the (guix scripts home import) tools.
+
+(test-begin "home-import")
+
+;; Example manifest entries.
+
+(define guile-2.0.9
+  (manifest-entry
+    (name "guile")
+    (version "2.0.9")
+    (item "/gnu/store/...")))
+
+(define glibc
+  (manifest-entry
+    (name "glibc")
+    (version "2.19")
+    (item "/gnu/store/...")))
+
+(define gcc
+  (manifest-entry
+    (name "gcc")
+    (version "10.3.0")
+    (item "/gnu/store/...")))
+
+;; Helpers for checking and generating home environments.
+
+(%destination-directory "/tmp/guix-config")
+(mkdir-p (%destination-directory))
+
+(define %temporary-home-directory "/tmp/guix-home-import-test")
+
+(define-syntax-rule (define-home-environment-matcher name pattern)
+  (define (name obj)
+    (match obj
+      (pattern #t)
+      (x (pk 'fail x #f)))))
+
+(define (create-temporary-home files-alist)
+  "Create a temporary home directory in '%temporary-home-directory'.
+FILES-ALIST is an association list of files and the content of the
+corresponding file."
+  (define (create-file file content)
+    (let ((absolute-path (string-append %temporary-home-directory "/" file=
)))
+      (unless (file-exists? absolute-path)
+        (mkdir-p (pk (dirname absolute-path))))
+      (call-with-output-file (pk absolute-path)
+        (cut display content <>))))
+
+  (for-each (match-lambda
+              ((file . content) (create-file file content)))
+            (pk files-alist)))
+
+;; Copied from (guix profiles)
+(define (version-spec entry)
+  (let ((name (manifest-entry-name entry)))
+    (match (map package-version (find-packages-by-name name))
+      ((_)
+       ;; A single version of NAME is available, so do not specify the
+       ;; version number, even if the available version doesn't match ENTR=
Y.
+       "")
+      (versions
+       ;; If ENTRY uses the latest version, don't specify any version.
+       ;; Otherwise return the shortest unique version prefix.  Note that
+       ;; this is based on the currently available packages, which could
+       ;; differ from the packages available in the revision that was used
+       ;; to build MANIFEST.
+       (let ((current (manifest-entry-version entry)))
+         (if (every (cut version>? current <>)
+                    (delete current versions))
+             ""
+             (version-unique-prefix (manifest-entry-version entry)
+                                    versions)))))))
+
+(define (eval-test-with-home-environment files-alist manifest matcher)
+  (create-temporary-home files-alist)
+  (setenv "HOME" %temporary-home-directory)
+  (mkdir-p %temporary-home-directory)
+  (let* ((home-environment (manifest->code manifest
+                                           #:entry-package-version version=
-spec
+                                           #:home-environment? #t))
+         (result (matcher home-environment)))
+    (delete-file-recursively %temporary-home-directory)
+    result))
+
+(define-home-environment-matcher match-home-environment-no-services
+  ('begin
+    ('use-modules
+     ('gnu 'home)
+     ('gnu 'packages))
+    ('home-environment
+     ('packages
+      ('map 'specification->package
+            ('list "guile@HIDDEN" "gcc" "glibc@HIDDEN")))
+     ('services
+      ('list)))))
+
+(define-home-environment-matcher match-home-environment-no-services-nor-pa=
ckages
+  ('begin
+    ('use-modules
+     ('gnu 'home)
+     ('gnu 'packages))
+    ('home-environment
+     ('packages
+      ('map 'specification->package
+            ('list)))
+     ('services
+      ('list)))))
+
+(define-home-environment-matcher match-home-environment-bash-service
+  ('begin
+    ('use-modules
+     ('gnu 'home)
+     ('gnu 'packages)
+     ('gnu 'home 'services 'shells))
+    ('home-environment
+     ('packages
+      ('map 'specification->package
+            ('list)))
+     ('services
+      ('list ('service
+              'home-bash-service-type
+              ('home-bash-configuration
+               ('bashrc
+                ('list ('local-file "/tmp/guix-config/.bashrc"))))))))))
+
+(test-assert "manifest->code: No services"
+  (eval-test-with-home-environment
+   '()
+   (make-manifest (list guile-2.0.9 gcc glibc))
+   match-home-environment-no-services))
+
+(test-assert "manifest->code: No packages nor services"
+  (eval-test-with-home-environment
+   '()
+   (make-manifest '())
+   match-home-environment-no-services-nor-packages))
+
+(test-assert "manifest->code: Bash service"
+  (eval-test-with-home-environment
+   '((".bashrc" . "echo 'hello guix'"))
+   (make-manifest '())
+   match-home-environment-bash-service))
+
+(test-end "home-import")
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:46 2021
Received: from localhost ([127.0.0.1]:54505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwk-0003Nn-La
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:46 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39852
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwi-0003NP-Nu
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:45 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861239;
 bh=4HZfDpDQv6G3L+iHcmw74LWqfAhU9l5R7EPesFqqw2E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=GqUQLCzFhZIMgBLsHeCgCrNyOrSzNpaH3CaLAu8nbCTtJtYYpmNzW7PLyS83i0/ic
 WNuxIK44M2XIsMLTbmfN+uVOnOkuf6d51IRXiM7keVxPoxVy6fTKmoXQ8A/sjCaA59
 0RbC0Xoiy6ftc3V4FUB2zZLA64CzHdAjnOY8866M=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 6/7] =?UTF-8?q?doc:=20Document=20the=20=E2=80=98guix=20hom?=
 =?UTF-8?q?e=20import=E2=80=99=20subcommand.?=
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <b86d5dab6ff86d4dab6907e68e87b24d9ebef8e1.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:38 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  * doc/guix.texi (Invoking guix home): Document ‘guix home
    import’. --- doc/guix.texi | 32 ++++++++++++++++++++++++++++++++ 1 file
    changed, 32 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index
    b577684eb7..107a76a9d3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@
   -36089,6 +36089,38 @@ $ guix home list-generations 10d @end example 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  * doc/guix.texi (Invoking guix home): Document ‘guix home
    import’. --- doc/guix.texi | 32 ++++++++++++++++++++++++++++++++ 1 file
    changed, 32 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index
    b577684eb7..107a76a9d3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@
   -36089,6 +36089,38 @@ $ guix home list-generations 10d @end example 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

* doc/guix.texi (Invoking guix home): Document =E2=80=98guix home import=E2=
=80=99.
---
 doc/guix.texi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index b577684eb7..107a76a9d3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36089,6 +36089,38 @@
 $ guix home list-generations 10d
 @end example
=20
+@item import
+Generate a @dfn{home environment} from the packages in the default
+profile and configuration files found in the user's home directory.  The
+configuration files will be copied to the specified directory.  Note
+that not every home service that exists is supported (@pxref{Home
+Services}).
+
+@example
+$ guix home import ~/guix-config
+;; This "home-environment" file can be passed to 'guix home reconfigure'
+;; to reproduce the content of your profile.  This is "symbolic": it only
+;; specifies package names.  To reproduce the exact same profile, you also
+;; need to capture the channels being used, as returned by "guix describe".
+;; See the "Replicating Guix" section in the manual.
+
+(use-modules
+  (gnu home)
+  (gnu packages)
+  (gnu home services shells))
+
+(home-environment
+  (packages
+    (map specification->package
+         (list "glibc-locales" "nss-certs" "nss")))
+  (services
+    (list (service
+            home-bash-service-type
+            (home-bash-configuration
+              (bashrc
+                (list (local-file "/tmp/guix-config/.bashrc"))))))))
+@end example
+
 @end table
=20
 @var{options} can contain any of the common build options (@pxref{Common
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:40 2021
Received: from localhost ([127.0.0.1]:54502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwe-0003NV-E3
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:40 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39824
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwd-0003N6-8P
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:39 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861233;
 bh=MrpFKSnBOheEUP1Gsz6KdE+W7u6iL3Oyhb8moemgALU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=azTt7zoAjbakto9VyYwiG/eimw2nh9nKO6yFnLEL6iLbRJ3gxnbdBt6kNe4z9iiPN
 SMdvToN0qXCKXXWjh/JHfMSw89AfKeRhZsyYAWUhxLdCio5gc4f3GASoGo/OGAPFSd
 vH46nGfv/hLPaMPvn7BgFQk8BPVFSEjv2Gf6weIo=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 5/7] guix home: import: Delete duplicate modules when
 importing.
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <2814010aadd95c389a54922958d1f3ffedeec106.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:33 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  Two different services might require the same module(s), so
    delete duplicates when generating the ‘use-modules’ form. * import.scm
    (manifest->code): Delete duplicate modules. --- guix/scripts/home/import.scm
    | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  Two different services might require the same module(s), so
    delete duplicates when generating the ‘use-modules’ form. * import.scm
    (manifest->code): Delete duplicate modules. --- guix/scripts/home/import.scm
    | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Two different services might require the same module(s), so delete duplicat=
es
when generating the =E2=80=98use-modules=E2=80=99 form.

* import.scm (manifest->code): Delete duplicate modules.
---
 guix/scripts/home/import.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 21f762f239..b892ae3dfa 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -145,7 +145,8 @@ (define (qualified-name entry)
               `(begin
                  (use-modules (gnu home)
                               (gnu packages)
-                              ,@(concatenate (map cdr configurations+modul=
es)))
+                              ,@((compose delete-duplicates concatenate)
+                                 (map cdr configurations+modules)))
                  ,(home-environment-template
                    #:specs specs
                    #:services (map first configurations+modules))))
@@ -188,7 +189,8 @@ (define name
                  (use-modules (guix transformations)
                               (gnu home)
                               (gnu packages)
-                              ,@(concatenate (map cdr configurations+modul=
es)))
+                              ,@((compose delete-duplicates concatenate)
+                                 (map cdr configurations+modules)))
=20
                  ,@transformations
=20
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:37 2021
Received: from localhost ([127.0.0.1]:54499 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwb-0003NF-6W
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:37 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39804
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwa-0003Mv-91
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:36 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861230;
 bh=aQ3MEdOEL7amLbKpRdawZXHaOI8GJ0v6NxyXPJ6ePIE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=n+dKt0uQGXY8K5cUmN+qGUI6p3pNY4naRSKiCdaV6uEoAf6kKMI7ObIvqTg59Jsk9
 fO0o2KX8B+/aaeCv5/1/H+Z56Q43yOHMIcjcaozAE3OElcLT85++95ba27tys5XAo/
 LMOtbGtLtW8JVHkvGerc29LVAqbOG+ZlRaXEzjdY=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 4/7] =?UTF-8?q?guix=20home:=20import:=20Don=E2=80=99t=20us?=
 =?UTF-8?q?e=20'slurp-file-gexp'.?=
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <a3b10cf163a3535746a583de1add669e1101ebfe.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:30 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  ‘slurp-file-gexp’ is not a bound procedure. * guix/scripts/home/import.scm
    (generate-bash-configuration+modules): Don’t use ‘slurp-file-gexp’.
    --- guix/scripts/home/import.scm | 10 +++------- 1 file changed, 3 insertions(+),
    7 deletions(- [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  ‘slurp-file-gexp’ is not a bound procedure. * guix/scripts/home/import.scm
    (generate-bash-configuration+modules): Don’t use ‘slurp-file-gexp’.
    --- guix/scripts/home/import.scm | 10 +++------- 1 file changed, 3 insertions(+),
    7 deletions(- [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

=E2=80=98slurp-file-gexp=E2=80=99 is not a bound procedure.

* guix/scripts/home/import.scm (generate-bash-configuration+modules): Don=
=E2=80=99t
  use =E2=80=98slurp-file-gexp=E2=80=99.
---
 guix/scripts/home/import.scm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 96ed710c2d..21f762f239 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -51,22 +51,18 @@ (define (destination-append path)
                (home-bash-configuration
                 ,@(if (file-exists? rc)
                       `((bashrc
-                         (list (slurp-file-gexp
-                                (local-file ,rc)))))
+                         (list (local-file ,rc))))
                       '())
                 ,@(if (file-exists? profile)
                       `((bash-profile
-                         (list (slurp-file-gexp
-                                (local-file ,profile)))))
+                         (list (local-file ,profile))))
                       '())
                 ,@(if (file-exists? logout)
                       `((bash-logout
-                         (list (slurp-file-gexp
-                                (local-file ,logout)))))
+                         (list (local-file ,logout))))
                       '())))
       (gnu home services shells))))
=20
-
 (define %files+configurations-alist
   `((".bashrc" . ,generate-bash-configuration+modules)
     (".bash_profile" . ,generate-bash-configuration+modules)
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:31 2021
Received: from localhost ([127.0.0.1]:54496 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwU-0003Mu-W1
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:31 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39774
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwT-0003Mh-F8
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:29 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861224;
 bh=VyMj1DdARgasZZuSnNn/LrFF+TrbhGJtnS5Z4Xmjf0U=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=Z+p6DWJzzN2PpgDPVn+rErtaOEBqFj0u+cHImXgp6LPffYaA8D5noz3WhXFumWcfQ
 4hOWMX6KYmi/eOiAD4uzn6oIZ639B52E5Rdw9ZknF6m6PVUMD7uDB5xSgEDPARKh+H
 w/7o4sKF+NzB6UqpokGwUy2WH/D0ftj/U86BnotQ=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 3/7] guix home: import: Fix module name for Bash service.
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <0ecf026f4196f1f3abb10f917e8a566052f70ed6.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:23 +0200
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.9 (++)
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: * guix/scripts/home/import.scm
 (generate-bash-configuration+modules):
 Change (gnu home-services bash) to (gnu home-services shells). ---
 guix/scripts/home/import.scm
 | 2 +- 1 file changed, 1 insertion [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  * guix/scripts/home/import.scm (generate-bash-configuration+modules):
    Change (gnu home-services bash) to (gnu home-services shells). --- guix/scripts/home/import.scm
    | 2 +- 1 file changed, 1 insertion [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

* guix/scripts/home/import.scm (generate-bash-configuration+modules): Change
(gnu home-services bash) to (gnu home-services shells).
---
 guix/scripts/home/import.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index ad926fa202..96ed710c2d 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -64,7 +64,7 @@ (define (destination-append path)
                          (list (slurp-file-gexp
                                 (local-file ,logout)))))
                       '())))
-      (gnu home-services bash))))
+      (gnu home services shells))))
 
 
 (define %files+configurations-alist
-- 
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:22 2021
Received: from localhost ([127.0.0.1]:54493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwL-0003MY-KL
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:21 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39738
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwK-0003Lx-0k
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:20 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861214;
 bh=RylSVc8nuJeWHmXsVlgB+ho4C05ujXWj1OBhUFCaHpA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=tv7o25WklXQrkSxdiI3OMYWkNnpPT7Wk7mXH0f2SlAC8lseooipjPX9+u+incRQpY
 HM0gd055AsJlwh/FZ8vNw2V0mXWyCxp2K2MzEVX4AebA21wqYqqLz3kUZeRQs8AH/t
 td9zgtiePO4xYmrpoQYSFk1HdPaWPF1Yx+o3FkeU=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 2/7] guix home: import: Allow multiple modules to be
 imported for each service.
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <ac6637753c1939bddd18c285e4ce0a5937d4cb02.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:14 +0200
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.9 (++)
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:  Previously,
 only one module could be imported for each service, 
 e.g., only (gnu home-services shell) could be imported when generating the
 Bash service declaration. However, for some services, multipl [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  Previously, only one module could be imported for each service,
    e.g., only (gnu home-services shell) could be imported when generating the
    Bash service declaration. However, for some services, multipl [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Previously, only one module could be imported for each service, e.g., only
(gnu home-services shell) could be imported when generating the Bash service
declaration.  However, for some services, multiple modules might need to be
imported in order for it to work.

* guix/scripts/home/import.scm (generate-bash-module+configuration): Rename to
...
(generate-bash-configuration+modules): ... this.
(%files-configurations-alist): Rename to ...
(%files+configurations-alist): ... this.
(modules+configurations): Rename to ...
(configurations+modules): ... this.
(manifest->code): Adjust accordingly.
---
 guix/scripts/home/import.scm | 43 ++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index a6ab68a32c..ad926fa202 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -40,15 +40,14 @@ (define-module (guix scripts home import)
 (define %destination-directory
   (make-parameter (string-append (getenv "HOME") "/src/guix-config")))
 
-(define (generate-bash-module+configuration)
+(define (generate-bash-configuration+modules)
   (define (destination-append path)
     (string-append (%destination-directory) "/" path))
 
   (let ((rc (destination-append ".bashrc"))
         (profile (destination-append ".bash_profile"))
         (logout (destination-append ".bash_logout")))
-    `((gnu home-services bash)
-      (service home-bash-service-type
+    `((service home-bash-service-type
                (home-bash-configuration
                 ,@(if (file-exists? rc)
                       `((bashrc
@@ -64,14 +63,16 @@ (define (destination-append path)
                       `((bash-logout
                          (list (slurp-file-gexp
                                 (local-file ,logout)))))
-                      '()))))))
+                      '())))
+      (gnu home-services bash))))
 
-(define %files-configurations-alist
-  `((".bashrc" . ,generate-bash-module+configuration)
-    (".bash_profile" . ,generate-bash-module+configuration)
-    (".bash_logout" . ,generate-bash-module+configuration)))
 
-(define (modules+configurations)
+(define %files+configurations-alist
+  `((".bashrc" . ,generate-bash-configuration+modules)
+    (".bash_profile" . ,generate-bash-configuration+modules)
+    (".bash_logout" . ,generate-bash-configuration+modules)))
+
+(define (configurations+modules)
   (define configurations
     (delete-duplicates
      (filter-map (match-lambda
@@ -85,11 +86,11 @@ (define configurations
                                         (%destination-directory) "/" file))
                             proc)
                           #f))))
-                 %files-configurations-alist)
+                 %files+configurations-alist)
      (lambda (x y)
        (equal? (procedure-name x) (procedure-name y)))))
   
-    (map (lambda (proc) (proc)) configurations))
+  (map (lambda (proc) (proc)) configurations))
 
 ;; Based on `manifest->code' from (guix profiles)
 ;; MAYBE: Upstream it?
@@ -144,14 +145,14 @@ (define (qualified-name entry)
                                                    ":" output))))
                         (manifest-entries manifest))))
         (if home-environment?
-            (let ((modules+configurations (modules+configurations)))
+            (let ((configurations+modules (configurations+modules)))
               `(begin
-               (use-modules (gnu home)
-                            (gnu packages)
-                            ,@(map first modules+configurations))
-               ,(home-environment-template
-                 #:specs specs
-                 #:services (map second modules+configurations))))
+                 (use-modules (gnu home)
+                              (gnu packages)
+                              ,@(concatenate (map cdr configurations+modules)))
+                 ,(home-environment-template
+                   #:specs specs
+                   #:services (map first configurations+modules))))
             `(begin
                (use-modules (gnu packages))
 
@@ -186,18 +187,18 @@ (define name
                              (options->transformation ',options))))
                        transformation-procedures)))
         (if home-environment?
-            (let ((modules+configurations (modules+configurations)))
+            (let ((configurations+modules (configurations+modules)))
               `(begin
                  (use-modules (guix transformations)
                               (gnu home)
                               (gnu packages)
-                              ,@(map first modules+configurations))
+                              ,@(concatenate (map cdr configurations+modules)))
 
                  ,@transformations
 
                  ,(home-environment-template
                    #:packages packages
-                   #:services (map second modules+configurations))))
+                   #:services (map first configurations+modules))))
             `(begin
                (use-modules (guix transformations)
                             (gnu packages))
-- 
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:19 2021
Received: from localhost ([127.0.0.1]:54490 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwJ-0003MJ-7R
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:19 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39716
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwG-0003Lt-Vo
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:17 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861211;
 bh=GjCDFBVPzoLpomEwylpSfTEdA589GFIwlMJCLptPUyo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=VgYbwohlQkJZE7h1HrQrGwiOAsFdvYiQq/EcAV9we8BMRNHmS9o5tQVoSZ6ELA5Ds
 jdM9ZRHTWR7Z8+eaI1BJ2tej3iPnVgZtnKtI9RVkLCdTM7+oSKBCwwiTCdIUKMp5jU
 znIYvy/GFCqsHf5RJ9CedidWYw9u7sC+oT/RWkys=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 1/7] guix home: import: Make the user to specify a
 destination directory.
In-Reply-To: <cover.1633861021.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <9db0424f9494d3d15e534eb75773ae9bd3f33cb3.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:20:11 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  Copy the appropriate the relevant configuration files to the
    destination directory, and call ‘local-file’ on them. Without this, ‘guix
    home import’ will generate a service declaration like this 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  Copy the appropriate the relevant configuration files to the
    destination directory, and call ‘local-file’ on them. Without this, ‘guix
    home import’ will generate a service declaration like this 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Copy the appropriate the relevant configuration files to the destination
directory, and call =E2=80=98local-file=E2=80=99 on them.

Without this, =E2=80=98guix home import=E2=80=99 will generate a service de=
claration like this

  (service
   home-bash-service-type
   (home-bash-configuration
    (bashrc
     (list (slurp-file-gexp
            (local-file "/home/yoctocell/.bashrc"))))))

but when running =E2=80=98guix home reconfigure=E2=80=99, the ~/.bashrc fil=
e would be moved, so
when running =E2=80=98guix home reconfigure=E2=80=99 for the second time, i=
t would read the
~/.bashrc which is itself a symlink to a file the store.

* guix/scripts/home/import.scm (%destination-directory): New parameter.
(generate-bash-module+configuration): Adjust accordingly.
(modules+configurations): Copy the user=E2=80=99s configuration file to
=E2=80=98%destination-directory=E2=80=99.
* guix/scripts/home.scm (process-command): Adjust accordingly; create
=E2=80=98%destination-directory=E2=80=99 if it doesn=E2=80=99t exist.
---
 guix/scripts/home.scm        | 25 +++++++-----
 guix/scripts/home/import.scm | 75 +++++++++++++++++++++---------------
 2 files changed, 61 insertions(+), 39 deletions(-)

diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 55e7b436c1..520360e14a 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -40,6 +40,7 @@ (define-module (guix scripts home)
   #:autoload   (guix scripts pull) (channel-commit-hyperlink)
   #:use-module (guix scripts home import)
   #:use-module ((guix status) #:select (with-status-verbosity))
+  #:use-module ((guix build utils) #:select (mkdir-p))
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (srfi srfi-1)
@@ -260,15 +261,21 @@ (define-syntax-rule (with-store* store exp ...)
      (apply search args))
     ((import)
      (let* ((profiles (delete-duplicates
-                      (match (filter-map (match-lambda
-                                           (('profile . p) p)
-                                           (_              #f))
-                                         opts)
-                        (() (list %current-profile))
-                        (lst (reverse lst)))))
-           (manifest (concatenate-manifests
-                      (map profile-manifest profiles))))
-       (import-manifest manifest (current-output-port))))
+                       (match (filter-map (match-lambda
+                                            (('profile . p) p)
+                                            (_              #f))
+                                          opts)
+                         (() (list %current-profile))
+                         (lst (reverse lst)))))
+            (manifest (concatenate-manifests
+                       (map profile-manifest profiles)))
+            (destination (match args
+                           ((destination) destination)
+                           (_ (leave (G_ "wrong number of arguments~%"))))=
))
+       (unless (file-exists? destination)
+         (mkdir-p destination))
+       (parameterize ((%destination-directory destination))
+         (import-manifest manifest (current-output-port)))))
     ((describe)
      (match (generation-number %guix-home)
        (0
diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 611f580e85..a6ab68a32c 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -27,7 +27,8 @@ (define-module (guix scripts home import)
   #:use-module (ice-9 pretty-print)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
-  #:export (import-manifest))
+  #:export (import-manifest
+            %destination-directory))
=20
 ;;; Commentary:
 ;;;
@@ -36,27 +37,34 @@ (define-module (guix scripts home import)
 ;;;
 ;;; Code:
=20
+(define %destination-directory
+  (make-parameter (string-append (getenv "HOME") "/src/guix-config")))
=20
 (define (generate-bash-module+configuration)
-  (let ((rc (string-append (getenv "HOME") "/.bashrc"))
-        (profile (string-append (getenv "HOME") "/.bash_profile"))
-        (logout (string-append (getenv "HOME") "/.bash_logout")))
-    `((gnu home services bash)
-      (service home-bash-service-type
-                 (home-bash-configuration
-                  ,@(if (file-exists? rc)
-                        `((bashrc
-                           (list (local-file ,rc))))
-                        '())
-                  ,@(if (file-exists? profile)
-                        `((bash-profile
-                           (list (local-file ,profile))))
-                        '())
-                  ,@(if (file-exists? logout)
-                        `((bash-logout
-                           (list (local-file ,logout))))
-                        '()))))))
+  (define (destination-append path)
+    (string-append (%destination-directory) "/" path))
=20
+  (let ((rc (destination-append ".bashrc"))
+        (profile (destination-append ".bash_profile"))
+        (logout (destination-append ".bash_logout")))
+    `((gnu home-services bash)
+      (service home-bash-service-type
+               (home-bash-configuration
+                ,@(if (file-exists? rc)
+                      `((bashrc
+                         (list (slurp-file-gexp
+                                (local-file ,rc)))))
+                      '())
+                ,@(if (file-exists? profile)
+                      `((bash-profile
+                         (list (slurp-file-gexp
+                                (local-file ,profile)))))
+                      '())
+                ,@(if (file-exists? logout)
+                      `((bash-logout
+                         (list (slurp-file-gexp
+                                (local-file ,logout)))))
+                      '()))))))
=20
 (define %files-configurations-alist
   `((".bashrc" . ,generate-bash-module+configuration)
@@ -64,17 +72,24 @@ (define %files-configurations-alist
     (".bash_logout" . ,generate-bash-module+configuration)))
=20
 (define (modules+configurations)
-  (let ((configurations (delete-duplicates
-                         (filter-map (match-lambda
-                                ((file . proc)
-                                 (if (file-exists?
-                                      (string-append (getenv "HOME") "/" f=
ile))
-                                     proc
-                                     #f)))
-                                     %files-configurations-alist)
-                         (lambda (x y)
-                           (equal? (procedure-name x) (procedure-name y)))=
)))
-    (map (lambda (proc) (proc)) configurations)))
+  (define configurations
+    (delete-duplicates
+     (filter-map (match-lambda
+                   ((file . proc)
+                    (let ((absolute-path (string-append (getenv "HOME")
+                                                        "/" file)))
+                      (if (file-exists? absolute-path)
+                          (begin
+                            (copy-file absolute-path
+                                       (string-append
+                                        (%destination-directory) "/" file))
+                            proc)
+                          #f))))
+                 %files-configurations-alist)
+     (lambda (x y)
+       (equal? (procedure-name x) (procedure-name y)))))
+=20=20
+    (map (lambda (proc) (proc)) configurations))
=20
 ;; Based on `manifest->code' from (guix profiles)
 ;; MAYBE: Upstream it?
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 10 Oct 2021 10:20:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 10 06:20:18 2021
Received: from localhost ([127.0.0.1]:54488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mZVwI-0003MA-0t
	for submit <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:18 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39692
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mZVwE-0003Li-0g
 for 50873 <at> debbugs.gnu.org; Sun, 10 Oct 2021 06:20:16 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633861207;
 bh=w7K/Gbi1fZnKgOvf5mBaPX6IXr4E+vxggentIVr5vhY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ohpKWzPzlFSl81n1ogstBzp+c+98ST7Yk/PQvXLAZ6WkXhAoS2NlgJQUZjarOsYlw
 J9LODXZpb+Q/YjKuAXxgjU5RFqIMIQWe7JvJ/WQy/WkyZuriKJJCiQuXCo7QPtp0aD
 oc1L1/XfmBTboeYAJhgT9q74WgkuzkO3h2WMj4tQ=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 0/7] Fixes to =?utf-8?Q?=E2=80=98guix?= home =?utf-8?Q?imp?=
 =?utf-8?Q?ort=E2=80=99?=
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
Message-Id: <cover.1633861021.git.public@HIDDEN>
Date: Sun, 10 Oct 2021 12:19:57 +0200
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
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:  Change since v1: * Remove uses of ‘slurp-file-gexp’. *
    Add tests for the Scheme API of (guix scripts home import). 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Oleg Pykhalov <go.wigust@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
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:  Change since v1: * Remove uses of ‘slurp-file-gexp’. *
    Add tests for the Scheme API of (guix scripts home import). 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

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

Change since v1:

* Remove uses of =E2=80=98slurp-file-gexp=E2=80=99.

* Add tests for the Scheme API of (guix scripts home import).

Xinglu Chen (7):
  guix home: import: Make the user to specify a destination directory.
  guix home: import: Allow multiple modules to be imported for each
    service.
  guix home: import: Fix module name for Bash service.
  guix home: import: Don=E2=80=99t use 'slurp-file-gexp'.
  guix home: import: Delete duplicate modules when importing.
  doc: Document the =E2=80=98guix home import=E2=80=99 subcommand.
  Add tests for =E2=80=98guix home import=E2=80=99.

 Makefile.am                  |   1 +
 doc/guix.texi                |  32 +++++++
 guix/scripts/home.scm        |  25 +++--
 guix/scripts/home/import.scm | 115 +++++++++++++----------
 tests/home-import.scm        | 174 +++++++++++++++++++++++++++++++++++
 5 files changed, 289 insertions(+), 58 deletions(-)
 create mode 100644 tests/home-import.scm


base-commit: edbcbdabac9a64dba3850b0f7e596b396f044599
=2D-=20
2.33.0




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

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

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFivk0VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5vSgP/2767jQ3mUl57HqAX7NFWSqSk96H
vzd6BnavuQguchT5q2Fh5LJPlhTUhZlspY+qqv7fbTo7g2llpC7GfzVYVB5a2CT9
qN3XcTL+pGRH/YA0vXg6/aOnVXNADxjg9GIQvKtPBLieH6n3JWHeHYJuu+YGVghn
iF1991tibtEsQnDQvgKJ158OVhpOXVQCyHy51O5qag7lgNQUrCtTcoIqbpHVc8Zr
kVLliT2iblbFICUn8GjVLq8QGV4n++Y8TJAsarWhMu0PkpR2mZc9y20K4nxwBKWi
ZQB81O7ULxxcrnESAM74+JgEhTcmJci4yLxzFePo9RSoeb+FLq7d4oNA002YZMC1
eHd9nwP2UvuePQtfmB7vppupinoIMP3aDw7pC9sN9JriODGv8h4fDfuBcux3qTNC
jvzIwxYxOjmBaf3/7b2sI4Thmo5aNxfERqMrRupgFaRzquXr4oHbpjaeMNjHNa15
0jPJ4f+mUE9yEiwZokQFtcG6CYkQea9W1FaTgGZhtOIFvn2j13O2cLRQszr+7kix
jdxjMJ61dkd1Gbc6NxrS36aVXmqf1hpihvqdqyoCKJoUNkPiHoBH9xa92zRN8+O4
kRnX00o5XKwK4cUUuPni++68Yr6NFOVdNgyr6diV3b3/iAtfjU+hzV7OutWlotYm
chsUgfR65Ys38N1a
=g6ar
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 2 Oct 2021 18:46:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 02 14:46:07 2021
Received: from localhost ([127.0.0.1]:60570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWk1P-0007b5-2I
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2021 14:46:07 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:41038
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mWk1N-0007aL-9t
 for 50873 <at> debbugs.gnu.org; Sat, 02 Oct 2021 14:46:05 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633200359;
 bh=sncnf5Bxf7IZDpapTGpcbB9lpiwjV5Omc06BXOeXLAU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=B4BSkfVzsE7p+U8UgdpVa8ZjQcJIXC/BAUSr75T6jDDugcL41ZDBb91pFXj509Vwa
 UiEYhIhWD4LFNGcARVpf2pKfK/U2UzGAhVZK2pb1Vklo88LNdKqZDNg3tTmkJD0+9g
 /00+fUcCp/GgFuGVhATONROCt0zJHRtk5tTuHjiQ=
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#50873] [PATCH 0/5] Fixes to =?utf-8?Q?=E2=80=98guix?= home
 =?utf-8?Q?import=E2=80=99?=
In-Reply-To: <87czonwjcu.fsf@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
 <87czonwjcu.fsf@HIDDEN>
Date: Sat, 02 Oct 2021 20:45:56 +0200
Message-ID: <877devnu3f.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
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:  On Sat, Oct 02 2021, Ludovic Courtès wrote: > Xinglu Chen
    <public@HIDDEN> skribis: > >> This series makes some fixes to the
   ‘guix home import’ subcommand which >> brings it into a usable state.
   >> >> The last patch documents the subc [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: 50873 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
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:  On Sat, Oct 02 2021, Ludovic Courtès wrote: > Xinglu Chen
    <public@HIDDEN> skribis: > >> This series makes some fixes to the
   ‘guix home import’ subcommand which >> brings it into a usable state.
   >> >> The last patch documents the subc [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

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

On Sat, Oct 02 2021, Ludovic Court=C3=A8s wrote:

> Xinglu Chen <public@HIDDEN> skribis:
>
>> This series makes some fixes to the =E2=80=98guix home import=E2=80=99 s=
ubcommand which
>> brings it into a usable state.
>>
>> The last patch documents the subcommand in the manual.
>>
>> As a sidenote, the =E2=80=98manifest->code=E2=80=99 procedure in (guix s=
cripts home
>> import), which is based on =E2=80=98manifest->code=E2=80=99 from (guix p=
rofiles) should
>> probably be factorized with the original =E2=80=98manifest->code=E2=80=
=99 procedure.
>>
>> Xinglu Chen (5):
>>   guix home: import: Make the user to specify a destination directory.
>>   guix home: import: Allow multiple modules to be imported for each
>>     service.
>>   guix home: import: Fix module name for Bash service.
>>   guix home: import: Delete duplicate modules when importing.
>>   doc: Document the =E2=80=98guix home import=E2=80=99 subcommand.
>
> Could you (Xinglu, Andrew, Oleg?) add tests for this?  I think
> Scheme-level tests like we have for the =E2=80=98guix import=E2=80=99 cod=
e would be
> fine.  It would also help review because it=E2=80=99d give a clearer view=
 of how
> this is supposed to work.

Sure!

> Thanks for following up on this!

You are welcome!  :-)

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

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

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFYqOQVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5p78P/i/mDTCjhgXA7uK9D19DUsnro4lv
aUyjeP31y40iyToxOu4zGKasxTk/Lhpj6tJwNpCtiY7pmfOU5KX8e4Q+/x8IhE8U
5WGbf7c04W6th2uPbrYh83qJNQPhBobODpqOpQVsAUDB8D4GZkPfcNZ1g9wMPxpY
X8idU4+RYyNNV5dhda3Q48JaIulOo5x93eel1yNF6jeNdV1V0XiWVuwRzZTpfEf4
+gKPSuiAUu6nykFWApdmAu9Lktz5tc/o/6MqVAbbh+FjBgSI5dMO8rt4+Ra2V8Da
hdzeNTNLOOzhd8qnrVNX08f+SWE5Tuc+Ey8TPoBEwqVZTEkY2hQGq3ggvHC/aumt
pwFbo8P9HozjsG2eOfOQ6t+WcYBaWHjnaWWIYal0zOhXVMlorsOAa6qHKXQ5CnJn
zA6+9VkoFou3T9tZXblOS/lrV+q75Mpu5tw/1V0SyTfYuesrD4/+kX46vTYJ/QZY
d8j2MS97HUUno9A2PbMwPol477j3B0swEIHAjTEUBMMAatj0f+1jZFzmiRxWyjGy
imulEi1xMiAVjJ0WbD1tMtchdbvqikuFlQhsOvyXxXvvcPVSSDAsQrbylRwQRLqA
RWbNlgSKyivwVtlscLAedmZlH0njsnt/WaGs0uAofelwuk0O3L7wUExoJ17e8iv/
MTvF9ugAe+RGwAXK
=CSLN
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 2 Oct 2021 15:13:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 02 11:13:15 2021
Received: from localhost ([127.0.0.1]:60270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWghP-0005uJ-6q
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2021 11:13:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49148)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mWghN-0005u7-2L
 for 50873 <at> debbugs.gnu.org; Sat, 02 Oct 2021 11:13:13 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54970)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mWghH-0006TN-Be; Sat, 02 Oct 2021 11:13:07 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36494 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mWghH-0000bo-2Q; Sat, 02 Oct 2021 11:13:07 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Xinglu Chen <public@HIDDEN>
Subject: Re: bug#50873: [PATCH 0/5] Fixes to =?utf-8?Q?=E2=80=98guix?= home
 =?utf-8?Q?import=E2=80=99?=
References: <cover.1632849969.git.public@HIDDEN>
Date: Sat, 02 Oct 2021 17:13:05 +0200
In-Reply-To: <cover.1632849969.git.public@HIDDEN> (Xinglu Chen's
 message of "Tue, 28 Sep 2021 19:33:09 +0200")
Message-ID: <87czonwjcu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 50873
Cc: 50873 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

Xinglu Chen <public@HIDDEN> skribis:

> This series makes some fixes to the =E2=80=98guix home import=E2=80=99 su=
bcommand which
> brings it into a usable state.
>
> The last patch documents the subcommand in the manual.
>
> As a sidenote, the =E2=80=98manifest->code=E2=80=99 procedure in (guix sc=
ripts home
> import), which is based on =E2=80=98manifest->code=E2=80=99 from (guix pr=
ofiles) should
> probably be factorized with the original =E2=80=98manifest->code=E2=80=99=
 procedure.
>
> Xinglu Chen (5):
>   guix home: import: Make the user to specify a destination directory.
>   guix home: import: Allow multiple modules to be imported for each
>     service.
>   guix home: import: Fix module name for Bash service.
>   guix home: import: Delete duplicate modules when importing.
>   doc: Document the =E2=80=98guix home import=E2=80=99 subcommand.

Could you (Xinglu, Andrew, Oleg?) add tests for this?  I think
Scheme-level tests like we have for the =E2=80=98guix import=E2=80=99 code =
would be
fine.  It would also help review because it=E2=80=99d give a clearer view o=
f how
this is supposed to work.

Thanks for following up on this!

Ludo=E2=80=99.




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

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


Received: (at 50873) by debbugs.gnu.org; 2 Oct 2021 15:10:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 02 11:10:28 2021
Received: from localhost ([127.0.0.1]:60265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWgeh-0005q8-O7
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2021 11:10:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48870)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mWgef-0005pn-Lq
 for 50873 <at> debbugs.gnu.org; Sat, 02 Oct 2021 11:10:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54876)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mWgea-00046c-4L; Sat, 02 Oct 2021 11:10:20 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36492 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mWgeT-00008u-DI; Sat, 02 Oct 2021 11:10:19 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Xinglu Chen <public@HIDDEN>
Subject: Re: bug#50873: [PATCH 0/5] Fixes to =?utf-8?Q?=E2=80=98guix?= home
 =?utf-8?Q?import=E2=80=99?=
References: <cover.1632849969.git.public@HIDDEN>
 <e2be996cf4e3b3140a4c928c53dc37721c783bdc.1632849969.git.public@HIDDEN>
 <87h7e2o802.fsf@HIDDEN> <87y27dl4ca.fsf@HIDDEN>
Date: Sat, 02 Oct 2021 17:10:11 +0200
In-Reply-To: <87y27dl4ca.fsf@HIDDEN> (Xinglu Chen's message of "Fri, 01
 Oct 2021 07:08:21 +0200")
Message-ID: <87k0ivwjho.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 50873
Cc: 50873 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

Hi,

Xinglu Chen <public@HIDDEN> skribis:

> On Thu, Sep 30 2021, Andrew Tropin wrote:

[...]

>> It still uses slurp-file-gexp, which is not upstreamed, but overall
>> looks ok.
>
> Oh, I thought it was already upstreamed, my bad.
>
>> I'll make a rationale behind this function and the approach I picked in
>> home services config serializers and will prepare some examples next
>> week.  Maybe it will convince Ludovic or maybe I'll change my mind and
>> rework configuration records for home services to use file-like
>> objects.
>
> OK, then we should probably wait for this =E2=80=98slurp-file-gexp=E2=80=
=99 discussion
> to reach an consensus, then I can send a v2 for this series.  :-)

Yes, but I don=E2=80=99t expect to change my mind on this one.  :-)

I=E2=80=99ve explained my views before, and really, it=E2=80=99s no differe=
nt than the
situation of Guix System services so I see no reason to do things
differently.

Apart from this bit, the documentation part LGTM.

Thank you, Xinglu!

Ludo=E2=80=99.




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

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


Received: (at 50873) by debbugs.gnu.org; 1 Oct 2021 05:09:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 01 01:09:03 2021
Received: from localhost ([127.0.0.1]:54438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mWAn9-0001D3-Dq
	for submit <at> debbugs.gnu.org; Fri, 01 Oct 2021 01:09:03 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:48588
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mWAn5-0001CX-K7
 for 50873 <at> debbugs.gnu.org; Fri, 01 Oct 2021 01:09:02 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1633064933;
 bh=eH4F0jMKF9nIC8rYtjCfyO8KQvw+md2tDMd2l3v+dXg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=pgBM0xnDu60lXdndpbe1Nck8sQqlo9pvFx5uy5scKKEwnEFTiYfedozILFqbCCjFz
 tJcm1HlIxg3I1K55xukmRezIBgmVwjyJCRNDRAszou1yCISFezx6xPaR++zkRmAG7J
 3A36jQ3YraUoVBuRoX2vcYOIjt87s0LhL2bzedSs=
To: Andrew Tropin <andrew@HIDDEN>, 50873 <at> debbugs.gnu.org
Subject: Re: [bug#50873] [PATCH 5/5] doc: Document the =?utf-8?Q?=E2=80=98?=
 =?utf-8?Q?guix?= home =?utf-8?Q?import=E2=80=99?= subcommand.
In-Reply-To: <87h7e2o802.fsf@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
 <e2be996cf4e3b3140a4c928c53dc37721c783bdc.1632849969.git.public@HIDDEN>
 <87h7e2o802.fsf@HIDDEN>
Date: Fri, 01 Oct 2021 07:08:21 +0200
Message-ID: <87y27dl4ca.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
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:  On Thu, Sep 30 2021, Andrew Tropin wrote: > On 2021-09-28
   19:36, Xinglu Chen wrote: > >> * doc/guix.texi (Invoking guix home): Document
    ‘guix home import’. >> --- >> doc/guix.texi | 33 +++++++++++++++++++++++++++++++++
    >> 1 file changed, [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
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:  On Thu, Sep 30 2021, Andrew Tropin wrote: > On 2021-09-28
   19:36, Xinglu Chen wrote: > >> * doc/guix.texi (Invoking guix home): Document
    ‘guix home import’. >> --- >> doc/guix.texi | 33 +++++++++++++++++++++++++++++++++
    >> 1 file changed, [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

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

On Thu, Sep 30 2021, Andrew Tropin wrote:

> On 2021-09-28 19:36, Xinglu Chen wrote:
>
>> * doc/guix.texi (Invoking guix home): Document =E2=80=98guix home import=
=E2=80=99.
>> ---
>>  doc/guix.texi | 33 +++++++++++++++++++++++++++++++++
>>  1 file changed, 33 insertions(+)
>>
>> diff --git a/doc/guix.texi b/doc/guix.texi
>> index 7956652050..2c268705d0 100644
>> --- a/doc/guix.texi
>> +++ b/doc/guix.texi
>> @@ -36088,6 +36088,39 @@
>>  $ guix home list-generations 10d
>>  @end example
>>=20=20
>> +@item import
>> +Generate a @dfn{home environment} from the packages in the default
>> +profile and configuration files found in the user's home directory.  The
>> +configuration files will be copied to the specified directory.  Note
>> +that not every home service that exists is supported (@pxref{Home
>> +Services}).
>> +
>> +@example
>> +$ guix home import ~/guix-config
>> +;; This "home-environment" file can be passed to 'guix home reconfigure'
>> +;; to reproduce the content of your profile.  This is "symbolic": it on=
ly
>> +;; specifies package names.  To reproduce the exact same profile, you a=
lso
>> +;; need to capture the channels being used, as returned by "guix descri=
be".
>> +;; See the "Replicating Guix" section in the manual.
>> +
>> +(use-modules
>> +  (gnu home)
>> +  (gnu packages)
>> +  (gnu home-services bash))
>> +
>> +(home-environment
>> +  (packages
>> +    (map specification->package
>> +         (list "glibc-locales" "nss-certs" "nss")))
>> +  (services
>> +    (list (service
>> +            home-bash-service-type
>> +            (home-bash-configuration
>> +              (bashrc
>> +                (list (slurp-file-gexp
>
> It still uses slurp-file-gexp, which is not upstreamed, but overall
> looks ok.

Oh, I thought it was already upstreamed, my bad.

> I'll make a rationale behind this function and the approach I picked in
> home services config serializers and will prepare some examples next
> week.  Maybe it will convince Ludovic or maybe I'll change my mind and
> rework configuration records for home services to use file-like
> objects.

OK, then we should probably wait for this =E2=80=98slurp-file-gexp=E2=80=99=
 discussion
to reach an consensus, then I can send a v2 for this series.  :-)

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

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

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFWl8YVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5TlkQAKM1l2hFEfwGDQXUHT1E7raJE0pZ
lLHO/q6OcJ4JlHJL9/Bq8QN9mJwSqVTI7T4d3oyPI9v+//20/vlZi3qoFL835/iO
S7BWLUE9Il5HF4IE61dsgpA/e96+xEL9Lm5UkG5kdgT2RZc4hP5ePgbZ7Yve1vYi
zFXZqSsmvxyrqT+nHy1dOgitHee9l2tYTHHoShLuZQ9bT3xKHFjDEmtR298jbqts
JQ52fPP/BDHekY4kcMj3Y4ynKr5pql6hPlwHkyZDZfkuLoAznt9S21zDexGkAzFu
Igq+yM0pdgmfHjEkuZKgDEIBjaqgVN5rJR9V/Y0heoKXM0Au3VW9pzDNv5MkVePZ
anUz3fJOuyC9sFHslJCjscFDnBR6KfG/jho7rOhPTZlu9+le6QGfR8rId4f3ha5d
rA8GewJwwXw4cpTaeyJfORhCa8aujjd5YcE+XJTcpfQSCJ6UZWVi4qFD07UYzGr7
ANdj1gccYVZk33rWN3K3cW1CcTTMK0gOSXK5Asc659FGtyojxRDD4Fzp2qMXSjSh
uYLzwwjmP9nLRNVt7KSxPZdT03SeHigYVQY2XvjFtP29B/sTVtVAKOE6mlo7EPCa
m3Rg1jVXY+caTO81EU1dtbMHYRJET/z9l9NCNvnFiWhbZlL1Yilsl2YYd+E2QTiN
r3+13qyXQ5KU4B55
=cHO7
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 30 Sep 2021 07:09:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 30 03:09:00 2021
Received: from localhost ([127.0.0.1]:51298 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVqBf-00024I-U8
	for submit <at> debbugs.gnu.org; Thu, 30 Sep 2021 03:09:00 -0400
Received: from mail-lf1-f49.google.com ([209.85.167.49]:34419)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1mVqBc-000241-9Q
 for 50873 <at> debbugs.gnu.org; Thu, 30 Sep 2021 03:08:58 -0400
Received: by mail-lf1-f49.google.com with SMTP id g41so21202003lfv.1
 for <50873 <at> debbugs.gnu.org>; Thu, 30 Sep 2021 00:08:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=trop-in.20210112.gappssmtp.com; s=20210112;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version; bh=bTeuW3+LMqEhwU25kEL+7oYUHmV1P6LodFInKksU4jQ=;
 b=rjydLJyTQmdzUI2bsvxAyuCOTwgw6y8CToVQdHqMwnxiGl+8UqhjlR7jRlJbNj47nd
 OKvMfGiN5knINtIm6Luiao6MSt9+k4qsjFhx0ar1eVg5ezcUPyOsm+1j+NaHUchoukki
 XxUcM/3ifYAcTZXOS6GIlHYy1lVoWb0UQ+6uhdXdEHfdAg8h9K5aiel3+Cljz+JXzzIP
 mlx12eJtMABYrT5QwW1Njy8MLuQxvIWUB5iGbWpH7abpsqeHNDIsshkiizIyHXeOBo5b
 VftHCc/IZQJBr2kozar9g1mBa5iCZCPDqnSNZjEvRJ9fWFvGskI68lvJec3MC6/oYoHB
 qiTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date
 :message-id:mime-version;
 bh=bTeuW3+LMqEhwU25kEL+7oYUHmV1P6LodFInKksU4jQ=;
 b=rBg1P+8BuPXkGQ+g/0HsyMoTlWKzU1f3m5ppxnSuJNrf87TBd/H3fQMmShLDl/wqoa
 mZlTyQP8j5GVMfCukyWcsPii17HfDpCN73QT3HxMTlmVL2eyvbY7VEcb7rrGaKwbofVt
 yOj5l1zluBUtnm++cWnG5ghpvy9i1P0UOS1Rqu1KTQmFaJIvGZve/y6OT5Ynr69JGX0I
 ogIGCFNQU/N+8wqRTzEX9V5qw2pJmmUjXUzGsg5UDURjJeQrJ8hLk+fcEHmxXblXKYrZ
 Yd2WExZY4G52kAHI0rvYBfOBjHuglXXjVLU9cWc8W5hh46Gb/GU0TIP0vpFjFjdzMyug
 jcRw==
X-Gm-Message-State: AOAM5318PX0j/cALNCcleIiKdZqaxn8DoPCkr/sM7B2i/yqfjOUFhB5c
 HV60tTTVLcjEerSWQDDISGm3AQ==
X-Google-Smtp-Source: ABdhPJwn48xORd89V96fCgRcbsToGq9UvuFENEh1Ohefp6oFdR5u9vUQcMo62rkVfs9uvfevJCW9yA==
X-Received: by 2002:a2e:9b13:: with SMTP id u19mr4265647lji.41.1632985729947; 
 Thu, 30 Sep 2021 00:08:49 -0700 (PDT)
Received: from localhost (109-252-140-132.dynamic.spd-mgts.ru.
 [109.252.140.132])
 by smtp.gmail.com with ESMTPSA id k26sm267316lfj.69.2021.09.30.00.08.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 30 Sep 2021 00:08:49 -0700 (PDT)
From: Andrew Tropin <andrew@HIDDEN>
To: Xinglu Chen <public@HIDDEN>, 50873 <at> debbugs.gnu.org
Subject: Re: [bug#50873] [PATCH 5/5] doc: Document the =?utf-8?Q?=E2=80=98?=
 =?utf-8?Q?guix?= home =?utf-8?Q?import=E2=80=99?= subcommand.
In-Reply-To: <e2be996cf4e3b3140a4c928c53dc37721c783bdc.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
 <e2be996cf4e3b3140a4c928c53dc37721c783bdc.1632849969.git.public@HIDDEN>
Date: Thu, 30 Sep 2021 10:08:45 +0300
Message-ID: <87h7e2o802.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: 50873
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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

On 2021-09-28 19:36, Xinglu Chen wrote:

> * doc/guix.texi (Invoking guix home): Document =E2=80=98guix home import=
=E2=80=99.
> ---
>  doc/guix.texi | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 7956652050..2c268705d0 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -36088,6 +36088,39 @@
>  $ guix home list-generations 10d
>  @end example
>=20=20
> +@item import
> +Generate a @dfn{home environment} from the packages in the default
> +profile and configuration files found in the user's home directory.  The
> +configuration files will be copied to the specified directory.  Note
> +that not every home service that exists is supported (@pxref{Home
> +Services}).
> +
> +@example
> +$ guix home import ~/guix-config
> +;; This "home-environment" file can be passed to 'guix home reconfigure'
> +;; to reproduce the content of your profile.  This is "symbolic": it only
> +;; specifies package names.  To reproduce the exact same profile, you al=
so
> +;; need to capture the channels being used, as returned by "guix describ=
e".
> +;; See the "Replicating Guix" section in the manual.
> +
> +(use-modules
> +  (gnu home)
> +  (gnu packages)
> +  (gnu home-services bash))
> +
> +(home-environment
> +  (packages
> +    (map specification->package
> +         (list "glibc-locales" "nss-certs" "nss")))
> +  (services
> +    (list (service
> +            home-bash-service-type
> +            (home-bash-configuration
> +              (bashrc
> +                (list (slurp-file-gexp

It still uses slurp-file-gexp, which is not upstreamed, but overall
looks ok.

I'll make a rationale behind this function and the approach I picked in
home services config serializers and will prepare some examples next
week.  Maybe it will convince Ludovic or maybe I'll change my mind and
rework configuration records for home services to use file-like objects.

> +                        (local-file "/home/alice/guix-config/.bashrc")))=
))))))
> +@end example
> +
>  @end table
>=20=20
>  @node Documentation

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

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

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFVYn0ACgkQIgjSCVjB
3rAXpw//Xy3kH7/bzCT5yRf1wKEsHX7Bs1eN0S51kkZY5fYQy9oqa9GwmQe0bMX7
xu3UMJhRt8ndFjLPtUIArVeSBhHFOi8uPpfBJPZzJQh1lp2XXxNx+ldp1VKHCuzO
E/AxP21BJLKYZ3x+C2gO33nD/EhAg2d2NvRmC7sYG81EloDmOrgoVgfnp9REtbP/
hsK0S4H+XFNIbHYQ/Llt554Oz43crism4S277KqiDuRlcxAfApGCPO5/2iGLFGQt
tEYtrDTEcVQtWqvAcA4I1y0wegxgUYkpTXa1Y54taMnQK3xfwm189XBpnQa0nBGJ
+GcLIxVtcW6O28fB3Ocp5nqlptaQyEhB4frVJCPG+JQjSiRXvfyLuz7Lj3dXIS/r
5RjWBszzNIykzHvpnw2cpLughK0/yk9vnOcDpGnJOmLYdXCRPJ9hylSCXsuJPdzM
t7CtI+galfI2N8fP5sNj08sazzVEqRS+l5uQyOiHVLKQY2Ez8yXnWJ9Scpzr275z
SPNsN2NOtC6xrClauouRhPFFLNPsNv/WpGMZD8CyYHEjXogTrePGm8RJG50moFKQ
u1HRIs/TKZ7OAYheJKXLuaUpuA3kBVXGZeARgoQpkDS/sq/V9TaB9Mq/MwXe1Bnp
wa1O/87WQw9KPUFgpSPyAdk1aAzZt6cmxtwVzlnWRuFsm8bwdQw=
=CSlo
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 20:53:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 16:53:03 2021
Received: from localhost ([127.0.0.1]:47167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVK63-0008Hg-11
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:53:03 -0400
Received: from mout-p-202.mailbox.org ([80.241.56.172]:41782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <antero@HIDDEN>) id 1mVK5s-0008GZ-66
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:52:59 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4HJsCK5QktzQk14
 for <50873 <at> debbugs.gnu.org>; Tue, 28 Sep 2021 22:52:45 +0200 (CEST)
Authentication-Results: spamfilter04.heinlein-hosting.de (amavisd-new);
 dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
 header.d=mailbox.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;
 s=mail20150812; t=1632862364;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=19704WD8R3+4o07N+l3wpcufSwnpCXcSNZDIFu2iFiE=;
 b=qwY07WlYn2FNwYmwSTTY/ZCgWR1U1JhyhMsWxPvCa51p+DvdHkNCKV+auhzVUikcPr9exe
 B9L0mau3FkMzIjITdqLtCNIoKnQEWX+Dv9NhIaymlUmtQMn6ISC73hTa6QgoMU8+jFkv5Q
 kWEHpQBIFdbLnQS+/4q1I7hvPTiLz30yLNPC9RlUDr98R4Jal69/ehH3IPRODjgSBGVpem
 3X2CJcuw8W1fj9fJZkJM6NDzVEPRfNLw4y5BhDXxL2QRtOCNk9QdWErGb892jlI7oUcmFV
 ONh0Yk7QMxzgI5oWT/0s7Gn7e8liyrG02FAdqv6R0yeUvTlLzoOo//vezQOoDw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:from:from:received; s=
 mail20150812; t=1632862362; bh=19704WD8R3+4o07N+l3wpcufSwnpCXcSN
 ZDIFu2iFiE=; b=cyaopgbB7wKvplvN/2BbV9DkqloMYfMFZQqOIOQml81tLWpW1
 aAQ83bpRrE3ZWO3ufug+KPFno8rbkW5WESitlVyrornJO05kCxIMrdPK0EOrJugW
 +o7MbfJEdEDFLxlu4ozv3Q9YgfN4KqnBemCC3dTHNbAaR7si9OgRlx9eP/2yHPdv
 6beGSnHLgm2VBgvp9LVKotISXXHGWBXDy9YSacDl+tPWPleT51VzRUtVgpExOew6
 kBeYgrVvY3t5I9hKXudt4BFDY3o+uvvb8/FjvgYkmbH1OOEucbeSCLb+0kzsJqmB
 MxtscAqOlGzlwORqlRYx9QcKfRMixPJ2CHx9Q==
X-Virus-Scanned: amavisd-new at heinlein-support.de
From: Antero Mejr <antero@HIDDEN>
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 0/2] Add pn.
Date: Tue, 28 Sep 2021 16:52:25 -0400
Message-Id: <20210928205227.25833-1-antero@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: C1FE7181B
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50873
Cc: Antero Mejr <antero@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Thanks for the suggestions Xinglu, I updated with the changes.

> The package doesn’t seem to be reproducible; ‘guix build libphonenumber
> --rounds=2’ fails

libphonenumber reproduces on my main computer, I can try again with a different one later:
successfully built /gnu/store/dyf2a70slkvfxf4qcims3q69a51ydb0x-libphonenumber-8.12.33.drv
successfully built /gnu/store/dyf2a70slkvfxf4qcims3q69a51ydb0x-libphonenumber-8.12.33.drv




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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 20:53:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 16:53:03 2021
Received: from localhost ([127.0.0.1]:47165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVK62-0008He-O6
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:53:02 -0400
Received: from mout-p-202.mailbox.org ([80.241.56.172]:41784)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <antero@HIDDEN>) id 1mVK5x-0008Gg-29
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:52:57 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4HJsCR4NWDzQkBx
 for <50873 <at> debbugs.gnu.org>; Tue, 28 Sep 2021 22:52:51 +0200 (CEST)
Authentication-Results: spamfilter03.heinlein-hosting.de (amavisd-new);
 dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
 header.d=mailbox.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;
 s=mail20150812; t=1632862369;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=kVda2M8rJ3I5ztqRaOiAmPnGhDfJ5CWc7pVyzxJG7iA=;
 b=elBtQMKwYAlP9EnWH3Vbu0c3qYyOI6h6HllGJa8FGtuqcilLryVwnq+Q8jOkoIMwf+T6AA
 opuIxBtboFb1p9KAFBVUO1IbrxRTDo4JLX+MYvA5HwY8UnylxkZua6tGdE5tT0oO55yhwu
 SYPiV6anDwoC0xMrp5GiaWMFUB+UTNbV5dOY+kKWWJW8gcwXJadJyqFLf2dw4Tc4iCZYpH
 8zcuvu8WXqTXyVsjkKRR6+13RqLYHwGRLI2pFg7vaOIYQ6P1I9bHhsoZT7mC7PpUq1wdkl
 gmDPFipDdfC7PnQbO3YH34rYIxFtP1h5xmZDjiMQ5EIXcFmqWCA33o0PkG65/g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h=
 content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:date:subject:subject:from:from:received; s=
 mail20150812; t=1632862368; bh=RzX1DZTPz6nEgVXKLKrxk/8x3L0mLh/rI
 9QaxBER1Vg=; b=H2rGLAYl2qSOpQnBtCPnFOy7obYSN3H1/HzikdJqiVa0BvzzC
 Fql8aaSVeaJrO7RWP9kkfVnr1Wrigfnl7sJbimT3kLt84M/5+Ylg6FZmFI8rjqNM
 sUkrBwtbxdMSptwrUzx4/gA97/mDEjKtKk1KcH1Xb362V581ELkgFK1rMG0cpZpg
 3HqrgU3AM0g5hXxWKVN2zFt5RPEY/q4Ls6BGbWlGGDYIERzjp3kerI04tTGqrCo3
 b+0XE+c1b93dEil+dX08i0x+37Um25IRvun1/+9pSQWHExkGef95PO5ucKd1dq0+
 sW+z5mf81XcQO0t6W155qyn8ajCDQi9+H2IdA==
X-Virus-Scanned: amavisd-new at heinlein-support.de
From: Antero Mejr <antero@HIDDEN>
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add pn.
Date: Tue, 28 Sep 2021 16:52:27 -0400
Message-Id: <20210928205227.25833-3-antero@HIDDEN>
In-Reply-To: <20210928205227.25833-1-antero@HIDDEN>
References: <20210928205227.25833-1-antero@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: A20CF881
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50873
Cc: Antero Mejr <antero@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/telephony.scm (pn): New variable.
---
 gnu/packages/telephony.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 50b5790ae3..d30c8aa661 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -945,3 +945,38 @@ telephony functionality into custom Telegram clients.")
 library for parsing, formatting, and validating international phone numbers.")
     (license license:asl2.0)))
 
+(define-public pn
+  (package
+    (name "pn")
+    (version "0.9.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Orange-OpenSource/pn")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1lvzb0yixj7wmmqzsri20k9nn3gf06j0yjvmg2mi1zihywq7s4dx"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+        (modify-phases %standard-phases
+         (add-after 'unpack 'sub-bin-path
+           (lambda _
+             (substitute* "CMakeLists.txt" (("DESTINATION \\$\\{AWKLIBPATH\\}")
+                                             "DESTINATION bin")))))))
+    (inputs
+     `(("libphonenumber" ,libphonenumber)
+       ("icu4c" ,icu4c)
+       ("protobuf" ,protobuf)
+       ("gawk" ,gawk)))
+    (home-page "https://github.com/Orange-OpenSource/pn")
+    (synopsis "Command-line validation tool for phone numbers")
+    (description
+     "@code{pn} provides a command line tool that allows users to operate on
+phone numbers (get validity information, reformat them, or extract
+numbers from a text snippet), using @code{libphonenumber}.")
+    (license license:asl2.0)))
-- 
2.30.2





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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 20:52:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 16:52:57 2021
Received: from localhost ([127.0.0.1]:47161 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVK5x-0008Gt-At
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:52:57 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:44166)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <antero@HIDDEN>) id 1mVK5v-0008Gd-LF
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 16:52:56 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4HJsCP42yczQkJ1
 for <50873 <at> debbugs.gnu.org>; Tue, 28 Sep 2021 22:52:49 +0200 (CEST)
Authentication-Results: spamfilter01.heinlein-hosting.de (amavisd-new);
 dkim=pass (2048-bit key) reason="pass (just generated, assumed good)"
 header.d=mailbox.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;
 s=mail20150812; t=1632862367;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=gefl5fw8JWRwmqF6izeWg+SAsD7a8rgwYRrvjWIFZKQ=;
 b=deRn8w1Vv255J1wV8IvF/wzJxzbEbMFTYlhOnrc1oRsTQpcNJCs71N12xzpU/BgKPEx21v
 TJNW0wLEjBwGnHYXCAxg1CcaY57GO9RddtMOT61ewZMZ7KgcVveEm1isu+NpfVaS0vnRJ3
 WLQSRi0h1pJRx9iDQYHe+9huznTiUe9bTgkZBbK9y1rpS6HoskXe0jco5iF+hqG6nr16pK
 WeuauP4ZzF63qyc3yYhNjojZlvxn6JUzBxOLqpQo876+6WJt4/pBM/bqDrkSwIUUUqgrHH
 D/EKDtbFjlyV6I/bF/3G+golopEvoSRN+pG9N1ymQIr4y86yBKgGGS4xDpb38Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :references:in-reply-to:message-id:date:date:subject:subject
 :from:from:received; s=mail20150812; t=1632862366; bh=kAWSSR2+Iy
 g4aV234lx3dzgD+FmfJkYZMM8gK1+5KF4=; b=heMaFizn7TVLpF+9bBQ08uBv1B
 xrwSaEaZJadfDwqJIqAqCThLHXXJjDaM/kseK6wGueZ2zP423PrL4fheYftYVn0r
 l3jdAhiqCzuyoPY+BGZJANSBfYNVs1irrc3wc/NN00NHVnnYb6W2eN6ZCsQWKRQi
 MpON7nbiLtMRbP6a8CbeA4/peSwMv1BWWL75co2K0EQZaj01L2L3p9MsX0KS7pFS
 X7hnF3XrrX72OprJkP4vugw0zB/L9lFuUczmECl6i0p5g/hfuFyXdWxatUtTdr+w
 w94x4vtQrdGxHBw2MsTxzvI4rHVgfXZrxRKbdqcJ9TK4OXxEalC7WWtETlhQ==
X-Virus-Scanned: amavisd-new at heinlein-support.de
From: Antero Mejr <antero@HIDDEN>
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add libphonenumber.
Date: Tue, 28 Sep 2021 16:52:26 -0400
Message-Id: <20210928205227.25833-2-antero@HIDDEN>
In-Reply-To: <20210928205227.25833-1-antero@HIDDEN>
References: <20210928205227.25833-1-antero@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 8546B1702
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50873
Cc: Antero Mejr <antero@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/telephony.scm (libphonenumber): New variable.
---
 gnu/packages/telephony.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 48bbe12920..50b5790ae3 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@HIDDEN>
 ;;; Copyright © 2021 LibreMiami <packaging-guix@HIDDEN>
+;;; Copyright © 2021 Antero Mejr <antero@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,12 +55,14 @@
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages file)
   #:use-module (gnu packages protobuf)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linphone)
@@ -907,3 +910,38 @@ Initiation Protocol (SIP) and a multimedia framework.")
 telephony functionality into custom Telegram clients.")
     (home-page "https://github.com/zevlg/libtgvoip")
     (license license:unlicense)))
+
+(define-public libphonenumber
+  (package
+    (name "libphonenumber")
+    (version "8.12.33")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/google/libphonenumber")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+         (base32
+          "0r12icyig6jy0v87j9n3w14acfa2yfckzzfbmnjx1hww6qc9ih25"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'enter-dir
+            (lambda _ (chdir "cpp")))
+          (replace 'check
+            (lambda _ (invoke "./libphonenumber_test"))))))
+    (inputs
+     `(("boost" ,boost)
+       ("googletest" ,googletest)
+       ("protobuf" ,protobuf)
+       ("icu4c" ,icu4c)))
+    (home-page "https://github.com/google/libphonenumber")
+    (synopsis "C++ library for phone number parsing")
+    (description
+     "@code{libphonenumber} is Google's common Java, C++ and JavaScript
+library for parsing, formatting, and validating international phone numbers.")
+    (license license:asl2.0)))
+
-- 
2.30.2





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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 19:00:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 15:00:08 2021
Received: from localhost ([127.0.0.1]:46983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVIKl-0005Qx-Ij
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:00:07 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:35054
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVIKj-0005Ov-5K
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:00:06 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632855597;
 bh=I3+vKjvVEU+BvmdcCEqPRwJFryDUq7b6fVQxN31/IYs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=GVlpQU7UbD+Wq+Gl62YnGRKAdaDDP5iue4/7WYNGp+TyuiNaJQ+NuSKbQ7KzFJQ/h
 88yZwsF11C7//jaiphjuvb9y9bp1/hQeFUaXSgjSnEVtgF35Ctgpmdj3nqGR0TQi1g
 z5aQNLwQLgC02sbobfMS5/7Q4a+NNr43hPlEfy9M=
To: 50873 <at> debbugs.gnu.org
Subject: Re: [bug#50796] [PATCH] gnu: Add pn.
In-Reply-To: <20210925032815.68194-1-antero@HIDDEN>
References: <20210925032815.68194-1-antero@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Date: Tue, 28 Sep 2021 20:59:52 +0200
Message-ID: <87lf3g34rb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
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:  On Fri, Sep 24 2021, Antero Mejr via Guix-patches via wrote:
    > * gnu/packages/telephony.scm (pn): New variable. The ‘libphonenumber’
    package is also added; this should be split into patches, each adding one
    new package. 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
Cc: Antero Mejr <antero@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
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:  On Fri, Sep 24 2021, Antero Mejr via Guix-patches via wrote:
    > * gnu/packages/telephony.scm (pn): New variable. The ‘libphonenumber’
    package is also added; this should be split into patches, each adding one
    new package. 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

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

On Fri, Sep 24 2021, Antero Mejr via Guix-patches via wrote:

> * gnu/packages/telephony.scm (pn): New variable.

The =E2=80=98libphonenumber=E2=80=99 package is also added; this should be =
split into
patches, each adding one new package.

> ---
> Add pn and its dependencies.
> It's a phone number CLI tool used by Linux phone GUIs like SXMO.
>
>  gnu/packages/telephony.scm | 72 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
> index 48bbe12920..9015cf536a 100644
> --- a/gnu/packages/telephony.scm
> +++ b/gnu/packages/telephony.scm
> @@ -20,6 +20,7 @@
>  ;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer <maxim.cournoyer@HIDDEN=
om>
>  ;;; Copyright =C2=A9 2020 Vincent Legoll <vincent.legoll@HIDDEN>
>  ;;; Copyright =C2=A9 2021 LibreMiami <packaging-guix@HIDDEN>
> +;;; Copyright =C2=A9 2021 Antero Mejr <antero@HIDDEN>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -54,12 +55,14 @@
>    #:use-module (gnu packages documentation)
>    #:use-module (gnu packages file)
>    #:use-module (gnu packages protobuf)
> +  #:use-module (gnu packages gawk)
>    #:use-module (gnu packages gettext)
>    #:use-module (gnu packages gl)
>    #:use-module (gnu packages glib)
>    #:use-module (gnu packages gnome)
>    #:use-module (gnu packages gnupg)
>    #:use-module (gnu packages gtk)
> +  #:use-module (gnu packages icu4c)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages libcanberra)
>    #:use-module (gnu packages linphone)
> @@ -907,3 +910,72 @@ Initiation Protocol (SIP) and a multimedia framework=
.")
>  telephony functionality into custom Telegram clients.")
>      (home-page "https://github.com/zevlg/libtgvoip")
>      (license license:unlicense)))
> +
> +(define-public libphonenumber
> +  (package
> +    (name "libphonenumber")
> +    (version "8.12.33")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/google/libphonenumber")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +         (base32
> +          "0r12icyig6jy0v87j9n3w14acfa2yfckzzfbmnjx1hww6qc9ih25"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f

There should be a comment explaining why tests are disabled.

> +       #:phases
> +        (modify-phases %standard-phases
> +          (add-after 'unpack 'enter-dir
> +            (lambda _ (chdir "cpp") #t)))))

Phases don=E2=80=99t have to return #t.

> +    (inputs
> +     `(("boost" ,boost)
> +       ("googletest" ,googletest)
> +       ("protobuf" ,protobuf)
> +       ("icu4c" ,icu4c)))
> +    (home-page "https://github.com/google/libphonenumber")
> +    (synopsis "C++ library for phone number parsing")
> +    (description
> +     "libphonenumber is Google's common Java, C++ and JavaScript library=
 for
> +parsing, formatting, and validating international phone numbers.")

I would use @code{libphonenumber}.

The package doesn=E2=80=99t seem to be reproducible; =E2=80=98guix build li=
bphonenumber
=2D-rounds=3D2=E2=80=99 fails with

=2D-8<---------------cut here---------------start------------->8---
guix build: error: derivation `/gnu/store/a0vycg9ic70bziygn098bbvw4hy39zzb-=
libphonenumber-8.12.33.drv' may not be deterministic: output `/gnu/store/1i=
fj4ndpf3mv8nwbjp0gzrx5jpjvghgb-libphonenumber-8.12.33' differs
=2D-8<---------------cut here---------------end--------------->8---

Could you look into this?

> +    (license license:asl2.0)))
> +
> +(define-public pn
> +  (package
> +    (name "pn")
> +    (version "0.9.0")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/Orange-OpenSource/pn")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> +         "1lvzb0yixj7wmmqzsri20k9nn3gf06j0yjvmg2mi1zihywq7s4dx"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f

Why are tests disabled?

> +       #:phases
> +        (modify-phases %standard-phases
> +         (add-after 'unpack 'sub-bin-path
> +           (lambda _
> +             (substitute* "CMakeLists.txt" (("DESTINATION \\$\\{AWKLIBPA=
TH\\}")
> +                                             "DESTINATION bin")))))))
> +    (inputs
> +     `(("libphonenumber" ,libphonenumber)
> +       ("icu4c" ,icu4c)
> +       ("protobuf" ,protobuf)
> +       ("gawk" ,gawk)))
> +    (home-page "https://github.com/Orange-OpenSource/pn")
> +    (synopsis "Command-line validation tool for phone numbers")
> +    (description
> +     "pn is a tool that allows command line user/programmers to operate =
on
> +phone numbers (get validity information, reformat them, or extract numbe=
rs
> +from a text snippet), using libphonenumber.")

I suggest

  @code{pn} provides a command line tools that allows on to operate on
  phone numbers (get validity information, reformat them, or extract
  numbers from a text snippet), using @code{libphonenumber}.



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

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

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFTZikVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5OO0P/1Rxx51OXlTRsGt1+4D5VatanM5t
yBNIjzUdPVdJF4q3JYgH9WWwSHEysUlI18taLmVn+XcTUOcMiBiMf8cU8rLEgcol
2TYpzU8E4s6qijF5VSF7GN8+6fT3SvgbgneGSriCnGTOM1DaZM2ZRCdtX4rOYK3t
aKNbTdKjUD5PDlNycoRQY/SSvrOftSuWLcUhcjS0kDjoQFL8QG7ZP2OUalBf4kfE
IzoUOPJe5AYGor9b15YPiEGdghgMVRBWdSGlmkEO9PREtZPkSpilg4OicOkDuhrJ
NadhOuTvAwFKFdMUcaTyg1nqvQdwqWUYcHDIDsYDga5gDM4TrdzgUdhpd44qirRn
JW3lEbiDkj7+SO+jd1yYcUTaTMcDimlzuGuGFVyyX0U/rtYI2kNeESpGyab7zdPt
M+oO0YkrWfDG1itr1jhGbluJk10PGqUA4M44o76uTTkqsI1F5U+90oZ3ulgZnLxb
7iBT4sJvjHOodRW/swUZkmvbgkhGx1A+kpCpz7Cg+yb6Qr4Q47BuPpwg6zKVFmIW
TEsFH4GpPR1eVKTkjycXwpxHWyWZnc1eyBi9EO3DqZXxvOVJxzZRGPx+dYJ3Jznl
I6oGCIt3X4IQ2bHEc2lW1dcFG0+APTM5fxYNOyMnqcMsjJu7+d/BkYZRL5RHTFsv
QfwZdt6NmeGYSmUg
=1DBg
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:36:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:36:13 2021
Received: from localhost ([127.0.0.1]:46934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVH1Y-0001Dr-Vj
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:13 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33292
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVH1U-0001DB-MJ
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:08 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850563;
 bh=TUtWXEuGN7p9CKtrdQJ102+DBZNfc2RxrCTbv4yjRA0=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=VhTB1R460wWAgmWKEBeFPvF8byYXfv1U7WaTChVrxy4UZ1/H7wxa/iLH2H3N7vnkU
 hs3mBknzmfGZeK0oo1lZpamx1vVCOBygHYoafcw88y4l5z6YdORc9wXQ6ILc4wZ9+s
 zK76HYIFx+u535rC+Ls2HBu/DmP/oxxf5iw4mWBg=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 5/5] =?UTF-8?q?doc:=20Document=20the=20=E2=80=98guix=20hom?=
 =?UTF-8?q?e=20import=E2=80=99=20subcommand.?=
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <e2be996cf4e3b3140a4c928c53dc37721c783bdc.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:36:02 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  * doc/guix.texi (Invoking guix home): Document ‘guix home
    import’. --- doc/guix.texi | 33 +++++++++++++++++++++++++++++++++ 1 file
    changed, 33 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index
    7956652050..2c268705d0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@
   -36088,6 +36088,39 @@ $ guix home list-generations 10d @end example 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
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.9 (+)
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:  * doc/guix.texi (Invoking guix home): Document ‘guix home
    import’. --- doc/guix.texi | 33 +++++++++++++++++++++++++++++++++ 1 file
    changed, 33 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index
    7956652050..2c268705d0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@
   -36088,6 +36088,39 @@ $ guix home list-generations 10d @end example 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

* doc/guix.texi (Invoking guix home): Document =E2=80=98guix home import=E2=
=80=99.
---
 doc/guix.texi | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7956652050..2c268705d0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36088,6 +36088,39 @@
 $ guix home list-generations 10d
 @end example
=20
+@item import
+Generate a @dfn{home environment} from the packages in the default
+profile and configuration files found in the user's home directory.  The
+configuration files will be copied to the specified directory.  Note
+that not every home service that exists is supported (@pxref{Home
+Services}).
+
+@example
+$ guix home import ~/guix-config
+;; This "home-environment" file can be passed to 'guix home reconfigure'
+;; to reproduce the content of your profile.  This is "symbolic": it only
+;; specifies package names.  To reproduce the exact same profile, you also
+;; need to capture the channels being used, as returned by "guix describe".
+;; See the "Replicating Guix" section in the manual.
+
+(use-modules
+  (gnu home)
+  (gnu packages)
+  (gnu home-services bash))
+
+(home-environment
+  (packages
+    (map specification->package
+         (list "glibc-locales" "nss-certs" "nss")))
+  (services
+    (list (service
+            home-bash-service-type
+            (home-bash-configuration
+              (bashrc
+                (list (slurp-file-gexp
+                        (local-file "/home/alice/guix-config/.bashrc")))))=
))))
+@end example
+
 @end table
=20
 @node Documentation
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:36:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:36:08 2021
Received: from localhost ([127.0.0.1]:46931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVH1T-0001DZ-P7
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:07 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33286
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVH1S-0001Cj-8g
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:06 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850560;
 bh=noR8bcNYCpsS7urz40MGuCN1Dw4WfxLNXQpd0Scl5Zg=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=r+Fy5q/jJHbJ5HLE0TS/Tna/RGOYHxzwTInNtYs7eCdsCdflZnlfXq6NofAAmmflQ
 f7dTV1E2liwYIXWypkoEcDFUA5NTEpfPq5P8bHjKjEoqea1j6rEelOd9kPzuumota1
 HTa7jRF0lbPwtmmz9WKLK/vCjlfKOcykR0SauiYY=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 4/5] guix home: import: Delete duplicate modules when
 importing.
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <7063704a274d99c8ea0bdc437a05b74e9fd78a49.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:36:00 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  Two different services might require the same module(s), so
    delete duplicates when generating the ‘use-modules’ form. * import.scm
    (manifest->code): Delete duplicate modules. --- guix/scripts/home/import.scm
    | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
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.9 (+)
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:  Two different services might require the same module(s), so
    delete duplicates when generating the ‘use-modules’ form. * import.scm
    (manifest->code): Delete duplicate modules. --- guix/scripts/home/import.scm
    | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Two different services might require the same module(s), so delete duplicat=
es
when generating the =E2=80=98use-modules=E2=80=99 form.

* import.scm (manifest->code): Delete duplicate modules.
---
 guix/scripts/home/import.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 6d9ca98f28..5ba99378af 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -149,7 +149,8 @@ (define (qualified-name entry)
               `(begin
                  (use-modules (gnu home)
                               (gnu packages)
-                              ,@(concatenate (map cdr configurations+modul=
es)))
+                              ,@((compose delete-duplicates concatenate)
+                                 (map cdr configurations+modules)))
                  ,(home-environment-template
                    #:specs specs
                    #:services (map first configurations+modules))))
@@ -192,7 +193,8 @@ (define name
                  (use-modules (guix transformations)
                               (gnu home)
                               (gnu packages)
-                              ,@(concatenate (map cdr configurations+modul=
es)))
+                              ,@((compose delete-duplicates concatenate)
+                                 (map cdr configurations+modules)))
=20
                  ,@transformations
=20
--=20
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:36:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:36:05 2021
Received: from localhost ([127.0.0.1]:46928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVH1R-0001DF-Ga
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:05 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33280
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVH1K-0001CP-T5
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:35:59 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850553;
 bh=WdGWlYN8AYbycU8YeDTnp965qSc1o7PAFb9CV2VtQp4=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=KJ9Au9VnPcaVyafLOZKIq/vym7jjk5a0CGrsll57GeDuRVTK7H6DhQ4rm8KV1Qw4R
 wCiivZsvggYqU74xRt/UFxqfmHhBrKP7KcnvLZCf3OYFPIR0GczoeH8Fh6azJZEu5H
 K5bfly76udAuKu3/u6rplHtSMSrA2SRBWpC8Jbek=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 3/5] guix home: import: Fix module name for Bash service.
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <4c4666a12f67c76b463cc7701319e68b9b809def.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:35:52 +0200
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.9 (++)
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: * guix/scripts/home/import.scm
 (generate-bash-configuration+modules):
 Change (gnu home-services bash) to (gnu home-services shells). ---
 guix/scripts/home/import.scm
 | 2 +- 1 file changed, 1 insertion [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
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.9 (+)
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:  * guix/scripts/home/import.scm (generate-bash-configuration+modules):
    Change (gnu home-services bash) to (gnu home-services shells). --- guix/scripts/home/import.scm
    | 2 +- 1 file changed, 1 insertion [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

* guix/scripts/home/import.scm (generate-bash-configuration+modules): Change
(gnu home-services bash) to (gnu home-services shells).
---
 guix/scripts/home/import.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index ad926fa202..6d9ca98f28 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -64,7 +64,7 @@ (define (destination-append path)
                          (list (slurp-file-gexp
                                 (local-file ,logout)))))
                       '())))
-      (gnu home-services bash))))
+      (gnu home-services shells))))
 
 
 (define %files+configurations-alist
-- 
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:36:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:36:05 2021
Received: from localhost ([127.0.0.1]:46923 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVH1G-0001CW-Jf
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:36:05 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33270
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVH1F-0001CJ-2K
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:35:53 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850547;
 bh=RylSVc8nuJeWHmXsVlgB+ho4C05ujXWj1OBhUFCaHpA=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=LIaTdDgNdqDhaww0r7qWW/Qrf42p3JhR3CymYzhBL4H/Heo3R8csPCFwWW001s9S8
 WxgSTkfCQTlqqyre93CPCDw7dGBlZWthVxNM9WqJWM3EBLNORl6PMWNY/Zw567Y03P
 39A0mQI0iixW+XTIt+I1CubVLzcBkydU+sego3n4=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 2/5] guix home: import: Allow multiple modules to be
 imported for each service.
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <100bd160a58a65442ec68fb2f83e2dc3291224e0.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:35:47 +0200
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 2.9 (++)
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:  Previously,
 only one module could be imported for each service, 
 e.g., only (gnu home-services shell) could be imported when generating the
 Bash service declaration. However, for some services, multipl [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
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.9 (+)
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:  Previously, only one module could be imported for each service,
    e.g., only (gnu home-services shell) could be imported when generating the
    Bash service declaration. However, for some services, multipl [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Previously, only one module could be imported for each service, e.g., only
(gnu home-services shell) could be imported when generating the Bash service
declaration.  However, for some services, multiple modules might need to be
imported in order for it to work.

* guix/scripts/home/import.scm (generate-bash-module+configuration): Rename to
...
(generate-bash-configuration+modules): ... this.
(%files-configurations-alist): Rename to ...
(%files+configurations-alist): ... this.
(modules+configurations): Rename to ...
(configurations+modules): ... this.
(manifest->code): Adjust accordingly.
---
 guix/scripts/home/import.scm | 43 ++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index a6ab68a32c..ad926fa202 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -40,15 +40,14 @@ (define-module (guix scripts home import)
 (define %destination-directory
   (make-parameter (string-append (getenv "HOME") "/src/guix-config")))
 
-(define (generate-bash-module+configuration)
+(define (generate-bash-configuration+modules)
   (define (destination-append path)
     (string-append (%destination-directory) "/" path))
 
   (let ((rc (destination-append ".bashrc"))
         (profile (destination-append ".bash_profile"))
         (logout (destination-append ".bash_logout")))
-    `((gnu home-services bash)
-      (service home-bash-service-type
+    `((service home-bash-service-type
                (home-bash-configuration
                 ,@(if (file-exists? rc)
                       `((bashrc
@@ -64,14 +63,16 @@ (define (destination-append path)
                       `((bash-logout
                          (list (slurp-file-gexp
                                 (local-file ,logout)))))
-                      '()))))))
+                      '())))
+      (gnu home-services bash))))
 
-(define %files-configurations-alist
-  `((".bashrc" . ,generate-bash-module+configuration)
-    (".bash_profile" . ,generate-bash-module+configuration)
-    (".bash_logout" . ,generate-bash-module+configuration)))
 
-(define (modules+configurations)
+(define %files+configurations-alist
+  `((".bashrc" . ,generate-bash-configuration+modules)
+    (".bash_profile" . ,generate-bash-configuration+modules)
+    (".bash_logout" . ,generate-bash-configuration+modules)))
+
+(define (configurations+modules)
   (define configurations
     (delete-duplicates
      (filter-map (match-lambda
@@ -85,11 +86,11 @@ (define configurations
                                         (%destination-directory) "/" file))
                             proc)
                           #f))))
-                 %files-configurations-alist)
+                 %files+configurations-alist)
      (lambda (x y)
        (equal? (procedure-name x) (procedure-name y)))))
   
-    (map (lambda (proc) (proc)) configurations))
+  (map (lambda (proc) (proc)) configurations))
 
 ;; Based on `manifest->code' from (guix profiles)
 ;; MAYBE: Upstream it?
@@ -144,14 +145,14 @@ (define (qualified-name entry)
                                                    ":" output))))
                         (manifest-entries manifest))))
         (if home-environment?
-            (let ((modules+configurations (modules+configurations)))
+            (let ((configurations+modules (configurations+modules)))
               `(begin
-               (use-modules (gnu home)
-                            (gnu packages)
-                            ,@(map first modules+configurations))
-               ,(home-environment-template
-                 #:specs specs
-                 #:services (map second modules+configurations))))
+                 (use-modules (gnu home)
+                              (gnu packages)
+                              ,@(concatenate (map cdr configurations+modules)))
+                 ,(home-environment-template
+                   #:specs specs
+                   #:services (map first configurations+modules))))
             `(begin
                (use-modules (gnu packages))
 
@@ -186,18 +187,18 @@ (define name
                              (options->transformation ',options))))
                        transformation-procedures)))
         (if home-environment?
-            (let ((modules+configurations (modules+configurations)))
+            (let ((configurations+modules (configurations+modules)))
               `(begin
                  (use-modules (guix transformations)
                               (gnu home)
                               (gnu packages)
-                              ,@(map first modules+configurations))
+                              ,@(concatenate (map cdr configurations+modules)))
 
                  ,@transformations
 
                  ,(home-environment-template
                    #:packages packages
-                   #:services (map second modules+configurations))))
+                   #:services (map first configurations+modules))))
             `(begin
                (use-modules (guix transformations)
                             (gnu packages))
-- 
2.33.0







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

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


Received: (at 50873) by debbugs.gnu.org; 28 Sep 2021 17:35:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:35:44 2021
Received: from localhost ([127.0.0.1]:46920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVH16-0001C8-55
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:35:44 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33258
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVH14-0001Bs-3S
 for 50873 <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:35:42 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850536;
 bh=8204i1p8k/yCcQOFyl3weMDTCmOJgLPRH+CH29SV5KQ=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=OCHgu16TLyGwFG+Kz75jJVa6BrBoqz6DDjo9xJq9ATAhFzv84z23luGe2UA1Uskfe
 AYDaMgxftsW7PPhwb/UoPGOCqKj7P89zQ7RrvYVhBSPl15Stb7zHZcyQpGCmszBd+O
 Bpi6V7P9o34aBpAvnwR6sN3OmcNPuppYo5IJEztc=
To: 50873 <at> debbugs.gnu.org
Subject: [PATCH 1/5] guix home: import: Make the user to specify a
 destination directory.
In-Reply-To: <cover.1632849969.git.public@HIDDEN>
References: <cover.1632849969.git.public@HIDDEN>
X-Debbugs-Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <649c8f3218460dea0ec6cca46064150224374f89.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:35:35 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 2.9 (++)
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:  Copy the appropriate the relevant configuration files to the
    destination directory, and call ‘local-file’ on them. Without this, ‘guix
    home import’ will generate a service declaration like this 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50873
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.9 (+)
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:  Copy the appropriate the relevant configuration files to the
    destination directory, and call ‘local-file’ on them. Without this, ‘guix
    home import’ will generate a service declaration like this 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches 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.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

Copy the appropriate the relevant configuration files to the destination
directory, and call =E2=80=98local-file=E2=80=99 on them.

Without this, =E2=80=98guix home import=E2=80=99 will generate a service de=
claration like this

  (service
   home-bash-service-type
   (home-bash-configuration
    (bashrc
     (list (slurp-file-gexp
            (local-file "/home/yoctocell/.bashrc"))))))

but when running =E2=80=98guix home reconfigure=E2=80=99, the ~/.bashrc fil=
e would be moved, so
when running =E2=80=98guix home reconfigure=E2=80=99 for the second time, i=
t would read the
~/.bashrc which is itself a symlink to a file the store.

* guix/scripts/home/import.scm (%destination-directory): New parameter.
(generate-bash-module+configuration): Adjust accordingly.
(modules+configurations): Copy the user=E2=80=99s configuration file to
=E2=80=98%destination-directory=E2=80=99.
* guix/scripts/home.scm (process-command): Adjust accordingly; create
=E2=80=98%destination-directory=E2=80=99 if it doesn=E2=80=99t exist.
---
 guix/scripts/home.scm        | 25 +++++++-----
 guix/scripts/home/import.scm | 75 +++++++++++++++++++++---------------
 2 files changed, 60 insertions(+), 40 deletions(-)

diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 75df6d707d..0f638b643e 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -38,6 +38,7 @@ (define-module (guix scripts home)
   #:autoload   (guix scripts pull) (channel-commit-hyperlink)
   #:use-module (guix scripts home import)
   #:use-module ((guix status) #:select (with-status-verbosity))
+  #:use-module ((guix build utils) #:select (mkdir-p))
   #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (srfi srfi-1)
@@ -248,15 +249,21 @@ (define-syntax-rule (with-store* store exp ...)
      (apply search args))
     ((import)
      (let* ((profiles (delete-duplicates
-                      (match (filter-map (match-lambda
-                                           (('profile . p) p)
-                                           (_              #f))
-                                         opts)
-                        (() (list %current-profile))
-                        (lst (reverse lst)))))
-           (manifest (concatenate-manifests
-                      (map profile-manifest profiles))))
-       (import-manifest manifest (current-output-port))))
+                       (match (filter-map (match-lambda
+                                            (('profile . p) p)
+                                            (_              #f))
+                                          opts)
+                         (() (list %current-profile))
+                         (lst (reverse lst)))))
+            (manifest (concatenate-manifests
+                       (map profile-manifest profiles)))
+            (destination (match args
+                           ((destination) destination)
+                           (_ (leave (G_ "wrong number of arguments~%"))))=
))
+       (unless (file-exists? destination)
+         (mkdir-p destination))
+       (parameterize ((%destination-directory destination))
+         (import-manifest manifest (current-output-port)))))
     ((describe)
      (match (generation-number %guix-home)
        (0
diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 79fb23a2fd..a6ab68a32c 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -27,7 +27,8 @@ (define-module (guix scripts home import)
   #:use-module (ice-9 pretty-print)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
-  #:export (import-manifest))
+  #:export (import-manifest
+            %destination-directory))
=20
 ;;; Commentary:
 ;;;
@@ -36,29 +37,34 @@ (define-module (guix scripts home import)
 ;;;
 ;;; Code:
=20
+(define %destination-directory
+  (make-parameter (string-append (getenv "HOME") "/src/guix-config")))
=20
 (define (generate-bash-module+configuration)
-  (let ((rc (string-append (getenv "HOME") "/.bashrc"))
-        (profile (string-append (getenv "HOME") "/.bash_profile"))
-        (logout (string-append (getenv "HOME") "/.bash_logout")))
+  (define (destination-append path)
+    (string-append (%destination-directory) "/" path))
+
+  (let ((rc (destination-append ".bashrc"))
+        (profile (destination-append ".bash_profile"))
+        (logout (destination-append ".bash_logout")))
     `((gnu home-services bash)
       (service home-bash-service-type
-                 (home-bash-configuration
-                  ,@(if (file-exists? rc)
-                        `((bashrc
-                           (list (slurp-file-gexp (local-file ,rc)))))
-                        '())
-                  ,@(if (file-exists? profile)
-                        `((bash-profile
-                           (list (slurp-file-gexp
-                                  (local-file ,profile)))))
-                        '())
-                  ,@(if (file-exists? logout)
-                        `((bash-logout
-                           (list (slurp-file-gexp
-                                  (local-file ,logout)))))
-                        '()))))))
-
+               (home-bash-configuration
+                ,@(if (file-exists? rc)
+                      `((bashrc
+                         (list (slurp-file-gexp
+                                (local-file ,rc)))))
+                      '())
+                ,@(if (file-exists? profile)
+                      `((bash-profile
+                         (list (slurp-file-gexp
+                                (local-file ,profile)))))
+                      '())
+                ,@(if (file-exists? logout)
+                      `((bash-logout
+                         (list (slurp-file-gexp
+                                (local-file ,logout)))))
+                      '()))))))
=20
 (define %files-configurations-alist
   `((".bashrc" . ,generate-bash-module+configuration)
@@ -66,17 +72,24 @@ (define %files-configurations-alist
     (".bash_logout" . ,generate-bash-module+configuration)))
=20
 (define (modules+configurations)
-  (let ((configurations (delete-duplicates
-                         (filter-map (match-lambda
-                                ((file . proc)
-                                 (if (file-exists?
-                                      (string-append (getenv "HOME") "/" f=
ile))
-                                     proc
-                                     #f)))
-                                     %files-configurations-alist)
-                         (lambda (x y)
-                           (equal? (procedure-name x) (procedure-name y)))=
)))
-    (map (lambda (proc) (proc)) configurations)))
+  (define configurations
+    (delete-duplicates
+     (filter-map (match-lambda
+                   ((file . proc)
+                    (let ((absolute-path (string-append (getenv "HOME")
+                                                        "/" file)))
+                      (if (file-exists? absolute-path)
+                          (begin
+                            (copy-file absolute-path
+                                       (string-append
+                                        (%destination-directory) "/" file))
+                            proc)
+                          #f))))
+                 %files-configurations-alist)
+     (lambda (x y)
+       (equal? (procedure-name x) (procedure-name y)))))
+=20=20
+    (map (lambda (proc) (proc)) configurations))
=20
 ;; Based on `manifest->code' from (guix profiles)
 ;; MAYBE: Upstream it?
--=20
2.33.0







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

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


Received: (at submit) by debbugs.gnu.org; 28 Sep 2021 17:33:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 13:33:25 2021
Received: from localhost ([127.0.0.1]:46914 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVGyq-00018F-Ou
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:33:24 -0400
Received: from lists.gnu.org ([209.51.188.17]:44772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mVGyo-000187-HZ
 for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 13:33:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51066)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <public@HIDDEN>)
 id 1mVGyo-0002DL-BP
 for guix-patches@HIDDEN; Tue, 28 Sep 2021 13:33:22 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:53170
 helo=mail.yoctocell.xyz)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <public@HIDDEN>)
 id 1mVGym-0003N6-5G
 for guix-patches@HIDDEN; Tue, 28 Sep 2021 13:33:22 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1632850395;
 bh=vteuw7v/PF23xOJwEas2evOTMCZyT38pQ5w2h5r9SXU=;
 h=From:To:Subject:Date;
 b=uHbi2SrC9sJh69YIbyIdvauN7xvZsuHBUI9bVz95S8Zcrvrc/nQqQ48y/rYzVtXdE
 TRz2HYyonF+/rBkf3B2lMJFLfMNEooOhLsiib+YksPhmxvixZPRwRyS1ccxNVLVqzI
 bZDHYB/59x6OPi7kzuHRFeCeZglwd+2ywhWVjIDE=
To: guix-patches@HIDDEN
Subject: [PATCH 0/5] Fixes to =?utf-8?Q?=E2=80=98guix?= home =?utf-8?Q?imp?=
 =?utf-8?Q?ort=E2=80=99?=
X-Debbugs-CC: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Andrew Tropin
 <andrew@HIDDEN>
Message-Id: <cover.1632849969.git.public@HIDDEN>
Date: Tue, 28 Sep 2021 19:33:09 +0200
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@HIDDEN;
 helo=mail.yoctocell.xyz
X-Spam_score_int: 39
X-Spam_score: 3.9
X-Spam_bar: +++
X-Spam_report: (3.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499,
 FROM_SUSPICIOUS_NTLD_FP=0.229, PDS_OTHER_BAD_TLD=1.999,
 PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=2.299 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.7 (+)
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:  This series makes some fixes to the ‘guix home import’
    subcommand which brings it into a usable state. The last patch documents
   the subcommand in the manual. As a sidenote, the ‘manifest->code’ procedure
    in (guix scripts home import), which is based on ‘manifest->code’ from
    (guix profiles) should probably be factorized with the original ‘manifest
    [...] 
 
 Content analysis details:   (1.7 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.51.188.17 listed in wl.mailspike.net]
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
                             medium trust
                             [209.51.188.17 listed in list.dnswl.org]
  0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
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: 0.2 (/)

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

This series makes some fixes to the =E2=80=98guix home import=E2=80=99 subc=
ommand which
brings it into a usable state.

The last patch documents the subcommand in the manual.

As a sidenote, the =E2=80=98manifest->code=E2=80=99 procedure in (guix scri=
pts home
import), which is based on =E2=80=98manifest->code=E2=80=99 from (guix prof=
iles) should
probably be factorized with the original =E2=80=98manifest->code=E2=80=99 p=
rocedure.

Xinglu Chen (5):
  guix home: import: Make the user to specify a destination directory.
  guix home: import: Allow multiple modules to be imported for each
    service.
  guix home: import: Fix module name for Bash service.
  guix home: import: Delete duplicate modules when importing.
  doc: Document the =E2=80=98guix home import=E2=80=99 subcommand.

 doc/guix.texi                |  33 ++++++++++
 guix/scripts/home.scm        |  25 +++++---
 guix/scripts/home/import.scm | 118 ++++++++++++++++++++---------------
 3 files changed, 116 insertions(+), 60 deletions(-)


base-commit: 5edfa6d15e5bb92609ecff7e37e3985eced1dd4d
=2D-=20
2.33.0




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

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

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFTUdYVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5tMkP/RaFKrwuVlmXoVx4nTb8gV7oQErP
Ktc+q8zhehNgLX+CTgOXUDp0PJ6XRQ6Z+BfMITogrxPBIzuhvx2VksNIpxIVpKn5
HP7hH1u8rbApeONLyTdbuluQRP40Oj4yUvB/g6Art1Qeqg5ZBfagCaVEAYaFGuPc
5TyT+b53NfATrLysWX5q4MnEMIHllJR/Ku8QLB59Uu31oCAoDfF1ANs0CNMIwrWX
JR0nG6PUX/ic1SMuWZxcy+TcjLdeY5JhXfYK/9S8I2XkWjFTYE32RpF3xjpj3F1z
8ewzIpRZKDqlFVDawMyigH8fyOSwQxLi5tTwEnnnJS9h/oBmEa879uOxkBjwn/Dm
SGUbazquk2q84IwJNi9SpXCfwPjxXtIVhc+ryPa93BSr9a9812PTC1jtlt3P1fWc
x+KaE8neCAOe8RXy7AsRg9C6G5+Gv/FaI3kLVZ0Y5vRa27Bc9RnnRhLEVNMTA/bC
jXKeuuXMaPg9UWDOcL4vEznrK6xJj39qqmtyF8IgESbK0MKOsXk8YGT355NbCbsz
wspv+EPo88NhdAO/NhWK7oXYNHW8Mixgqs5NfQ33aUTXxp6nMFkjRDdSZr1nWFAg
oEFoHvowz5ymk4WLXWgBwcBmCwGUwQYzWtFjA0+uH6aaik1RNTrtXIqKdxsKloiz
t2pB2PFHZBj0WnBk
=a4L2
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Xinglu Chen <public@HIDDEN>:
New bug report received and forwarded. Copy sent to ludo@HIDDEN, andrew@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to ludo@HIDDEN, andrew@HIDDEN, guix-patches@HIDDEN:
bug#50873; 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, 11 Oct 2021 13:00:02 UTC

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