From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eJvHCqdbW2B1HAAA0tVLHw (envelope-from ) for ; Wed, 24 Mar 2021 15:32:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MCD/BadbW2CoegAAbx9fmQ (envelope-from ) for ; Wed, 24 Mar 2021 15:32:55 +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 CC853848E for ; Wed, 24 Mar 2021 16:32:54 +0100 (CET) Received: from localhost ([::1]:60230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP5V8-0002h3-1d for larch@yhetil.org; Wed, 24 Mar 2021 11:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4hd-0003SZ-46 for guix-devel@gnu.org; Wed, 24 Mar 2021 10:41:45 -0400 Received: from mx1.riseup.net ([198.252.153.129]:36152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4hW-0004px-60 for guix-devel@gnu.org; Wed, 24 Mar 2021 10:41:44 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4F59sr411SzDxd7; Wed, 24 Mar 2021 07:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1616596896; bh=bnheckFNOT7HL3J2uObERF75BwQdkQUFnJQenFeviyk=; h=From:To:Subject:References:Date:In-Reply-To:From; b=LXVq3l4zsyWfuuNWj3sBqzGCDQCjJ7jXDCwh9kmzzhIcRQsv8D1rP5PYwtQyU4LWQ bfEbXo2Mis+JqrrAZ35U58CYhcmvWgpZGCFDAuxrVzDvw3VRkAQmjjKfIcmAX/ypxs Sn1czi9pbzz6ruRHrUZ2Ua4gZ9Ie1bO14OKw4IfU= X-Riseup-User-ID: B188C95F481438A7264C5E9CF736BD5B5BF7166B2021F1A76245832831556C6C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4F59sq4FNKz5vNG; Wed, 24 Mar 2021 07:41:35 -0700 (PDT) From: c4t0 To: guix-devel@gnu.org, Julien Lepiller Subject: Re: guix environment guix -pure can't locate lesspipe References: <87r1k57bj1.fsf@riseup.net> Date: Wed, 24 Mar 2021 11:41:29 -0300 In-Reply-To: (Julien Lepiller's message of "Tue, 23 Mar 2021 20:04:41 -0400") Message-ID: <87ft0k7gx2.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=198.252.153.129; envelope-from=c4t0@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 24 Mar 2021 11:30:40 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616599974; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Uw2Zm8gUtLSdq/kLVqTg8JmsCm/GtiOuftubQLVsGXw=; b=r8tNvDw27EmCExSfnbTP68FV7yIHTzpGvVftzDUaI5q6HXeiRfhUUBkOWwyE9ST5r2gRqX /YwPb6vDqFrSHDWVy3bY5rHQxB8ZmhkylGFrtjpYHLP5RJi2Y/fmfIyYg80+AVnYSh0aAl hCEQFaR5Genh26ySudLtvN9mNHx8p6F953h23nY+WXZrRgT3xcmKtaMgv69OcsvCl9b3+f dCZQOFeR7HmnWi5vouFcv5TZ3s2vQM2IPBxOoqZeYMXnfs2LFp0ohGyXc+aFbv+37mYYe7 tgjMaAVLktr+smK0elGWiDMLIfRGNxgs6konD1l9UY0m5e1Eh9cCJ0iltlSeag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616599974; a=rsa-sha256; cv=none; b=L34cIpAv8fIBcdVE+2ddymJbxASwLKxxGphVsJbR8V5k9YjZXITTPgxEU68eSb4iVz3rW6 b/udfdSIz9w811XT+EPD2JMck+zkgr0fSpeDN1c7d27YIxP0Z8WwICXsstaTqE4jvtxMXI SNWIv5dEBvOfTPjR4UawYw8SK7MyuroH4YSxT9eutxL8eHKiqpZOleGuhFCjcyGDW9lopd DuBZ161Nr9EGFxyA9plgygr5cvP2Xyk3/3BYY6oM33gDOsqh3FH6qBVPkDQjc/ENIfYnp0 mmlZPlqEhav4YFLeW87rXDQAG8BOXpPYPh/RForJIsm7Z6zZga+ssnEJIeDb6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=LXVq3l4z; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=LXVq3l4z; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: CC853848E X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: /597q4+q6fbk Julien Lepiller writes: > Le 23 mars 2021 18:25:38 GMT-04:00, c4t0 a =C3=A9crit : >> >>Hi, >> >>I'm having trouble importing a package from hackage, so I tried to >>debug >>the import source code. After cloning guix I found that I can't start a >>pure environment: >> >>guix environment guix --pure --ad-hoc help2man git strace >>Command 'lesspipe' is available in the following places >> * /bin/lesspipe >> * /usr/bin/lesspipe >>The command could not be located because '/bin:/usr/bin' is not >>included in the PATH environment variable. >>lesspipe: command not found > > This is probably because a start file from bash or your shell uses > lesspipe, but it's not available in the environment. Something similar > happens to me on Fedora where it wants to install software that's > already there. I simply deny the request to install, as it's not a > fatal error. > You're right, the culprit was: # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=3D/bin/sh lesspipe)" so I replace it with: [ -x /usr/bin/lesspipe ] \ && [ $(echo $PATH | grep ':/bin:' >/dev/null; echo $?) -eq 0 ] \ && eval "$(SHELL=3D/bin/sh lesspipe)" a little verbose, but it works. >> >>If I use --container it works: >> >>$guix environment guix --pure --ad-hoc help2man git strace lesspipe >>--container >>me@mypc ~/guix/git/guix [env]$ >> >>but then I have problems connecting with the daemond: >>./pre-inst-env guix build hello >>guix build: error: failed to connect >>to`/usr/local/var/guix/daemon-socket/socket': No such file or directory > > Here, you probably.forgot to pass --localstatedir as documented in the ma= nual. If you don't do so, it might result in a broken guix installation! > Ok, after: $guix environment guix --pure --ad-hoc help2man git strace $./bootstrap $./configure --localstatedir=3D/var $./pre-inst-env guix build hello it builds fine! >> >>(also there isn't any file in my user environment with that name) >> >>So I have to run guix environment with --network and start one: >>$guix environment guix --pure --ad-hoc help2man git strace lesspipe >>--container >>me@mypc ~/guix/git/guix [env]$ >> >>and then >>./pre-inst-env guix-daemon & >>and >>./pre-inst-env guix build hello >> >>it appears to work, but really I don't know if i'm making a mess at >>this point... I can't pass --build-users-group=3Dguixbuild because it >>doesn't exist inside the container. >>And besides more that one daemon in the same store shurely produces >>nasty race conditions. > > You shouldn't run guix-daemon from the checkout. It is not > needed. Normally, you should be able to share /var/guix inside the > container, but the container itself should not be needed. > Ok, it was my mistake, didn't realize that the problem was in .bashrc; I'll use it without a container. No problem using the store, when developing then? I guess that the calculated hash will be different and I will not break anything. The environment =C2=A2ommand takes care of protecting the profile. Maybe I should have sended this mail to help-guix. Thanks again!