From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cBjBBmpj5GG4ZQEAgWs5BA (envelope-from ) for ; Sun, 16 Jan 2022 19:26:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ELQPBGpj5GEIzAAA9RJhRA (envelope-from ) for ; Sun, 16 Jan 2022 19:26:50 +0100 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 C5797137E8 for ; Sun, 16 Jan 2022 19:26:49 +0100 (CET) Received: from localhost ([::1]:48824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9AEr-0001wP-2Y for larch@yhetil.org; Sun, 16 Jan 2022 13:26:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9AEN-0001ug-VR for guix-devel@gnu.org; Sun, 16 Jan 2022 13:26:20 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:35367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9AEB-000817-IP for guix-devel@gnu.org; Sun, 16 Jan 2022 13:26:19 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7D3C63200D60; Sun, 16 Jan 2022 13:26:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 16 Jan 2022 13:26:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=wvgCvQnKAn4Ai6shw0Id0dlg aPtq47dKLaZwnSx/ang=; b=ew5ssgGlHeztLgQiwxjoPHLJij6sq/b+ORRoT3DH pOQiKcCv/tpHkonFWt9/MP4uEZrjsFZrm4t8DObUioLlEfBM/+nRkMBFrURw9Knq i5hE93vqXbtdpAUcQ7t8PzoVhTRe5X2mCJ9BtNdhhzbswqozRa9rySvnq89IU/I5 NtM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=wvgCvQ nKAn4Ai6shw0Id0dlgaPtq47dKLaZwnSx/ang=; b=lQYvOnqyLYsDp7Y4ouDc6d psHbgQupGW81wcLYluZ7vXScSyW1iwEmr6bux34XJBUQ9Iii5c9kV2cI1JUxaXRL emCOBr8+Rghpi3By3pEpuwac8YqEp030PTCBKDDhVBAvIVxfgztMpM0xFUDmmW73 /3i9VMIO69DzUOFVN3Fu1RcJhneLNhE4z0zvkKoexF9rEFzP62+qKkoNjt4PkJVo YdX0XoK/qZ5JabeOPkW84QtDgXIvaNakJ+GTLxUNBw9WUAT7fohtaOouo5qznyZc 6V+GdCZ8vCBdRYsuPZxIoLkOKqZE+UQ20vHDwfmix/hV+7qU4RAc9CF9MT6zgjcQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdelgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepvddvudegffefiedttdfhfedvuefhgf ekieekgeekveetgefhfeetgfegueduffeinecuffhomhgrihhnpehgnhhurdhorhhgnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfh grmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 16 Jan 2022 13:25:59 -0500 (EST) Date: Sun, 16 Jan 2022 13:25:57 -0500 From: Leo Famulari To: Matt Subject: Re: Document /homeless-shelter? Message-ID: References: <17e60e604fa.d4b620b31007437.5972832998992327822@excalamus.com> <17e63f86f33.d5900dd61032836.2315489730847975183@excalamus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17e63f86f33.d5900dd61032836.2315489730847975183@excalamus.com> Received-SPF: pass client-ip=64.147.123.20; envelope-from=leo@famulari.name; helo=wout4-smtp.messagingengine.com 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642357609; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wvgCvQnKAn4Ai6shw0Id0dlgaPtq47dKLaZwnSx/ang=; b=hALuiniQboLFdzCNOXbEuvU/4+e2T/yGL4JlDWqTc5cEQ2vMbUnV4q2Zh9NDSxPxcdyeXY 769DUgY+ZH4a6y0eszhwHscxZZZxLaimIxo9pnC/3bDpJZRkzjPbwQGeodx/QMJx/IVwzg eS5iT1OaEEP5u5mZnNgx1VNtCeE4jy1KcCLuv+GaG9AtU7n4Xc3MCGB5/lSr47xiHIoGPE WGMjYa/ty3MfwgCJD1j+mkyPGWf8D4dWMFqiujB61EzKzOdfHPFl3w7YtlHnvp0Shsmc0y b0ER/4xfF+CSNsk7QUtK8CBJaN8qu9pM+AQZRiLcj9FfGMfnaOwGXD/3ecpWDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642357609; a=rsa-sha256; cv=none; b=dA5xMt41AfED/dehB0gGxuYZccpc0BEx1+xzI6A05SP1sHTxf9F0PWjUpoP4Hl/p/jG3C7 E16cu+KfFpax3iudAwp0W789JDrZvQrVmazSPofF/u2XYrwlzqYrkbFKfGME/f2QfF0DUv /Yl0v12UQqtAm2I9QaXtkRLG2yQ4BwIQriNhvln1Rmcdmr6eIW+WVKLr+mIfgcuaAl/X7E 7PSdMvhem34zaWc5KV8M9KTsEEYUggCTZt3gM25h/MzpmkTlFPknGkD5o5ZI/iW54jqsdc AUsF0nBydPS9QRYhuBRT0sMEX9Zd28noCOPYNgivzil++pcY4BoHBVqzO+9ZFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=famulari.name header.s=mesmtp header.b=ew5ssgGl; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=lQYvOnqy; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.92 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=famulari.name header.s=mesmtp header.b=ew5ssgGl; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=lQYvOnqy; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C5797137E8 X-Spam-Score: -3.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: yYGpQwZxeonH On Sun, Jan 16, 2022 at 12:38:52PM -0500, Matt wrote: > Subject: [PATCH] Document /homeless-shelter I pushed a simpler addition to the manual: https://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi#n1181 Of course I made a silly typo and so this change takes place over two commits. > +The @env{HOME} environment variable is set to @file{/homeless-shelter} > +during the build process. This ensures builds are determistic and > +highlights all uses of @env{HOME}. Packages should not depend on the > +pathname of a home directory. Instead, modify the build phase to set > +@env{HOME} to @file{/tmp}: > + > +@lisp > +(modify-phases %standard-phases > + (add-before 'check 'fix-home-directory > + (lambda _ > + (setenv "HOME" "/tmp")))) > +@end lisp This text is basically correct but we have to balance verbosity with readability. The important thing was to document /homeless-shelter, so that packagers understand it comes from Guix, and to explain its rationale. It's not 100% true that setting HOME=homeless-shelter ensures that builds are deterministic and highlights all uses of $HOME, although it does help with those goals. I don't think we want to document the use of /tmp, or recommend it as an authoritative workaround. Rather, it's a common solution, but packagers must seek to understand how the package build scripts are trying to use $HOME and make a judgement. Additionally, I don't think that Build Environment Setup is the right place to document workarounds.