Fixes #838. xattrs were historically disabled in 2017, since then, NFS v4.2 gained support for xattrs and almost all filesystems support xattrs. In addition, moving the build directory to a xattrs-supporting filesystem is always an option. Programs may exploit xattrs (including ACLs) during their build process and testing phase, to better serve these programs, we will remove this limitation. Lix will use POSIX ACLs for its UNIX domain sockets in the future and be one of these programs which will run tests making use of xattrs, while not writing any xattrs in the derivation outputs themselves. xattrs are still scrubbed from derivation outputs so it is not possible to obtain an advantage by writing a security-related xattr to a well chosen file. Tests were added to test these scenarios on Linux. Darwin is carefully excluded because of #1008 and #1090, solving that is welcome. In the meantime, they are marked xfail. Change-Id: Ia3255eeb8442e83db4f10dcb5a51cbc368a2550d Signed-off-by: Raito Bezarius <raito@lix.systems>
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ hashInvalidator ? "" }:
|
|
with import ./config.nix;
|
|
|
|
let
|
|
input0 = mkDerivation {
|
|
name = "dependencies-input-0";
|
|
buildCommand = "mkdir $out; echo foo > $out/bar";
|
|
};
|
|
|
|
input1 = mkDerivation {
|
|
name = "dependencies-input-1";
|
|
buildCommand = "mkdir $out; echo FOO > $out/foo";
|
|
};
|
|
|
|
input2 = mkDerivation {
|
|
name = "dependencies-input-2";
|
|
buildCommand = ''
|
|
mkdir $out
|
|
# Space-filler to test GC stats reporting
|
|
head -c 100000 /dev/zero > $out/filler
|
|
echo BAR > $out/bar
|
|
echo ${input0} > $out/input0
|
|
echo ${input3} > $out/input3
|
|
'';
|
|
};
|
|
|
|
input3 = mkDerivation {
|
|
name = "dependencies-input-3";
|
|
buildCommand = "mkdir $out; echo FOO > $out/foo";
|
|
};
|
|
|
|
fod_input = mkDerivation {
|
|
name = "fod-input";
|
|
buildCommand = ''
|
|
echo ${hashInvalidator}
|
|
echo FOD > $out
|
|
'';
|
|
outputHashMode = "flat";
|
|
outputHashAlgo = "sha256";
|
|
outputHash = "1dq9p0hnm1y75q2x40fws5887bq1r840hzdxak0a9djbwvx0b16d";
|
|
};
|
|
|
|
in
|
|
mkDerivation {
|
|
name = "dependencies-top";
|
|
builder = ./dependencies.builder0.sh + "/FOOBAR/../.";
|
|
input1 = input1 + "/.";
|
|
input2 = "${input2}/.";
|
|
input3 = "${input3}/.";
|
|
input1_drv = input1;
|
|
input2_drv = input2;
|
|
input3_drv = input3;
|
|
input0_drv = input0;
|
|
fod_input_drv = fod_input;
|
|
meta.description = "Random test package";
|
|
}
|