emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63245: closed (Potential regression: cp --preserve=mode or --preserv


From: GNU bug Tracking System
Subject: bug#63245: closed (Potential regression: cp --preserve=mode or --preserve=all fails to copy files from subdirectory)
Date: Thu, 04 May 2023 22:30:03 +0000

Your message dated Thu, 4 May 2023 23:29:16 +0100
with message-id <9535bf5d-f794-13da-b53b-49d518e36b03@draigBrady.com>
and subject line Re: bug#63245: Potential regression: cp --preserve=mode or 
--preserve=all fails to copy files from subdirectory
has caused the debbugs.gnu.org bug report #63245,
regarding Potential regression: cp --preserve=mode or --preserve=all fails to 
copy files from subdirectory
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
63245: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63245
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Potential regression: cp --preserve=mode or --preserve=all fails to copy files from subdirectory Date: Wed, 3 May 2023 11:27:01 +0200
Hello,

I'm a maintainer of the Relax-and-Recover (https://relax-and-recover.org/) Open Source project and think that I might have found a major regression in cp, starting somewhere with version 9.


Problem:

We use a cp call like the following to copy various files and directory into a destination path with preserving the structure:

cp --verbose -t DESTINATION -L --preserve=all --parents SOURCE...

Over the last 10+ years that worked well on all Linux distros (ReaR is build for and tested on nearly all distros), but I recently found out that on Ubuntu 23.04 this fails like this:

# rm -Rf /tmp/f && mkdir /tmp/f && cp --verbose -t /tmp/f -L --preserve=all --parents /etc/apt/sources.list && echo yes ; ls -lR /tmp/f/etc/apt/sources.list /etc/apt/sources.list
/etc -> /tmp/f/etc
/etc/apt -> /tmp/f/etc/apt
'/etc/apt/sources.list' -> '/tmp/f/etc/apt/sources.list'
cp: ‘etc/apt’: No such file or directory
-rw-r--r-- 1 root root 2437 Apr 23 09:53 /etc/apt/sources.list
-rw-r--r-- 1 root root 2437 Apr 23 09:53 /tmp/f/etc/apt/sources.list
#

Ubuntu 23.04 uses cp (GNU coreutils) 9.1

On Ubuntu 22.04 there is cp (GNU coreutils) 8.32 and the same example works as expected:

# rm -Rf /tmp/f && mkdir /tmp/f && cp --verbose -t /tmp/f -L --preserve=all --parents /etc/apt/sources.list && echo yes ; ls -lR /tmp/f/etc/apt/sources.list /etc/apt/sources.list
/etc -> /tmp/f/etc
/etc/apt -> /tmp/f/etc/apt
'/etc/apt/sources.list' -> '/tmp/f/etc/apt/sources.list'
yes
-rw-r--r-- 1 root root 263 Mär 26 15:20 /etc/apt/sources.list
-rw-r--r-- 1 root root 263 Mär 26 15:20 /tmp/f/etc/apt/sources.list
#

BTW, I checked also on many other distros that ReaR supports and all distros with cp version 9.1 fail in the same way.

Can you please have a look and advise how to proceed? We at the ReaR project can of course change our code to use tar for example, but I won't be surprised if other users will also meet this changed behaviour and maybe it is indeed a bug.

Kind regards,
Schlomo Schapiro

--- End Message ---
--- Begin Message --- Subject: Re: bug#63245: Potential regression: cp --preserve=mode or --preserve=all fails to copy files from subdirectory Date: Thu, 4 May 2023 23:29:16 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0
On 04/05/2023 12:27, Pádraig Brady wrote:
On 04/05/2023 07:27, Schlomo Schapiro wrote:
Hi Pádraig,

thank you, that will not yet fix the problem in the older distros? What
about the RPM world with Fedora/RHEL and Archlinux? As far as I can tell
all cp version 9.x are affected by this.

I'll handle the Fedora 37/38 fixes.
RHEL/Centos and current Archlinux are not affected AFAICS.

Fedora 37 and 38 updates are now pending (cc Kamil):
https://bodhi.fedoraproject.org/updates/FEDORA-2023-65365355b3
https://bodhi.fedoraproject.org/updates/FEDORA-2023-4beb422aac

The Fedora patches should also apply to the debian bookworm package,
so I've opened bugs accordingly at:

https://bugs.debian.org/1035530
https://bugs.debian.org/1035531

Schlomo, the second one is the one you're particularly interested in.

Marking this bug as completed upstream.

cheers,
Pádraig


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]