From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GMSoFm7C1mAF0wAAgWs5BA (envelope-from ) for ; Sat, 26 Jun 2021 08:00:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iPFpEm7C1mBTYgAA1q6Kng (envelope-from ) for ; Sat, 26 Jun 2021 06:00:14 +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 78E9BB052 for ; Sat, 26 Jun 2021 08:00:13 +0200 (CEST) Received: from localhost ([::1]:59394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lx1MS-00016Q-2z for larch@yhetil.org; Sat, 26 Jun 2021 02:00:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lx1MI-00016H-P6 for bug-guix@gnu.org; Sat, 26 Jun 2021 02:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lx1MI-0003bB-H2 for bug-guix@gnu.org; Sat, 26 Jun 2021 02:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lx1MI-0005RC-Bi for bug-guix@gnu.org; Sat, 26 Jun 2021 02:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#20255: 'search-paths' should respect both user and system profile. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 26 Jun 2021 06:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20255 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Alex Kost Received: via spool by 20255-submit@debbugs.gnu.org id=B20255.162468717820832 (code B ref 20255); Sat, 26 Jun 2021 06:00:02 +0000 Received: (at 20255) by debbugs.gnu.org; 26 Jun 2021 05:59:38 +0000 Received: from localhost ([127.0.0.1]:47069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lx1Lu-0005Pv-3x for submit@debbugs.gnu.org; Sat, 26 Jun 2021 01:59:38 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:33819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lx1Lr-0005Pl-RI for 20255@debbugs.gnu.org; Sat, 26 Jun 2021 01:59:37 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GBjr42mbxz1LWpg; Sat, 26 Jun 2021 07:59:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4GBjr42mbxz1LWpg DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624687172; bh=wXpT3zHL4L2lC5p5eccbDqQVdNyMzF6TRzIYMFB+zNU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=mI7lGsuNa1nrLCEh8jPpVt9mpfbYpqftEEIW2hgOZfJumh/ljUpIdcNgz89GPNZKQ Ivj8LadZgSjycaOT7WTmrbN7rUg/d6MSlUv8EeKsZLo1CM7PmbDuj1pzh7YCUVn70z ZqzxJe6ONwu2PAkW00oKwW/28rBRPm5ksiYw/r34= Message-ID: <5f385b99827c7c069094e1ed0fb2bd52f5345445.camel@student.tugraz.at> From: Leo Prikler Date: Sat, 26 Jun 2021 07:59:30 +0200 In-Reply-To: <874kdlxsfl.fsf_-_@gmail.com> References: <87eeun97ur.fsf@gmail.com> <874kdlxsfl.fsf_-_@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: iyzsong@gmail.com, 20255@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624687214; 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:dkim-signature; bh=wXpT3zHL4L2lC5p5eccbDqQVdNyMzF6TRzIYMFB+zNU=; b=naymVhb/04x4uJ+T8rKXV5IjX1GyLIMIJq091vbcRJurHQTZnddq5B0cl/5/luvcWORSje IXFYc7gRfOZmzLwr7c4zD0G1+IM44WpLfTQjluCiIx81N5mYE6N2JZ5MyKfswhDlMcP5Df /oLeQ8C3b1CgndFViwrvJ16vIkeILls2iRURnXzdNpZo8RRmkPldiysWZROcQnLv++uBOP MHdxku6YIXeu8Tq3pzy4R0u+sqhlHMcGuADDYZ7BwqbuwyunTh4Ky2EKj4/4dXHgaHd+Q+ nxsijIs/5UI6suHpb9PeSqm6V1b0PLnhuvtg0SDhkvPy5txUSfhTgBz5WDzRFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624687214; a=rsa-sha256; cv=none; b=VGPoipaaqEAzyqPzEM/xZL34Eqd1tWSyEw1owF9GYeISCI2xqqjTWZIp55sl7Iv2zhj4SF NPg7uHO8RrbgxbN/u/6FSNSJIDJCQi80LwpBWVyPazwX6Ew3X4kFDL9L8oYTMDj+AWngxB mlxUCFsOaC1XuZRlkcFRfGLKhbdsGmARzqp9lkj3+aBdPcNoN/r0ug23PW6/zdr+yzpWHP zmkOPYQuGaHLBaB/Ljnc2rlo70BfSNyq1GL7rCOR6jUaJnY4g8ud/6OOpHtIcamG7Ai4ph J2ulOaRPtRCBPO63IJ7jtBgTZN4qrgAb0aSA39HH9oB5fHr9eZFPzxTnm0uYmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=mI7lGsuN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=mI7lGsuN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 78E9BB052 X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: whWBO+2Q9VeA Am Freitag, den 25.06.2021, 22:37 -0400 schrieb Maxim Cournoyer: > Hello, > > Alex Kost writes: > > > zimoun (2020-02-21 16:53 +0100) wrote: > > > > > Dear, > > > > > > What is the status of the bug#20255 [1]? > > > It is old; the last activity seems back on 2015, November. So let > > > resume. > > > > > > The issue is, e.g.: > > > - perl installed into the system profile > > > - perl-xml-parser installed into an user profile > > > Then "guix package --search-paths" does not set correctly > > > XML::Parser. > > > > > > > > > Fixes had been pushed: dedb17a and b2a7223 and cc3de1d. > > > > > > The final fix is still missing. Because it is a controversial > > > patch > > > [2] :-) i.e., running 'guix' in '/etc/profile'; see these lines > > > of the > > > patch: > > > > > > + eval `/run/current-system/profile/bin/guix package \\ > > > + -p /run/current-system/profile \\ > > > + -p \"$HOME/.guix-profile\" --search-paths` > > > > > > > > > The friendly "protest" [3] is about turning these lines optional > > > via > > > an environment variable. I am not sure to follow where the > > > discussion > > > had been going then. > > > > As for me, I am OK with any default setting as long as there is a > > way to > > change it. I recall Ludovic proposed a patch that allowed to > > customize > > "/etc/profile" and I was happy about it, but he changed his mind on > > that > > patch so it was never committed. > > Do you still have a vetted interest in the issue at hand? This is a > serious usability problem that's been in limbo for 6 years, > apparently > for reasons of purity (not wanting to run a command in /etc/profile). > While I share the sentiment that /etc/profile would better be 'inert' > or > static, it seems we haven't been able to come up with a better > solution > than calling 'guix package --search-paths'. Like Ludovic, I also > don't > find the idea of allowing users to override /etc/profile very > appealing; > even if undocumented, its mere presence in the operating-system field > would be an invitation for problems. An environment variable to > disable > such basic functionality also seems backward to me. > > I would personally be in favor of committing the fix as-is. If < 1 s > of > wasted time on boot is an issue, I suggest to look into GNU Shepherd > to > offset it; optimization opportunities should abound :-). I think there is a solution, that works not only for the case of disabling this unwanted feature, but also to add in support for multiple profiles, i.e. if the user has more than just their .guix- profile to load. If we made this feature opt-in in that a user would first have to write their profiles to $HOME/.config/guix/default-profiles or a similarly named file in $HOME/.config/guix, we could simply not run the command if the file doesn't exist, and if it exists run it using the profiles in there. Most users will likely have --8<---------------cut here---------------start------------->8--- /home/myself/.guix-profile /run/current-system/profile --8<---------------cut here---------------end--------------->8--- in it, but you could also have --8<---------------cut here---------------start------------->8--- /home/myself/.guix-extra-profiles/emacs /home/myself/.guix-extra-profiles/hundreds-of-npm-packages /home/myself/.guix-extra-profiles/rusty-rust /home/myself/.guix-profile /run/current-system/profile --8<---------------cut here---------------end--------------->8--- Of course, having to type out /home/myself is somewhat weird, and the last two lines are a bit of boilerplate, that one might want to avoid. We could alternatively make it so that an empty file means "use $HOME/.guix-profile and /run/current-system/profile", such that those are always sourced no matter what. WDYT? Regards, Leo