From patchwork Fri Feb 21 13:05:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 38902 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 24D3E27BBEA; Fri, 21 Feb 2025 13:08:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C6FB027BBE2 for ; Fri, 21 Feb 2025 13:08:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tlSlA-000556-2u; Fri, 21 Feb 2025 08:08:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tlSl8-00054h-EQ for guix-patches@gnu.org; Fri, 21 Feb 2025 08:08:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tlSl8-0004fX-47 for guix-patches@gnu.org; Fri, 21 Feb 2025 08:08:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Zsh2zvgPChPdygWDGttbjWAWpTHmsPY3r3V/6RFHAxg=; b=rmratef5yo+kBhdq9xnHCwZLcWw3mWvOyasZy+pAqbqRjfSplK1Udkfunjyc6WpaIAGya3l3+NrfMC/ltb+E0nPcP/ZgWbY7+gMv9jeewbL/a59bQSpe3SWVaTVFWBj9KNLZZ/3T9S5+QXB4xH9JL83yU53flFQ98VUN3t2WMGMp7WKuAR91pHe9Jcv0TsMPv89V3Rk+xOrmcyz6zgPO8FMBvenNe9Py/xt5AfXEKybQ2cAJMkZV5//vFYGONG9MuKydjwWYdPgh+OcdKewZZ05Gc+aOmu0TAmCV2MkDLv7QF1fFAUzBGRSbNcuiXAeL0hoW9rZEXwHGPANxxZMYXw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tlSl7-0005cV-Tu for guix-patches@gnu.org; Fri, 21 Feb 2025 08:08:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75810] [PATCH v3 07/11] daemon: Create /var/guix/profiles/per-user unconditionally. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 Feb 2025 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75810 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75810@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 75810-submit@debbugs.gnu.org id=B75810.174014326221373 (code B ref 75810); Fri, 21 Feb 2025 13:08:01 +0000 Received: (at 75810) by debbugs.gnu.org; 21 Feb 2025 13:07:42 +0000 Received: from localhost ([127.0.0.1]:56671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlSkl-0005YG-JD for submit@debbugs.gnu.org; Fri, 21 Feb 2025 08:07:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60052) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tlSjx-0005Ov-DA for 75810@debbugs.gnu.org; Fri, 21 Feb 2025 08:06:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tlSjr-0004ZO-MD; Fri, 21 Feb 2025 08:06:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Zsh2zvgPChPdygWDGttbjWAWpTHmsPY3r3V/6RFHAxg=; b=CQm+Lb8jxciD4Z5quqVJ C5g/T4kY8MF9sUmMO1mZm7OLhFZOLaZZiG6+XdmfwxhUzEA41OXA10F+rPBQtMaXmMnB11J0QBuWx 1cGb2hTK0xivL3sTvuC8pxjw6SrknC4viATybu2ZkLmkkotZYgDtEpwpAVlj6zNv/qJzVvQ3rKKkX aUFrivFux6mCljxfZQZJPgRZhFINqoTmWoVcLJ3PuDuTQgiSCWWKmxZGUL9+J4YnJkDEYyWSSvtYc 2F7nxQtnkB4Fay8H9G+SedxO292WORQl89eAc2yDNagHILPq//YQF4HEPPmT2DgngaBp7dCvyo7FR c16JjungyqlYZg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 21 Feb 2025 14:05:55 +0100 Message-ID: <42766ef6f8486fd4e25a5f211883934a7bdb5256.1740142328.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * nix/libstore/local-store.cc (LocalStore::LocalStore): Create ‘perUserDir’ unconditionally. Change-Id: I5188320f9630a81d16f79212d0fffabd55d94abe --- nix/libstore/local-store.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 4308264a4f3..63846695194 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -79,12 +79,12 @@ LocalStore::LocalStore(bool reserveSpace) createSymlink(profilesDir, gcRootsDir + "/profiles"); } - /* Optionally, create directories and set permissions for a - multi-user install. */ + Path perUserDir = profilesDir + "/per-user"; + createDirs(perUserDir); + + /* Optionally, set permissions for a multi-user install. */ if (getuid() == 0 && settings.buildUsersGroup != "") { - Path perUserDir = profilesDir + "/per-user"; - createDirs(perUserDir); if (chmod(perUserDir.c_str(), 0755) == -1) throw SysError(format("could not set permissions on '%1%' to 755") % perUserDir);