TMPDIR and build containers

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal

Debbugs page

pelzflorian (Florian Pelz) wrote 6 years ago
(address . bug-guix@gnu.org)
20181027012336.glawlvz63m6kiiuu@florianbeaglebone.fritz.box
Hello,

The manual says that TMPDIR does not leak into the build environment:

Toggle quote (9 lines)
> You can influence the directory where the daemon stores build trees
> via the ‘TMPDIR’ environment variable. However, the build tree within
> the chroot is always called ‘/tmp/guix-build-NAME.drv-0’, where NAME is
> the derivation name—e.g., ‘coreutils-8.24’. This way, the value of
> ‘TMPDIR’ does not leak inside build environments, which avoids
> discrepancies in cases where build processes capture the name of their
> build tree.


However, later it says:

Toggle quote (10 lines)
> When the daemon performs a build on behalf of the user, it creates a
> build directory under ‘/tmp’ or under the directory specified by its
> ‘TMPDIR’ environment variable; this directory is shared with the
> container for the duration of the build. Be aware that using a
> directory other than ‘/tmp’ can affect build results—for example, with a
> longer directory name, a build process that uses Unix-domain sockets
> might hit the name length limitation for ‘sun_path’, which it would
> otherwise not hit.


This seems like a contradiction, or do I misunderstand?

Regards,
Florian
Ludovic Courtès wrote 6 years ago
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 33171-done@debbugs.gnu.org)
87efc4u969.fsf@gnu.org
Hello Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

Toggle quote (25 lines)
> The manual says that TMPDIR does not leak into the build environment:
>
>> You can influence the directory where the daemon stores build trees
>> via the ‘TMPDIR’ environment variable. However, the build tree within
>> the chroot is always called ‘/tmp/guix-build-NAME.drv-0’, where NAME is
>> the derivation name—e.g., ‘coreutils-8.24’. This way, the value of
>> ‘TMPDIR’ does not leak inside build environments, which avoids
>> discrepancies in cases where build processes capture the name of their
>> build tree.
>
>
> However, later it says:
>
>> When the daemon performs a build on behalf of the user, it creates a
>> build directory under ‘/tmp’ or under the directory specified by its
>> ‘TMPDIR’ environment variable; this directory is shared with the
>> container for the duration of the build. Be aware that using a
>> directory other than ‘/tmp’ can affect build results—for example, with a
>> longer directory name, a build process that uses Unix-domain sockets
>> might hit the name length limitation for ‘sun_path’, which it would
>> otherwise not hit.
>
>
> This seems like a contradiction, or do I misunderstand?

Indeed. The sentences that starts with “Be aware” is inaccurate; I’ll
remove it.

Thank you!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33171@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33171
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help