From: Matt <matt@excalamus.com>
To: "Leo Famulari" <leo@famulari.name>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Document /homeless-shelter?
Date: Sun, 16 Jan 2022 12:38:52 -0500 [thread overview]
Message-ID: <17e63f86f33.d5900dd61032836.2315489730847975183@excalamus.com> (raw)
In-Reply-To: <YeOrMQ+IP7xNQe69@jasmine.lan>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
---- On Sun, 16 Jan 2022 00:20:49 -0500 Leo Famulari <leo@famulari.name> wrote ----
> It could be documented briefly in the manual section Build Environment
> Setup.
How does this look?
From 34fcd075efad1577aa139012c5d2fccf44e10058 Mon Sep 17 00:00:00 2001
From: Matt <matt@excalamus.com>
Date: Sun, 16 Jan 2022 12:30:37 -0500
Subject: [PATCH] Document /homeless-shelter
---
doc/guix.texi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 42691570ff..fd48a0dcd2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1193,6 +1193,19 @@ environment variables for HTTP and HTTPS downloads it performs, be it
for fixed-output derivations (@pxref{Derivations}) or for substitutes
(@pxref{Substitutes}).
+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
+
If you are installing Guix as an unprivileged user, it is still possible
to run @command{guix-daemon} provided you pass @option{--disable-chroot}.
However, build processes will not be isolated from one another, and not
--
2.34.0
[-- Attachment #2: 0001-Document-homeless-shelter.patch --]
[-- Type: application/octet-stream, Size: 1257 bytes --]
From 34fcd075efad1577aa139012c5d2fccf44e10058 Mon Sep 17 00:00:00 2001
From: Matt <matt@excalamus.com>
Date: Sun, 16 Jan 2022 12:30:37 -0500
Subject: [PATCH] Document /homeless-shelter
---
doc/guix.texi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 42691570ff..fd48a0dcd2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1193,6 +1193,19 @@ environment variables for HTTP and HTTPS downloads it performs, be it
for fixed-output derivations (@pxref{Derivations}) or for substitutes
(@pxref{Substitutes}).
+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
+
If you are installing Guix as an unprivileged user, it is still possible
to run @command{guix-daemon} provided you pass @option{--disable-chroot}.
However, build processes will not be isolated from one another, and not
--
2.34.0
next prev parent reply other threads:[~2022-01-16 17:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-16 3:19 Document /homeless-shelter? Matt
2022-01-16 5:20 ` Leo Famulari
2022-01-16 17:38 ` Matt [this message]
2022-01-16 18:16 ` Maxime Devos
2022-01-16 18:27 ` Leo Famulari
2022-01-16 18:25 ` Leo Famulari
2022-01-16 18:55 ` Matt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17e63f86f33.d5900dd61032836.2315489730847975183@excalamus.com \
--to=matt@excalamus.com \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.