[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cp --preserve=mode not right on rh4 and nfs
From: |
Jim Meyering |
Subject: |
Re: cp --preserve=mode not right on rh4 and nfs |
Date: |
Sat, 04 Oct 2008 09:17:18 +0200 |
Warren L Dodge <address@hidden> wrote:
> I have built coreutils-6.12 on a GNU/Linux RedHat3 system. When I use
> the "cp" command with the --preserve=mode,timestamps switch there is a
> problem where a copy to a nfs mounted file system does not set the
> timesamp properly.
>
> I show examples below where I run the command on GNU/Linux RedHat3 and it
> works as expected. Then I run the same binary on GNU/Linux RedHat4 and
> it does not work properly.
Thank you for the fine report.
This does sound like a bug...
The problem is that you configured and built on one type of system
and ran the executables on a different type. While in general that's
ok, there are some configure-time tests that detect OS bugs and
work around them (or features, and take advantage of them), and
in unusual cases, that can lead to trouble.
So if it found/enabled something on the system where built, yet
that bit failed (without run-time recourse) on the different system
where it was run, ...
Obviously, we try not to have many pieces like that, but it can
happen, especially when someone builds on a newer system and tries to
run the resulting binary on an older one. *That* is not supported
at all. But you didn't do that.
In your case, if you provide some more info, it may help:
- strace one of the losing cp commands (on RHEL4)
- strace the same, working cp command (on RHEL3)
- lib/config.h from your coreutils build directory on RHEL3
> I believe I reported this quite some time ago. I was hoping the problem
> was solved in coreutils-6.12 as some of the users are needing this
> functionality.
If you filed a bugzilla (http://bugzilla.redhat.com/),
please tell me the number. If not, doing so (and merely referencing this
thread: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14699) may
also accelerate the processes.
Also, using the RHEL3 binaries, can you run "make check"
on a RHEL4 system to see if any regression tests fail?
> The /tmp on my machine is the local drive. The installed_tree/bin is
> where I am executing the command. The installed_tree is a nfs mounted
> file system. It is served by a NetApp system.
>
> coreutils-6.12 built on gnu/linux RedHat3
>
> #############################################################################
> execute on GNU/Linux RedHat4
>
> ./cp --preserve=mode,timestamps --no-preserve=ownership yes z
> ./cp --preserve=mode,timestamps --no-preserve=ownership yes /tmp/z
> ./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/z zz
> ./cp --preserve=mode,timestamps --no-preserve=ownership /tmp/z /tmp/zz
>
> ll yes /tmp/z /tmp/zz z zz
>
> -rwxr-xr-x 1 wdtmgr wdtmgr 73211 Oct 3 12:02 yes
> -rwxr-xr-x 1 wdtmgr wdtmgr 73211 Oct 3 12:02 /tmp/z
> -rwxr-xr-x 1 wdtmgr wdtmgr 73211 Oct 3 12:02 /tmp/zz
> -rwxr-xr-x 1 wdtmgr wdtmgr 73211 Oct 3 12:07 z << WRONG TIME
> -rwxr-xr-x 1 wdtmgr wdtmgr 73211 Oct 3 12:08 zz << WRONG TIME
...