GNU bug report logs - #20438
coreutils 8.23 on OS X : Calling gcp -al fails on symbolic links

Previous Next

Package: coreutils;

Reported by: Thomas Baigneres <thomas.baigneres <at> cryptoexperts.com>

Date: Mon, 27 Apr 2015 15:30:04 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20438 in the body.
You can then email your comments to 20438 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#20438; Package coreutils. (Mon, 27 Apr 2015 15:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Baigneres <thomas.baigneres <at> cryptoexperts.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 27 Apr 2015 15:30:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Baigneres <thomas.baigneres <at> cryptoexperts.com>
To: bug-coreutils <at> gnu.org
Subject: coreutils 8.23 on OS X : Calling gcp -al fails on symbolic links 
Date: Mon, 27 Apr 2015 13:34:03 +0200
Hello,

Consider the following directory hierarchy:

	$ ls -lR
	total 0
	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source

	./source:
	total 16
	-rw-r--r--  1 user  group  0 Apr 24 13:50 file.txt
	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt


Trying to copy the `source` directory with the options -a (archive) and -l
(hard link files instead of copying) fails when using the 8.23 version
of coreutils:

	$ gcp -al source destination
	gcp: cannot create hard link 'destination/symbolic-link-to-file' to
	'source/symbolic-link-to-file': Operation not supported

Trying to do the same with the 8.22 version of coreutils works as
expected :

	$ gcp -al source destination
	$ ls -lR
	total 0
	drwxr-xr-x  4 user  group  136 Apr 24 13:51 destination
	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source

	./destination:
	total 16
	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt

	./source:
	total 16
	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt


Searching the internet suggests that the culprit might be the `linkat()`
function, which exists but does not work as expected by coreutils.

Regards,

Thomas




Information forwarded to bug-coreutils <at> gnu.org:
bug#20438; Package coreutils. (Mon, 27 Apr 2015 16:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 20438 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <Padraig.Brady <at> lincor.com>
To: Thomas Baigneres <thomas.baigneres <at> cryptoexperts.com>, 
 20438 <at> debbugs.gnu.org
Subject: Re: bug#20438: coreutils 8.23 on OS X : Calling gcp -al fails on
 symbolic links
Date: Mon, 27 Apr 2015 17:01:26 +0100
On 27/04/15 12:34, Thomas Baigneres wrote:
> Hello,
>
> Consider the following directory hierarchy:
>
> 	$ ls -lR
> 	total 0
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source
>
> 	./source:
> 	total 16
> 	-rw-r--r--  1 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
>
> Trying to copy the `source` directory with the options -a (archive) and -l
> (hard link files instead of copying) fails when using the 8.23 version
> of coreutils:
>
> 	$ gcp -al source destination
> 	gcp: cannot create hard link 'destination/symbolic-link-to-file' to
> 	'source/symbolic-link-to-file': Operation not supported
>
> Trying to do the same with the 8.22 version of coreutils works as
> expected :
>
> 	$ gcp -al source destination
> 	$ ls -lR
> 	total 0
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 destination
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source
>
> 	./destination:
> 	total 16
> 	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
> 	./source:
> 	total 16
> 	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
>
> Searching the internet suggests that the culprit might be the `linkat()`
> function, which exists but does not work as expected by coreutils.
Yes coreutils 8.23 uses linkat() for that where available:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.22-23-g9654b67

BTW this issue is caught by gnulib and coreutils tests.
I.E. `make check` may be being ignored on your build?

There was initial work to fix this at:
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c8e57ce5

That doesn't fix everything though I think,
and I'll need to look into a complete fix for Mac OS X >= 10.10
(or revert to the previous coreutils behavior).

cheers,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#20438; Package coreutils. (Mon, 27 Apr 2015 16:12:01 GMT) Full text and rfc822 format available.

Message #11 received at 20438 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 20438 <at> debbugs.gnu.org
Subject: Re: bug#20438: coreutils 8.23 on OS X : Calling gcp -al fails on
 symbolic links
Date: Mon, 27 Apr 2015 17:11:36 +0100
On 27/04/15 12:34, Thomas Baigneres wrote:
> Hello,
>
> Consider the following directory hierarchy:
>
> 	$ ls -lR
> 	total 0
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source
>
> 	./source:
> 	total 16
> 	-rw-r--r--  1 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
>
> Trying to copy the `source` directory with the options -a (archive) and -l
> (hard link files instead of copying) fails when using the 8.23 version
> of coreutils:
>
> 	$ gcp -al source destination
> 	gcp: cannot create hard link 'destination/symbolic-link-to-file' to
> 	'source/symbolic-link-to-file': Operation not supported
>
> Trying to do the same with the 8.22 version of coreutils works as
> expected :
>
> 	$ gcp -al source destination
> 	$ ls -lR
> 	total 0
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 destination
> 	drwxr-xr-x  4 user  group  136 Apr 24 13:51 source
>
> 	./destination:
> 	total 16
> 	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
> 	./source:
> 	total 16
> 	-rw-r--r--  2 user  group  0 Apr 24 13:50 file.txt
> 	lrwxr-xr-x  1 user  group  8 Apr 24 13:51 symbolic-link-to-file -> file.txt
>
>
> Searching the internet suggests that the culprit might be the `linkat()`
> function, which exists but does not work as expected by coreutils.
>

Yes coreutils 8.23 uses linkat() for that where available:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.22-23-g9654b67

BTW this issue on OS X 10.10 is caught by gnulib and coreutils tests.
I.E. `make check` may be being ignored on your build?

There was initial work to fix this at:
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c8e57ce5

That doesn't fix everything though I think,
and I'll need to look into a complete fix for Mac OS X >= 10.10
(or revert to the previous coreutils behavior).

cheers,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#20438; Package coreutils. (Tue, 23 Oct 2018 02:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 20438 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 20438 <at> debbugs.gnu.org
Subject: Re: bug#20438: coreutils 8.23 on OS X : Calling gcp -al fails on
 symbolic links
Date: Mon, 22 Oct 2018 20:15:35 -0600
tags 20438 fixed
close 20438
stop

(triaging old bugs)

On 27/04/15 10:11 AM, Pádraig Brady wrote:
> On 27/04/15 12:34, Thomas Baigneres wrote:
>> [...]
>> Searching the internet suggests that the culprit might be the `linkat()`
>> function, which exists but does not work as expected by coreutils.
>>
> Yes coreutils 8.23 uses linkat() for that where available:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.22-23-g9654b67
> 
> BTW this issue on OS X 10.10 is caught by gnulib and coreutils tests.
> I.E. `make check` may be being ignored on your build?
> 
> There was initial work to fix this at:
> http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c8e57ce5

With no further follow-ups in 5 years,
and Mac OS X 10.10 being a bit old,
I'm inclined to close this bug report.

If this is still an issue, please reply to this thread.

-assaf





Added tag(s) fixed. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 02:16:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 20438 <at> debbugs.gnu.org and Thomas Baigneres <thomas.baigneres <at> cryptoexperts.com> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 02:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Nov 2018 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.