[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
avoid buggy AIX 5.3 cp -R.
From: |
Ralf Wildenhues |
Subject: |
avoid buggy AIX 5.3 cp -R. |
Date: |
Sat, 22 Jan 2011 13:45:28 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
automake/tests/fn99{,subdir}.test have been long-time failures on
AIX 5.[123], but not 6.1 or newer (and IIRC not 4.3.3 either):
http://autobuild.josefsson.org/automake/log-201101181921915482000.txt
| + make distcheck
| make dist-gzip am__post_remove_distdir='@:'
| { test ! -d "fn99-1.0" || { find "fn99-1.0" -type d ! -perm -200
-exec chmod u+w {} ';' && rm -fr "fn99-1.0"; }; }
| test -d "fn99-1.0" || mkdir "fn99-1.0"
| cp: 8???: A file or directory in the path name does not exist.
| make: 1254-004 The error code from the last command is 1.
I finally got myself to look at this a bit, and playing around with
various directory depths and whether there are files in them, I can only
come to the conclusion that this system's cp -R is simply unusable as it
corrupts its memory depending on the source tree layout. I've even got
it to dump core.
Any reasons against these two patches, for Autoconf master and Automake
maint?
It might be possible to rework the distdir rule to use maybe
tar cBf - files | (cd $(distdir) && tar xf -)
but that opens up its own set of problems (are ACLs copied? is the
sub-second time stamp handling the same as that of cp?) I'm not eager
to pursue this unless we see a real-life bug report from somebody who
needs it to work on AIX.
Thanks,
Ralf
docs: do not use AIX 5.3 cp -R.
* doc/autoconf.texi (Limitations of Usual Tools): Document one
instance of the cp -R bug on AIX 5.3. This seems to have been
fixed in 6.1 and newer releases.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4cb3a8c..eee4ba7 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -18065,7 +18065,16 @@ Avoid the @option{-r} option, since Posix 1003.1-2004
marks it as
obsolescent and its behavior on special files is implementation-defined.
Use @option{-R} instead. On GNU hosts the two options
are equivalent, but on Solaris hosts (for example) @code{cp -r}
-reads from pipes instead of replicating them.
+reads from pipes instead of replicating them. AIX 5.3 @code{cp -R} may
+corrupt its own memory with some directory hierarchies and error out or
+dump core:
+
address@hidden
address@hidden -p 12345678/12345678/12345678/12345678}
address@hidden 12345678/12345678/x}
address@hidden -R 12345678 t}
+cp: 0653-440 12345678/12345678/: name too long.
address@hidden example
Some @command{cp} implementations (e.g., BSD/OS 4.2) do not allow
trailing slashes at the end of nonexistent destination directories. To
tests: avoid fn99*.test failures due to buggy AIX 5.3 cp -R.
* tests/fn99.test, tests/fn99subdir.test: Skip if an initial
`cp -R' of the subdir tree already fails; AIX 5.3 cp messes
up its internal memory when copying this tree.
diff --git a/tests/fn99.test b/tests/fn99.test
index e80d09f..c2afd2e 100755
--- a/tests/fn99.test
+++ b/tests/fn99.test
@@ -32,6 +32,9 @@ do
touch x
done) || Exit 77
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R 12345678 t || Exit 77
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test
index 0f05b5a..a040e58 100755
--- a/tests/fn99subdir.test
+++ b/tests/fn99subdir.test
@@ -53,6 +53,9 @@ do
touch x
done)
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R ${subdirname} t || Exit 77
+
for init_dir in ${subdirname} .; do
(
cd ${init_dir} || Exit 1
- avoid buggy AIX 5.3 cp -R.,
Ralf Wildenhues <=