I'm installing the following patch. Thanks! Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]>
* 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. Index: NEWS =================================================================== RCS file: /cvsroot/autoconf/autoconf/NEWS,v retrieving revision 1.259 diff -u -u -r1.259 NEWS --- NEWS 26 Sep 2002 11:57:28 -0000 1.259 +++ NEWS 27 Sep 2002 08:18:48 -0000 @@ -5,6 +5,15 @@ - 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. Index: THANKS =================================================================== RCS file: /cvsroot/autoconf/autoconf/THANKS,v retrieving revision 1.95 diff -u -u -r1.95 THANKS --- THANKS 13 Sep 2002 06:59:56 -0000 1.95 +++ THANKS 27 Sep 2002 08:18:49 -0000 @@ -22,6 +22,7 @@ Assar Westerlund [EMAIL PROTECTED] Axel Thimm [EMAIL PROTECTED] Ben Elliston [EMAIL PROTECTED] +Bill Moseley [EMAIL PROTECTED] Bill Sommerfeld [EMAIL PROTECTED] Bob Friesenhahn [EMAIL PROTECTED] Bob Proulx [EMAIL PROTECTED] Index: configure =================================================================== RCS file: /cvsroot/autoconf/autoconf/configure,v retrieving revision 1.221 diff -u -u -r1.221 configure --- configure 13 Sep 2002 10:21:07 -0000 1.221 +++ configure 27 Sep 2002 08:18:51 -0000 @@ -1,6 +1,6 @@ #! /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 <[EMAIL PROTECTED]>. # @@ -854,7 +854,7 @@ 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. @@ -869,7 +869,7 @@ 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 $@ @@ -2287,7 +2287,7 @@ 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 @@ -2344,7 +2344,7 @@ 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 @@ -2470,6 +2470,9 @@ 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 || { @@ -2478,17 +2481,17 @@ } # 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; } } Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.681 diff -u -u -r1.681 autoconf.texi --- doc/autoconf.texi 26 Sep 2002 15:47:56 -0000 1.681 +++ doc/autoconf.texi 27 Sep 2002 08:19:08 -0000 @@ -10198,7 +10198,6 @@ @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} @@ -10209,6 +10208,31 @@ but it is not always atomic: when doing @samp{mv new existing}, there's 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}. Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.29 diff -u -u -r1.29 status.m4 --- lib/autoconf/status.m4 18 Jul 2002 11:57:32 -0000 1.29 +++ lib/autoconf/status.m4 27 Sep 2002 08:19:10 -0000 @@ -1516,7 +1516,10 @@ ])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 Index: lib/m4sugar/m4sh.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v retrieving revision 1.87 diff -u -u -r1.87 m4sh.m4 --- lib/m4sugar/m4sh.m4 1 Sep 2002 08:24:04 -0000 1.87 +++ lib/m4sugar/m4sh.m4 27 Sep 2002 08:19:10 -0000 @@ -789,11 +789,11 @@ [$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 || @@ -803,17 +803,17 @@ } # 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