Skip to content

Commit

Permalink
Merge pull request #57339 from dtzWill/update/coreutils-8.31
Browse files Browse the repository at this point in the history
coreutils: 8.30 -> 8.31, touchups
  • Loading branch information
dtzWill committed Mar 17, 2019
2 parents c10dfbc + 2f7bf95 commit 5506691
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions pkgs/tools/misc/coreutils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,41 @@ assert selinuxSupport -> libselinux != null && libsepol != null;
with lib;

stdenv.mkDerivation rec {
name = "coreutils-8.30";
pname = "coreutils";
version = "8.31";

src = fetchurl {
url = "mirror://gnu/coreutils/${name}.tar.xz";
sha256 = "0mxhw43d4wpqmvg0l4znk1vm10fy92biyh90lzdnqjcic2lb6cg8";
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz";
};

patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;

postPatch = ''
# The test tends to fail on btrfs,f2fs and maybe other unusual filesystems.
sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
sed '2i echo Skipping du threshold test && exit 0' -i ./tests/du/threshold.sh
sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
sed '2i echo Skipping du long-from-unreadable test && exit 0' -i ./tests/du/long-from-unreadable.sh
sed '2i echo Skipping dd sparse test && exit 77' -i ./tests/dd/sparse.sh
sed '2i echo Skipping du threshold test && exit 77' -i ./tests/du/threshold.sh
sed '2i echo Skipping cp sparse test && exit 77' -i ./tests/cp/sparse.sh
sed '2i echo Skipping rm deep-2 test && exit 77' -i ./tests/rm/deep-2.sh
sed '2i echo Skipping du long-from-unreadable test && exit 77' -i ./tests/du/long-from-unreadable.sh
# sandbox does not allow setgid
sed '2i echo Skipping chmod setgid test && exit 0' -i ./tests/chmod/setgid.sh
sed '2i echo Skipping chmod setgid test && exit 77' -i ./tests/chmod/setgid.sh
substituteInPlace ./tests/install/install-C.sh \
--replace 'mode3=2755' 'mode3=1755'
sed '2i print "Skipping env -S test"; exit 0;' -i ./tests/misc/env-S.pl
sed '2i print "Skipping env -S test"; exit 77;' -i ./tests/misc/env-S.pl
# these tests fail in the unprivileged nix sandbox (without nix-daemon) as we break posix assumptions
for f in ./tests/chgrp/{basic.sh,recurse.sh,default-no-deref.sh,no-x.sh,posix-H.sh}; do
sed '2i echo Skipping chgrp && exit 0' -i "$f"
sed '2i echo Skipping chgrp && exit 77' -i "$f"
done
for f in gnulib-tests/{test-chown.c,test-fchownat.c,test-lchown.c}; do
echo "int main() { return 0; }" > "$f"
echo "int main() { return 77; }" > "$f"
done
'' + optionalString (stdenv.hostPlatform.libc == "musl") ''
echo "int main() { return 77; }" > gnulib-tests/test-parse-datetime.c
echo "int main() { return 77; }" > gnulib-tests/test-getlogin.c
'';

outputs = [ "out" "info" ];
Expand Down Expand Up @@ -80,7 +84,7 @@ stdenv.mkDerivation rec {
# and {Open,Free}BSD.
# With non-standard storeDir: https://github.com/NixOS/nix/issues/512
doCheck = stdenv.hostPlatform == stdenv.buildPlatform
&& stdenv.hostPlatform.libc == "glibc"
&& (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.isMusl)
&& builtins.storeDir == "/nix/store";

# Prevents attempts of running 'help2man' on cross-built binaries.
Expand Down

0 comments on commit 5506691

Please sign in to comment.