[maintainer] coreutils-9.5 and 9.6 regression in cp (and maybe ln? mv?)

Brian Inglis Brian.Inglis@systematicsw.ab.ca
Mon Mar 31 06:37:50 GMT 2025


On 2025-03-30 15:43, Corinna Vinschen wrote:
> Hi Brian
> 
> Regression in 9.5 and 9.6:
> 
>    $ ls -l /bin/setfacl*
>    -rwxr-xr-x 1 corinna Administrators 109379 Mar 30 21:24 /bin/setfacl.exe
>    $ cd <cygwin-build-dir>
>    $ ls -l x86_64-pc-cygwin/winsup/utils/setfacl*
>    -rwxr-xr-x 1 corinna vinschen 109379 Mar 30 21:19 x86_64-pc-cygwin/winsup/utils/setfacl.exe
>    -rw-r--r-- 1 corinna vinschen  46188 Mar 30 21:19 x86_64-pc-cygwin/winsup/utils/setfacl.o
> 
> With coreutils 9.0:
> 
>    $ cp x86_64-pc-cygwin/winsup/utils/setfacl /bin
>    $ echo $?
>    0
>    $ ls -l /bin/setfacl*
>    -rwxr-xr-x 1 corinna Administrators 109379 Mar 30 21:25 /bin/setfacl.exe
> 
> With coreutils 9.5 and 9.6:
> 
>    $ cp x86_64-pc-cygwin/winsup/utils/setfacl /bin
>    cp: cannot create regular file '/bin/setfacl': File exists
> 
> I think the .exe suffix handling affects not only cp(1), but I didn't
> check explicitely.  It looks like code from 9.0 is missing in 9.5 and 9.6.

In coreutils 9.1 the approach changed to using the dir FD relative API ...at 
functions:

faccessat, fchmodat, fchownat, fstatat, futimesat, linkat, mkdirat, mkfifoat, 
mknodat, openat/2, readlinkat, renameat/2, scandirat, symlinkat, unlinkat, utimensat

which required splitting Eric's former single patch, reworking many file patches 
extensively, and I still had to withdraw 9.1 because of issues; some patches 
need changes for each release, and may not all be complete yet, which is why I 
have managed only test releases so far.

The changes and patches require a cygwin.[ch]:cygwin_spelling() function (by 
Eric) which only handles .exe not .lnk etc, and affects lib/same.c same_name() 
function, and copy, install, ls, and stat program sources, as far as I can tell.

As well as the acl issues identified, there are also issues with sparse file 
detection (not "supported", even though it works), and testing, and the usual 
confusion between Cygwin, Msys, Mingw, and Windows histories.

Recent releases have also become more difficult to test because more cases just 
hang or loop and need killed to proceed: perl test timeouts do not break out 
reliably!
And file system loops create gigs of permission denied errors and log diffs.

Please (anyone!) feel free to review and suggest alternate/better approaches to 
patching and testing.

https://cygwin.com/git/?p=git/cygwin-packages/coreutils.git;a=tree;h=refs/heads/playground;hb=refs/heads/playground

[Ports might have been easier had we kept to targeting BSD, SunOS, Solaris, plus 
POSIX, user lands, and ignored Linux, as being Linux-like but not supporting 
their headers, syscalls, and roots, seems to confuse some upstreams ;^> ]

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin mailing list