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 13:55:12 -0500 [thread overview]
Message-ID: <17e643e508a.e552e2621035362.4950233452711916332@excalamus.com> (raw)
In-Reply-To: <YeRjNZuxp0H3X91/@jasmine.lan>
---- On Sun, 16 Jan 2022 13:25:57 -0500 Leo Famulari <leo@famulari.name> wrote ----
> 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
That looks great.
> > +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.
This all looks sound to me. Thanks for taking the time to work with me on this.
prev parent reply other threads:[~2022-01-16 18:55 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
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 [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17e643e508a.e552e2621035362.4950233452711916332@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).