nightly.sh revision 8cca05f603f260c0af8a0163734d0f0d3d3ffe89
2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A# Use is subject to license terms. 2N/A# Based on the nightly script from the integration folks, 2N/A# Mostly modified and owned by mike_s. 2N/A# Changes also by kjc, dmk. 2N/A# BRINGOVER_WS may be specified in the env file. 2N/A# The default is the old behavior of CLONE_WS 2N/A# -i on the command line, means fast options, so when it's on the 2N/A# command line (only), lint and check builds are skipped no matter what 2N/A# the setting of their individual flags are in NIGHTLY_OPTIONS. 2N/A# LINTDIRS can be set in the env file, format is a list of: 2N/A# /dirname-to-run-lint-on flag 2N/A# Where flag is: y - enable lint noise diff output 2N/A# n - disable lint noise diff output # -A flag in NIGHTLY_OPTIONS checks ABI diffs in .so files # This option requires a couple of scripts. # OPTHOME and TEAMWARE may be set in the environment to override /opt # The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout # under certain circumstances, which can really screw things up; unset it. # Get the absolute path of the nightly script that the user invoked. This # may be a relative path, and we need to do this before changing directory. # Keep track of where we found nightly so we can invoke the matching # which_scm script. If that doesn't work, don't go guessing, just rely # on the $PATH settings, which will generally give us either /opt/onbld # or the user's workspace. # Print the tag string used to identify a build (e.g., "DEBUG # usage: tagstring debug-part open-part # Function to do a DEBUG and non-DEBUG build. Needed because we might # need to do another for the source build, and since we only deliver DEBUG or # usage: normal_build [-O] # -O OpenSolaris delivery build. Put the proto area and # (eventually) packages in -open directories. Use skeleton # closed binaries. Don't generate archives--that needs to be # done later, after we've generated the closed binaries. Also # skip the package build (until 6414822 is fixed). while getopts O FLAG $*; do # usage: run_hook HOOKNAME ARGS... # If variable "$HOOKNAME" is defined, insert a section header into # our logs and then run the command with ARGS # Let exit status propagate up # usage: filelist DESTDIR PATTERN # function to save off binaries after a full build for later # save off list of binaries echo "\n==== Saving binaries from build at `date` ====\n" | \ # usage: hybridize_files DESTDIR MAKE_TARGET echo "\n==== Hybridizing files at `date` ====\n" | \ sed -e "/^# HYBRID DELETE START/,/^# HYBRID DELETE END/d" \ # restore binaries into the proper source tree. # usage: restore_binaries DESTDIR MAKE_TARGET echo "\n==== Restoring binaries to ${MAKETARG} at `date` ====\n" | \ # rename files we save binaries of # usage: rename_files DESTDIR MAKE_TARGET echo "\n==== Renaming source files in ${MAKETARG} at `date` ====\n" | \ # Copy some or all of the source tree. # Returns 0 for success, non-zero for failure. # usage: copy_source CODEMGR_WS DESTDIR LABEL SRCROOT printf "\n==== Creating %s source from %s (%s) ====\n\n" \ sed -e 's,SCCS\/s.,,' | \ echo "Tree copy is not supported for workspace type" \ # Mercurial-specific copy code for copy_source(). Handles the # combined open and closed trees. # Returns 0 for success, non-zero for failure. # usage: copy_source_mercurial destdir srcroot printf "can't copy %s: closed tree not present.\n" \ # function to create (but not build) the export/crypt source tree. # usage: set_up_source_build CODEMGR_WS DESTDIR MAKE_TARGET # Sets SRC to the modified source tree, for use by the caller when it echo "\nCould not copy source tree for source build." | echo "making ${MAKETARG} in ${SRC}." >> $LOGFILE egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ echo "clearing state files." >> $LOGFILE if [ "${MAKETARG}" = "CRYPT_SRC" ]; then # make sure the files exist if [ "${MAKETARG}" = "EXPORT_SRC" ]; then # rename first, since we might restore a file # of the same name (mapfiles) echo "\n==== Creating ${MAKETARG}.cpio.Z ====\n" | \ if [ "${MAKETARG}" = "EXPORT_SRC" ]; then if [ "${MAKETARG}" = "CRYPT_SRC" ]; then # Return library search directive as function of given root. # Return header search directive as function of given root. # Wrapper over commands that generate BFU archives. The entire # command output gets written to LOGFILE, and any unexpected messages # are written to the mail message. Returns with the status of the echo "\n==== cpio archives build errors ($LABEL) ====\n" \ # Function to do the build, including cpio archive and package generation. # usage: build LABEL SUFFIX MULTIPROTO # - LABEL is used to tag build output. # - SUFFIX is used to distinguish files (e.g., debug vs non-debug). # - If MULTIPROTO is "yes", it means to name the proto area according to # SUFFIX. Otherwise ("no"), (re)use the standard proto area. # Build OS-Networking source echo "\n==== Building OS-Net source at `date` ($LABEL) ====\n" \ egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ egrep -v "cc .* -o error " | \ | egrep -v "symbol \`timezone' has differing types:" \ | egrep -v "parameter <PSTAMP> set to" \ | egrep -v "Ignoring unknown host" \ | egrep -v "redefining segment flags attribute for" \ echo "\n==== Ended OS-Net source build at `date` ($LABEL) ====\n" \ | egrep -v '^(Start|Finish|real|user|sys|./bld_awk)' \ | egrep -v '^LD_LIBRARY_PATH=' \ | egrep -v 'ar: creating' \ | egrep -v 'ar: writing' \ | egrep -v 'conflicts:' \ | egrep -v ':saved created' \ | egrep -v '^lint library construction:' \ | egrep -v 'tsort: INFORM:' \ | egrep -v 'stripalign:' \ | egrep -v 'chars, width' \ | egrep -v "symbol \`timezone' has differing types:" \ | egrep -v '|%WHOANDWHERE%|' \ | egrep -v '^Manifying' \ | egrep -v 'Ignoring unknown host' \ | egrep -v 'Processing method:' \ | egrep -v "^echo 'msgid" \ | egrep -v '^Adding file:' \ | egrep -v 'CLASSPATH=' \ | egrep -v '\/var\/mail\/:saved' \ | egrep -v -- '-DUTS_VERSION=' \ | egrep -v '^Running Mkbootstrap' \ | egrep -v '^Applet length read:' \ | egrep -v 'bytes written:' \ | egrep -v -i 'jibversion' \ | egrep -v '^Output size:' \ | egrep -v '^Solo size statistics:' \ | egrep -v '^Using ROM API Version' \ | egrep -v '^Zero Signature length:' \ | egrep -v '^Note \(probably harmless\):' \ | egrep -v -- '-xcache' \ | egrep -v '^cc1: note: -fwritable-strings' \ | egrep -v 'svccfg-native -s svc:/' \ echo "\n==== Build noise differences ($LABEL) ====\n" \ # Re-sign selected binaries using signing server # (gatekeeper builds only) echo "\n==== Signing proto area at `date` ====\n" >> $LOGFILE echo "\n==== Finished signing proto area at `date` ====\n" \ echo "\n==== Crypto module signing errors ($LABEL) ====\n" \ # Create cpio archives for preintegration testing (PIT) echo "\n==== Creating $LABEL cpio archives at `date` ====\n" \ echo "Archive_directory: ${X}" >${TMPDIR}/f echo "\n==== Not creating $LABEL cpio archives ====\n" \ echo "\n==== Creating $LABEL packages at `date` ====\n" \ # Optional build of sparc realmode on i386 if [ "$MACH" = "i386" ] && [ "${SPARC_RM_PKGARCHIVE}" ]; then echo "Clearing out ${SPARC_RM_PKGARCHIVE} ..." \ echo "\n==== Package build errors ($LABEL) ====\n" \ egrep -v "Ignoring unknown host" \ # Arg. 2 is a flag to turn on/off the lint diff output echo "dolint error: $1 is not a directory" if [ "$2" != "y" -a "$2" != "n" ]; then echo "dolint internal error: $2 should be 'y' or 'n'" # '$MAKE lint' in $lintdir # Remove all .ln files to ensure a full reference file egrep -v "Ignoring unknown host" \ echo "\n==== Elapsed time of '$MAKE lint' of $base ====\n" \ egrep -v '^(real|user|sys)' | egrep -v '(library construction)' | \ egrep -v ': global crosschecks' | \ egrep -v 'Ignoring unknown host' | \ echo "\n==== lint warnings $base ====\n" \ # should be none, though there are a few that were filtered out echo "\n==== lint noise differences $base ====\n" \ # Install proto area from IHV build echo "\n==== Installing IHV proto area ====\n" \ if [ ! -d "$ROOT" ]; then if [ ! -d "$ROOT-nd" ]; then # If there's a non-debug version of the IHV proto area, # copy it, but copy something if there's not. # Install IHV packages in PKGARCHIVE # usage: copy_ihv_pkgs LABEL SUFFIX # always use non-DEBUG IHV packages # Build and install the onbld tools. # usage: build_tools DESTROOT # returns non-zero status if the build was successful. echo "\n==== Building tools at `date` ====\n" \ egrep -e "(${MAKE}:|[ ]error[: \n])" | \ egrep -v "Ignoring unknown host" | \ # Set up to use locally installed tools. # usage: use_tools TOOLSROOT echo "\n==== New environment settings. ====\n" >> $LOGFILE echo "CTFCONVERT=${CTFCONVERT}" >> $LOGFILE echo "CTFCVTPTBL=${CTFCVTPTBL}" >> $LOGFILE echo "CTFFINDMOD=${CTFFINDMOD}" >> $LOGFILE # Verify that the closed tree is present if it needs to be. # Sets CLOSED_IS_PRESENT for future use. # If it's an old (pre-split) tree or an empty # workspace, don't complain. echo "If the closed sources are not present," \ echo "must point to the closed binaries tree." echo "WARNING: Obsolete $1 build requested; request will be ignored" # usage: do_wsdiff LABEL OLDPROTO NEWPROTO echo "\n==== Objects that differ since last build ($label) ====\n" | \ USAGE=
'Usage: nightly [-in] [-V VERS ] [ -S E|D|H|O ] <env_file> -i Fast incremental options (no clobber, lint, check) -V VERS set the build version string to VERS -S Build a variant of the source product E - build exportable source D - build domestic source (exportable + crypt) H - build hybrid source (binaries + deleted source) O - build (only) open source <env_file> file in Bourne shell syntax that sets and exports variables that configure the operation of this script and many of the scripts this one calls. If <env_file> does not exist, non-DEBUG is the default build type. Build options can be set in the NIGHTLY_OPTIONS variable in the <env_file> as follows: -A check for ABI differences in .so files -D do a build with DEBUG on -F do _not_ do a non-DEBUG build -G gate keeper default group of options (-au) -I integration engineer default group of options (-ampu) -M do not run pmodes (safe file permission checker) -O generate OpenSolaris deliverables -R default group of options for building a release (-mp) -U update proto area in the parent -V VERS set the build version string to VERS -X copy x86 IHV proto area -f find unreferenced files -i do an incremental build (no "make clobber") -l do "make lint" in $LINTDIRS (default: $SRC y) -m send mail to $MAILTO at end of build -o build using root privileges to set OWNER/GROUP (old style) -r check ELF runtime attributes in the proto area -t build and use the tools in $SRC/tools -u update proto_list_$MACH and friends in the parent workspace; -w report on differences between previous and current proto areas -z compress cpio archives with gzip -W Do not report warnings (freeware gate ONLY) -S Build a variant of the source product E - build exportable source D - build domestic source (exportable + crypt) H - build hybrid source (binaries + deleted source) O - build (only) open source # -x less public handling of xmod source for the source product # A log file will be generated under the name $LOGFILE # for partially completed build and log.`date '+%F'` # in the same directory for fully completed builds. # default values for low-level FLAGS; G I R are group FLAGS # single function for setting -S flag and doing error checking. # usage: set_S_flag <type> # where <type> is the source build type ("E", "D", ...). echo "Can only build one source variant at a time." elif [ "$1" = "D" ]; then elif [ "$1" = "H" ]; then elif [ "$1" = "O" ]; then # correct argument count after options # test that the path to the environment-setting file was given # check if user is running nightly as root # ISUSER is set non-zero if an ordinary user runs nightly, or is zero # when root invokes nightly. # clear environment variables we know to be bad for the build # Setup environmental variables # contents of stdenv.sh inserted after next line: # place ourselves in a new task, respecting BUILD_PROJECT if set. # See if NIGHTLY_OPTIONS is set # If BRINGOVER_WS was not specified, let it default to CLONE_WS # If CLOSED_BRINGOVER_WS was not specified, let it default to CLOSED_CLONE_WS # If BRINGOVER_FILES was not specified, default to usr # If the closed sources are not present, the closed binaries must be # present for the build to succeed. If there's no pointer to the # closed binaries, flag that now, rather than forcing the user to wait # a couple hours (or more) to find out. # Note: changes to the option letters here should also be applied to the # bldenv script. `d' is listed for backward compatibility. if [ -z
"${PARENT_ROOT}" ];
then echo "PARENT_ROOT must be set if the U flag is" \
"present in NIGHTLY_OPTIONS." X )
# now that we no longer need realmode builds, just # copy IHV packages. only meaningful on x86. if [
"$MACH" =
"i386" ];
then echo "Old-style build requires root permission." # Set default value for STAFFER, if needed. # roots of source trees, both relative to $SRC and absolute. # root invoked old-style build -- make sure it works as it always has # we export POUND_SIGN to speed up the build process -- prevents evaluation of # get the dmake version string alone # focus in on just the dotted version number alone sed -e 's/.*\<\([^.]*\.[^ ]*\).*$/\1/' ) # extract the second (or final) integer # extract the first integer # x86 was built on the 12th, sparc on the 13th. echo `whence $MAKE`" version is:" This version may not be safe for use. Either set TEAMWARE to a better path or (if you really want to use this version of dmake anyway), add the following to your environment to disable this check: if [
"${SUNWSPRO}" !=
"" ];
then if [ -z
"${ROOT}" ];
then # if -V flag was given, reset VERSION to V_ARG # Check for IHV root for copying ihv proto area echo "IA32_IHV_ROOT: must be set for copying ihv proto" echo "IA32_IHV_WS: must be set for copying ihv proto" VERSION=
"${VERSION}:MODIFIED_SOURCE_PRODUCT" # Keep elfsign's use of pkcs11_softtoken from looking in the user home # directory, which doesn't always work. Needed until all build machines # have the fix for 6271754 # create directories that are automatically removed if the nightly script # fails to start correctly # since this script assumes the build is from full source, it nullifies # variables likely to have been set by a "ws" script; nullification # confines the search space for headers and libraries to the proto area # built from this immediate source. # Juggle the logs and optionally send mail on completion. # Now that we're about to send mail, it's time to check the noise # file. In the event that an error occurs beyond this point, it will # be recorded in the nightly.log file, but nowhere else. This would # include only errors that cause the copying of the noise log to fail # or the mail itself not to be sent. echo "\n==== Nightly build noise ====\n" | # Remove the locks and temporary files on any exit # this will trigger cleanup(), above. # Generic lock file processing -- make sure that the lock file doesn't # exist. If it does, it should name the build host and PID. If it # doesn't, then make sure we can create it. Clean up locks that are # known to be stale (assumes host name is unique among build systems # stale lock; clear it out and try again # Return the list of interesting proto areas, depending on the current # OpenSolaris deliveries require separate proto areas. # Ensure no other instance of this script is running on this host. # LOCKNAME can be set in <env_file>, and is by default, but is not # required due to the use of $ATLOG below. # Create from one, two, or three other locks: # - protects against multiple builds in same workspace # - protects against multiple 'u' copy-backs # - protects against multiple 'U' copy-backs # Overriding ISUSER to 1 causes the lock to be created as root if the # script is run as root. The default is to create it as $STAFFER. # NIGHTLY_PARENT_ROOT is written as root if script invoked as root. # Locks have been taken, so we're doing a build and we're committed to # the directories we may have created so far. # ATLOG directory already made by 'create_lock' above # make sure we log only to the nightly build file echo "\n==== list of environment variables ====\n" >>
$LOGFILE echo "WARNING: the -S flags do not support incremental" \
echo "WARNING: the -S flags do not support protocmp;" \
"protocmp disabled\n" | \
echo "WARNING: the -S flags do not support lint;" \
echo "WARNING: the -S flags do not support cstyle;" \
cat <<EOF
| tee -a $mail_msg_file >> $LOGFILE WARNING: the p option (create packages) is set, but so is the N option (do not run protocmp); this is dangerous; you should unset the N option cat <<EOF
| tee -a $mail_msg_file >> $LOGFILE Warning: the N option (do not run protocmp) is set; it probably shouldn't be echo "WARNING: OpenSolaris deliveries (-O) require archives;" \
echo "WARNING: Neither DEBUG nor non-DEBUG build requested, but the" \
# In the past we just complained but went ahead with the lint # pass, even though the proto area was built non-debug. It's # unlikely that non-debug headers will make a difference, but # rather than assuming it's a safe combination, force the user # to specify a debug build. echo "WARNING: DEBUG build not requested; disabling lint.\n" \
echo "WARNING: the -f flag cannot be used during incremental" \
echo "WARNING: the -f flag requires -l and -p; ignoring -f\n" | \
echo "WARNING: -w specified, but $ROOT does not exist;" \
# We're not doing a tools build, so make sure elfsign(1) is # new enough to safely sign non-crypto binaries. We test # debugging output from elfsign to detect the old version. "will only sign crypto modules\n" | \
echo "WARNING: VERIFY_ELFSIGN=y requires" \
"the -t flag; ignoring VERIFY_ELFSIGN\n" | \
echo "Setting MULTI_PROTO to \"no\".\n" | \
# Save the current proto area if we're comparing against the last build if [ -d
"$ROOT.prev" ];
then # Same for non-DEBUG proto area # Echo the SCM types of $CODEMGR_WS and $BRINGOVER_WS # Probe BRINGOVER_WS to determine its type egrep -s "This is a Subversion repository" \ # Probe CODEMGR_WS to determine its type # fold both unsupported and unrecognized results into "none" # Decide whether to clobber # remove old clobber file # Remove all .make.state* files, just in case we are restarting # the build after having interrupted a previous 'make clobber'. egrep -v
"Ignoring unknown host" \
echo "\n==== Make tools clobber at `date` ====\n" >>
$LOGFILE echo "\n==== Make tools clobber ERRORS ====\n" \
# Get back to a clean workspace as much as possible to catch # problems that only occur on fresh workspaces. # Remove all .make.state* files, libraries, and .o's that may # have been omitted from clobber. A couple of libraries are # under source code control, so leave them alone. # We should probably blow away temporary directories too. \( -
name '.make.*' -o -
name 'lib*.a' -o -
name 'lib*.so*' -o \
-
name '*.o' \) -
print | \
# sleep on the parent workspace's lock echo "\n==== POST-BRINGOVER CLEANUP NOISE ====\n" # If the repository doesn't exist yet, then we want to populate it. # If the user set CLOSED_BRINGOVER_WS and didn't set CLOSED_IS_PRESENT # to "no," then we'll want to initialise the closed repository # We use $orig_closed_is_present instead of $CLOSED_IS_PRESENT, # because for newly-created source trees, the latter will be "no" # until after the bringover completes. # If the user has changes, regardless of whether those changes are # committed, and regardless of whether those changes conflict, then # we'll attempt to merge them either implicitly (uncommitted) or # explicitly (committed). # These are the messages we'll use to help clarify mercurial output *** nightly was unable to automatically merge your changes. You should\n\ *** redo the full merge manually, following the steps outlined by mercurial\n\ *** above, then restart nightly.\n\ *** nightly successfully merged your changes. This means that your working\n\ *** directory has been updated, but those changes are not yet committed.\n\ *** After nightly completes, you should validate the results of the merge,\n\ *** then use hg commit manually.\n\ # For each repository in turn: # 1. Do the pull. If this fails, dump the output and bail out. # 2. If the pull resulted in an extra head, do an explicit merge. # If this fails, dump the output and bail out. # Because we can't rely on Mercurial to exit with a failure code # when a merge fails (Mercurial issue #186), we must grep the # 3. If a merge failed, set the message and fail the bringover. # 4. Otherwise, if a merge succeeded, set the message # 5. Dump the output, and any message from step 3 or 4. printf "%s: merge failed as follows:\n\n" \ # We only want to update usr/closed if it exists, and we haven't been # told not to via $CLOSED_IS_PRESENT, and we actually know where to # pull from ($CLOSED_BRINGOVER_WS). printf "closed pull failed as follows:\n\n" printf "closed merge failed as follows:\n\n" printf "updated %s with the following results:\n" \ nawk '/^Repository Root:/ {print $NF}') # We fail here because there's no way to update \$BRINGOVER_WS doesn't match repository root: \$BRINGOVER_WS: $BRINGOVER_WS touch $TMPDIR/bringover_failed # If a conflict happens, svn still exits 0. staffer svn update $CODEMGR_WS | tee $TMPDIR/pull.out || touch $TMPDIR/bringover_failed if grep "^C" $TMPDIR/pull.out > /dev/null 2>&1; then touch $TMPDIR/bringover_failed type bringover_none > /dev/null 2>&1 || bringover_none() { echo "Couldn't figure out what kind of SCM to use for $BRINGOVER_WS." touch $TMPDIR/bringover_failed # The other way to deal with empty components is to echo a string that can # be eval'ed by the caller to associate values (possibly empty) with # variables. In that case, passing in a printf string would let the caller # choose the variable names. typeset url method host port path if [[ $host == *:* ]]; then # method can never be empty. host can only be empty if method is # file, and that implies it's localhost. path can default to / if # it's otherwise empty, leaving port as the only component without # a default, so it has to go last. echo $method ${host:-localhost} ${path:-/} $port typeset url method host port path if [[ -n $http_proxy ]]; then parse_url $http_proxy | read method host path port echo "GET $url HTTP/1.0\r\n" | mconnect -p ${port:-8080} $host parse_url $url | read method host path port echo "GET $path HTTP/1.0\r\n" | mconnect -p ${port:-80} $host # Decide whether to bringover to the codemgr workspace if [ "$n_FLAG" = "n" ]; then if [[ $SCM_TYPE != none && $SCM_TYPE != $PARENT_SCM_TYPE ]]; then echo "cannot bringover from $PARENT_SCM_TYPE to $SCM_TYPE, " \ "quitting at `date`." | tee -a $mail_msg_file >> $LOGFILE echo "\n==== bringover to $CODEMGR_WS at `date` ====\n" >> $LOGFILE echo "\n==== BRINGOVER LOG ====\n" >> $mail_msg_file eval "bringover_${PARENT_SCM_TYPE}" 2>&1 | tee -a $mail_msg_file >> $LOGFILE if [ -f $TMPDIR/bringover_failed ]; then rm -f $TMPDIR/bringover_failed echo "trouble with bringover, quitting at `date`." | tee -a $mail_msg_file >> $LOGFILE # It's possible that we used the bringover above to create # $CODEMGR_WS. If so, then SCM_TYPE was previously "none," # but should now be the same as $BRINGOVER_WS. [[ $SCM_TYPE = none ]] && SCM_TYPE=$PARENT_SCM_TYPE # Possible transition from pre-split workspace to split # workspace. See if the bringover changed anything. CLOSED_IS_PRESENT="$orig_closed_is_present" echo "\n==== No bringover to $CODEMGR_WS ====\n" >> $LOGFILE echo "\n==== Build environment ====\n" | tee -a $build_environ_file >> $LOGFILE whence uname | tee -a $build_environ_file >> $LOGFILE uname -a 2>&1 | tee -a $build_environ_file >> $LOGFILE echo | tee -a $build_environ_file >> $LOGFILE echo "$0 $@" | tee -a $build_environ_file >> $LOGFILE if [[ $nightly_path = "/opt/onbld/bin/nightly" ]] && pkginfo SUNWonbld > /dev/null 2>&1 ; then pkginfo -l SUNWonbld | egrep "PKGINST:|VERSION:|PSTAMP:" fi | tee -a $build_environ_file >> $LOGFILE echo | tee -a $build_environ_file >> $LOGFILE whence $MAKE | tee -a $build_environ_file >> $LOGFILE $MAKE -v | tee -a $build_environ_file >> $LOGFILE echo "number of concurrent jobs = $DMAKE_MAX_JOBS" | tee -a $build_environ_file >> $LOGFILE # Report the compiler versions. if [[ ! -f $SRC/Makefile ]]; then echo "\nUnable to find \"Makefile\" in $SRC." | \ tee -a $build_environ_file >> $LOGFILE for target in cc-version cc64-version java-version; do # Put statefile somewhere we know we can write to rather than trip # over a read-only $srcroot. if $MAKE -K $TMPDIR/make-state -e $target 2>/dev/null; then ) | tee -a $build_environ_file >> $LOGFILE if [ -f $TMPDIR/nocompiler ]; then echo "Aborting due to missing compiler." | tee -a $build_environ_file >> $LOGFILE whence as | tee -a $build_environ_file >> $LOGFILE as -V 2>&1 | head -1 | tee -a $build_environ_file >> $LOGFILE echo | tee -a $build_environ_file >> $LOGFILE # Check that we're running a capable link-editor whence ld | tee -a $build_environ_file >> $LOGFILE echo $LDVER | tee -a $build_environ_file >> $LOGFILE LDVER=`echo $LDVER | sed -e "s/.*-1\.//" -e "s/:.*//"` if [ `expr $LDVER \< 422` -eq 1 ]; then echo "The link-editor needs to be at version 422 or higher to build" | \ tee -a $build_environ_file >> $LOGFILE echo "the latest stuff. Hope your build works." | \ tee -a $build_environ_file >> $LOGFILE # Build and use the workspace's tools if requested if [[ "$t_FLAG" = "y" || "$O_FLAG" = y ]]; then set_non_debug_build_flags build_tools ${TOOLS_PROTO} if [[ $tools_build_ok = y ]]; then echo "\n==== Creating protolist tools file at `date` ====" \ protolist $TOOLS_PROTO > $ATLOG/proto_list_tools_${MACH} echo "==== protolist tools file created at `date` ====\n" \ if [ "$N_FLAG" != "y" ]; then echo "\n==== Impact on tools packages ====\n" \ # Use the current tools exception list. exc=etc/exception_list_$MACH if [ -f $SRC/tools/$exc ]; then TOOLS_ELIST="-e $SRC/tools/$exc" # Compare the build's proto list with current package # definitions to audit the quality of package # definitions and makefile install targets. "Files missing from the proto area:" \ "Files missing from packages:" \ "Inconsistencies between pkgdefs and proto area:" \ $ATLOG/proto_list_tools_${MACH} \ if [[ $tools_build_ok = y && "$t_FLAG" = y ]]; then export ONBLD_TOOLS=${ONBLD_TOOLS:=${TOOLS_PROTO}/opt/onbld} # copy ihv proto area in addition to the build itself if [ "$X_FLAG" = "y" ]; then if [ "$i_FLAG" = "y" -a "$SH_FLAG" = "y" ]; then echo "\n==== NOT Building base OS-Net source ====\n" | \ tee -a $LOGFILE >> $mail_msg_file # timestamp the start of the normal build; the findunref tool uses it. # Generate the THIRDPARTYLICENSE files if needed. This is done before # findunref to help identify license files that need to be added to if [ "$O_FLAG" = y -a "$build_ok" = y ]; then echo "\n==== Generating THIRDPARTYLICENSE files ====\n" | \ tee -a $mail_msg_file >> $LOGFILE mktpl usr/src/tools/opensolaris/license-list >>$LOGFILE 2>&1 echo "Couldn't create THIRDPARTYLICENSE files" | tee -a $mail_msg_file >> $LOGFILE # If OpenSolaris deliverables were requested, do the open-only build # now, so that it happens at roughly the same point as the source # product builds. This lets us take advantage of checks that come # later (e.g., the core file check). if [ "$O_FLAG" = y -a "$build_ok" = y ]; then # Generate skeleton (minimal) closed binaries for open-only # build. There's no need to distinguish debug from non-debug # binaries, but it simplifies file management to have separate echo "\n==== Generating skeleton closed binaries for" \ "open-only build ====\n" | \ tee -a $LOGFILE >> $mail_msg_file rm -rf $CODEMGR_WS/closed.skel if [ "$D_FLAG" = y ]; then mkclosed $MACH $ROOT $CODEMGR_WS/closed.skel/root_$MACH \ echo "Couldn't create skeleton DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE if [ "$F_FLAG" = n ]; then mkclosed $MACH $ROOT-nd $CODEMGR_WS/closed.skel/root_$MACH-nd \ echo "Couldn't create skeleton non-DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE ORIG_CLOSED_IS_PRESENT=$CLOSED_IS_PRESENT export CLOSED_IS_PRESENT=no ORIG_ON_CLOSED_BINS="$ON_CLOSED_BINS" export ON_CLOSED_BINS=$CODEMGR_WS/closed.skel ON_CLOSED_BINS=$ORIG_ON_CLOSED_BINS CLOSED_IS_PRESENT=$ORIG_CLOSED_IS_PRESENT BINARCHIVE=${CODEMGR_WS}/bin-${MACH}.cpio.Z if [ "$SE_FLAG" = "y" -o "$SD_FLAG" = "y" -o "$SH_FLAG" = "y" ]; then # EXPORT_SRC comes after CRYPT_SRC since a domestic build will need # $SRC pointing to the export_source usr/src. if [ "$SE_FLAG" = "y" -o "$SD_FLAG" = "y" -o "$SH_FLAG" = "y" ]; then if [ "$SD_FLAG" = "y" -a $build_ok = y ]; then set_up_source_build ${CODEMGR_WS} ${CRYPT_SRC} CRYPT_SRC if [ $build_ok = y ]; then set_up_source_build ${CODEMGR_WS} ${EXPORT_SRC} EXPORT_SRC if [ "$SD_FLAG" = "y" -a $build_ok = y ]; then # drop the crypt files in place. echo "\nextracting crypt_files.cpio.Z onto export_source.\n" \ zcat ${CODEMGR_WS}/crypt_files.cpio.Z | \ cpio -idmucvB 2>/dev/null >> ${LOGFILE} echo "\n==== DOMESTIC extraction succeeded ====\n" \ echo "\n==== DOMESTIC extraction failed ====\n" \ if [ "$SO_FLAG" = "y" -a $build_ok = y ]; then # Copy the open sources into their own tree, set up the closed # binaries, and set up the environment. The build looks for # the closed binaries in a location that depends on whether # it's a DEBUG build, so we might need to make two copies. # If copy_source fails, it will have already generated an # error message and set build_ok=n, so we don't need to worry copy_source $CODEMGR_WS $OPEN_SRCDIR OPEN_SOURCE usr/src if [ "$SO_FLAG" = "y" -a $build_ok = y ]; then # Try not to clobber any user-provided closed binaries. export ON_CLOSED_BINS=$CODEMGR_WS/closed$$ echo "\n==== Copying skeleton closed binaries to" \ "$ON_CLOSED_BINS ====\n" | \ tee -a $mail_msg_file >> $LOGFILE if [ "$D_FLAG" = y ]; then mkclosed $MACH $ROOT $ON_CLOSED_BINS/root_$MACH >>$LOGFILE 2>&1 echo "Couldn't create DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE if [ "$F_FLAG" = n ]; then [ "$MULTI_PROTO" = yes ] && root=$ROOT-nd mkclosed $MACH $root $ON_CLOSED_BINS/root_$MACH-nd \ echo "Couldn't create non-DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE export CLOSED_IS_PRESENT=no if is_source_build && [ $build_ok = y ] ; then # remove proto area(s) here, since we don't clobber if [ "$t_FLAG" = "y" ]; then set_non_debug_build_flags # SRC was set earlier to point to the source build # source tree (e.g., $EXPORT_SRC). build_tools ${SRC}/tools/proto export EXPORT_RELEASE_BUILD ; EXPORT_RELEASE_BUILD=# if [[ "$SO_FLAG" = "y" && "$build_ok" = "y" ]]; then # There are several checks that need to look at the proto area, but # they only need to look at one, and they don't care whether it's if [[ "$MULTI_PROTO" = yes && "$D_FLAG" = n ]]; then if [ "$build_ok" = "y" ]; then echo "\n==== Creating protolist system file at `date` ====" \ protolist $checkroot > $ATLOG/proto_list_${MACH} echo "==== protolist system file created at `date` ====\n" \ if [ "$N_FLAG" != "y" ]; then echo "\n==== Impact on packages ====\n" >> $mail_msg_file # If there is a reference proto list, compare the build's proto # list with the reference to see changes in proto areas. # Use the current exception list. exc=etc/exception_list_$MACH if [ -f $SRC/pkgdefs/$exc ]; then ELIST="-e $SRC/pkgdefs/$exc" if [ "$X_FLAG" = "y" -a -f $IA32_IHV_WS/usr/src/pkgdefs/$exc ]; then ELIST="$ELIST -e $IA32_IHV_WS/usr/src/pkgdefs/$exc" if [ -f "$REF_PROTO_LIST" ]; then # For builds that copy the IHV proto area (-X), add the # IHV proto list to the reference list if the reference # For builds that don't copy the IHV proto area, add the # IHV proto list to the build's proto list if the # reference was built with -X. # Use the presence of the first file entry of the cached # IHV proto list in the reference list to determine # whether it was build with -X or not. IHV_REF_PROTO_LIST=$SRC/pkgdefs/etc/proto_list_ihv_$MACH grepfor=$(nawk '$1 == "f" { print $2; exit }' \ $IHV_REF_PROTO_LIST 2> /dev/null) if [ $? = 0 -a -n "$grepfor" ]; then if [ "$X_FLAG" = "y" ]; then $REF_PROTO_LIST > /dev/null if [ ! "$?" = "0" ]; then REF_IHV_PROTO="-d $IHV_REF_PROTO_LIST" $REF_PROTO_LIST > /dev/null IHV_PROTO_LIST="$IHV_REF_PROTO_LIST" "Files in yesterday's proto area, but not today's:" \ "Files in today's proto area, but not yesterday's:" \ "Files that changed between yesterday and today:" \ $ATLOG/proto_list_${MACH} \ # Compare the build's proto list with current package # definitions to audit the quality of package definitions # and makefile install targets. Use the current exception list. if [ -d $d/pkgdefs ]; then PKGDEFS_LIST="$PKGDEFS_LIST -d $d/pkgdefs" if [ "$X_FLAG" = "y" -a -d $IA32_IHV_WS/usr/src/pkgdefs ]; then PKGDEFS_LIST="$PKGDEFS_LIST -d $IA32_IHV_WS/usr/src/pkgdefs" "Files missing from the proto area:" \ "Files missing from packages:" \ "Inconsistencies between pkgdefs and proto area:" \ $ATLOG/proto_list_${MACH} \ if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then staffer cp $ATLOG/proto_list_${MACH} \ $PARENT_WS/usr/src/proto_list_${MACH} # Update parent proto area if necessary. This is done now # so that the proto area has either DEBUG or non-DEBUG kernels. # Note that this clears out the lock file, so we can dispense with if [ "$U_FLAG" = "y" -a "$build_ok" = "y" ]; then echo "\n==== Copying proto area to $NIGHTLY_PARENT_ROOT ====\n" | \ tee -a $LOGFILE >> $mail_msg_file # The rm -rf command below produces predictable errors if # nightly is invoked from the parent's $ROOT/opt/onbld/bin, # and that directory is accessed via NFS. This is because # deleted-but-still-open files don't actually disappear as # expected, but rather turn into .nfsXXXX junk files, leaving # the directory non-empty. Since this is a not-unusual usage # pattern, and we still want to catch other errors here, we # take the unusal step of moving aside 'nightly' from that # directory (if we're using it). mypath=${nightly_path##*/root_$MACH/} if [ "$mypath" = $nightly_path ]; then mypath=opt/onbld/bin/${nightly_path##*/} if [ $nightly_path -ef $PARENT_WS/proto/root_$MACH/$mypath ]; then mv -f $nightly_path $PARENT_WS/proto/root_$MACH rm -rf $PARENT_WS/proto/root_$MACH/* mkdir -p $NIGHTLY_PARENT_ROOT if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then ( cd $NIGHTLY_PARENT_ROOT; umask 0; tar xpf - ) ) 2>&1 | tee -a $mail_msg_file >> $LOGFILE if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then mkdir -p $NIGHTLY_PARENT_ROOT-nd ( cd $NIGHTLY_PARENT_ROOT-nd; umask 0; tar xpf - ) ) 2>&1 | tee -a $mail_msg_file >> $LOGFILE # do shared library interface verification if [ "$A_FLAG" = "y" -a "$build_ok" = "y" ]; then echo "\n==== Check versioning and ABI information ====\n" | \ tee -a $LOGFILE >> $mail_msg_file rm -rf $SRC/interfaces.ref if [ -d $SRC/interfaces.out ]; then mv $SRC/interfaces.out $SRC/interfaces.ref rm -rf $SRC/interfaces.out mkdir -p $SRC/interfaces.out intf_check -V -m -o -b $SRC/tools/abi/etc \ -d $SRC/interfaces.out $checkroot 2>&1 | sort \ > $SRC/interfaces.out/log # report any ERROR found in log file fgrep 'ERROR' $SRC/interfaces.out/log | sed 's/^ERROR: //' | \ tee -a $LOGFILE >> $mail_msg_file if [ ! -d $SRC/interfaces.ref ] ; then mkdir -p $SRC/interfaces.ref if [ -d $SRC/interfaces.out ]; then cp -r $SRC/interfaces.out/* $SRC/interfaces.ref echo "\n==== Diff versioning warnings (since last build) ====\n" | \ tee -a $LOGFILE >> $mail_msg_file out_vers=`grep ^VERSION $SRC/interfaces.out/log`; ref_vers=`grep ^VERSION $SRC/interfaces.ref/log`; # Report any differences in WARNING messages between last if [ "$out_vers" = "$ref_vers" ]; then diff $SRC/interfaces.ref/log $SRC/interfaces.out/log | \ fgrep 'WARNING' | sed 's/WARNING: //' | \ tee -a $LOGFILE >> $mail_msg_file if [ "$r_FLAG" = "y" -a "$build_ok" = "y" ]; then echo "\n==== Check ELF runtime attributes ====\n" | \ tee -a $LOGFILE >> $mail_msg_file CRLECONF="^crle: configuration file:" RUNTIMEREF=$SRC/runtime-${MACH}.ref RUNTIMEOUT=$SRC/runtime-${MACH}.out if [ -f $RUNTIMEOUT ]; then egrep -v "$LDDWRONG|$CRLERROR|$CRLECONF" \ $RUNTIMEOUT > $RUNTIMEREF # If we're doing a debug build the proto area will be left with # debuggable objects, thus don't assert -s. if [ "$D_FLAG" = "y" ]; then check_rtime -d $checkroot -i -m -v -o $rtime_sflag $checkroot 2>&1 | \ egrep -v ": unreferenced object=$checkroot/.*/lib(w|intl|thread|pthread).so" | \ egrep -v ": unused object=$checkroot/.*/lib(w|intl|thread|pthread).so" | \ # Determine any processing errors that will affect the final output # and display these first. grep -l "$LDDWRONG" $RUNTIMEOUT > /dev/null echo "WARNING: wrong class message detected. ldd(1) was unable" | \ tee -a $LOGFILE >> $mail_msg_file echo "to execute an object, thus it could not be checked fully." | \ tee -a $LOGFILE >> $mail_msg_file echo "Perhaps a 64-bit object was encountered on a 32-bit system," | \ tee -a $LOGFILE >> $mail_msg_file echo "or an i386 object was encountered on a sparc system?\n" | \ tee -a $LOGFILE >> $mail_msg_file grep -l "$CRLECONF" $RUNTIMEOUT > /dev/null echo "WARNING: creation of an alternative dependency cache failed." | \ tee -a $LOGFILE >> $mail_msg_file echo "Dependencies will bind to the base system libraries.\n" | \ tee -a $LOGFILE >> $mail_msg_file grep "$CRLECONF" $RUNTIMEOUT | \ tee -a $LOGFILE >> $mail_msg_file grep "$CRLERROR" $RUNTIMEOUT | grep -v "$CRLECONF" | \ tee -a $LOGFILE >> $mail_msg_file echo "\n" | tee -a $LOGFILE >> $mail_msg_file egrep '<dependency no longer necessary>' $RUNTIMEOUT | \ tee -a $LOGFILE >> $mail_msg_file # NEEDED= and RPATH= are generated by the -i option # VERDEF= and VERSION= are generated by the -v option. # These lines are informational; report anything else that we egrep -v "NEEDED=|RPATH=|VERDEF=|VERSION=" $RUNTIMEOUT \ | egrep -v "$LDDWRONG|$CRLERROR|$CRLECONF" \ | tee -a $LOGFILE >> $mail_msg_file # probably should compare against a 'known ok runpaths' list if [ ! -f $RUNTIMEREF ]; then egrep -v "$LDDWRONG|$CRLERROR|$CRLECONF" \ $RUNTIMEOUT > $RUNTIMEREF echo "\n==== Diff ELF runtime attributes (since last build) ====\n" \ egrep -v "$LDDWRONG|$CRLERROR|$CRLECONF" $RUNTIMEOUT | \ diff $RUNTIMEREF - >> $mail_msg_file # DEBUG lint of kernel begins if [ "$i_CMD_LINE_FLAG" = "n" -a "$l_FLAG" = "y" ]; then if [ "$LINTDIRS" = "" ]; then # LINTDIRS="$SRC/uts y $SRC/stand y $SRC/psm y" dolint $1 $2; shift; shift echo "\n==== No '$MAKE lint' ====\n" >> $LOGFILE if [ "$i_CMD_LINE_FLAG" = "n" -a "$C_FLAG" = "y" ]; then rm -f $SRC/check-${MACH}.out $MAKE -ek check 2>&1 | tee -a $SRC/check-${MACH}.out >> $LOGFILE echo "\n==== cstyle/hdrchk errors ====\n" >> $mail_msg_file grep ":" $SRC/check-${MACH}.out | egrep -v "Ignoring unknown host" | \ sort | uniq >> $mail_msg_file echo "\n==== No '$MAKE check' ====\n" >> $LOGFILE echo "\n==== Find core files ====\n" | \ tee -a $LOGFILE >> $mail_msg_file find $abssrcdirs -name core -a -type f -exec file {} \; | \ tee -a $LOGFILE >> $mail_msg_file if [ "$f_FLAG" = "y" -a "$build_ok" = "y" ]; then echo "\n==== Diff unreferenced files (since last build) ====\n" \ | tee -a $LOGFILE >>$mail_msg_file rm -f $SRC/unref-${MACH}.ref if [ -f $SRC/unref-${MACH}.out ]; then mv $SRC/unref-${MACH}.out $SRC/unref-${MACH}.ref # For any SCM other than teamware, we want to disable the # managed-by-SCCS test in findunref if [ "$SCM_TYPE" != teamware ]; then findunref $findunref_all -t $SRC/.build.tstamp $SRC/.. \ ${TOOLS}/findunref/exception_list 2>> $mail_msg_file | \ sort | sed -e s=^./src/=./= -e s=^./closed/=../closed/= \ if [ ! -f $SRC/unref-${MACH}.ref ]; then cp $SRC/unref-${MACH}.out $SRC/unref-${MACH}.ref diff $SRC/unref-${MACH}.ref $SRC/unref-${MACH}.out >>$mail_msg_file # Generate the OpenSolaris deliverables if requested. Some of these # steps need to come after findunref and are commented below. if [ "$O_FLAG" = y -a "$build_ok" = y ]; then echo "\n==== Generating OpenSolaris tarballs ====\n" | \ tee -a $mail_msg_file >> $LOGFILE # This step grovels through the pkgdefs proto* files, so it # must come after findunref. echo "Generating closed binaries tarball(s)..." >> $LOGFILE closed_basename=on-closed-bins if [ "$D_FLAG" = y ]; then bindrop "$ROOT" "$ROOT-open" "$closed_basename" \ echo "Couldn't create DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE if [ "$F_FLAG" = n ]; then bindrop -n "$ROOT-nd" "$ROOT-open-nd" "$closed_basename-nd" \ echo "Couldn't create non-DEBUG closed binaries." | tee -a $mail_msg_file >> $LOGFILE echo "Generating SUNWonbld tarball..." >> $LOGFILE PKGARCHIVE=$PKGARCHIVE_ORIG onblddrop >> $LOGFILE 2>&1 echo "Couldn't create SUNWonbld tarball." | tee -a $mail_msg_file >> $LOGFILE echo "Generating README.opensolaris..." >> $LOGFILE cat $SRC/tools/opensolaris/README.opensolaris.tmpl | \ mkreadme_osol $CODEMGR_WS/README.opensolaris >> $LOGFILE 2>&1 echo "Couldn't create README.opensolaris." | tee -a $mail_msg_file >> $LOGFILE # This step walks the source tree, so it must come after # findunref. It depends on README.opensolaris. echo "Generating source tarball..." >> $LOGFILE echo "Couldn't create source tarball." | tee -a "$mail_msg_file" >> "$LOGFILE" # This step depends on the closed binaries tarballs. echo "Generating BFU tarball(s)..." >> $LOGFILE if [ "$D_FLAG" = y ]; then makebfu_filt bfudrop "$ROOT-open" \ "$closed_basename.$MACH.tar.bz2" nightly-osol echo "Couldn't create DEBUG archives tarball." | tee -a $mail_msg_file >> $LOGFILE if [ "$F_FLAG" = n ]; then makebfu_filt bfudrop -n "$ROOT-open-nd" \ "$closed_basename-nd.$MACH.tar.bz2" nightly-osol-nd echo "Couldn't create non-DEBUG archives tarball." | tee -a $mail_msg_file >> $LOGFILE # Verify that the usual lists of files, such as exception lists, # contain only valid references to files. If the build has failed, # then don't check the proto area. CHECK_PATHS=${CHECK_PATHS:-y} if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then echo "\n==== Check lists of files ====\n" | tee -a $LOGFILE \ [ "$build_ok" = y ] && arg= checkpaths $arg $checkroot 2>&1 | tee -a $LOGFILE >>$mail_msg_file if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then echo "\n==== Impact on file permissions ====\n" \ # Get pkginfo files from usr/src/pkgdefs `for d in $abssrcdirs; do find $d/pkgdefs -name pkginfo.tmpl -print -o -name .del\* -prune done | sed -e 's:/pkginfo.tmpl$::' | sort -u ` >> $mail_msg_file if [ "$w_FLAG" = "y" -a "$build_ok" = "y" ]; then if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then do_wsdiff DEBUG $ROOT.prev $ROOT if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then do_wsdiff non-DEBUG $ROOT-nd.prev $ROOT-nd echo "==== Nightly $maketype build completed: $END_DATE ====" | \ tee -a $LOGFILE >> $build_time_file ((hours = elapsed_time / 3600 )) ((minutes = elapsed_time / 60 % 60)) ((seconds = elapsed_time % 60)) echo "\n==== Total build time ====" | \ tee -a $LOGFILE >> $build_time_file echo "\nreal ${hours}:${minutes}:${seconds}" | \ tee -a $LOGFILE >> $build_time_file if [ "$u_FLAG" = "y" -a "$f_FLAG" = "y" -a "$build_ok" = "y" ]; then staffer cp ${SRC}/unref-${MACH}.out $PARENT_WS/usr/src/ # Produce a master list of unreferenced files -- ideally, we'd # generate the master just once after all of the nightlies # have finished, but there's no simple way to know when that # will be. Instead, we assume that we're the last nightly to # finish and merge all of the unref-${MACH}.out files in # $PARENT_WS/usr/src/. If we are in fact the final ${MACH} to # finish, then this file will be the authoritative master # list. Otherwise, another ${MACH}'s nightly will eventually # overwrite ours with its own master, but in the meantime our # temporary "master" will be no worse than any older master # which was already on the parent. set -- $PARENT_WS/usr/src/unref-*.out cp "$1" ${TMPDIR}/unref.merge comm -12 ${TMPDIR}/unref.merge "$unreffile" > ${TMPDIR}/unref.$$ mv ${TMPDIR}/unref.$$ ${TMPDIR}/unref.merge staffer cp ${TMPDIR}/unref.merge $PARENT_WS/usr/src/unrefmaster.out # All done save for the sweeping up. # (whichever exit we hit here will trigger the "cleanup" trap which # optionally sends mail on completion). if [ "$build_ok" = "y" ]; then