From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wBWkOkrNYGGl2wAAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 00:59:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MNsoNUrNYGHdBwAAbx9fmQ (envelope-from ) for ; Fri, 08 Oct 2021 22:59:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 81271C6D0 for ; Sat, 9 Oct 2021 00:59:22 +0200 (CEST) Received: from localhost ([::1]:39720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYypl-0006IB-MB for larch@yhetil.org; Fri, 08 Oct 2021 18:59:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYypS-0006I2-Q8 for guix-patches@gnu.org; Fri, 08 Oct 2021 18:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYypS-000768-J2 for guix-patches@gnu.org; Fri, 08 Oct 2021 18:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYypS-0006Od-7t for guix-patches@gnu.org; Fri, 08 Oct 2021 18:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Oct 2021 22:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Oleg Pykhalov Cc: Andrew Tropin , Xinglu Chen , 50967@debbugs.gnu.org, zimoun Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163373388424522 (code B ref 50967); Fri, 08 Oct 2021 22:59:02 +0000 Received: (at 50967) by debbugs.gnu.org; 8 Oct 2021 22:58:04 +0000 Received: from localhost ([127.0.0.1]:52067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYyoW-0006NS-B9 for submit@debbugs.gnu.org; Fri, 08 Oct 2021 18:58:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYyoT-0006Mx-TO for 50967@debbugs.gnu.org; Fri, 08 Oct 2021 18:58:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60690) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYyoN-0006FD-QS; Fri, 08 Oct 2021 18:57:55 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59210 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYyoN-0005BF-F1; Fri, 08 Oct 2021 18:57:55 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87h7dwq4cb.fsf_-_@gnu.org> <20211004231331.5269-1-go.wigust@gmail.com> <20211004231331.5269-3-go.wigust@gmail.com> <878rz54xmy.fsf@gmail.com> Date: Sat, 09 Oct 2021 00:57:53 +0200 In-Reply-To: <878rz54xmy.fsf@gmail.com> (Oleg Pykhalov's message of "Thu, 07 Oct 2021 01:05:41 +0300") Message-ID: <87o87z2kge.fsf_-_@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633733962; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=mvevKMNYMkJ9HKDc4M3vEZDGpjdAkyRCh0X6oRaDLoU=; b=UZP1W6V0gvM+5Ff6KphoCZzcJckonXx/+gUautheGtghinHZWC8XTMMl0D/t8YXpHIV64s KKbYBvj2r8tP+mvZMKg7d6AhZX5ZOc+e57r64p79MlNvzH8N9D/sUZFhs9VZ9LLRwUkKvd /yMxHwRcE8xZZAwEqYo3vQ4YnsHUmFRBOR7Gnd3ZjqMI/wlu/MsmGM2gXXqy9fpuysWnu1 1V9mhimg5bAIGe9I6+KbLebUr6mhlgnnij7OU0skMnohPwD2dRn/xedrvsrHXuXTn881Qg ZjHFfmpKpYnHF8oB85NL0mZ56usjtpEISvLjvLRSFFHG9+2b8GVX2039Purstw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633733962; a=rsa-sha256; cv=none; b=Z/r7F/S44+SzeSXXfmh7OHVH9RzEgw0F7ZOWl4LJ2wGANIRfj3cvShL4WON8+mvVxnx5JQ 1FLm8V/lo/mJElTL/42isMgX/j/qsV7y6OgRo0Iukwf3HP7P2gKVUU5lqqYaZ+vFmPyz6i Q7gqafZz5DWMS4ncqbnhBNUO2cfXcsG+oQhUvs6v7tda+gFymscsCXqALfcJqJjEz3XqZ8 i/2O2UAyKQ3X2BxcupXCqWm/nJQLgelVfabSqy+61vM3pJU+dBJRuJRnHc/8pAZg62HquY GSrXmDvW+0DKYXUiPFGIQX5ZaUVtxrQAGCgaPwt3fykR9R94eKMEvkpD+rnY3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 81271C6D0 X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1Kczkqm/cMds Oleg Pykhalov skribis: > From eec2ab5f514ec6e156244898f8a635baf323ab70 Mon Sep 17 00:00:00 2001 > From: Oleg Pykhalov > Date: Tue, 5 Oct 2021 02:10:25 +0300 > Subject: [PATCH] scripts: home: Make sure profile directory exists. > > * guix/scripts/home.scm (process-action): Make sure profile directory exi= sts. > * tests/guix-home.sh: New file. > * Makefile.am (SH_TESTS): Add this. IMO the home.scm change should perhaps be a separate commit because it=E2= =80=99s not strictly what the test exercises. > +++ b/tests/guix-home.sh > @@ -0,0 +1,86 @@ > +#!/usr/bin/env bash > + You can remove these two lines. > +run_guix_home_without_home() > +{ > + ( > + # Save current directory (Guix source directory) for later mount > + test_directory=3D"$(mktemp -d)" > + trap 'umount $test_directory; rmdir $test_directory' EXIT > + mount --bind "$PWD" "$test_directory" > + > + # Make $HOME directory empty to preserve user's files > + mount --types tmpfs none "$HOME" > + > + # Mount Guix source directory in a clean environment > + mkdir -p "$PWD" > + mount --bind "$test_directory" "$PWD" > + cd "$PWD" || exit 77 How about =E2=80=98set -e=E2=80=99 to make sure we abort as soon as things = go wrong? Also, wouldn=E2=80=99t it be easier to set HOME to a new directory? > + guix home reconfigure "${test_directory}/home.scm" Looks like the test is not checking anything after =E2=80=98reconfigure=E2= =80=99 has completed. Should it check for the presence of certain things in ~/.bashrc, for the presence of ~/.guix-home, the output of =E2=80=98guix ho= me describe=E2=80=99 maybe? > +unshare -mrf bash -c "run_guix_home_without_home" If we keep this strategy (rather than setting HOME), we need a check for unprivileged user namespace support. In =E2=80=98tests/guix-pack-relocatable.sh=E2=80=99, this is done by invoking = =E2=80=9Cunshare -r true=E2=80=9D and checking the return value. Could you send an updated patch? Thanks, Ludo=E2=80=99.