bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-11, at 12:02 AM, Pádraig Brady wrote: > > On 10/02/2023 21:50, Paul Eggert wrote: >> On 2/10/23 13:35, George Valkov wrote: >>> Since the source and it’s clone have separate metadata, >>> it should be possible to change it on the clone, to comply with standards. >> Attached is a

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-11, at 2:48 AM, Paul Eggert wrote: > > I want to emphasize the fact that we need to get to the bottom of the > SEEK_HOLE / SEEK_DATA situation on macOS. Core programs other than 'cp' use > these options, and working around the bug in 'cp' won't fix the bug elsewhere. > > One

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 11:50 PM, Paul Eggert wrote: > > On 2/10/23 13:35, George Valkov wrote: > >> Since the source and it’s clone have separate metadata, >> it should be possible to change it on the clone, to comply with standards. > > Attached is a hacky patch to do that. It also uses the

bug#61248: uniq --unique needs examples

2023-02-10 Thread Dan Jacobson
BV> While an example is always nice, isn't the last part of the above BV> exactly telling what it's doing? That is for experts to know. The rest of us need examples, sort of like your idea, (please modify): $ echo a a a b c c b b d b | xargs --max-args=1 | uniq --unique b d b

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Paul Eggert
I want to emphasize the fact that we need to get to the bottom of the SEEK_HOLE / SEEK_DATA situation on macOS. Core programs other than 'cp' use these options, and working around the bug in 'cp' won't fix the bug elsewhere. One possibility is to modify Gnulib so that SEEK_HOLE and SEEK_DATA

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 11:46 PM, Pádraig Brady wrote: > > On 10/02/2023 20:45, Paul Eggert wrote: >> On 2/10/23 10:58, Pádraig Brady wrote: >>> I was considering "touch"ing the timestamps after also, >>> but it's better to just maintain them as we're >>> pointing to the same data after all. >>

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Paul Eggert
On 2/10/23 13:46, Pádraig Brady wrote: Maybe. Though POSIX says cp "shall copy" and we're not making a copy, we're making a reflink. If that were an important reason not to clone, then cp should not have made --reflink=auto the default, as clones would not be considered to be copies.

bug#61248: uniq --unique needs examples

2023-02-10 Thread Bernhard Voelker
On 2/3/23 08:12, Dan Jacobson wrote: uniq INFO page says: ‘-u’ ‘--unique’ Discard the last line that would be output for a repeated input group. When used by itself, this option causes ‘uniq’ to print unique lines, and nothing else. This really needs some examples, to help

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 21:50, Paul Eggert wrote: On 2/10/23 13:35, George Valkov wrote: Since the source and it’s clone have separate metadata, it should be possible to change it on the clone, to comply with standards. Attached is a hacky patch to do that. It also uses the new CLONE_ACL flag. The old

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Paul Eggert
On 2/10/23 13:35, George Valkov wrote: Since the source and it’s clone have separate metadata, it should be possible to change it on the clone, to comply with standards. Attached is a hacky patch to do that. It also uses the new CLONE_ACL flag. The old code apparently mishandled ACLs; the

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 20:45, Paul Eggert wrote: On 2/10/23 10:58, Pádraig Brady wrote: I was considering "touch"ing the timestamps after also, but it's better to just maintain them as we're pointing to the same data after all. For POSIX conformance we must touch if the user has specified only POSIX

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 10:45 PM, Paul Eggert wrote: > > On 2/10/23 10:58, Pádraig Brady wrote: >> I was considering "touch"ing the timestamps after also, >> but it's better to just maintain them as we're >> pointing to the same data after all. > > For POSIX conformance we must touch if the user

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Paul Eggert
On 2/10/23 10:58, Pádraig Brady wrote: I was considering "touch"ing the timestamps after also, but it's better to just maintain them as we're pointing to the same data after all. For POSIX conformance we must touch if the user has specified only POSIX options (and has not specified -p). And

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 8:58 PM, Pádraig Brady wrote: > > On 10/02/2023 17:24, George Valkov wrote: >>> On 2023-02-10, at 4:02 PM, Pádraig Brady wrote: >>> >>> On 10/02/2023 12:13, George Valkov wrote: > On 2023-02-10, at 11:18 AM, Pádraig Brady wrote: > > I'll apply the simple

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 17:24, George Valkov wrote: On 2023-02-10, at 4:02 PM, Pádraig Brady wrote: On 10/02/2023 12:13, George Valkov wrote: On 2023-02-10, at 11:18 AM, Pádraig Brady wrote: I'll apply the simple patch later I think. I have an interesting idea: If I copy a large file, say the 16

bug#61405: [PATCH] maint: fix some typos in comments

2023-02-10 Thread Pádraig Brady
On 10/02/2023 15:41, ChuanGang Jiang wrote: * NEWS : s/commmand/command/ * src/expand-common.c: s/specifed/specified/ * src/pr.c: s/e.g/e.g./ * tests/misc/comm.pl: s/ouput/output/ --- NEWS| 2 +- src/expand-common.c | 2 +- src/pr.c| 2 +- tests/misc/comm.pl | 2

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 4:02 PM, Pádraig Brady wrote: > > On 10/02/2023 12:13, George Valkov wrote: >>> On 2023-02-10, at 11:18 AM, Pádraig Brady wrote: >>> >>> I'll apply the simple patch later I think. >> I have an interesting idea: If I copy a large file, say the 16 GB disk image >> where I

bug#61405: [PATCH] maint: fix some typos in comments

2023-02-10 Thread ChuanGang Jiang
* NEWS : s/commmand/command/ * src/expand-common.c: s/specifed/specified/ * src/pr.c: s/e.g/e.g./ * tests/misc/comm.pl: s/ouput/output/ --- NEWS| 2 +- src/expand-common.c | 2 +- src/pr.c| 2 +- tests/misc/comm.pl | 2 +- 4 files changed, 4 insertions(+), 4

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 12:13, George Valkov wrote: On 2023-02-10, at 11:18 AM, Pádraig Brady wrote: I'll apply the simple patch later I think. I have an interesting idea: If I copy a large file, say the 16 GB disk image where I compiled OpenWRT. So I copy this on the same filesystem, and check disk

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread George Valkov
> On 2023-02-10, at 11:18 AM, Pádraig Brady wrote: > > On 10/02/2023 03:57, Paul Eggert wrote: >> On 2/9/23 01:20, George Valkov wrote: >>> -#ifdef SEEK_HOLE >>> +#if defined(SEEK_HOLE) && !defined(__APPLE__) >> Instead of always disabling the SEEK_HOLE optimization, how about doing >> it only

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 03:57, Paul Eggert wrote: On 2/9/23 01:20, George Valkov wrote: -#ifdef SEEK_HOLE +#if defined(SEEK_HOLE) && !defined(__APPLE__) Instead of always disabling the SEEK_HOLE optimization, how about doing it only on APFS files? Something like the attached, perhaps (this is against

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-10 Thread Pádraig Brady
On 10/02/2023 01:03, George Valkov wrote: On 2023-02-09, at 11:35 PM, Pádraig Brady wrote: On 09/02/2023 17:23, George Valkov wrote: On 2023-02-09, at 6:32 PM, Pádraig Brady wrote: On 09/02/2023 15:57, George Valkov wrote: On 2023-02-09, at 1:56 PM, Pádraig Brady wrote: On 09/02/2023