e69db257480ddc4aae24ca6ae0130c9450abc362
hiram
  Mon Oct 28 14:07:47 2024 -0700
do not use /dev/shm as a temporary directory refs #34685

diff --git src/hg/utils/automation/HgAutomate.pm src/hg/utils/automation/HgAutomate.pm
index 404429a..b4dc82e 100755
--- src/hg/utils/automation/HgAutomate.pm
+++ src/hg/utils/automation/HgAutomate.pm
@@ -565,51 +565,30 @@
 
 $setMachtype = "setenv MACHTYPE `uname -m | sed -e 's/i686/i386/;'`";
 
 #########################################################################
 # General utility subroutines:
 
 ### decide on an appropriate temporary directory
 sub tmpDir {
   my $tDir="/tmp";	# default, most likely overridden
   if (defined($ENV{'TMPDIR'}) && -d $ENV{'TMPDIR'} && -w "$ENV{'TMPDIR'}") {	# TMPDIR above all else
     $tDir = $ENV{'TMPDIR'};
   } elsif ( -d "/data/tmp" && -w "/data/tmp" ) {	# UCSC local file system
     $tDir = "/data/tmp";
   } elsif ( -d "/scratch/tmp" && -w "/scratch/tmp" ) {	# UCSC cluster node local file system
     $tDir = "/scratch/tmp";
-  } else {
-    my $tmpSz = `df --output=avail -k /tmp | tail -1`;
-    my $shmSz = `df --output=avail -k /dev/shm | tail -1`;
-    chomp ($tmpSz, $shmSz);
-    if ( $shmSz > $tmpSz ) {	# use /dev/shm when it is the larger one
-       my $shmTmp = "/dev/shm/tmp";
-       my $saveUmask = umask(0000);	# do not allow user's umask to interfere
-       if (! mkdir($shmTmp, 0777)) {
-          my $errString = $!;
-          if ($errString =~ /File exists/i) {	# this error OK
-            if ( -w "${shmTmp}" ) {	# use only when writable
-                $tDir = $shmTmp;
-            }
-          }	# mkdir other errors cause use of default
-       } else {				# no error on the mkdir
-          if ( -w "${shmTmp}" ) {	# use only when writable
-            $tDir = $shmTmp;
-          }
-       }
-       umask($saveUmask);	# restore
-    }
   }
 return $tDir;
 }
 
 sub checkCleanSlate {
   # Exit with an error message if it looks like this step has already been run
   # based on the existence of the given file(s) or directory(ies).
   my ($step, $nextStep, @files) = @_;
   confess "Must have at least 3 arguments" if (scalar(@_) < 3);
   confess "undef input" if (! defined $step || ! defined $nextStep);
   my $problem = 0;
   foreach my $f (@files) {
     confess "undef input" if (! defined $f);
     if (-e $f) {
       warn "$step: looks like this was run successfully already " .