diff options
Diffstat (limited to 'usr/src/tools/scripts')
-rwxr-xr-x | usr/src/tools/scripts/bldenv | 15 | ||||
-rw-r--r-- | usr/src/tools/scripts/check_rtime.pl | 12 | ||||
-rwxr-xr-x | usr/src/tools/scripts/nightly | 22 |
3 files changed, 30 insertions, 19 deletions
diff --git a/usr/src/tools/scripts/bldenv b/usr/src/tools/scripts/bldenv index 85999e5b77..69f74d89de 100755 --- a/usr/src/tools/scripts/bldenv +++ b/usr/src/tools/scripts/bldenv @@ -25,6 +25,7 @@ # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> # Copyright 2020 Joyent, Inc. +# Copyright 2020 Oxide Computer Company # # Uses supplied "env" file, based on /opt/onbld/etc/env, to set shell variables # before spawning a shell for doing a release-style builds interactively @@ -247,14 +248,20 @@ if [ "${flags.d_set}" != "true" ] && "${flags.DF_build}"; then fi POUND_SIGN="#" +basews=$(basename -- "$CODEMGR_WS") # have we set RELEASE_DATE in our env file? if [ -z "$RELEASE_DATE" ]; then RELEASE_DATE=$(LC_ALL=C date +"%B %Y") fi -BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d) -BASEWSDIR=$(basename -- "${CODEMGR_WS}") -DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\"" -export DEV_CM RELEASE_DATE POUND_SIGN +now=$(LC_ALL=C date +%Y-%b-%d) +DEV_CM_TAIL="development build: $LOGNAME $now [$basews]" + +# +# We export POUND_SIGN, RELEASE_DATE and DEV_CM_TAIL to speed up the build +# process by avoiding repeated shell invocations to evaluate Makefile.master +# definitions. +# +export POUND_SIGN RELEASE_DATE DEV_CM_TAIL print 'Build type is \c' if ${flags.d} ; then diff --git a/usr/src/tools/scripts/check_rtime.pl b/usr/src/tools/scripts/check_rtime.pl index f456ea4cbc..ebd49a79bb 100644 --- a/usr/src/tools/scripts/check_rtime.pl +++ b/usr/src/tools/scripts/check_rtime.pl @@ -22,6 +22,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2020 Oxide Computer Company # # @@ -147,7 +148,7 @@ use vars qw($EXRE_exec_data $EXRE_exec_stack $EXRE_nocrlealt); use vars qw($EXRE_nodirect $EXRE_nosymsort $EXRE_forbidden_dep $EXRE_forbidden); use vars qw($EXRE_olddep $EXRE_skip $EXRE_stab $EXRE_textrel $EXRE_undef_ref); use vars qw($EXRE_unref_obj $EXRE_unused_deps $EXRE_unused_obj); -use vars qw($EXRE_unused_rpath); +use vars qw($EXRE_unused_rpath $EXRE_no_comment); use strict; use Getopt::Std; @@ -279,11 +280,12 @@ sub ProcFile { # Determine whether this ELF executable or shared object has a # conforming mcs(1) comment section. If the correct $(POST_PROCESS) # macros are used, only a 3 or 4 line .comment section should exist - # containing one or two "@(#)SunOS" identifying comments (one comment + # containing one or two "@(#)illumos" identifying comments (one comment # for a non-debug build, and two for a debug build). The results of # the following split should be three or four lines, the last empty # line being discarded by the split. - if ($opt{m}) { + if ($opt{m} && + (!defined($EXRE_no_comment) || ($RelPath !~ $EXRE_no_comment))) { my(@Mcs, $Con, $Dev); @Mcs = split(/\n/, `mcs -p $FullPath 2>&1`); @@ -292,11 +294,11 @@ sub ProcFile { foreach my $Line (@Mcs) { $Val++; - if (($Val == 3) && ($Line !~ /^@\(#\)SunOS/)) { + if (($Val == 3) && ($Line !~ /^@\(#\)illumos/)) { $Con = 1; last; } - if (($Val == 4) && ($Line =~ /^@\(#\)SunOS/)) { + if (($Val == 4) && ($Line =~ /^@\(#\)illumos/)) { $Dev = 1; next; } diff --git a/usr/src/tools/scripts/nightly b/usr/src/tools/scripts/nightly index 489f63b897..f6b536c924 100755 --- a/usr/src/tools/scripts/nightly +++ b/usr/src/tools/scripts/nightly @@ -29,6 +29,7 @@ # Copyright 2020 Joyent, Inc. # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # Copyright 2019 Peter Trible. +# Copyright 2020 Oxide Computer Company # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -804,18 +805,20 @@ abssrcdirs="$SRC" PROTOCMPTERSE="protocmp.terse -gu" POUND_SIGN="#" +basews="$(basename "$CODEMGR_WS")" # have we set RELEASE_DATE in our env file? if [ -z "$RELEASE_DATE" ]; then RELEASE_DATE=$(LC_ALL=C date +"%B %Y") fi -BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d) -BASEWSDIR=$(basename $CODEMGR_WS) -DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\"" +now=$(LC_ALL=C date +%Y-%b-%d) +DEV_CM_TAIL="development build: $LOGNAME $now [$basews]" -# we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process -# by avoiding repeated shell invocations to evaluate Makefile.master +# +# We export POUND_SIGN, RELEASE_DATE and DEV_CM_TAIL to speed up the build +# process by avoiding repeated shell invocations to evaluate Makefile.master # definitions. -export POUND_SIGN RELEASE_DATE DEV_CM +# +export POUND_SIGN RELEASE_DATE DEV_CM_TAIL maketype="distributed" if [[ -z "$MAKE" ]]; then @@ -1027,9 +1030,9 @@ function logshuffle { cat $build_time_file $build_environ_file $mail_msg_file \ > ${LLOG}/mail_msg if [ "$m_FLAG" = "y" ]; then - cat ${LLOG}/mail_msg | /usr/bin/mailx ${mailx_r} -s \ - "Nightly ${MACH} Build of `basename ${CODEMGR_WS}` ${state}." \ - ${MAILTO} + /usr/bin/mailx ${mailx_r} -s \ + "Nightly ${MACH} Build of ${basews} ${state}." \ + "${MAILTO}" < "${LLOG}/mail_msg" fi if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then @@ -1086,7 +1089,6 @@ function create_lock { eval $lockvar=$lockf while ! staffer ln -s $hostname.$STAFFER.$$ $lockf 2> /dev/null; do - basews=`basename $CODEMGR_WS` ls -l $lockf | nawk '{print $NF}' | IFS=. read host user pid if [ "$host" != "$hostname" ]; then echo "$MACH build of $basews apparently" \ |