from /tmp.
Thanks to Bill Moseley and Paul Eggert.
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): $2 is the directory into which
the tmpdir must be created.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Have the tmp
dir be in the build tree, instead of $TMPDIR.
+2002-09-27 Akim Demaille <akim@epita.fr>
+
+ * doc/autoconf.texi (Limitations of Usual Tools): Some about mv
+ from /tmp.
+ Thanks to Bill Moseley and Paul Eggert.
+ * lib/m4sugar/m4sh.m4 (AS_TMPDIR): $2 is the directory into which
+ the tmpdir must be created.
+ * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Have the tmp
+ dir be in the build tree, instead of $TMPDIR.
+
2002-09-27 Akim Demaille <akim@epita.fr>
* bin/autoscan.in: Improve the comments.
- Portability of the Autoconf package to Solaris.
+- Spurious warnings caused by config.status.
+ This bug is benign, but painful: on some systems (typically
+ FreeBSD), warnings such as:
+
+ config.status: creating Makefile
+ mv: Makefile: set owner/group (was: 1357/0): Operation not permitted
+
+ could be issued. This is fixed.
+
* Major changes in Autoconf 2.54
Released September 13th, 2002.
Assar Westerlund assar@sics.se
Axel Thimm Axel.Thimm@physik.fu-berlin.de
Ben Elliston bje@redhat.com
+Bill Moseley moseley@hank.org
Bill Sommerfeld sommerfeld@apollo.hp.com
Bob Friesenhahn bfriesen@simple.dallas.tx.us
Bob Proulx bob@proulx.com
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.54 for GNU Autoconf 2.54a.
+# Generated by GNU Autoconf 2.54a for GNU Autoconf 2.54a.
#
# Report bugs to <bug-autoconf@gnu.org>.
#
if $ac_init_version; then
cat <<\_ACEOF
GNU Autoconf configure 2.54a
-generated by GNU Autoconf 2.54
+generated by GNU Autoconf 2.54a
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Autoconf $as_me 2.54a, which was
-generated by GNU Autoconf 2.54. Invocation command line was
+generated by GNU Autoconf 2.54a. Invocation command line was
$ $0 $@
cat >&5 <<_CSEOF
This file was extended by GNU Autoconf $as_me 2.54a, which was
-generated by GNU Autoconf 2.54. Invocation command line was
+generated by GNU Autoconf 2.54a. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
GNU Autoconf config.status 2.54a
-configured by $0, generated by GNU Autoconf 2.54,
+configured by $0, generated by GNU Autoconf 2.54a,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
@samp{mkdir -p @var{filename}}, you should use use
@code{AS_MKDIR_P(@var{filename})} (@pxref{Programming in M4sh}).
-
@item @command{mv}
@c ---------------
@prindex @command{mv}
a critical section where neither the old nor the new version of
@file{existing} actually exists.
+Be aware that moving files from @file{/tmp} can sometimes cause
+undesirable (but perfectly valid) warnings, even if you created these
+files. On some systems, creating the file in @file{/tmp} is setting a
+guid @code{wheel} which you may not be part of. So the file is copied,
+and then the @code{chgrp} fails:
+
+@example
+$ @kbd{touch /tmp/foo}
+$ @kbd{mv /tmp/foo .}
+@error{}mv: ./foo: set owner/group (was: 3830/0): Operation not permitted
+$ @kbd{echo $?}
+0
+$ @kbd{ls foo}
+foo
+@end example
+
+@noindent
+This behavior conforms to @acronym{POSIX}:
+
+@quotation
+If the duplication of the file characteristics fails for any reason, mv
+shall write a diagnostic message to standard error, but this failure
+shall not cause mv to modify its exit status.''
+@end quotation
+
Moving directories across mount points is not portable, use @command{cp}
and @command{rm}.
])dnl
fi
-AS_TMPDIR(cs)
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+AS_TMPDIR([confstat], [.])
_ACEOF
])[]dnl m4_ifval
[$3], [$2])])
-# AS_TMPDIR(PREFIX)
-# -----------------
-# Create as safely as possible a temporary directory which name is
-# inspired by PREFIX (should be 2-4 chars max), and set trap
-# mechanisms to remove it.
+# AS_TMPDIR(PREFIX, [DIRECTORY = $TMPDIR [= /tmp]])
+# -------------------------------------------------
+# Create as safely as possible a temporary directory in DIRECTORY
+# which name is inspired by PREFIX (should be 2-4 chars max), and set
+# trap mechanisms to remove it.
m4_define([AS_TMPDIR],
[# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+m4_if([$2], [], [: ${TMPDIR=/tmp}])
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/$1XXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "m4_default([$2], [$TMPDIR])/$1XXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/$1$$-$RANDOM
+ tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in m4_default([$2], [$TMPDIR])" >&2
AS_EXIT
}dnl
])# AS_TMPDIR