From patchwork Thu Mar 20 20:54:41 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: 40533 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 B6E7127BBE2; Thu, 20 Mar 2025 20:58:17 +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 2498727BBE9 for ; Thu, 20 Mar 2025 20:58:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvMxs-00034k-7f; Thu, 20 Mar 2025 16:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvMxr-00034W-C7 for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:07 -0400 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 1tvMxr-0002oB-3E for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:07 -0400 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=wZDaJpSBiec4HWURn73Fvz7bhdz1AmvaDkV9vu9Mxas=; b=GI6gAk84qx33/WqGONEXbX19dErFl44f4K/UfY7gTRoYq3xvrFcsFYw9WPhK4bP5fPeiOGDqNQPHiVSITHlHXntAICTBNlTYHPMJtkTCSVRhkg0pkuxlEPujvm6pmHLuKM+01mg2Fv6Xc+n4dIwVnq+OpGRBjNkboWORPi59nzHWyfMADRvNjEJ41sWl/8eXZh8+12o0m45IRz8dQ1UOJa15PJ4q/U1NfcNn3Ga04BdqrxnitvA27Kozmiti6W2l0aagC7s/NTKcDPsCyQK//XGPnJy6gav9IELmkdfEDAZpTTDWgud8QlRtk2Yiuf/JjNMCCL+lSDavHMuKsMUnxQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tvMxq-0006gN-Uu for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#75810] [PATCH v7 08/16] 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: Thu, 20 Mar 2025 20:58:06 +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.174250425025410 (code B ref 75810); Thu, 20 Mar 2025 20:58:06 +0000 Received: (at 75810) by debbugs.gnu.org; 20 Mar 2025 20:57:30 +0000 Received: from localhost ([127.0.0.1]:59203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvMxE-0006bY-KI for submit@debbugs.gnu.org; Thu, 20 Mar 2025 16:57:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43246) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvMwE-0006S5-AM for 75810@debbugs.gnu.org; Thu, 20 Mar 2025 16:56:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvMw4-0001Gq-Ti; Thu, 20 Mar 2025 16:56:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=wZDaJpSBiec4HWURn73Fvz7bhdz1AmvaDkV9vu9Mxas=; b=d5vsrWNB3mXIzROjoTEK rnb9lRejIfyOhi/N1PzaOSMsDvnOXIrlAhjgfR2qINZDNvCE6HcsBtgSpK/y/ApscQIdnvsPopugj 5vz8vbGOUTruf0+uBOLzJ60EJEpqybWdHaJ2b2ygwIXIp0UXM0mgoHQeGxq6PR7UVd9vdw0Yw9KvR 6nKSZHAk9A9WOUUGam7Je48UMtg51CMEXlGl7eoRb/dgdPdPEBQ86wlnZ9+/Hw8chVdKFvjELaI8O ggiIG35/Gxat/ZnLntXkVz8EuzQk/3ej7HWjO0NQ5riQea+b8yWD0skQzrj12DxXLgVszhWBXG2kJ UsmPvDlkGdjsIg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 20 Mar 2025 21:54:41 +0100 Message-ID: <9267d0a9de0def5e4dd30fb3c2e420b116ddb5af.1742503591.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 83e6c3e16e..f6540c2117 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);