diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-10-28 18:02:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 18:02:03 +0000 |
commit | 37b1afa489f1ffb2da7504ae2c6e82352b455b93 (patch) | |
tree | 2c29a20a3044925286eeb3568e3d1d3c3f648617 /pkgs/tools/misc/coreutils | |
parent | 3f01b576af96454d1302fe4312420776f3ed0755 (diff) | |
parent | da1f24822928ad74741d41526a2914231500b21d (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/misc/coreutils')
-rw-r--r-- | pkgs/tools/misc/coreutils/default.nix | 7 | ||||
-rw-r--r-- | pkgs/tools/misc/coreutils/disable-seek-hole.patch | 43 |
2 files changed, 48 insertions, 2 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index f5e7ca8a25c07..a5d951a2eb421 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -29,8 +29,11 @@ stdenv.mkDerivation (rec { sha256 = "sha256-zjCs30pBvFuzDdlV6eqnX6IWtOPesIiJ7TJDPHs7l84="; }; - patches = [ ./fix-chmod-exit-code.patch ] - ++ optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch + patches = [ + ./fix-chmod-exit-code.patch + # Workaround for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51433 + ./disable-seek-hole.patch + ] ++ optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch # fix gnulib tests on 32-bit ARM. Included on coreutils master. # https://lists.gnu.org/r/bug-gnulib/2020-08/msg00225.html ++ optional stdenv.hostPlatform.isAarch32 ./fix-gnulib-tests-arm.patch; diff --git a/pkgs/tools/misc/coreutils/disable-seek-hole.patch b/pkgs/tools/misc/coreutils/disable-seek-hole.patch new file mode 100644 index 0000000000000..89503287980d4 --- /dev/null +++ b/pkgs/tools/misc/coreutils/disable-seek-hole.patch @@ -0,0 +1,43 @@ +diff --git a/src/copy.c b/src/copy.c +index cb9018f93..2a4ccc061 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -502,7 +502,7 @@ write_zeros (int fd, off_t n_bytes) + return true; + } + +-#ifdef SEEK_HOLE ++#if 0 + /* Perform an efficient extent copy, if possible. This avoids + the overhead of detecting holes in hole-introducing/preserving + copy, and thus makes copying sparse files much more efficient. +@@ -1095,7 +1095,7 @@ infer_scantype (int fd, struct stat const *sb, + && ST_NBLOCKS (*sb) < sb->st_size / ST_NBLOCKSIZE)) + return PLAIN_SCANTYPE; + +-#ifdef SEEK_HOLE ++#if 0 + scan_inference->ext_start = lseek (fd, 0, SEEK_DATA); + if (0 <= scan_inference->ext_start) + return LSEEK_SCANTYPE; +@@ -1377,7 +1377,7 @@ copy_reg (char const *src_name, char const *dst_name, + off_t n_read; + bool wrote_hole_at_eof = false; + if (! ( +-#ifdef SEEK_HOLE ++#if 0 + scantype == LSEEK_SCANTYPE + ? lseek_copy (source_desc, dest_desc, buf, buf_size, hole_size, + scan_inference.ext_start, src_open_sb.st_size, +diff --git a/tests/seek-data-capable b/tests/seek-data-capable +index cc6372214..6e7a9ec1e 100644 +--- a/tests/seek-data-capable ++++ b/tests/seek-data-capable +@@ -1,5 +1,7 @@ + import sys, os, errno, platform + ++sys.exit(1) ++ + # Pass an _empty_ file + if len(sys.argv) != 2: + sys.exit(1) |