diff --git a/cde/admin/BuildTools/master_build/ListTheTree b/cde/admin/BuildTools/master_build/ListTheTree deleted file mode 100755 index 04aaed357..000000000 --- a/cde/admin/BuildTools/master_build/ListTheTree +++ /dev/null @@ -1,144 +0,0 @@ -#! /usr/local/bin/perl - -eval "exec /usr/local/bin/perl -S $0 $*" - if $running_under_some_shell; - -################################################################################ -# -# File: ListTheTree -# RCS: $XConsortium: ListTheTree /main/3 1995/10/30 13:43:24 rswiston $ -# Author: Jim Andreas Hewlett-Packard, OSSD-CV -# Created: 1/15/92 -# Modified by: Marc Ayotte Hewlett-Packard, OSSD-CV (perlizer) -# Language: N/A -# Package: N/A -# Status: CDE distributed -# -# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved. -# -# Description: This file does 2 things: -# 1) List the source tree's structure. -# This structure is placed into the source tree's -# directory as :TreeListing. -# 2) Creates a listing of all of the files locked in the -# source tree and places it in :TreeListing.locks. -################################################################################ - -if ($ARGV[0]) { - $TREE = $ARGV[0]; - # - # if not / relative get pwd path - # - if ($TREE !~ m%^\/%) { - print STDERR " Must be a / related path e.g -> /foo. Sorry!\n"; - exit 1; - } -} -else { - die " USAGE ListTheTree \n"; -} - -# put /usr/local/bin in the path for Rcslocks -$ENV{'PATH'} = "/x/cdesrc/admin/bin:/usr/local/bin:$ENV{'PATH'}"; - -if (! chdir("$TREE")) { - die " ERROR -> Couldn't change directory to $TREE.\n"; -} - -###################### -# get the tree listing -###################### -system ("find . -print > :TreeListing.new"); -unlink(":TreeListing"); -if (! rename(":TreeListing.new",":TreeListing")) { - print " WARNING -> couldn't mv :TreeListing.new to :TreeListing.\n"; -} - - -################################### -# find the locked files in the tree -################################### -unlink(":TreeListing.locks.new"); -open(NLOCK,">>$TREE/:TreeListing.locks.new"); -print NLOCK "List of locked files in $TREE\n\n"; -@dirs=(`find . -type d -print`); - -foreach $dir (@dirs) { - undef(@rcsLocks); - chop($dir); - if (chdir("$dir")) { - @rcsLocks = (`Rcslocks -v`); - # only list directory if there are locks - if (@rcsLocks) { - print NLOCK "$dir\n"; - while (@rcsLocks) { - $lock = shift(@rcsLocks); - print NLOCK " $lock"; - } - print NLOCK "\n"; - } - } - else { - print " WARNING -> could not cd to ${TREE}/${dir}\n"; - print " $!\n"; - } - chdir("$TREE"); -} - -unlink("$TREE/:TreeListing.locks"); -rename("$TREE/:TreeListing.locks.new","$TREE/:TreeListing.locks"); - - -# -# get changes from last listing -# check file $TREE/changestamp -# -$cstamp = "${TREE}/changestamp"; -if ( -f "${TREE}/changestamp" ) { - $laststamp = `cat $cstamp`; - chop $laststamp; -} -else { - $date = `date +%y%m%d`; - chop $date; - $laststamp = "${date}0001"; - $dip = `echo "$laststamp" >$cstamp`; - $date = `date +%m%d0001`; - chop $date; - system "touch $date $cstamp"; -} -$curstamp = `date +%y%m%d%H%M`; -chop $curstamp; - -unlink("$TREE/:TreeListing.changes.new"); -open(NCHANGE,">>$TREE/:TreeListing.changes.new"); -print NCHANGE "List of changed files in $TREE\n\n"; -@allfiles=(`find . -follow -name "*,v" -newer $cstamp -print`); -foreach $file (@allfiles) { - chop $file; - if (open($RCSFILE,"$file")) { - NEXTLINE: - while ($line = <$RCSFILE>) { - chop $line; - if ($line !~ m%^date%) { - next NEXTLINE; - } - else { - $lastdate = $line; - $author = $line; - $lastdate =~ s%^.* (\d+\.\d+\.\d+\.\d+\.\d+).*$%\1%; - $lastdate =~ s%\.%%g; - if ($lastdate > $laststamp) { - $author =~ s%^.*author (.*); .*;$%\1%; - print NCHANGE "$file <-> $author\n"; - } - } - } - close($RCSFILE); - } -} - -$dip = `echo "$curstamp" >$cstamp`; - -unlink("$TREE/:TreeListing.changes"); -rename("$TREE/:TreeListing.changes.new","$TREE/:TreeListing.changes"); diff --git a/cde/admin/BuildTools/master_build/builds b/cde/admin/BuildTools/master_build/builds deleted file mode 100644 index 733f6088e..000000000 --- a/cde/admin/BuildTools/master_build/builds +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/ksh - -TMPFILE=/tmp/xxIIee$$ -TMPFILE300=${TMPFILE}300 -TMPFILE700=${TMPFILE}700 -TMPFILEOTHER=${TMPFILE}OTHER -TMPFILEEMPTY=${TMPFILE}EMPTY - -if (( $# < 1 )) -then - PWDIR=`/bin/pwd` - DATEDIR=`basename $PWDIR` - DIR=/x/logs/build/$DATEDIR -else - DIR=/x/logs/build/$1 -fi - - -echo >$TMPFILEEMPTY -echo >>$TMPFILEEMPTY -echo >>$TMPFILEEMPTY - -echo "300 Build Machines in $DIR" > $TMPFILE300 -echo >> $TMPFILE300 - -echo "700 Build Machines in $DIR" > $TMPFILE700 -echo >> $TMPFILE700 - -echo "Other Build Machines in $DIR" > $TMPFILEOTHER -echo >> $TMPFILEOTHER - - -find $DIR -name summar\* -exec grep master_build {} \; > $TMPFILE - - - -grep 300 $TMPFILE | sort -k 6,6 >> $TMPFILE300 - -grep 700 $TMPFILE | sort -k 6,6 >> $TMPFILE700 - -grep -v 300 $TMPFILE | grep -v 700 | sort -k 6,6 >> $TMPFILEOTHER - -cat $TMPFILE700 $TMPFILEEMPTY $TMPFILEOTHER $TMPFILEEMPTY $TMPFILE300 - - - - rm $TMPFILE - rm $TMPFILE300 - rm $TMPFILE700 - rm $TMPFILEOTHER - rm $TMPFILEEMPTY - - - diff --git a/cde/admin/BuildTools/master_build/cleanLinks b/cde/admin/BuildTools/master_build/cleanLinks deleted file mode 100755 index 416981e49..000000000 --- a/cde/admin/BuildTools/master_build/cleanLinks +++ /dev/null @@ -1,121 +0,0 @@ -#! /usr/local/bin/perl - -eval "exec /usr/local/bin/perl -S $0 $*" - if $running_under_some_shell; - -################################################################################ -# -# File: cleanLinks -# RCS: $XConsortium: cleanLinks /main/3 1995/10/30 13:43:35 rswiston $ -# Author: Marc Ayotte Hewlett-Packard, OSSD-CV -# Created: Sun Jul 4 17:57:13 PDT 1993 -# Language: perl -# Package: N/A -# Status: CDE distributed -# -# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved. -# -# Usage: cleanLinks -# -# Description: This script removes symbolic links to nowhere in -# . It does not remove anything with RCS -# in its path. -# -################################################################################ -if ($ARGV[0]) { - $TREE = $ARGV[0]; -} -else { - die " USAGE CleanLinks \n"; -} - -if (! chdir("$TREE")) { - die " ERROR -> Couldn't change directory to $TREE.\n"; -} - -####################################################### -# define local subroutines -####################################################### -sub dokill { - die "\n left on INTR \n"; - exit 1; -} -######################################################## -# Catch signals -######################################################## -$SIG{'INT'} = 'dokill'; - - -############################## -# get the symlinks in the tree -############################## -if (! open(FIND,"find . -type d ! -type l -print|")) { - print STDERR " ERROR failure in open used for find.\n"; - die "You may have to contact your build administrator\n"; -} -# -# don't buffer find output -# -$| = 1; - -print "************ List of symlinks to nowhere removed **********\n"; - - -################################################################## -# go through the directories and examine each symlink. -# resolve the symlink and, if the file at the end doesn't exist, -# remove the original symlink. Don't do anything that ends in RCS. -################################################################## -FILE: -while ($new = ) { - chop $new; - if (! opendir(THISDIR,"$new")) { - print STDERR " WARNING -> could not process directory $new\n"; - next FILE; - } - else { - if (! chdir("$new")) { - print STDERR " WARNING -> could not change directory to $new\n"; - next FILE; - } - } - # remove . from $new path for cuteness of output - $new =~ s%^\.%%; - - @allfiles = grep(!/^\.\.?$/, readdir(THISDIR)); - foreach $file (@allfiles) { - if (( -l $file) && ($file !~ m%RCS$%) && (! -d $file)) { - # - # resolve the link - # - $tmp1file = $file; - $counter = 0; - while (defined($tmp2file = readlink($tmp1file))) { - $tmp1file = $tmp2file; - # - # watch for cyclic symlinks - # - if ($counter++ == 10) { - last; - } - } - # - # if last piece in resolved chain is not a file - # it is a symlink to nowhere -> remove - # - if ( ! -e $tmp1file) { # remove link to nowhere - if (unlink("$file")) { - print "removing ${TREE}${new}/${file}\n"; - } - else { - print STDERR " WARNING -> ${TREE}${new}/${file} -> could not remove\n"; - print "$!\n"; - } - } - } - } - closedir(THISDIR); - if (! chdir("$TREE")) { - die " ERROR -> Couldn't change directory to $TREE.\n"; - } -} diff --git a/cde/admin/BuildTools/master_build/cleanLogs b/cde/admin/BuildTools/master_build/cleanLogs deleted file mode 100755 index f60ca505c..000000000 --- a/cde/admin/BuildTools/master_build/cleanLogs +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/ksh - -# This script trims the number of files in the main build log directory -# It can also be used to trim other log files -# marca 2/7/90 -USAGE="cleanLogs [logdir] [number of logs left]" - -# defaults -LOGSLEFT=14 -LOGDIR=/x/logs/build -[ $# -gt 1 ] && LOGSLEFT=$2 -[ $# -gt 0 ] && LOGDIR=$1 - -#clean up the log files because dere be too many -echo "" -echo "***************************************" -echo "START Trimming log files" -cd $LOGDIR -LOGS=`ls -rt` -set -- $LOGS - -while [ $# -gt $LOGSLEFT ] -do - #eliminate last log file - echo "Trying to delete $1" - rm -rf $1 || echo "could not delete $1" - shift -done diff --git a/cde/admin/BuildTools/master_build/cleanfnr b/cde/admin/BuildTools/master_build/cleanfnr deleted file mode 100755 index afdbea75c..000000000 --- a/cde/admin/BuildTools/master_build/cleanfnr +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -# This script cleans the fnrclone, etc directories. - -for DIRS in `echo "fnrclone fnrnolink fnrnoRCS"` -do - CURRENT=$HOME/$DIRS - if [ -d $CURRENT ];then - echo "" - echo "In $CURRENT" - cd $CURRENT - LOGS=`ls -rt` - set -- $LOGS - - #check to see if you have at least 10 log and script files - while [ $# -gt 20 ] - do - echo $1 - rm -rf $1 || echo "could not delete $1" - shift - done - fi - echo "" -done diff --git a/cde/admin/BuildTools/master_build/cleansrctree b/cde/admin/BuildTools/master_build/cleansrctree deleted file mode 100755 index a0449ba4b..000000000 --- a/cde/admin/BuildTools/master_build/cleansrctree +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -# This script cleans a source tree of unwanted ,RCSnew* files -# created when you abort RCS. -# It also makes all the ,v files have group bin and owner bin --marca -# marca 2/7/90 - -USAGE="USAGE: cleansrctree " - -if [ $# -lt 1 ];then - echo "" - echo "$USAGE" - exit 1 -fi - -cd /$1 - -#change owner and group to bin -echo "FILES NOT OWNER BIN" -find . -name "*,v" ! -user bin -print -exec chown bin {} \; -find . -name "*,v" ! -group bin -print -exec chgrp bin {} \; -echo "FILES not 444" -find . -name "*,v" -perm 0440 -exec chmod +r {} \; -print -echo "" -echo "FILES NOT GROUP BIN" -echo "" -echo ",RCS FILES" -# eliminate , files -find . -name ",*" -print -exec rm -f {} \; diff --git a/cde/admin/BuildTools/master_build/cron_example b/cde/admin/BuildTools/master_build/cron_example deleted file mode 100644 index 73ced8737..000000000 --- a/cde/admin/BuildTools/master_build/cron_example +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################ -# -# RCS: $XConsortium: cron_example /main/3 1995/10/30 13:43:46 rswiston $ -# Author: Marc Ayotte, Hewlett-Packard OSSD-CV -# Created: Tue Jun 29 10:12:15 PDT 1993 -# Language: N/A -# Package: N/A -# Status: CDE -# -# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved. -# -# Description: This file is an example cron script which triggers -# builds and does normal tree maintenance. The various functions -# are delimited by the letters #[A-Z]). -# A) fnrclone can leave 2 files each time it executes: -# The file ${HOME}/fnrclone/log.hhmmss and script.hhmmss. -# These files can pile up and they are cleaned out by the cleanfnr -# script. -# NOTE: In the very near future this will not be the default -# operation for fnrclone and this may no longer be necessary. -# B) By default, master_build puts its log files in the -# /x/logs/build/MMDD/${buildtreename} directory. The -# cleanLogs script trims these directories. -# C) The script ListTheTree creates a listing of all of the files in -# a tree and puts the list under the name :TreeListing in the top -# of the tree. -# D) An example of building the /x/cde_hp700_90 tree on the -# machine that is doing cron. -# E) An example of building the /x/cde_hp700d_90(debug) tree on a -# remote machine using remsh. -################################################################################ -#A) clean ${HOME}/fnrclone directory -4 11 * * * /x/cdesrc/admin/BuildTools/master_build/cleanfnr 1>/users/marca/xbuild/cleanfnr.log 2>&1 - -#B) clean excess build logs in /x/logs/build -4 19 * * * /x/cdesrc/admin/BuildTools/master_build/cleanLogs 1>/x/logs/cronlogs/cleanLogs.log 2>&1 - -#C) create a listing of the files in a tree and put into top of the tree. -# this also creates a listing of locked files -10 12 * * * /x/cdesrc/admin/BuildTools/master_build/ListTheTree /x/cdesrc 1>/x/logs/cronlogs/ListTheTreecdesrc.log 2>&1 - -#D) build the hp tree putting the log files in the default location. -# the source tree is /x/cdesrc; the build tree is /x/cde_hp700_90. -# This entry will first do an fnrclone -s /x/cdesrc /x/cde_hp700_90 -# to sync up the build tree's links to the source (-clone s). -# The log and error files from the clone will go into -# /x/logs/build/mmdd/cde_hp700_90/clonelog.HHMMSS -# /x/logs/build/mmdd/cde_hp700_90/cloneerr.HHMMSS -# It uses -c to do all of the normal imake functions: -# make -i Makefile; make -i Makefiles;make -i includes;make -i -# depend and make -i. -# The log files for make -i will go in -# /x/logs/build/mmdd/cde_hp700_90/make.HHMMSS. -# The log files for all other operations will go in -# /x/logs/build/mmdd/cde_hp700_90/allmake.HHMMSS. -# The second entry uses -w to "clean the tree": remove all .o's, .a's, -# executables etc. Normally we make clean once a week on Saturday night. -# The -cl option will remove symbolic links to nowhere. -# The -m option will mail notification to someone when the build -# is complete. -############ cde_hp700_90 - LOCAL ############## -6 22 * * 0,1,2,3,4,5 /x/cdesrc/admin/BuildTools/master_build/master_build -src /x/cdesrc -build /x/cde_hp700_90 -clone s -cl -c -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1 -6 22 * * 6 /x/cdesrc/admin/BuildTools/master_build/master_build -src /x/cdesrc -build /x/cde_hp700_90 -clone s -cl -c -w -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1 - - -#E) build the debug tree on hpcvusj -############ cde_hp700d_90 - HPCVUSJ ############## -10 22 * * 0,1,2,3,4,5 /x/cdesrc/admin/BuildTools/master_build/remote_build hpcvusj -src /x/cdesrc -build /x/cde_hp700d_90 -clone s -cl -c -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1 -10 22 * * 6 /x/cdesrc/admin/BuildTools/master_build/remote_build hpcvusj -src /x/cdesrc -build /x/cde_hp700d_90 -clone s -cl -c -w -m buildwatch@hpcvlx 1>/x/logs/cronlogs/r5s700.log 2>&1 diff --git a/cde/admin/BuildTools/master_build/fixSourceDirPerm b/cde/admin/BuildTools/master_build/fixSourceDirPerm deleted file mode 100755 index ac542a943..000000000 --- a/cde/admin/BuildTools/master_build/fixSourceDirPerm +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# -# this script make sure that all dirs in /x80src are -# owned by xbuild, and that all directories have permissions -# of 755. -# -# - jim andreas 10/91 -# -# modified to be more general by Marc Ayotte 11/92 - -doUsage() -{ - cat << eof - - USAGE: fixSourceDirPerm - - Note: if owner != bin, files and directories owned by bin - will NOT be changed to owner. - -eof -} - -if [ $# -lt 3 ];then - doUsage; - exit 1 -fi - -cd $1 || doUsage - -# Some dirs in the build trees have to be owned by bin (rcs_tools) -# if bin is not the chosen group, don't change files that are already bin -if [ "$2" != "bin" ];then - DontDoBin="! -user bin" -fi - -# change ownership of non-conforming dirs -# -echo "DIRS not owned by $2" -find . -type d ! -path "*RCS*" ! -path "*/CRT*" ! -user $2 $DontDoBin -print -exec chown $2 {} \; -exec chgrp $3 {} \; - -# chmod mode of non-conforming dirs -# -echo "DIRS not 755 permission by $2" -find . -type d -user $2 ! -path "*/CRT*" $DontDoBin ! -perm 755 -print -exec chmod 755 {} \; - -# chown mode of non-conforming files -# -echo "FILES not owned by $2" -find . -type f ! -path "*RCS*" ! -path "*/CRT*" ! -user $2 $DontDoBin -print -exec chown $2 {} \; -exec chgrp $3 {} \; diff --git a/cde/admin/BuildTools/master_build/manageBInstallDirs b/cde/admin/BuildTools/master_build/manageBInstallDirs deleted file mode 100755 index 240924a3f..000000000 --- a/cde/admin/BuildTools/master_build/manageBInstallDirs +++ /dev/null @@ -1,89 +0,0 @@ -#! /usr/local/bin/perl - -eval "exec /usr/local/bin/perl -S $0 $*" - if $running_under_some_shell; - -################################################################################ -# -# File: manageBInstallDirs -# RCS: $XConsortium: manageBInstallDirs /main/3 1995/10/30 13:43:53 rswiston $ -# Author: Marc Ayotte Hewlett-Packard, OSSD-CV -# Created: Thu Dec 30 14:02:31 PST 1993 -# Language: perl -# Package: N/A -# Status: CDE distributed -# -# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved. -# -# Usage: manageBInstallDirs [#dirsleft] -# -# Description: This script removes excessive binstall directories of -# the type parentdir/mm_dd (month day). -# It also symbolically links the most recent subdirectory -# to parentdir/latest. -# -################################################################################ -if ($ARGV[1]) { - $tree = $ARGV[0]; - $latestSubdir = $ARGV[1]; -} -else { - die "USAGE manageBInstallDirs [# dirsleft]\n"; -} - -if (! chdir("$tree")) { - die " ERROR -> Couldn't change directory to $tree.\n"; -} - -if ($ARGV[2]) { - $numDirsLeft = $ARGV[2]; -} -else { - $numDirsLeft = 7; -} - -####################################################### -# define local subroutines -####################################################### -sub dokill { - die "\n left on INTR \n"; - exit 1; -} -######################################################## -# Catch signals -######################################################## -$SIG{'INT'} = 'dokill'; - - -################################################## -# get the mm_dd directories in oldest first order. -# remove the oldest if there are more than minimum. -################################################## -@allDirs = (`ls -t`); -$counter = 0; -foreach $dir (@allDirs){ - chop $dir; - $_ = $dir; - if (m%^[0-9][0-9]_[0-9][0-9]$% && -d $dir) { - if ($counter++ >= $numDirsLeft) { - print "removing $tree/$dir\n"; - system "rm -rf $dir"; - } - } -} - - -############################ -# link latestSubdir to latest -############################ -if (-l "latest") { - print "linking $latestSubdir to \"latest\"\n"; - system "rm -f latest"; - system "ln -s -f $latestSubdir latest"; -} -elsif(-d "latest") { - print "Error - directory \"latest\" is a real directory"; -} -else { # create link - system "ln -s -f $latestSubdir latest"; -} diff --git a/cde/admin/BuildTools/master_build/master_build b/cde/admin/BuildTools/master_build/master_build deleted file mode 100755 index a46855cb8..000000000 --- a/cde/admin/BuildTools/master_build/master_build +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/ksh -################################################################################ -# -# File: master_build -# RCS: $XConsortium: master_build /main/14 1996/07/18 14:17:16 drk $ -# Author: Marc Ayotte Hewlett-Packard, OSSD-CV -# Created: 2/6/90 -# Modified by: Jim Andreas, Fred Handloser, Marc Ayotte, Ron Voll -# and others from Hewlett-Packard, OSSD-CV -# Language: N/A -# Package: N/A -# Status: CDE distributed -# -# (c) Copyright 1993, Hewlett-Packard Company, all rights reserved. -# -# Description: This file controls the building and cloning of -# of source and build trees. Look at the file cron.example -# and the usage information below for examples of how -# to use this script. There is also a man page -# master_build.1 -################################################################################ - - -################################################################################ -function DoUsage # -################################################################################ -{ - if [ -n $1 ]; then - echo "unrecognized option: $1" - echo - fi - - cat< ] (source directory e.g. /proj/cde, /proj/x11) - [ -build (build dir. as in /proj/cde, /proj/x11) - [ -clone