Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] coreutils 9.3
@ 2023-07-28 19:33 dkwo
  2023-07-28 19:42 ` dkwo
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: dkwo @ 2023-07-28 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)

at least on glibc, the previously skipped tests now pass

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11041 bytes --]

From 808451619108b5af175c5bf0559fbc5df52c0dce Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH 1/2] coreutils: update to 9.3

---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |   4 +-
 3 files changed, 2 insertions(+), 196 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..8541a5bb67ad8 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 

From 8a23a953149d55b2622c97f3e0753f19b360e7f0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:29:53 -0400
Subject: [PATCH 2/2] coreutils: don't skip tests

---
 srcpkgs/coreutils/template | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 8541a5bb67ad8..37bc4ed1fb9f6 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -104,10 +104,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
@ 2023-07-28 19:42 ` dkwo
  2023-07-29 19:38 ` [PR PATCH] [Updated] " dkwo
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-07-28 19:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656231373

Comment:
it seems this is blocked by musl on 32-bit
```
checking for arm-linux-musleabihf-gcc option to enable timestamps after Jan 2038... support not detected
configure: error: in '/builddir/coreutils-9.3':
configure: error: support for timestamps after Jan 2038 is required
```

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
  2023-07-28 19:42 ` dkwo
@ 2023-07-29 19:38 ` dkwo
  2023-07-29 19:46 ` dkwo
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-07-29 19:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)

at least on glibc, the previously skipped tests now pass

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11865 bytes --]

From 12e1d0307066693c2fabe66752ab6de3838916fb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH 1/3] coreutils: update to 9.3

---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |   4 +-
 3 files changed, 2 insertions(+), 196 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..8541a5bb67ad8 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 

From 2ce5eda881dc800ec7244556bd58ee5126b9ecaa Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:29:53 -0400
Subject: [PATCH 2/3] coreutils: don't skip tests

---
 srcpkgs/coreutils/template | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 8541a5bb67ad8..37bc4ed1fb9f6 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -104,10 +104,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

From c151f1733348805e3377b27d6c50c7274148dcf6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 29 Jul 2023 15:38:11 -0400
Subject: [PATCH 3/3] coreutils: override year 2038 check for 32-bit arm*-musl.

---
 srcpkgs/coreutils/template | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 37bc4ed1fb9f6..9c5a40f4b351f 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -27,6 +27,12 @@ if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	export ac_cv_header_sys_cdefs_h=no
 fi
 
+case "$XBPS_TARGET_MACHINE" in
+arm*-musl)
+	# musl 1.1.x
+	configure_args+=" --disable-year2038";;
+esac
+
 alternatives="
  hostname:hostname:/usr/bin/hostname-coreutils
  hostname:hostname.1:/usr/share/man/man1/hostname-coreutils.1"

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
  2023-07-28 19:42 ` dkwo
  2023-07-29 19:38 ` [PR PATCH] [Updated] " dkwo
@ 2023-07-29 19:46 ` dkwo
  2023-07-29 19:49 ` dkwo
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-07-29 19:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)

at least on glibc, the previously skipped tests now pass

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11893 bytes --]

From 12e1d0307066693c2fabe66752ab6de3838916fb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH 1/3] coreutils: update to 9.3

---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |   4 +-
 3 files changed, 2 insertions(+), 196 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..8541a5bb67ad8 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 

From 2ce5eda881dc800ec7244556bd58ee5126b9ecaa Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:29:53 -0400
Subject: [PATCH 2/3] coreutils: don't skip tests

---
 srcpkgs/coreutils/template | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 8541a5bb67ad8..37bc4ed1fb9f6 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -104,10 +104,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

From bf04f6f9a334a255e707de9d3a2883f60786e2b5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 29 Jul 2023 15:38:11 -0400
Subject: [PATCH 3/3] coreutils: override year 2038 check for 32-bit arm*-musl.

---
 srcpkgs/coreutils/template | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index 37bc4ed1fb9f6..56bfd676c6292 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -57,6 +57,11 @@ do_configure() {
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
 	esac
+	case "$XBPS_TARGET_MACHINE" in
+		arm*-musl)
+		# musl 1.1.x
+		configure_args+=" --disable-year2038";;
+	esac
 	#
 	# Do not install kill: provided by util-linux.
 	# Do not install uptime: provided by procps-ng.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (2 preceding siblings ...)
  2023-07-29 19:46 ` dkwo
@ 2023-07-29 19:49 ` dkwo
  2023-07-29 19:52 ` dkwo
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-07-29 19:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656231373

Comment:
it seems this is blocked by musl on 32-bit
```
checking for arm-linux-musleabihf-gcc option to enable timestamps after Jan 2038... support not detected
configure: error: in '/builddir/coreutils-9.3':
configure: error: support for timestamps after Jan 2038 is required
```

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (3 preceding siblings ...)
  2023-07-29 19:49 ` dkwo
@ 2023-07-29 19:52 ` dkwo
  2023-08-01 11:01 ` dkwo
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-07-29 19:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656859189

Comment:
not sure why armv6l is not configuring; the tests pass locally on x86_64

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (4 preceding siblings ...)
  2023-07-29 19:52 ` dkwo
@ 2023-08-01 11:01 ` dkwo
  2023-08-01 11:16 ` dkwo
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-01 11:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656859189

Comment:
not sure why armv6l is not configuring.
the tests pass locally on x86_64, while on ci `FAIL: tests/tail-2/inotify-dir-recreate`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (5 preceding siblings ...)
  2023-08-01 11:01 ` dkwo
@ 2023-08-01 11:16 ` dkwo
  2023-08-01 11:18 ` dkwo
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-01 11:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1660107966

Comment:
need to look into it:
`configure: WARNING: unrecognized options: --with-sysroot, --with-libtool-sysroot, --disable-year2038, --disable-year2038`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (6 preceding siblings ...)
  2023-08-01 11:16 ` dkwo
@ 2023-08-01 11:18 ` dkwo
  2023-08-01 11:18 ` dkwo
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-01 11:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1660107966

Comment:
need to look into it:
`configure: WARNING: unrecognized options: --with-sysroot, --with-libtool-sysroot, --disable-year2038`
also in pre_configure

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (7 preceding siblings ...)
  2023-08-01 11:18 ` dkwo
@ 2023-08-01 11:18 ` dkwo
  2023-08-01 11:19 ` dkwo
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-01 11:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656859189

Comment:
the tests pass locally on x86_64, while on ci `FAIL: tests/tail-2/inotify-dir-recreate`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (8 preceding siblings ...)
  2023-08-01 11:18 ` dkwo
@ 2023-08-01 11:19 ` dkwo
  2023-08-02  8:42 ` dkwo
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-01 11:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1660107966

Comment:
need to look into arm-musl:
`configure: WARNING: unrecognized options: --with-sysroot, --with-libtool-sysroot, --disable-year2038`
also in pre_configure

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (9 preceding siblings ...)
  2023-08-01 11:19 ` dkwo
@ 2023-08-02  8:42 ` dkwo
  2023-08-02  8:43 ` dkwo
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-02  8:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1656859189

Comment:
the tests pass locally on x86_64, while on ci `FAIL: tests/tail-2/inotify-dir-recreate`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (10 preceding siblings ...)
  2023-08-02  8:42 ` dkwo
@ 2023-08-02  8:43 ` dkwo
  2023-08-02  8:49 ` [PR PATCH] [Updated] " dkwo
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-02  8:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45305#issuecomment-1660107966

Comment:
need to look into arm-musl:
`configure: WARNING: unrecognized options: --with-sysroot, --with-libtool-sysroot, --disable-year2038`
also in pre_configure

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (11 preceding siblings ...)
  2023-08-02  8:43 ` dkwo
@ 2023-08-02  8:49 ` dkwo
  2023-08-04 20:25 ` dkwo
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-02  8:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)
- at least on glibc, the previously skipped tests now pass
- the tests pass locally on x86_64, while on ci FAIL: tests/tail-2/inotify-dir-recreate
- cross-built to armv6l-musl locally

need to fix (from before) `configure: WARNING: unrecognized options: --with-sysroot, --with-libtool-sysroot`

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11069 bytes --]

From 905fdb8b37fd2dd8fa2b06df1e3a40b0093bb8a1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH] coreutils: update to 9.3

	- don't skip tests
	- override year 2038 check for 32-bit arm*-musl.
---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |  14 +--
 3 files changed, 8 insertions(+), 200 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..a57a0a8326427 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 
@@ -57,6 +57,12 @@ do_configure() {
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
 	esac
+	case "$XBPS_TARGET_MACHINE" in
+		arm*-musl)
+		# musl 1.1
+		configure_args+=" ac_year2038_required=no"
+		# this does not work: --disable-year2038
+	esac
 	#
 	# Do not install kill: provided by util-linux.
 	# Do not install uptime: provided by procps-ng.
@@ -104,10 +110,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (12 preceding siblings ...)
  2023-08-02  8:49 ` [PR PATCH] [Updated] " dkwo
@ 2023-08-04 20:25 ` dkwo
  2023-08-04 20:44 ` dkwo
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-04 20:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc). the tests pass locally on x86_64, while on CI `FAIL: tests/tail-2/inotify-dir-recreate`
- cross-built to armv6l-musl

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11966 bytes --]

From 1842e49474e088b5b7b0ed86ca17de7d42b4a089 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH 1/2] coreutils: update to 9.3

	- don't skip tests
	- override year 2038 check for 32-bit arm*-musl.
---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |  14 +--
 3 files changed, 8 insertions(+), 200 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..a57a0a8326427 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 
@@ -57,6 +57,12 @@ do_configure() {
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
 	esac
+	case "$XBPS_TARGET_MACHINE" in
+		arm*-musl)
+		# musl 1.1
+		configure_args+=" ac_year2038_required=no"
+		# this does not work: --disable-year2038
+	esac
 	#
 	# Do not install kill: provided by util-linux.
 	# Do not install uptime: provided by procps-ng.
@@ -104,10 +110,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

From 15024c33fbaa374cfd9eba891e2562d44885e503 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 4 Aug 2023 22:25:20 +0200
Subject: [PATCH 2/2] coreutils: only skip in ci

---
 srcpkgs/coreutils/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index a57a0a8326427..63e20c20cba49 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -107,8 +107,9 @@ do_check() {
 	# Tests that fail due to being inside a chroot
 	exeext_tests="chown lchown fchownat"
 
-	# Tests that depend on the tests removed
-	exeext_tests+=" fchmodat fchdir"
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		vsed -i '/tests\/tail-2\/inotify-dir-recreate/d' Makefile
+	fi
 
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (13 preceding siblings ...)
  2023-08-04 20:25 ` dkwo
@ 2023-08-04 20:44 ` dkwo
  2023-08-04 21:00 ` dkwo
  2023-08-09 20:24 ` [PR PATCH] [Merged]: " Duncaen
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-04 20:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc). the tests pass locally on x86_64, while on CI `FAIL: tests/tail-2/inotify-dir-recreate`
- cross-built to armv6l-musl

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 12025 bytes --]

From 1842e49474e088b5b7b0ed86ca17de7d42b4a089 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH 1/2] coreutils: update to 9.3

	- don't skip tests
	- override year 2038 check for 32-bit arm*-musl.
---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |  14 +--
 3 files changed, 8 insertions(+), 200 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..a57a0a8326427 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,7 +10,7 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
 
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 
@@ -57,6 +57,12 @@ do_configure() {
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
 	esac
+	case "$XBPS_TARGET_MACHINE" in
+		arm*-musl)
+		# musl 1.1
+		configure_args+=" ac_year2038_required=no"
+		# this does not work: --disable-year2038
+	esac
 	#
 	# Do not install kill: provided by util-linux.
 	# Do not install uptime: provided by procps-ng.
@@ -104,10 +110,6 @@ do_check() {
 	# Tests that depend on the tests removed
 	exeext_tests+=" fchmodat fchdir"
 
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done

From 633a69005aefc022578509c31712de02cbee28ff Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 4 Aug 2023 22:25:20 +0200
Subject: [PATCH 2/2] coreutils: only skip in ci

---
 srcpkgs/coreutils/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index a57a0a8326427..54ab6401da641 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -107,8 +107,10 @@ do_check() {
 	# Tests that fail due to being inside a chroot
 	exeext_tests="chown lchown fchownat"
 
-	# Tests that depend on the tests removed
-	exeext_tests+=" fchmodat fchdir"
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		vsed -i '/tests\/tail-2\/inotify-dir-recreate/d' Makefile
+		vsed -i '/tests\/du\/long-from-unreadable/d' Makefile
+	fi
 
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (14 preceding siblings ...)
  2023-08-04 20:44 ` dkwo
@ 2023-08-04 21:00 ` dkwo
  2023-08-09 20:24 ` [PR PATCH] [Merged]: " Duncaen
  16 siblings, 0 replies; 18+ messages in thread
From: dkwo @ 2023-08-04 21:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages core
https://github.com/void-linux/void-packages/pull/45305

coreutils 9.3
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)
- cross-built to armv6l-musl

A patch file from https://github.com/void-linux/void-packages/pull/45305.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-core-45305.patch --]
[-- Type: text/x-diff, Size: 11810 bytes --]

From d457fa4c7c58bc5822a9b24998aae8c72faef495 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Fri, 28 Jul 2023 15:10:31 -0400
Subject: [PATCH] coreutils: update to 9.3

---
 srcpkgs/coreutils/patches/cksum.patch |  64 -------------
 srcpkgs/coreutils/patches/copy.patch  | 130 --------------------------
 srcpkgs/coreutils/template            |  30 +++---
 3 files changed, 16 insertions(+), 208 deletions(-)
 delete mode 100644 srcpkgs/coreutils/patches/cksum.patch
 delete mode 100644 srcpkgs/coreutils/patches/copy.patch

diff --git a/srcpkgs/coreutils/patches/cksum.patch b/srcpkgs/coreutils/patches/cksum.patch
deleted file mode 100644
index d2e1a98c193fa..0000000000000
--- a/srcpkgs/coreutils/patches/cksum.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 76f2fb627118a26c25003dbd98c22c153b7ee1d2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 12:31:24 +0000
-Subject: cksum: fix reporting of failed checks
-
-This applies to all checksumming utilities,
-where we incorrectly report all subsequent files as checking 'OK'
-once any file has passed a digest check.
-The exit status was not impacted, only the printed status.
-
-* src/digest.c (digest_check): Use the correct state variable
-to determine if the _current_ file has passed or not.
-* tests/misc/md5sum.pl: Add a test case.
-Fixes https://bugs.gnu.org/62403
----
- src/digest.c         |  4 ++--
- tests/misc/md5sum.pl | 10 ++++++++++
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/src/digest.c b/src/digest.c
-index 6ee8a48..ab32968 100644
---- a/src/digest.c
-+++ b/src/digest.c
-@@ -1254,14 +1254,14 @@ digest_check (char const *checkfile_name)
- 
-               if (!status_only)
-                 {
--                  if ( ! matched_checksums || ! quiet)
-+                  if (! match || ! quiet)
-                     {
-                       if (needs_escape)
-                         putchar ('\\');
-                       print_filename (filename, needs_escape);
-                     }
- 
--                  if ( ! matched_checksums)
-+                  if (! match)
-                     printf (": %s\n", _("FAILED"));
-                   else if (!quiet)
-                     printf (": %s\n", _("OK"));
-diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
-index 186aca9..d712664 100755
---- a/tests/misc/md5sum.pl
-+++ b/tests/misc/md5sum.pl
-@@ -101,6 +101,16 @@ my @Tests =
-                   . "md5sum: WARNING: 1 line is improperly formatted\n"
-                   . "md5sum: WARNING: 2 computed checksums did NOT match\n"},
-                                 {EXIT=> 1}],
-+     # Ensure we use appropriate state to track failures (broken in 9.2)
-+     ['check-multifail-state', '--check', '--warn',
-+                                {IN=>{'f.md5' =>
-+                                      "$degenerate  f\n"
-+                                      . "$degenerate  g\n"
-+                                      . "$degenerate  f\n" }},
-+                                {AUX=> {f=> ''}}, {AUX=> {g=> 'a'}},
-+                                {OUT=>"f: OK\ng: FAILED\nf: OK\n"},
-+              {ERR=>"md5sum: WARNING: 1 computed checksum did NOT match\n"},
-+                                {EXIT=> 1}],
-      # The sha1sum and md5sum drivers share a lot of code.
-      # Ensure that md5sum does *not* share the part that makes
-      # sha1sum accept BSD format.
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/patches/copy.patch b/srcpkgs/coreutils/patches/copy.patch
deleted file mode 100644
index 68384992ed755..0000000000000
--- a/srcpkgs/coreutils/patches/copy.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
-Date: Thu, 23 Mar 2023 13:19:04 +0000
-Subject: copy: fix --reflink=auto to fallback in more cases
-
-On restricted systems like android or some containers,
-FICLONE could return EPERM, EACCES, or ENOTTY,
-which would have induced the command to fail to copy
-rather than falling back to a more standard copy.
-
-* src/copy.c (is_terminal_failure): A new function refactored
-from handle_clone_fail().
-(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
-as they also pertain to determination of whether cloning is supported
-if we ever use this function in that context.
-(handle_clone_fail): Use is_terminal_failure() in all cases,
-so that we assume a terminal failure in less errno cases.
-* NEWS: Mention the bug fix.
-Addresses https://bugs.gnu.org/62404
-
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, bool punch_holes, off_t size)
- }
- 
- 
--/* Whether the errno from FICLONE, or copy_file_range
--   indicates operation is not supported for this file or file system.  */
-+/* Whether the errno indicates the operation is a transient failure.
-+   I.e., a failure that would indicate the operation _is_ supported,
-+   but has failed in a terminal way.  */
-+
-+static bool
-+is_terminal_error (int err)
-+{
-+  return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
-+}
-+
-+
-+/* Whether the errno from FICLONE, or copy_file_range indicates
-+   the operation is not supported/allowed for this file or process.  */
- 
- static bool
- is_CLONENOTSUP (int err)
- {
--  return err == ENOSYS || is_ENOTSUP (err)
-+  return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
-          || err == EINVAL || err == EBADF
--         || err == EXDEV || err == ETXTBSY;
-+         || err == EXDEV || err == ETXTBSY
-+         || err == EPERM || err == EACCES;
- }
- 
- 
-@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
-           {
-             copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- 
--            if (is_CLONENOTSUP (errno))
--              break;
--
--            /* copy_file_range might not be enabled in seccomp filters,
--               so retry with a standard copy.  EPERM can also occur
--               for immutable files, but that would only be in the edge case
--               where the file is made immutable after creating/truncating,
-+            /* Consider operation unsupported only if no data copied.
-+               For example, EPERM could occur if copy_file_range not enabled
-+               in seccomp filters, so retry with a standard copy.  EPERM can
-+               also occur for immutable files, but that would only be in the
-+               edge case where the file is made immutable after creating,
-                in which case the (more accurate) error is still shown.  */
--            if (errno == EPERM && *total_n_read == 0)
-+            if (*total_n_read == 0 && is_CLONENOTSUP (errno))
-               break;
- 
-             /* ENOENT was seen sometimes across CIFS shares, resulting in
-                no data being copied, but subsequent standard copies succeed.  */
--            if (errno == ENOENT && *total_n_read == 0)
-+            if (*total_n_read == 0 && errno == ENOENT)
-               break;
- 
-             if (errno == EINTR)
-@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-                    char const* src_name, char const* dst_name,
-                    int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
- {
--  /* If the clone operation is creating the destination,
--     then don't try and cater for all non transient file system errors,
--     and instead only cater for specific transient errors.  */
--  bool transient_failure;
--  if (dest_desc < 0) /* currently for fclonefileat().  */
--    transient_failure = errno == EIO || errno == ENOMEM
--                        || errno == ENOSPC || errno == EDQUOT;
--  else /* currently for FICLONE.  */
--    transient_failure = ! is_CLONENOTSUP (errno);
--
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  /* When the clone operation fails, report failure only with errno values
-+     known to mean trouble when the clone is supported and called properly.
-+     Do not report failure merely because !is_CLONENOTSUP (errno),
-+     as systems may yield oddball errno values here with FICLONE.
-+     Also is_CLONENOTSUP() is not appropriate for the range of errnos
-+     possible from fclonefileat(), so it's more consistent to avoid. */
-+  bool report_failure = is_terminal_error (errno);
-+
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     error (0, errno, _("failed to clone %s from %s"),
-            quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
- 
-@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char const* dst_relname,
-      but cloned no data.  */
-   if (new_dst /* currently not for fclonefileat().  */
-       && reflink_mode == REFLINK_ALWAYS
--      && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-+      && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
-       && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
-     error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- 
--  if (! transient_failure)
-+  if (! report_failure)
-     copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- 
--  if (reflink_mode == REFLINK_ALWAYS || transient_failure)
-+  if (reflink_mode == REFLINK_ALWAYS || report_failure)
-     return false;
- 
-   return true;
--- 
-cgit v1.1
-
diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template
index af027c615380e..c158130abf1f8 100644
--- a/srcpkgs/coreutils/template
+++ b/srcpkgs/coreutils/template
@@ -1,6 +1,6 @@
 # Template file for 'coreutils'
 pkgname=coreutils
-version=9.2
+version=9.3
 revision=1
 bootstrap=yes
 makedepends="gmp-devel acl-devel libcap-devel"
@@ -10,8 +10,10 @@ license="GPL-3.0-or-later"
 homepage="https://www.gnu.org/software/coreutils"
 changelog="https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=HEAD"
 distfiles="${GNU_SITE}/coreutils/coreutils-${version}.tar.xz"
-checksum=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
-
+checksum=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
+alternatives="
+ hostname:hostname:/usr/bin/hostname-coreutils
+ hostname:hostname.1:/usr/share/man/man1/hostname-coreutils.1"
 replaces="chroot-coreutils>=0 coreutils-doc>=0 b2sum>=0"
 
 if [ "$CHROOT_READY" ]; then
@@ -27,10 +29,6 @@ if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	export ac_cv_header_sys_cdefs_h=no
 fi
 
-alternatives="
- hostname:hostname:/usr/bin/hostname-coreutils
- hostname:hostname.1:/usr/share/man/man1/hostname-coreutils.1"
-
 pre_configure() {
 	# Build natively all utils for the host, we need this to generate
 	# the manpages via help2man.
@@ -57,6 +55,12 @@ do_configure() {
 		# XXX syncfs() in src/sync.c expects a return value.
 		*-musl) configure_args+=" ac_cv_func_syncfs=no";;
 	esac
+	case "$XBPS_TARGET_MACHINE" in
+		arm*-musl)
+		# musl 1.1
+		configure_args+=" ac_year2038_required=no"
+		# this does not work: --disable-year2038
+	esac
 	#
 	# Do not install kill: provided by util-linux.
 	# Do not install uptime: provided by procps-ng.
@@ -101,17 +105,15 @@ do_check() {
 	# Tests that fail due to being inside a chroot
 	exeext_tests="chown lchown fchownat"
 
-	# Tests that depend on the tests removed
-	exeext_tests+=" fchmodat fchdir"
-
-	# temporarily disable two tests (coreutils9.1)
-	vsed -i "s/test-getcwd.sh //" gnulib-tests/Makefile
-	exeext_tests+=" getlogin"
-
 	for test in $exeext_tests ; do
 		vsed -i "s/test-$test\$(EXEEXT) //" gnulib-tests/Makefile
 	done
 
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		vsed -i '/tests\/tail-2\/inotify-dir-recreate/d' Makefile
+		vsed -i '/tests\/du\/long-from-unreadable/d' Makefile
+	fi
+
 	make check
 }
 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Merged]: coreutils 9.3
  2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
                   ` (15 preceding siblings ...)
  2023-08-04 21:00 ` dkwo
@ 2023-08-09 20:24 ` Duncaen
  16 siblings, 0 replies; 18+ messages in thread
From: Duncaen @ 2023-08-09 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

There's a merged pull request on the void-packages repository

coreutils 9.3
https://github.com/void-linux/void-packages/pull/45305

Description:
- I tested the changes in this PR: yes, using it since July 28
- I built this PR locally for my native architecture, (x86_64-glibc)
- cross-built to armv6l-musl

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-08-09 20:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 19:33 [PR PATCH] coreutils 9.3 dkwo
2023-07-28 19:42 ` dkwo
2023-07-29 19:38 ` [PR PATCH] [Updated] " dkwo
2023-07-29 19:46 ` dkwo
2023-07-29 19:49 ` dkwo
2023-07-29 19:52 ` dkwo
2023-08-01 11:01 ` dkwo
2023-08-01 11:16 ` dkwo
2023-08-01 11:18 ` dkwo
2023-08-01 11:18 ` dkwo
2023-08-01 11:19 ` dkwo
2023-08-02  8:42 ` dkwo
2023-08-02  8:43 ` dkwo
2023-08-02  8:49 ` [PR PATCH] [Updated] " dkwo
2023-08-04 20:25 ` dkwo
2023-08-04 20:44 ` dkwo
2023-08-04 21:00 ` dkwo
2023-08-09 20:24 ` [PR PATCH] [Merged]: " Duncaen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).