]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Limitations of Usual Tools): Some about mv
authorAkim Demaille <akim@epita.fr>
Fri, 27 Sep 2002 08:20:26 +0000 (08:20 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 27 Sep 2002 08:20:26 +0000 (08:20 +0000)
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.

ChangeLog
NEWS
THANKS
configure
doc/autoconf.texi
lib/autoconf/status.m4
lib/m4sugar/m4sh.m4

index cee416e7335da0be766dd3e0178965db6ea4e9fb..f8dbf43aabc59e9b5041b781b2a0e5059ef05346 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
diff --git a/NEWS b/NEWS
index de6cd09b48c206118bf3581e218f18219d9179b8..bc555e81a554bada340a4bebf9280b9eae246d18 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/THANKS b/THANKS
index 9b9541462dd38a89923f51e57d6dba51088d3ea4..e39c389f2d4ae81c4288926cb4c901d4e3958ab9 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -22,6 +22,7 @@ Artur Frysiak               wiget@pld.org.pl
 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
index 7f6baa4af93b52dd066172afc1d4accf6c4da600..da33d2c63a3cc282395827351bb704029dea9434 100755 (executable)
--- a/configure
+++ b/configure
@@ -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 <bug-autoconf@gnu.org>.
 #
@@ -854,7 +854,7 @@ test -n "$ac_init_help" && exit 0
 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 @@ This file contains any messages produced by compilers while
 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 @@ _ASBOX
 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 @@ _ACEOF
 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 @@ if $ac_need_defaults; then
   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 @@ $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; }
 }
 
index d8ee7f86814bd83d8b3cdf9f4e3a5c3d25f7f23d..4931f8fc017e9f43a1264866df5442b427525c33 100644 (file)
@@ -10198,7 +10198,6 @@ None of @command{mkdir}'s options are portable.  Instead of
 @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}
@@ -10210,6 +10209,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 25f367604b5adf693096bbddcf54dec8ab12ca9c..61d97b53ab64fc593f6446bb67fc75f6f092fe18 100644 (file)
@@ -1516,7 +1516,10 @@ m4_ifset([AC_LIST_COMMANDS],
 ])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 fa2994a56a3c32c8ed261ed88df7f9fe3189769d..3da6ab47dad0dedec3d042b20c49a136533110af 100644 (file)
@@ -789,11 +789,11 @@ m4_define([AS_LITERAL_IF],
            [$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 @@ $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