autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set owner/group on FreeBSD


From: Akim Demaille
Subject: Re: set owner/group on FreeBSD
Date: 27 Sep 2002 10:19:57 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

I'm installing the following patch.  Thanks!

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * 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            address@hidden
 Axel Thimm                  address@hidden
 Ben Elliston                address@hidden
+Bill Moseley                address@hidden
 Bill Sommerfeld             address@hidden
 Bob Friesenhahn             address@hidden
 Bob Proulx                  address@hidden
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 <address@hidden>.
 #
@@ -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:
+
address@hidden
+$ @kbd{touch /tmp/foo}
+$ @kbd{mv /tmp/foo .}
address@hidden: ./foo: set owner/group (was: 3830/0): Operation not permitted
+$ @kbd{echo $?}
+0
+$ @kbd{ls foo}
+foo
address@hidden example
+
address@hidden
+This behavior conforms to @acronym{POSIX}:
+
address@hidden
+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.''
address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]