From patchwork Wed Feb 8 02:37:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 46735 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 65CD416D02; Wed, 8 Feb 2023 02:38:11 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 6AA6E16546 for ; Wed, 8 Feb 2023 02:38:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPaLU-0002hp-Se; Tue, 07 Feb 2023 21:38: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 1pPaLS-0002fz-S5 for guix-patches@gnu.org; Tue, 07 Feb 2023 21:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPaLS-0007vb-H6 for guix-patches@gnu.org; Tue, 07 Feb 2023 21:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPaLS-0005du-Cf for guix-patches@gnu.org; Tue, 07 Feb 2023 21:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61358] [PATCH] system: default-skeletons: Merge search-paths of multiple profiles. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Feb 2023 02:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61358@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167582385021641 (code B ref -1); Wed, 08 Feb 2023 02:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Feb 2023 02:37:30 +0000 Received: from localhost ([127.0.0.1]:54390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPaKv-0005cz-KO for submit@debbugs.gnu.org; Tue, 07 Feb 2023 21:37:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:46628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPaKu-0005cr-Hr for submit@debbugs.gnu.org; Tue, 07 Feb 2023 21:37:28 -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 1pPaKu-0002Yh-B2 for guix-patches@gnu.org; Tue, 07 Feb 2023 21:37:28 -0500 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPaKr-0007rP-H4 for guix-patches@gnu.org; Tue, 07 Feb 2023 21:37:27 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id D587B38A04F2; Wed, 8 Feb 2023 02:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1675823841; bh=A9VJjH1xHK9tcvkPBkRkIg9MLv5JNJm/wE9ttyzKEI8=; h=From:To:Cc:Subject:Date:From; b=m//uywXup4Tl3cKIRq6r4hzSDERTUeQz0uTNxYaqSpCALVQWD198LK6tsplKBVQDL RoRksStweBrv9mS/NbfGqzLqsgT0mI9NmJeokK7vTQqhI6ImgULqFyt0XvMp3p4y93 WTlpSkEBuIzpDzvildGqeZ5kPchXXqDLEauTGwf9cJcQx9vHGDfPAlvrpbnSwEkDpu Jf3geJtcXjq5jwNVvK7Y0tOU5Nu5KNLpOVnEYWLibFiIFK1coyWVGjCeWN/yVbskEA S/As+05P5ompIa0XguIlX9oqALGbvVWdiskEDxIsGA93GjtPUpH0u+TrSGQjiPSD+d 5sMupMXdopE7gBNJpq33TAyqbTIqfoUFtSWVYzodtfDzN+Jx57PNhe8aCGc5OS4Msl JVtZFiSCBtIjyK8NFcH3n1pmmIED9k1DQVMUThzNy6cKwJwzPPwLrClw9TxrIHUCrD DF2w+aVAWmUVBnPBC9ZmlIsYulXcTC7hTLgL70ObX7bD4etp3Ed6wdz8NdzTY0DAEN uWyjHznB/hQvMoIR9l/tFUAGu2Ffch49z45GYo9ljdfRvje3s36tvKTzLxBdhuPW0+ ShQRBnbfBXP/8WHqH2yccEyDfyrya3C+k6Tv+EYAa/ei4Xz3ssM6VFguRVgBl3yuda tloNmPXSTGbOUDARB+ctZj1I= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id reh8ayXgaDYf; Wed, 8 Feb 2023 02:37:17 +0000 (UTC) Received: from localhost (unknown [182.150.116.135]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Wed, 8 Feb 2023 02:37:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 4c677001; Wed, 8 Feb 2023 02:37:36 +0000 (UTC) Date: Wed, 8 Feb 2023 10:37:35 +0800 Message-Id: <20230208023735.8388-1-iyzsong@envs.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: "ashish.is--- via Guix-patches\" via" 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 From: 宋文武 Fixes . * gnu/system/shadow.scm (default-skeletons)[bash_profile, zprofile]: Merge search-paths from multiple profiles via "guix package". --- gnu/system/shadow.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 2e87928368..a46f53e784 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -152,11 +152,31 @@ (define (default-skeletons) (let ((profile (plain-file "bash_profile" "\ # Honor per-interactive-shell startup file -if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n")) +if [ -f ~/.bashrc ]; then . ~/.bashrc; fi + +# Merge search-paths from multiple profiles, the order matters. +eval \"$(guix package --search-paths \\ +-p $HOME/.config/guix/current \\ +-p $HOME/.guix-profile \\ +-p /run/current-system/profile)\" + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH +")) (bashrc %default-bashrc) (zprofile (plain-file "zprofile" "\ # Honor system-wide environment variables -source /etc/profile\n")) +source /etc/profile + +# Merge search-paths from multiple profiles, the order matters. +eval \"$(guix package --search-paths \\ +-p $HOME/.config/guix/current \\ +-p $HOME/.guix-profile \\ +-p /run/current-system/profile)\" + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH +")) (xdefaults (plain-file "Xdefaults" "\ XTerm*utf8: always XTerm*metaSendsEscape: true\n"))