mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
diff hook: execute as the build user, and pass the temp dir
This commit is contained in:
parent
c78686e411
commit
6df61db060
5 changed files with 51 additions and 28 deletions
|
@ -46,17 +46,15 @@ file containing:
|
|||
#!/bin/sh
|
||||
exec >&2
|
||||
echo "For derivation $3:"
|
||||
/run/current-system/sw/bin/runuser -u nobody -- /run/current-system/sw/bin/diff -r "$1" "$2"
|
||||
/run/current-system/sw/bin/diff -r "$1" "$2"
|
||||
</programlisting>
|
||||
|
||||
<warning>
|
||||
<para>The diff hook can be run as root. Take care to run as little
|
||||
as possible as root, for this example we use <command>runuser</command>
|
||||
to drop privileges.
|
||||
</para>
|
||||
</warning>
|
||||
</para>
|
||||
|
||||
<para>The diff hook is executed by the same user and group who ran the
|
||||
build. However, the diff hook does not have write access to the store
|
||||
path just built.</para>
|
||||
|
||||
<section>
|
||||
<title>
|
||||
Spot-Checking Build Determinism
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue