From: Gary V. Vaughan Date: Fri, 19 Nov 2004 16:58:49 +0000 (+0000) Subject: * config/m4general.m4sh, config/mailnotify.m4sh, X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05c758aaac54208affcc905aed4215d9a8b7c1a6;p=thirdparty%2Flibtool.git * config/m4general.m4sh, config/mailnotify.m4sh, clcommit.m4sh: Updated from cvs-utils--tla--1.0 to allow parallel commits, and use safer tmpfiles. --- diff --git a/ChangeLog b/ChangeLog index 301d1e469..3cdc25349 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,21 +1,27 @@ -2004-11-19 Ralf Wildenhues +2004-11-19 Gary V. Vaughan + + * config/m4general.m4sh, config/mailnotify.m4sh, + clcommit.m4sh: Updated from cvs-utils--tla--1.0 to allow + parallel commits, and use safer tmpfiles. + +2004-11-19 Ralf Wildenhues * doc/libtool.texi (Libltdl interface): Typos. * doc/libtool.texi (Libltdl interface): Document public macros LT_PATHSEP_CHAR, LT_DIRSEP_CHAR, use in path descriptions. -2004-11-18 Daniel Reed +2004-11-18 Daniel Reed * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [linux]: Interpret `include' statements in toplevel ld.so.conf file. -2004-11-18 Ralf Wildenhues +2004-11-18 Ralf Wildenhues * m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin/mingw/pw32]: tag-protect setting of ld_shlibs. -2004-11-17 Ralf Wildenhues +2004-11-17 Ralf Wildenhues * doc/libtool.texi (Libltdl interface): The path separator is system-dependent. @@ -26,7 +32,7 @@ [aix4/aix5 !ia64]: Set whole_archive_flag_spec to '$convenience' so convenience libs are really added to the link cmdline. -2004-11-17 Mats Rynge +2004-11-17 Mats Rynge * libtool.m4 [linux]: Use only the CC basename in case statment when checking for icc/ecc. Allows for setting CC to the full path diff --git a/clcommit.m4sh b/clcommit.m4sh index 386c82274..ae2cb801e 100644 --- a/clcommit.m4sh +++ b/clcommit.m4sh @@ -103,10 +103,10 @@ exit_cmd=: # Locations for important files: signature_file= -log_file="${TMPDIR-/tmp}/$progname-$$" +log_dir="`func_mktempdir`" +log_file="$log_dir/log" -$RM "${TMPDIR-/tmp}/$progname"* -trap '$RM "${log_file}"*; exit $EXIT_FAILURE' 1 2 15 +trap '$RM -r "$log_dir"; exit $EXIT_FAILURE' 1 2 15 set -e @@ -417,7 +417,7 @@ func_commit () # func_mailnotify func_mailnotify () { - notify_file="${log_file}.2" + notify_file="${log_dir}/notify" func_verbose "Mailing commit notification to $sendmail_to" { @@ -493,7 +493,7 @@ func_mailnotify () func_mailnotify fi - $RM "${log_file}"* + $RM -r "$log_dir" } exit $EXIT_SUCCESS diff --git a/config/general.m4sh b/config/general.m4sh index c00500719..23880ccdf 100644 --- a/config/general.m4sh +++ b/config/general.m4sh @@ -227,12 +227,13 @@ func_mkdir_p () } -# func_mktempdir +# func_mktempdir [string] # Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/libtool" + my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode diff --git a/config/mailnotify.m4sh b/config/mailnotify.m4sh index 539cbe268..461d17f75 100644 --- a/config/mailnotify.m4sh +++ b/config/mailnotify.m4sh @@ -58,7 +58,6 @@ m4_divert_push([SCRIPT])#!/bin/sh # Report bugs to -: ${TMPDIR=/tmp} : ${HOST=`hostname`} : ${SENDMAIL=sendmail} @@ -330,8 +329,9 @@ func_sendmail () ## ----- ## { - fname="${TMPDIR}/$PROGRAM$RANDOM-$RANDOM.$$" - trap 'rm -f "$fname"; exit 1' 1 2 15 + tmp_dir="`func_mktempdir`" + fname="$tmp_dir/mail" + trap '$RM -r "$tmp_dir"; exit $EXIT_FAILURE' 1 2 15 # Generate a comma separated list of destination addresses for the # mail headers: @@ -372,6 +372,8 @@ func_sendmail () else mv $fname $outputfile || exit $EXIT_FAILURE fi + + $RM -r "$tmp_dir" } exit $EXIT_SUCCESS