Make tar invocation portable, fix OpenBSD build/test
At least on OpenBSD, tar(1) reads from /dev/rst0 not stdin by default options must specififed consistently with or without dashes, not mixed. Specify standard input explicitly to not rely on implementation details. Use either option style consistently.
This commit is contained in:
@@ -174,7 +174,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
|
||||
Path tmpDir = createTempDir();
|
||||
AutoDelete delTmpDir(tmpDir, true);
|
||||
|
||||
runProgram("tar", true, { "x", "-C", tmpDir }, tar);
|
||||
runProgram("tar", true, { "-x", "-f", "-", "-C", tmpDir }, tar);
|
||||
|
||||
gitInfo.storePath = store->addToStore(name, tmpDir);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ cp dependencies.nix $tarroot/default.nix
|
||||
cp config.nix dependencies.builder*.sh $tarroot/
|
||||
|
||||
tarball=$TEST_ROOT/tarball.tar.xz
|
||||
(cd $TEST_ROOT && tar c tarball) | xz > $tarball
|
||||
(cd $TEST_ROOT && tar cf - tarball) | xz > $tarball
|
||||
|
||||
nix-env -f file://$tarball -qa --out-path | grep -q dependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user