author | Keith M Wesolowski <wesolows@foobazco.org> |
Wed, 17 Jul 2013 17:05:07 -0700 | |
changeset 14225 | 20c0ad5cefdf |
parent 14218 | 62094c23dbe2 |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/ksh -p |
2 |
# |
|
3 |
# CDDL HEADER START |
|
4 |
# |
|
5 |
# The contents of this file are subject to the terms of the |
|
900 | 6 |
# Common Development and Distribution License (the "License"). |
7 |
# You may not use this file except in compliance with the License. |
|
0 | 8 |
# |
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 |
# or http://www.opensolaris.org/os/licensing. |
|
11 |
# See the License for the specific language governing permissions |
|
12 |
# and limitations under the License. |
|
13 |
# |
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 |
# |
|
20 |
# CDDL HEADER END |
|
21 |
# |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
22 |
|
0 | 23 |
# |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
24 |
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
25 |
# Copyright 2008, 2010, Richard Lowe |
13272
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
26 |
# Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
13655
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
27 |
# Copyright 2012 Joshua M. Clulow <[email protected]> |
0 | 28 |
# |
29 |
# Based on the nightly script from the integration folks, |
|
30 |
# Mostly modified and owned by mike_s. |
|
31 |
# Changes also by kjc, dmk. |
|
32 |
# |
|
33 |
# BRINGOVER_WS may be specified in the env file. |
|
34 |
# The default is the old behavior of CLONE_WS |
|
35 |
# |
|
36 |
# -i on the command line, means fast options, so when it's on the |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
37 |
# command line (only), lint and check builds are skipped no matter what |
2371 | 38 |
# the setting of their individual flags are in NIGHTLY_OPTIONS. |
0 | 39 |
# |
40 |
# LINTDIRS can be set in the env file, format is a list of: |
|
41 |
# |
|
42 |
# /dirname-to-run-lint-on flag |
|
43 |
# |
|
44 |
# Where flag is: y - enable lint noise diff output |
|
45 |
# n - disable lint noise diff output |
|
46 |
# |
|
47 |
# For example: LINTDIRS="$SRC/uts n $SRC/stand y $SRC/psm y" |
|
48 |
# |
|
49 |
# OPTHOME and TEAMWARE may be set in the environment to override /opt |
|
50 |
# and /opt/teamware defaults. |
|
51 |
# |
|
52 |
||
53 |
# |
|
54 |
# The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout |
|
55 |
# under certain circumstances, which can really screw things up; unset it. |
|
56 |
# |
|
57 |
unset CDPATH |
|
58 |
||
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
59 |
# Get the absolute path of the nightly script that the user invoked. This |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
60 |
# may be a relative path, and we need to do this before changing directory. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
61 |
nightly_path=`whence $0` |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
62 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
63 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
64 |
# Keep track of where we found nightly so we can invoke the matching |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
65 |
# which_scm script. If that doesn't work, don't go guessing, just rely |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
66 |
# on the $PATH settings, which will generally give us either /opt/onbld |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
67 |
# or the user's workspace. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
68 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
69 |
WHICH_SCM=$(dirname $nightly_path)/which_scm |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
70 |
if [[ ! -x $WHICH_SCM ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
71 |
WHICH_SCM=which_scm |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
72 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
73 |
|
13272
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
74 |
function fatal_error |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
75 |
{ |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
76 |
print -u2 "nightly: $*" |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
77 |
exit 1 |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
78 |
} |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
79 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
80 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
81 |
# Function to do a DEBUG and non-DEBUG build. Needed because we might |
0 | 82 |
# need to do another for the source build, and since we only deliver DEBUG or |
83 |
# non-DEBUG packages. |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
84 |
# |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
85 |
# usage: normal_build |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
86 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
87 |
function normal_build { |
0 | 88 |
|
4629
963cac9a5d07
6570962 nightly -O should include closed binaries in BFU archives
kupfer
parents:
4174
diff
changeset
|
89 |
typeset orig_p_FLAG="$p_FLAG" |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
90 |
typeset crypto_signer="$CODESIGN_USER" |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
91 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
92 |
suffix="" |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
93 |
|
0 | 94 |
# non-DEBUG build begins |
95 |
||
96 |
if [ "$F_FLAG" = "n" ]; then |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
97 |
set_non_debug_build_flags |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
98 |
CODESIGN_USER="$crypto_signer" \ |
13185 | 99 |
build "non-DEBUG" "$suffix-nd" "-nd" "$MULTI_PROTO" |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
100 |
if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \ |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
101 |
"$p_FLAG" = "y" ]; then |
0 | 102 |
copy_ihv_pkgs non-DEBUG -nd |
103 |
fi |
|
104 |
else |
|
4629
963cac9a5d07
6570962 nightly -O should include closed binaries in BFU archives
kupfer
parents:
4174
diff
changeset
|
105 |
echo "\n==== No non-DEBUG $open_only build ====\n" >> "$LOGFILE" |
0 | 106 |
fi |
107 |
||
108 |
# non-DEBUG build ends |
|
109 |
||
110 |
# DEBUG build begins |
|
111 |
||
112 |
if [ "$D_FLAG" = "y" ]; then |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
113 |
set_debug_build_flags |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
114 |
CODESIGN_USER="$crypto_signer" \ |
13185 | 115 |
build "DEBUG" "$suffix" "" "$MULTI_PROTO" |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
116 |
if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \ |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
117 |
"$p_FLAG" = "y" ]; then |
0 | 118 |
copy_ihv_pkgs DEBUG "" |
119 |
fi |
|
120 |
else |
|
4629
963cac9a5d07
6570962 nightly -O should include closed binaries in BFU archives
kupfer
parents:
4174
diff
changeset
|
121 |
echo "\n==== No DEBUG $open_only build ====\n" >> "$LOGFILE" |
0 | 122 |
fi |
123 |
||
124 |
# DEBUG build ends |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
125 |
|
4629
963cac9a5d07
6570962 nightly -O should include closed binaries in BFU archives
kupfer
parents:
4174
diff
changeset
|
126 |
p_FLAG="$orig_p_FLAG" |
0 | 127 |
} |
128 |
||
2947 | 129 |
# |
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
130 |
# usage: run_hook HOOKNAME ARGS... |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
131 |
# |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
132 |
# If variable "$HOOKNAME" is defined, insert a section header into |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
133 |
# our logs and then run the command with ARGS |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
134 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
135 |
function run_hook { |
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
136 |
HOOKNAME=$1 |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
137 |
eval HOOKCMD=\$$HOOKNAME |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
138 |
shift |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
139 |
|
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
140 |
if [ -n "$HOOKCMD" ]; then |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
141 |
( |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
142 |
echo "\n==== Running $HOOKNAME command: $HOOKCMD ====\n" |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
143 |
( $HOOKCMD "$@" 2>&1 ) |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
144 |
if [ "$?" -ne 0 ]; then |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
145 |
# Let exit status propagate up |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
146 |
touch $TMPDIR/abort |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
147 |
fi |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
148 |
) | tee -a $mail_msg_file >> $LOGFILE |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
149 |
|
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
150 |
if [ -f $TMPDIR/abort ]; then |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
151 |
build_ok=n |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
152 |
echo "\nAborting at request of $HOOKNAME" | |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
153 |
tee -a $mail_msg_file >> $LOGFILE |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
154 |
exit 1 |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
155 |
fi |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
156 |
fi |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
157 |
} |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
158 |
|
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
159 |
# |
2947 | 160 |
# usage: filelist DESTDIR PATTERN |
161 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
162 |
function filelist { |
0 | 163 |
DEST=$1 |
164 |
PATTERN=$2 |
|
165 |
cd ${DEST} |
|
166 |
} |
|
167 |
||
168 |
# function to save off binaries after a full build for later |
|
169 |
# restoration |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
170 |
function save_binaries { |
0 | 171 |
# save off list of binaries |
172 |
echo "\n==== Saving binaries from build at `date` ====\n" | \ |
|
173 |
tee -a $mail_msg_file >> $LOGFILE |
|
174 |
rm -f ${BINARCHIVE} |
|
175 |
cd ${CODEMGR_WS} |
|
176 |
filelist ${CODEMGR_WS} '^preserve:' >> $LOGFILE |
|
177 |
filelist ${CODEMGR_WS} '^preserve:' | \ |
|
178 |
cpio -ocB 2>/dev/null | compress \ |
|
179 |
> ${BINARCHIVE} |
|
180 |
} |
|
181 |
||
182 |
# delete files |
|
2947 | 183 |
# usage: hybridize_files DESTDIR MAKE_TARGET |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
184 |
function hybridize_files { |
0 | 185 |
DEST=$1 |
186 |
MAKETARG=$2 |
|
187 |
||
188 |
echo "\n==== Hybridizing files at `date` ====\n" | \ |
|
189 |
tee -a $mail_msg_file >> $LOGFILE |
|
190 |
for i in `filelist ${DEST} '^delete:'` |
|
191 |
do |
|
192 |
echo "removing ${i}." | tee -a $mail_msg_file >> $LOGFILE |
|
193 |
rm -rf "${i}" |
|
194 |
done |
|
195 |
for i in `filelist ${DEST} '^hybridize:' ` |
|
196 |
do |
|
197 |
echo "hybridizing ${i}." | tee -a $mail_msg_file >> $LOGFILE |
|
198 |
rm -f ${i}+ |
|
199 |
sed -e "/^# HYBRID DELETE START/,/^# HYBRID DELETE END/d" \ |
|
200 |
< ${i} > ${i}+ |
|
201 |
mv ${i}+ ${i} |
|
202 |
done |
|
203 |
} |
|
204 |
||
205 |
# restore binaries into the proper source tree. |
|
2947 | 206 |
# usage: restore_binaries DESTDIR MAKE_TARGET |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
207 |
function restore_binaries { |
0 | 208 |
DEST=$1 |
209 |
MAKETARG=$2 |
|
210 |
||
211 |
echo "\n==== Restoring binaries to ${MAKETARG} at `date` ====\n" | \ |
|
212 |
tee -a $mail_msg_file >> $LOGFILE |
|
213 |
cd ${DEST} |
|
214 |
zcat ${BINARCHIVE} | \ |
|
215 |
cpio -idmucvB 2>/dev/null | tee -a $mail_msg_file >> ${LOGFILE} |
|
216 |
} |
|
217 |
||
218 |
# rename files we save binaries of |
|
2947 | 219 |
# usage: rename_files DESTDIR MAKE_TARGET |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
220 |
function rename_files { |
0 | 221 |
DEST=$1 |
222 |
MAKETARG=$2 |
|
223 |
echo "\n==== Renaming source files in ${MAKETARG} at `date` ====\n" | \ |
|
224 |
tee -a $mail_msg_file >> $LOGFILE |
|
225 |
for i in `filelist ${DEST} '^rename:'` |
|
226 |
do |
|
227 |
echo ${i} | tee -a $mail_msg_file >> ${LOGFILE} |
|
228 |
rm -f ${i}.export |
|
229 |
mv ${i} ${i}.export |
|
230 |
done |
|
231 |
} |
|
232 |
||
2947 | 233 |
# |
234 |
# Copy some or all of the source tree. |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
235 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
236 |
# Returns 0 for success, non-zero for failure. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
237 |
# |
2947 | 238 |
# usage: copy_source CODEMGR_WS DESTDIR LABEL SRCROOT |
239 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
240 |
function copy_source { |
0 | 241 |
WS=$1 |
242 |
DEST=$2 |
|
2947 | 243 |
label=$3 |
244 |
srcroot=$4 |
|
0 | 245 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
246 |
printf "\n==== Creating %s source from %s (%s) ====\n\n" \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
247 |
"$DEST" "$WS" "$label" | tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
248 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
249 |
printf "cleaning out %s\n" "$DEST." >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
250 |
rm -rf "$DEST" >> $LOGFILE 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
251 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
252 |
printf "creating %s\n" "$DEST." >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
253 |
mkdir -p "$DEST" 2>> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
254 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
255 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
256 |
printf "failed to create %s\n" "$DEST" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
257 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
258 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
259 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
260 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
261 |
cd "$WS" |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
262 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
263 |
printf "populating %s\n" "$DEST." >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
264 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
265 |
case "$SCM_TYPE" in |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
266 |
teamware) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
267 |
find $srcroot -name 's\.*' -a -type f -print | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
268 |
sed -e 's,SCCS\/s.,,' | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
269 |
grep -v '/\.del-*' | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
270 |
cpio -pd $DEST >>$LOGFILE 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
271 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
272 |
printf "cpio failed for %s\n" "$DEST" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
273 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
274 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
275 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
276 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
277 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
278 |
mercurial) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
279 |
copy_source_mercurial $DEST $srcroot |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
280 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
281 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
282 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
283 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
284 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
285 |
*) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
286 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
287 |
echo "Tree copy is not supported for workspace type" \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
288 |
"$SCM_TYPE" | tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
289 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
290 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
291 |
esac |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
292 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
293 |
return 0 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
294 |
} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
295 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
296 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
297 |
# Mercurial-specific copy code for copy_source(). Handles the |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
298 |
# combined open and closed trees. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
299 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
300 |
# Returns 0 for success, non-zero for failure. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
301 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
302 |
# usage: copy_source_mercurial destdir srcroot |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
303 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
304 |
function copy_source_mercurial { |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
305 |
typeset dest=$1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
306 |
typeset srcroot=$2 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
307 |
typeset open_top closed_top |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
308 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
309 |
case $srcroot in |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
310 |
usr) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
311 |
open_top=usr |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
312 |
if [[ "$CLOSED_IS_PRESENT" = yes ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
313 |
closed_top=usr/closed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
314 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
315 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
316 |
usr/closed*) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
317 |
if [[ "$CLOSED_IS_PRESENT" = no ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
318 |
printf "can't copy %s: closed tree not present.\n" \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
319 |
"$srcroot" | tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
320 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
321 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
322 |
closed_top="$srcroot" |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
323 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
324 |
*) |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
325 |
open_top="$srcroot" |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
326 |
;; |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
327 |
esac |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
328 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
329 |
if [[ -n "$open_top" ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
330 |
hg locate -I "$open_top" | cpio -pd "$dest" >>$LOGFILE 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
331 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
332 |
printf "cpio failed for %s\n" "$dest" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
333 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
334 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
335 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
336 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
337 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
338 |
if [[ -n "$closed_top" ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
339 |
mkdir -p "$dest/usr/closed" || return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
340 |
if [[ "$closed_top" = usr/closed ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
341 |
(cd usr/closed; hg locate | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
342 |
cpio -pd "$dest/usr/closed") >>$LOGFILE 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
343 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
344 |
printf "cpio failed for %s/usr/closed\n" \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
345 |
"$dest" | tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
346 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
347 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
348 |
else |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
349 |
# copy subtree of usr/closed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
350 |
closed_top=${closed_top#usr/closed/} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
351 |
(cd usr/closed; hg locate -I "$closed_top" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
352 |
cpio -pd "$dest/usr/closed") >>$LOGFILE 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
353 |
if (( $? != 0 )) ; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
354 |
printf "cpio failed for %s/usr/closed/%s\n" \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
355 |
"$dest" "$closed_top" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
356 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
357 |
return 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
358 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
359 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
360 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
361 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
362 |
return 0 |
2947 | 363 |
} |
0 | 364 |
|
2947 | 365 |
# |
366 |
# function to create (but not build) the export/crypt source tree. |
|
367 |
# usage: set_up_source_build CODEMGR_WS DESTDIR MAKE_TARGET |
|
368 |
# Sets SRC to the modified source tree, for use by the caller when it |
|
369 |
# builds the tree. |
|
370 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
371 |
function set_up_source_build { |
2947 | 372 |
WS=$1 |
373 |
DEST=$2 |
|
374 |
MAKETARG=$3 |
|
375 |
||
376 |
copy_source $WS $DEST $MAKETARG usr |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
377 |
if (( $? != 0 )); then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
378 |
echo "\nCould not copy source tree for source build." | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
379 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
380 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
381 |
return |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
382 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
383 |
|
0 | 384 |
SRC=${DEST}/usr/src |
385 |
||
386 |
cd $SRC |
|
387 |
rm -f ${MAKETARG}.out |
|
388 |
echo "making ${MAKETARG} in ${SRC}." >> $LOGFILE |
|
389 |
/bin/time $MAKE -e ${MAKETARG} 2>&1 | \ |
|
390 |
tee -a $SRC/${MAKETARG}.out >> $LOGFILE |
|
391 |
echo "\n==== ${MAKETARG} build errors ====\n" >> $mail_msg_file |
|
392 |
egrep ":" $SRC/${MAKETARG}.out | \ |
|
393 |
egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ |
|
394 |
egrep -v "Ignoring unknown host" | \ |
|
395 |
egrep -v "warning" >> $mail_msg_file |
|
396 |
||
397 |
echo "clearing state files." >> $LOGFILE |
|
398 |
find . -name '.make*' -exec rm -f {} \; |
|
399 |
} |
|
400 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
401 |
# Return library search directive as function of given root. |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
402 |
function myldlibs { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
403 |
echo "-L$1/lib -L$1/usr/lib" |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
404 |
} |
0 | 405 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
406 |
# Return header search directive as function of given root. |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
407 |
function myheaders { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
408 |
echo "-I$1/usr/include" |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
409 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
410 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
411 |
# |
12776
0a254b4b5ca4
6932341 bfu should be removed
jmcp <James.McPherson@Sun.COM>
parents:
12658
diff
changeset
|
412 |
# Function to do the build, including package generation. |
13185 | 413 |
# usage: build LABEL SUFFIX ND MULTIPROTO |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
414 |
# - LABEL is used to tag build output. |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
415 |
# - SUFFIX is used to distinguish files (e.g., DEBUG vs non-DEBUG, |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
416 |
# open-only vs full tree). |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
417 |
# - ND is "-nd" (non-DEBUG builds) or "" (DEBUG builds). |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
418 |
# - If MULTIPROTO is "yes", it means to name the proto area according to |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
419 |
# SUFFIX. Otherwise ("no"), (re)use the standard proto area. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
420 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
421 |
function build { |
0 | 422 |
LABEL=$1 |
423 |
SUFFIX=$2 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
424 |
ND=$3 |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
425 |
MULTIPROTO=$4 |
0 | 426 |
INSTALLOG=install${SUFFIX}-${MACH} |
427 |
NOISE=noise${SUFFIX}-${MACH} |
|
428 |
PKGARCHIVE=${PKGARCHIVE_ORIG}${SUFFIX} |
|
429 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
430 |
ORIGROOT=$ROOT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
431 |
[ $MULTIPROTO = no ] || export ROOT=$ROOT$SUFFIX |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
432 |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
433 |
if [[ "$O_FLAG" = y ]]; then |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
434 |
echo "\nSetting CLOSEDROOT= ${ROOT}-closed\n" >> $LOGFILE |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
435 |
export CLOSEDROOT=${ROOT}-closed |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
436 |
fi |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
437 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
438 |
export ENVLDLIBS1=`myldlibs $ROOT` |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
439 |
export ENVCPPFLAGS1=`myheaders $ROOT` |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
440 |
|
0 | 441 |
this_build_ok=y |
442 |
# |
|
443 |
# Build OS-Networking source |
|
444 |
# |
|
445 |
echo "\n==== Building OS-Net source at `date` ($LABEL) ====\n" \ |
|
446 |
>> $LOGFILE |
|
447 |
||
448 |
rm -f $SRC/${INSTALLOG}.out |
|
449 |
cd $SRC |
|
450 |
/bin/time $MAKE -e install 2>&1 | \ |
|
451 |
tee -a $SRC/${INSTALLOG}.out >> $LOGFILE |
|
1810 | 452 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
453 |
if [[ "$SCM_TYPE" = teamware ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
454 |
echo "\n==== SCCS Noise ($LABEL) ====\n" >> $mail_msg_file |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
455 |
egrep 'sccs(check:| *get)' $SRC/${INSTALLOG}.out >> \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
456 |
$mail_msg_file |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
457 |
fi |
1810 | 458 |
|
0 | 459 |
echo "\n==== Build errors ($LABEL) ====\n" >> $mail_msg_file |
460 |
egrep ":" $SRC/${INSTALLOG}.out | |
|
461 |
egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ |
|
462 |
egrep -v "Ignoring unknown host" | \ |
|
463 |
egrep -v "cc .* -o error " | \ |
|
464 |
egrep -v "warning" >> $mail_msg_file |
|
465 |
if [ "$?" = "0" ]; then |
|
466 |
build_ok=n |
|
467 |
this_build_ok=n |
|
468 |
fi |
|
469 |
grep "bootblock image is .* bytes too big" $SRC/${INSTALLOG}.out \ |
|
470 |
>> $mail_msg_file |
|
471 |
if [ "$?" = "0" ]; then |
|
472 |
build_ok=n |
|
473 |
this_build_ok=n |
|
474 |
fi |
|
475 |
||
476 |
if [ "$W_FLAG" = "n" ]; then |
|
477 |
echo "\n==== Build warnings ($LABEL) ====\n" >>$mail_msg_file |
|
478 |
egrep -i warning: $SRC/${INSTALLOG}.out \ |
|
479 |
| egrep -v '^tic:' \ |
|
11690
1c19a1778a4f
6914728 Add dl_iterate_phdr() function to ld.so.1
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
11575
diff
changeset
|
480 |
| egrep -v "symbol (\`|')timezone' has differing types:" \ |
2298
8cac95e27f87
4416654 warning filter list in nightly should be cleaned up (fix whitespace)
meem
parents:
2294
diff
changeset
|
481 |
| egrep -v "parameter <PSTAMP> set to" \ |
0 | 482 |
| egrep -v "Ignoring unknown host" \ |
483 |
| egrep -v "redefining segment flags attribute for" \ |
|
484 |
>> $mail_msg_file |
|
485 |
fi |
|
486 |
||
487 |
echo "\n==== Ended OS-Net source build at `date` ($LABEL) ====\n" \ |
|
488 |
>> $LOGFILE |
|
489 |
||
490 |
echo "\n==== Elapsed build time ($LABEL) ====\n" >>$mail_msg_file |
|
491 |
tail -3 $SRC/${INSTALLOG}.out >>$mail_msg_file |
|
492 |
||
493 |
if [ "$i_FLAG" = "n" -a "$W_FLAG" = "n" ]; then |
|
494 |
rm -f $SRC/${NOISE}.ref |
|
495 |
if [ -f $SRC/${NOISE}.out ]; then |
|
496 |
mv $SRC/${NOISE}.out $SRC/${NOISE}.ref |
|
497 |
fi |
|
498 |
grep : $SRC/${INSTALLOG}.out \ |
|
499 |
| egrep -v '^/' \ |
|
500 |
| egrep -v '^(Start|Finish|real|user|sys|./bld_awk)' \ |
|
501 |
| egrep -v '^tic:' \ |
|
502 |
| egrep -v '^mcs' \ |
|
503 |
| egrep -v '^LD_LIBRARY_PATH=' \ |
|
504 |
| egrep -v 'ar: creating' \ |
|
505 |
| egrep -v 'ar: writing' \ |
|
506 |
| egrep -v 'conflicts:' \ |
|
507 |
| egrep -v ':saved created' \ |
|
508 |
| egrep -v '^stty.*c:' \ |
|
509 |
| egrep -v '^mfgname.c:' \ |
|
510 |
| egrep -v '^uname-i.c:' \ |
|
511 |
| egrep -v '^volumes.c:' \ |
|
512 |
| egrep -v '^lint library construction:' \ |
|
513 |
| egrep -v 'tsort: INFORM:' \ |
|
514 |
| egrep -v 'stripalign:' \ |
|
515 |
| egrep -v 'chars, width' \ |
|
11690
1c19a1778a4f
6914728 Add dl_iterate_phdr() function to ld.so.1
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
11575
diff
changeset
|
516 |
| egrep -v "symbol (\`|')timezone' has differing types:" \ |
0 | 517 |
| egrep -v 'PSTAMP' \ |
518 |
| egrep -v '|%WHOANDWHERE%|' \ |
|
519 |
| egrep -v '^Manifying' \ |
|
520 |
| egrep -v 'Ignoring unknown host' \ |
|
521 |
| egrep -v 'Processing method:' \ |
|
522 |
| egrep -v '^Writing' \ |
|
523 |
| egrep -v 'spellin1:' \ |
|
524 |
| egrep -v '^adding:' \ |
|
525 |
| egrep -v "^echo 'msgid" \ |
|
526 |
| egrep -v '^echo ' \ |
|
527 |
| egrep -v '\.c:$' \ |
|
528 |
| egrep -v '^Adding file:' \ |
|
529 |
| egrep -v 'CLASSPATH=' \ |
|
530 |
| egrep -v '\/var\/mail\/:saved' \ |
|
531 |
| egrep -v -- '-DUTS_VERSION=' \ |
|
532 |
| egrep -v '^Running Mkbootstrap' \ |
|
533 |
| egrep -v '^Applet length read:' \ |
|
534 |
| egrep -v 'bytes written:' \ |
|
535 |
| egrep -v '^File:SolarisAuthApplet.bin' \ |
|
536 |
| egrep -v -i 'jibversion' \ |
|
537 |
| egrep -v '^Output size:' \ |
|
538 |
| egrep -v '^Solo size statistics:' \ |
|
539 |
| egrep -v '^Using ROM API Version' \ |
|
540 |
| egrep -v '^Zero Signature length:' \ |
|
541 |
| egrep -v '^Note \(probably harmless\):' \ |
|
542 |
| egrep -v '::' \ |
|
543 |
| egrep -v -- '-xcache' \ |
|
411
ae71859f7fc8
6302154 fix for 6297567 introduces some undesirable output changes
wesolows
parents:
338
diff
changeset
|
544 |
| egrep -v '^\+' \ |
1729
6adc0fdde479
6242262 ON should be buildable with gcc (fix build noise)
wesolows
parents:
1557
diff
changeset
|
545 |
| egrep -v '^cc1: note: -fwritable-strings' \ |
2730
dc5dc85d6c88
6452279 svc-snmpdx shouldn't ignore return code from daemon startup
johnz
parents:
2639
diff
changeset
|
546 |
| egrep -v 'svccfg-native -s svc:/' \ |
0 | 547 |
| sort | uniq >$SRC/${NOISE}.out |
548 |
if [ ! -f $SRC/${NOISE}.ref ]; then |
|
549 |
cp $SRC/${NOISE}.out $SRC/${NOISE}.ref |
|
550 |
fi |
|
551 |
echo "\n==== Build noise differences ($LABEL) ====\n" \ |
|
552 |
>>$mail_msg_file |
|
553 |
diff $SRC/${NOISE}.ref $SRC/${NOISE}.out >>$mail_msg_file |
|
554 |
fi |
|
555 |
||
556 |
# |
|
3824
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
557 |
# Re-sign selected binaries using signing server |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
558 |
# (gatekeeper builds only) |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
559 |
# |
4174
e72663e55221
6550077 signproto/signit don't produce ERROR if ssh fails
johnz
parents:
4162
diff
changeset
|
560 |
if [ -n "$CODESIGN_USER" -a "$this_build_ok" = "y" ]; then |
3824
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
561 |
echo "\n==== Signing proto area at `date` ====\n" >> $LOGFILE |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
562 |
signing_file="${TMPDIR}/signing" |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
563 |
rm -f ${signing_file} |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
564 |
export CODESIGN_USER |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
565 |
signproto $SRC/tools/codesign/creds 2>&1 | \ |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
566 |
tee -a ${signing_file} >> $LOGFILE |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
567 |
echo "\n==== Finished signing proto area at `date` ====\n" \ |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
568 |
>> $LOGFILE |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
569 |
echo "\n==== Crypto module signing errors ($LABEL) ====\n" \ |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
570 |
>> $mail_msg_file |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
571 |
egrep 'WARNING|ERROR' ${signing_file} >> $mail_msg_file |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
572 |
if (( $? == 0 )) ; then |
4174
e72663e55221
6550077 signproto/signit don't produce ERROR if ssh fails
johnz
parents:
4162
diff
changeset
|
573 |
build_ok=n |
e72663e55221
6550077 signproto/signit don't produce ERROR if ssh fails
johnz
parents:
4162
diff
changeset
|
574 |
this_build_ok=n |
e72663e55221
6550077 signproto/signit don't produce ERROR if ssh fails
johnz
parents:
4162
diff
changeset
|
575 |
fi |
3824
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
576 |
fi |
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
577 |
|
5e04e5a474b4
6501102 elfsigning of crypto modules needs to be done by ON gatekeeping staff
rotondo
parents:
3644
diff
changeset
|
578 |
# |
0 | 579 |
# Building Packages |
580 |
# |
|
581 |
if [ "$p_FLAG" = "y" -a "$this_build_ok" = "y" ]; then |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
582 |
if [ -d $SRC/pkg -o -d $SRC/pkgdefs ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
583 |
echo "\n==== Creating $LABEL packages at `date` ====\n" \ |
338 | 584 |
>> $LOGFILE |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
585 |
echo "Clearing out $PKGARCHIVE ..." >> $LOGFILE |
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
586 |
rm -rf $PKGARCHIVE >> "$LOGFILE" 2>&1 |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
587 |
mkdir -p $PKGARCHIVE >> "$LOGFILE" 2>&1 |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
588 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
589 |
for d in pkg pkgdefs; do |
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
590 |
if [ ! -f "$SRC/$d/Makefile" ]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
591 |
continue |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
592 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
593 |
rm -f $SRC/$d/${INSTALLOG}.out |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
594 |
cd $SRC/$d |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
595 |
/bin/time $MAKE -e install 2>&1 | \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
596 |
tee -a $SRC/$d/${INSTALLOG}.out >> $LOGFILE |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
597 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
598 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
599 |
echo "\n==== package build errors ($LABEL) ====\n" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
600 |
>> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
601 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
602 |
for d in pkg pkgdefs; do |
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
603 |
if [ ! -f "$SRC/$d/Makefile" ]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
604 |
continue |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
605 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
606 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
607 |
egrep "${MAKE}|ERROR|WARNING" $SRC/$d/${INSTALLOG}.out | \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
608 |
grep ':' | \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
609 |
grep -v PSTAMP | \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
610 |
egrep -v "Ignoring unknown host" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
611 |
>> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
612 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
613 |
else |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
614 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
615 |
# Handle it gracefully if -p was set but there are |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
616 |
# neither pkg nor pkgdefs directories. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
617 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
618 |
echo "\n==== No $LABEL packages to build ====\n" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
619 |
>> $LOGFILE |
338 | 620 |
fi |
0 | 621 |
else |
622 |
echo "\n==== Not creating $LABEL packages ====\n" >> $LOGFILE |
|
623 |
fi |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
624 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
625 |
ROOT=$ORIGROOT |
0 | 626 |
} |
627 |
||
2947 | 628 |
# Usage: dolint /dir y|n |
629 |
# Arg. 2 is a flag to turn on/off the lint diff output |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
630 |
function dolint { |
0 | 631 |
if [ ! -d "$1" ]; then |
2947 | 632 |
echo "dolint error: $1 is not a directory" |
0 | 633 |
exit 1 |
634 |
fi |
|
635 |
||
636 |
if [ "$2" != "y" -a "$2" != "n" ]; then |
|
2947 | 637 |
echo "dolint internal error: $2 should be 'y' or 'n'" |
0 | 638 |
exit 1 |
639 |
fi |
|
640 |
||
641 |
lintdir=$1 |
|
642 |
dodiff=$2 |
|
643 |
base=`basename $lintdir` |
|
644 |
LINTOUT=$lintdir/lint-${MACH}.out |
|
645 |
LINTNOISE=$lintdir/lint-noise-${MACH} |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
646 |
export ENVLDLIBS1=`myldlibs $ROOT` |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
647 |
export ENVCPPFLAGS1=`myheaders $ROOT` |
0 | 648 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
649 |
set_debug_build_flags |
0 | 650 |
|
651 |
# |
|
652 |
# '$MAKE lint' in $lintdir |
|
653 |
# |
|
654 |
echo "\n==== Begin '$MAKE lint' of $base at `date` ====\n" >> $LOGFILE |
|
655 |
||
656 |
# remove old lint.out |
|
657 |
rm -f $lintdir/lint.out $lintdir/lint-noise.out |
|
658 |
if [ -f $lintdir/lint-noise.ref ]; then |
|
659 |
mv $lintdir/lint-noise.ref ${LINTNOISE}.ref |
|
660 |
fi |
|
661 |
||
662 |
rm -f $LINTOUT |
|
663 |
cd $lintdir |
|
664 |
# |
|
665 |
# Remove all .ln files to ensure a full reference file |
|
666 |
# |
|
667 |
rm -f Nothing_to_remove \ |
|
13660
189bdb3d9698
1960 developer tools should support git
Richard Lowe <richlowe@richlowe.net>
parents:
13655
diff
changeset
|
668 |
`find . \( -name SCCS -o -name .hg -o -name .svn -o -name .git \) \ |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
669 |
-prune -o -type f -name '*.ln' -print ` |
0 | 670 |
|
671 |
/bin/time $MAKE -ek lint 2>&1 | \ |
|
672 |
tee -a $LINTOUT >> $LOGFILE |
|
673 |
echo "\n==== '$MAKE lint' of $base ERRORS ====\n" >> $mail_msg_file |
|
674 |
grep "$MAKE:" $LINTOUT | |
|
675 |
egrep -v "Ignoring unknown host" \ |
|
676 |
>> $mail_msg_file |
|
677 |
||
678 |
echo "\n==== Ended '$MAKE lint' of $base at `date` ====\n" >> $LOGFILE |
|
679 |
||
680 |
echo "\n==== Elapsed time of '$MAKE lint' of $base ====\n" \ |
|
681 |
>>$mail_msg_file |
|
682 |
tail -3 $LINTOUT >>$mail_msg_file |
|
683 |
||
684 |
rm -f ${LINTNOISE}.ref |
|
685 |
if [ -f ${LINTNOISE}.out ]; then |
|
686 |
mv ${LINTNOISE}.out ${LINTNOISE}.ref |
|
687 |
fi |
|
688 |
grep : $LINTOUT | \ |
|
689 |
egrep -v '^(real|user|sys)' | |
|
690 |
egrep -v '(library construction)' | \ |
|
691 |
egrep -v ': global crosschecks' | \ |
|
692 |
egrep -v 'Ignoring unknown host' | \ |
|
693 |
egrep -v '\.c:$' | \ |
|
694 |
sort | uniq > ${LINTNOISE}.out |
|
695 |
if [ ! -f ${LINTNOISE}.ref ]; then |
|
696 |
cp ${LINTNOISE}.out ${LINTNOISE}.ref |
|
697 |
fi |
|
698 |
if [ "$dodiff" != "n" ]; then |
|
699 |
echo "\n==== lint warnings $base ====\n" \ |
|
700 |
>>$mail_msg_file |
|
701 |
# should be none, though there are a few that were filtered out |
|
702 |
# above |
|
703 |
egrep -i '(warning|lint):' ${LINTNOISE}.out \ |
|
704 |
| sort | uniq >> $mail_msg_file |
|
705 |
echo "\n==== lint noise differences $base ====\n" \ |
|
706 |
>> $mail_msg_file |
|
707 |
diff ${LINTNOISE}.ref ${LINTNOISE}.out \ |
|
708 |
>> $mail_msg_file |
|
709 |
fi |
|
710 |
} |
|
711 |
||
712 |
# Install proto area from IHV build |
|
713 |
||
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
714 |
function copy_ihv_proto { |
0 | 715 |
|
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
716 |
echo "\n==== Installing IHV proto area ====\n" \ |
0 | 717 |
>> $LOGFILE |
718 |
if [ -d "$IA32_IHV_ROOT" ]; then |
|
719 |
if [ ! -d "$ROOT" ]; then |
|
720 |
echo "mkdir -p $ROOT" >> $LOGFILE |
|
721 |
mkdir -p $ROOT |
|
722 |
fi |
|
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
723 |
echo "copying $IA32_IHV_ROOT to $ROOT\n" >> $LOGFILE |
0 | 724 |
cd $IA32_IHV_ROOT |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
725 |
tar cf - . | (cd $ROOT; umask 0; tar xpf - ) 2>&1 >> $LOGFILE |
0 | 726 |
else |
727 |
echo "$IA32_IHV_ROOT: not found" >> $LOGFILE |
|
728 |
fi |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
729 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
730 |
if [ "$MULTI_PROTO" = yes ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
731 |
if [ ! -d "$ROOT-nd" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
732 |
echo "mkdir -p $ROOT-nd" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
733 |
mkdir -p $ROOT-nd |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
734 |
fi |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
735 |
# If there's a non-DEBUG version of the IHV proto area, |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
736 |
# copy it, but copy something if there's not. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
737 |
if [ -d "$IA32_IHV_ROOT-nd" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
738 |
echo "copying $IA32_IHV_ROOT-nd to $ROOT-nd\n" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
739 |
cd $IA32_IHV_ROOT-nd |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
740 |
elif [ -d "$IA32_IHV_ROOT" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
741 |
echo "copying $IA32_IHV_ROOT to $ROOT-nd\n" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
742 |
cd $IA32_IHV_ROOT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
743 |
else |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
744 |
echo "$IA32_IHV_ROOT{-nd,}: not found" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
745 |
return |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
746 |
fi |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
747 |
tar cf - . | (cd $ROOT-nd; umask 0; tar xpf - ) 2>&1 >> $LOGFILE |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
748 |
fi |
0 | 749 |
} |
750 |
||
751 |
# Install IHV packages in PKGARCHIVE |
|
2947 | 752 |
# usage: copy_ihv_pkgs LABEL SUFFIX |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
753 |
function copy_ihv_pkgs { |
0 | 754 |
LABEL=$1 |
755 |
SUFFIX=$2 |
|
756 |
# always use non-DEBUG IHV packages |
|
757 |
IA32_IHV_PKGS=${IA32_IHV_PKGS_ORIG}-nd |
|
758 |
PKGARCHIVE=${PKGARCHIVE_ORIG}${SUFFIX} |
|
759 |
||
760 |
echo "\n==== Installing IHV packages from $IA32_IHV_PKGS ($LABEL) ====\n" \ |
|
761 |
>> $LOGFILE |
|
762 |
if [ -d "$IA32_IHV_PKGS" ]; then |
|
763 |
cd $IA32_IHV_PKGS |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
764 |
tar cf - * | \ |
0 | 765 |
(cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE |
766 |
else |
|
767 |
echo "$IA32_IHV_PKGS: not found" >> $LOGFILE |
|
768 |
fi |
|
769 |
||
770 |
echo "\n==== Installing IHV packages from $IA32_IHV_BINARY_PKGS ($LABEL) ====\n" \ |
|
771 |
>> $LOGFILE |
|
772 |
if [ -d "$IA32_IHV_BINARY_PKGS" ]; then |
|
773 |
cd $IA32_IHV_BINARY_PKGS |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
774 |
tar cf - * | \ |
0 | 775 |
(cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE |
776 |
else |
|
777 |
echo "$IA32_IHV_BINARY_PKGS: not found" >> $LOGFILE |
|
778 |
fi |
|
779 |
} |
|
780 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
781 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
782 |
# Build and install the onbld tools. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
783 |
# |
2947 | 784 |
# usage: build_tools DESTROOT |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
785 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
786 |
# returns non-zero status if the build was successful. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
787 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
788 |
function build_tools { |
0 | 789 |
DESTROOT=$1 |
790 |
||
791 |
INSTALLOG=install-${MACH} |
|
792 |
||
793 |
echo "\n==== Building tools at `date` ====\n" \ |
|
794 |
>> $LOGFILE |
|
795 |
||
796 |
rm -f ${TOOLS}/${INSTALLOG}.out |
|
797 |
cd ${TOOLS} |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
798 |
/bin/time $MAKE TOOLS_PROTO=${DESTROOT} -e install 2>&1 | \ |
0 | 799 |
tee -a ${TOOLS}/${INSTALLOG}.out >> $LOGFILE |
800 |
||
801 |
echo "\n==== Tools build errors ====\n" >> $mail_msg_file |
|
802 |
||
803 |
egrep ":" ${TOOLS}/${INSTALLOG}.out | |
|
804 |
egrep -e "(${MAKE}:|[ ]error[: \n])" | \ |
|
805 |
egrep -v "Ignoring unknown host" | \ |
|
806 |
egrep -v warning >> $mail_msg_file |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
807 |
return $? |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
808 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
809 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
810 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
811 |
# Set up to use locally installed tools. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
812 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
813 |
# usage: use_tools TOOLSROOT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
814 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
815 |
function use_tools { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
816 |
TOOLSROOT=$1 |
0 | 817 |
|
12374
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
818 |
# |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
819 |
# If we're not building ON workspace, then the TOOLSROOT |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
820 |
# settings here are clearly ignored by the workspace |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
821 |
# makefiles, prepending nonexistent directories to PATH is |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
822 |
# harmless, and we clearly do not wish to override |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
823 |
# ONBLD_TOOLS. |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
824 |
# |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
825 |
# If we're building an ON workspace, then the prepended PATH |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
826 |
# elements should supercede the preexisting ONBLD_TOOLS paths, |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
827 |
# and we want to override ONBLD_TOOLS to catch the tools that |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
828 |
# don't have specific path env vars here. |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
829 |
# |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
830 |
# So the only conditional behavior is overriding ONBLD_TOOLS, |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
831 |
# and we check for "an ON workspace" by looking for |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
832 |
# ${TOOLSROOT}/opt/onbld. |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
833 |
# |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
834 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
835 |
STABS=${TOOLSROOT}/opt/onbld/bin/${MACH}/stabs |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
836 |
export STABS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
837 |
CTFSTABS=${TOOLSROOT}/opt/onbld/bin/${MACH}/ctfstabs |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
838 |
export CTFSTABS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
839 |
GENOFFSETS=${TOOLSROOT}/opt/onbld/bin/genoffsets |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
840 |
export GENOFFSETS |
0 | 841 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
842 |
CTFCONVERT=${TOOLSROOT}/opt/onbld/bin/${MACH}/ctfconvert |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
843 |
export CTFCONVERT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
844 |
CTFMERGE=${TOOLSROOT}/opt/onbld/bin/${MACH}/ctfmerge |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
845 |
export CTFMERGE |
0 | 846 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
847 |
CTFCVTPTBL=${TOOLSROOT}/opt/onbld/bin/ctfcvtptbl |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
848 |
export CTFCVTPTBL |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
849 |
CTFFINDMOD=${TOOLSROOT}/opt/onbld/bin/ctffindmod |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
850 |
export CTFFINDMOD |
0 | 851 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
852 |
if [ "$VERIFY_ELFSIGN" = "y" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
853 |
ELFSIGN=${TOOLSROOT}/opt/onbld/bin/elfsigncmp |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
854 |
else |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
855 |
ELFSIGN=${TOOLSROOT}/opt/onbld/bin/${MACH}/elfsign |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
856 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
857 |
export ELFSIGN |
0 | 858 |
|
12374
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
859 |
PATH="${TOOLSROOT}/opt/onbld/bin/${MACH}:${PATH}" |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
860 |
PATH="${TOOLSROOT}/opt/onbld/bin:${PATH}" |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
861 |
export PATH |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
862 |
|
12374
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
863 |
if [ -d "${TOOLSROOT}/opt/onbld" ]; then |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
864 |
ONBLD_TOOLS=${TOOLSROOT}/opt/onbld |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
865 |
export ONBLD_TOOLS |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
866 |
fi |
10222
bc1378aafa34
6867214 nightly issues message about all new env vars from -t except ONBLD_TOOLS
Dan Mick <Dan.Mick@Sun.COM>
parents:
10194
diff
changeset
|
867 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
868 |
echo "\n==== New environment settings. ====\n" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
869 |
echo "STABS=${STABS}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
870 |
echo "CTFSTABS=${CTFSTABS}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
871 |
echo "CTFCONVERT=${CTFCONVERT}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
872 |
echo "CTFMERGE=${CTFMERGE}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
873 |
echo "CTFCVTPTBL=${CTFCVTPTBL}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
874 |
echo "CTFFINDMOD=${CTFFINDMOD}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
875 |
echo "ELFSIGN=${ELFSIGN}" >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
876 |
echo "PATH=${PATH}" >> $LOGFILE |
10222
bc1378aafa34
6867214 nightly issues message about all new env vars from -t except ONBLD_TOOLS
Dan Mick <Dan.Mick@Sun.COM>
parents:
10194
diff
changeset
|
877 |
echo "ONBLD_TOOLS=${ONBLD_TOOLS}" >> $LOGFILE |
0 | 878 |
} |
879 |
||
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
880 |
function staffer { |
0 | 881 |
if [ $ISUSER -ne 0 ]; then |
882 |
"$@" |
|
883 |
else |
|
884 |
arg="\"$1\"" |
|
885 |
shift |
|
886 |
for i |
|
887 |
do |
|
888 |
arg="$arg \"$i\"" |
|
889 |
done |
|
890 |
eval su $STAFFER -c \'$arg\' |
|
891 |
fi |
|
892 |
} |
|
893 |
||
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
894 |
# |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
895 |
# Verify that the closed tree is present if it needs to be. |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
896 |
# Sets CLOSED_IS_PRESENT for future use. |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
897 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
898 |
function check_closed_tree { |
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
899 |
if [ -z "$CLOSED_IS_PRESENT" ]; then |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
900 |
if [ -d $CODEMGR_WS/usr/closed ]; then |
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
901 |
CLOSED_IS_PRESENT="yes" |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
902 |
else |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
903 |
CLOSED_IS_PRESENT="no" |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
904 |
fi |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
905 |
export CLOSED_IS_PRESENT |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
906 |
fi |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
907 |
if [[ "$CLOSED_IS_PRESENT" = no && ! -d "$ON_CLOSED_BINS" ]]; then |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
908 |
# |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
909 |
# If it's an old (pre-split) tree or an empty |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
910 |
# workspace, don't complain. |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
911 |
# |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
912 |
if grep -s CLOSED_BUILD $SRC/Makefile.master > /dev/null; then |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
913 |
echo "If the closed sources are not present," \ |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
914 |
"ON_CLOSED_BINS" |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
915 |
echo "must point to the closed binaries tree." |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
916 |
build_ok=n |
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
917 |
exit 1 |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
918 |
fi |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
919 |
fi |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
920 |
} |
0 | 921 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
922 |
function obsolete_build { |
2371 | 923 |
echo "WARNING: Obsolete $1 build requested; request will be ignored" |
924 |
} |
|
925 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
926 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
927 |
# wrapper over wsdiff. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
928 |
# usage: do_wsdiff LABEL OLDPROTO NEWPROTO |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
929 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
930 |
function do_wsdiff { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
931 |
label=$1 |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
932 |
oldproto=$2 |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
933 |
newproto=$3 |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
934 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
935 |
wsdiff="wsdiff" |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
936 |
[ "$t_FLAG" = y ] && wsdiff="wsdiff -t" |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
937 |
|
12899
5abbd90da85a
6593083 wsdiff should exclude PASS fields from lintdump output before comparison
Vladimir Kotal <Vladimir.Kotal@Sun.COM>
parents:
12776
diff
changeset
|
938 |
echo "\n==== Getting object changes since last build at `date`" \ |
5abbd90da85a
6593083 wsdiff should exclude PASS fields from lintdump output before comparison
Vladimir Kotal <Vladimir.Kotal@Sun.COM>
parents:
12776
diff
changeset
|
939 |
"($label) ====\n" | tee -a $LOGFILE >> $mail_msg_file |
5abbd90da85a
6593083 wsdiff should exclude PASS fields from lintdump output before comparison
Vladimir Kotal <Vladimir.Kotal@Sun.COM>
parents:
12776
diff
changeset
|
940 |
$wsdiff -s -r ${TMPDIR}/wsdiff.results $oldproto $newproto 2>&1 | \ |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
941 |
tee -a $LOGFILE >> $mail_msg_file |
12899
5abbd90da85a
6593083 wsdiff should exclude PASS fields from lintdump output before comparison
Vladimir Kotal <Vladimir.Kotal@Sun.COM>
parents:
12776
diff
changeset
|
942 |
echo "\n==== Object changes determined at `date` ($label) ====\n" | \ |
5abbd90da85a
6593083 wsdiff should exclude PASS fields from lintdump output before comparison
Vladimir Kotal <Vladimir.Kotal@Sun.COM>
parents:
12776
diff
changeset
|
943 |
tee -a $LOGFILE >> $mail_msg_file |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
944 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
945 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
946 |
# |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
947 |
# Functions for setting build flags (DEBUG/non-DEBUG). Keep them |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
948 |
# together. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
949 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
950 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
951 |
function set_non_debug_build_flags { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
952 |
export INTERNAL_RELEASE_BUILD ; INTERNAL_RELEASE_BUILD= |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
953 |
export RELEASE_BUILD ; RELEASE_BUILD= |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
954 |
unset EXTRA_OPTIONS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
955 |
unset EXTRA_CFLAGS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
956 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
957 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
958 |
function set_debug_build_flags { |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
959 |
export INTERNAL_RELEASE_BUILD ; INTERNAL_RELEASE_BUILD= |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
960 |
unset RELEASE_BUILD |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
961 |
unset EXTRA_OPTIONS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
962 |
unset EXTRA_CFLAGS |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
963 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
964 |
|
2371 | 965 |
|
0 | 966 |
MACH=`uname -p` |
967 |
||
968 |
if [ "$OPTHOME" = "" ]; then |
|
969 |
OPTHOME=/opt |
|
970 |
export OPTHOME |
|
971 |
fi |
|
972 |
if [ "$TEAMWARE" = "" ]; then |
|
973 |
TEAMWARE=$OPTHOME/teamware |
|
974 |
export TEAMWARE |
|
975 |
fi |
|
976 |
||
12658
abe3f7fcaa24
6957957 nightly +t flag does not work
Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM>
parents:
12649
diff
changeset
|
977 |
USAGE='Usage: nightly [-in] [+t] [-V VERS ] [ -S E|D|H|O ] <env_file> |
0 | 978 |
|
979 |
Where: |
|
2371 | 980 |
-i Fast incremental options (no clobber, lint, check) |
0 | 981 |
-n Do not do a bringover |
12658
abe3f7fcaa24
6957957 nightly +t flag does not work
Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM>
parents:
12649
diff
changeset
|
982 |
+t Use the build tools in $ONBLD_TOOLS/bin |
0 | 983 |
-V VERS set the build version string to VERS |
984 |
-S Build a variant of the source product |
|
985 |
E - build exportable source |
|
986 |
D - build domestic source (exportable + crypt) |
|
987 |
H - build hybrid source (binaries + deleted source) |
|
2947 | 988 |
O - build (only) open source |
0 | 989 |
|
990 |
<env_file> file in Bourne shell syntax that sets and exports |
|
991 |
variables that configure the operation of this script and many of |
|
992 |
the scripts this one calls. If <env_file> does not exist, |
|
993 |
it will be looked for in $OPTHOME/onbld/env. |
|
994 |
||
995 |
non-DEBUG is the default build type. Build options can be set in the |
|
996 |
NIGHTLY_OPTIONS variable in the <env_file> as follows: |
|
997 |
||
998 |
-A check for ABI differences in .so files |
|
999 |
-C check for cstyle/hdrchk errors |
|
1000 |
-D do a build with DEBUG on |
|
1001 |
-F do _not_ do a non-DEBUG build |
|
11846
c4f025711cda
6931974 removal of nightly -0 flag missed a couple spots
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11845
diff
changeset
|
1002 |
-G gate keeper default group of options (-au) |
0 | 1003 |
-I integration engineer default group of options (-ampu) |
1004 |
-M do not run pmodes (safe file permission checker) |
|
1005 |
-N do not run protocmp |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1006 |
-O generate OpenSolaris deliverables |
0 | 1007 |
-R default group of options for building a release (-mp) |
1008 |
-U update proto area in the parent |
|
1009 |
-V VERS set the build version string to VERS |
|
851
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1010 |
-X copy x86 IHV proto area |
0 | 1011 |
-f find unreferenced files |
1012 |
-i do an incremental build (no "make clobber") |
|
1013 |
-l do "make lint" in $LINTDIRS (default: $SRC y) |
|
1014 |
-m send mail to $MAILTO at end of build |
|
1015 |
-n do not do a bringover |
|
1016 |
-o build using root privileges to set OWNER/GROUP (old style) |
|
1017 |
-p create packages |
|
1018 |
-r check ELF runtime attributes in the proto area |
|
12658
abe3f7fcaa24
6957957 nightly +t flag does not work
Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM>
parents:
12649
diff
changeset
|
1019 |
-t build and use the tools in $SRC/tools (default setting) |
abe3f7fcaa24
6957957 nightly +t flag does not work
Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM>
parents:
12649
diff
changeset
|
1020 |
+t Use the build tools in $ONBLD_TOOLS/bin |
0 | 1021 |
-u update proto_list_$MACH and friends in the parent workspace; |
1022 |
when used with -f, also build an unrefmaster.out in the parent |
|
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1023 |
-w report on differences between previous and current proto areas |
0 | 1024 |
-z compress cpio archives with gzip |
1025 |
-W Do not report warnings (freeware gate ONLY) |
|
1026 |
-S Build a variant of the source product |
|
1027 |
E - build exportable source |
|
1028 |
D - build domestic source (exportable + crypt) |
|
1029 |
H - build hybrid source (binaries + deleted source) |
|
2947 | 1030 |
O - build (only) open source |
0 | 1031 |
' |
1032 |
# |
|
1033 |
# A log file will be generated under the name $LOGFILE |
|
1557
0aead1696931
6371803 nightly should use ISO standard dates - it sorts better
darrenm
parents:
1202
diff
changeset
|
1034 |
# for partially completed build and log.`date '+%F'` |
0 | 1035 |
# in the same directory for fully completed builds. |
1036 |
# |
|
1037 |
||
1038 |
# default values for low-level FLAGS; G I R are group FLAGS |
|
1039 |
A_FLAG=n |
|
1040 |
C_FLAG=n |
|
3644 | 1041 |
D_FLAG=n |
0 | 1042 |
F_FLAG=n |
1043 |
f_FLAG=n |
|
3644 | 1044 |
i_FLAG=n; i_CMD_LINE_FLAG=n |
1045 |
l_FLAG=n |
|
1046 |
M_FLAG=n |
|
1047 |
m_FLAG=n |
|
1048 |
N_FLAG=n |
|
0 | 1049 |
n_FLAG=n |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1050 |
O_FLAG=n |
0 | 1051 |
o_FLAG=n |
3644 | 1052 |
P_FLAG=n |
0 | 1053 |
p_FLAG=n |
1054 |
r_FLAG=n |
|
3644 | 1055 |
T_FLAG=n |
5797 | 1056 |
t_FLAG=y |
3644 | 1057 |
U_FLAG=n |
0 | 1058 |
u_FLAG=n |
1059 |
V_FLAG=n |
|
3644 | 1060 |
W_FLAG=n |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1061 |
w_FLAG=n |
3644 | 1062 |
X_FLAG=n |
1063 |
SD_FLAG=n |
|
0 | 1064 |
SE_FLAG=n |
1065 |
SH_FLAG=n |
|
2947 | 1066 |
SO_FLAG=n |
0 | 1067 |
# |
1068 |
XMOD_OPT= |
|
1069 |
# |
|
1070 |
build_ok=y |
|
2947 | 1071 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1072 |
function is_source_build { |
2947 | 1073 |
[ "$SE_FLAG" = "y" -o "$SD_FLAG" = "y" -o \ |
1074 |
"$SH_FLAG" = "y" -o "$SO_FLAG" = "y" ] |
|
1075 |
return $? |
|
1076 |
} |
|
1077 |
||
0 | 1078 |
# |
1079 |
# examine arguments |
|
1080 |
# |
|
1081 |
||
2947 | 1082 |
# |
1083 |
# single function for setting -S flag and doing error checking. |
|
1084 |
# usage: set_S_flag <type> |
|
1085 |
# where <type> is the source build type ("E", "D", ...). |
|
1086 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1087 |
function set_S_flag { |
2947 | 1088 |
if is_source_build; then |
1089 |
echo "Can only build one source variant at a time." |
|
1090 |
exit 1 |
|
1091 |
fi |
|
1092 |
if [ "$1" = "E" ]; then |
|
1093 |
SE_FLAG=y |
|
1094 |
elif [ "$1" = "D" ]; then |
|
1095 |
SD_FLAG=y |
|
1096 |
elif [ "$1" = "H" ]; then |
|
1097 |
SH_FLAG=y |
|
1098 |
elif [ "$1" = "O" ]; then |
|
1099 |
SO_FLAG=y |
|
1100 |
else |
|
1101 |
echo "$USAGE" |
|
1102 |
exit 1 |
|
1103 |
fi |
|
1104 |
} |
|
1105 |
||
0 | 1106 |
OPTIND=1 |
12658
abe3f7fcaa24
6957957 nightly +t flag does not work
Peter Dennis - Sustaining Engineer <Peter.Dennis@Sun.COM>
parents:
12649
diff
changeset
|
1107 |
while getopts +inS:tV: FLAG |
0 | 1108 |
do |
1109 |
case $FLAG in |
|
1110 |
i ) i_FLAG=y; i_CMD_LINE_FLAG=y |
|
1111 |
;; |
|
1112 |
n ) n_FLAG=y |
|
1113 |
;; |
|
1114 |
S ) |
|
2947 | 1115 |
set_S_flag $OPTARG |
0 | 1116 |
;; |
5797 | 1117 |
+t ) t_FLAG=n |
0 | 1118 |
;; |
3644 | 1119 |
V ) V_FLAG=y |
1120 |
V_ARG="$OPTARG" |
|
1121 |
;; |
|
0 | 1122 |
\? ) echo "$USAGE" |
1123 |
exit 1 |
|
1124 |
;; |
|
1125 |
esac |
|
1126 |
done |
|
1127 |
||
1128 |
# correct argument count after options |
|
1129 |
shift `expr $OPTIND - 1` |
|
1130 |
||
1131 |
# test that the path to the environment-setting file was given |
|
1132 |
if [ $# -ne 1 ]; then |
|
1133 |
echo "$USAGE" |
|
1134 |
exit 1 |
|
1135 |
fi |
|
1136 |
||
1137 |
# check if user is running nightly as root |
|
1138 |
# ISUSER is set non-zero if an ordinary user runs nightly, or is zero |
|
1139 |
# when root invokes nightly. |
|
1140 |
/usr/bin/id | grep '^uid=0(' >/dev/null 2>&1 |
|
1141 |
ISUSER=$?; export ISUSER |
|
1142 |
||
1143 |
# |
|
1144 |
# force locale to C |
|
1145 |
LC_COLLATE=C; export LC_COLLATE |
|
1146 |
LC_CTYPE=C; export LC_CTYPE |
|
1147 |
LC_MESSAGES=C; export LC_MESSAGES |
|
1148 |
LC_MONETARY=C; export LC_MONETARY |
|
1149 |
LC_NUMERIC=C; export LC_NUMERIC |
|
1150 |
LC_TIME=C; export LC_TIME |
|
1151 |
||
1152 |
# clear environment variables we know to be bad for the build |
|
1153 |
unset LD_OPTIONS |
|
1154 |
unset LD_AUDIT LD_AUDIT_32 LD_AUDIT_64 |
|
1155 |
unset LD_BIND_NOW LD_BIND_NOW_32 LD_BIND_NOW_64 |
|
1156 |
unset LD_BREADTH LD_BREADTH_32 LD_BREADTH_64 |
|
1157 |
unset LD_CONFIG LD_CONFIG_32 LD_CONFIG_64 |
|
1158 |
unset LD_DEBUG LD_DEBUG_32 LD_DEBUG_64 |
|
1159 |
unset LD_DEMANGLE LD_DEMANGLE_32 LD_DEMANGLE_64 |
|
1160 |
unset LD_FLAGS LD_FLAGS_32 LD_FLAGS_64 |
|
1161 |
unset LD_LIBRARY_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 |
|
1162 |
unset LD_LOADFLTR LD_LOADFLTR_32 LD_LOADFLTR_64 |
|
1163 |
unset LD_NOAUDIT LD_NOAUDIT_32 LD_NOAUDIT_64 |
|
1164 |
unset LD_NOAUXFLTR LD_NOAUXFLTR_32 LD_NOAUXFLTR_64 |
|
1165 |
unset LD_NOCONFIG LD_NOCONFIG_32 LD_NOCONFIG_64 |
|
1166 |
unset LD_NODIRCONFIG LD_NODIRCONFIG_32 LD_NODIRCONFIG_64 |
|
1167 |
unset LD_NODIRECT LD_NODIRECT_32 LD_NODIRECT_64 |
|
1168 |
unset LD_NOLAZYLOAD LD_NOLAZYLOAD_32 LD_NOLAZYLOAD_64 |
|
1169 |
unset LD_NOOBJALTER LD_NOOBJALTER_32 LD_NOOBJALTER_64 |
|
1170 |
unset LD_NOVERSION LD_NOVERSION_32 LD_NOVERSION_64 |
|
1171 |
unset LD_ORIGIN LD_ORIGIN_32 LD_ORIGIN_64 |
|
1172 |
unset LD_PRELOAD LD_PRELOAD_32 LD_PRELOAD_64 |
|
1173 |
unset LD_PROFILE LD_PROFILE_32 LD_PROFILE_64 |
|
1174 |
||
1175 |
unset CONFIG |
|
1176 |
unset GROUP |
|
1177 |
unset OWNER |
|
1178 |
unset REMOTE |
|
1179 |
unset ENV |
|
1180 |
unset ARCH |
|
1181 |
unset CLASSPATH |
|
1182 |
unset NAME |
|
1183 |
||
1184 |
# |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1185 |
# To get ONBLD_TOOLS from the environment, it must come from the env file. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1186 |
# If it comes interactively, it is generally TOOLS_PROTO, which will be |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1187 |
# clobbered before the compiler version checks, which will therefore fail. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1188 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1189 |
unset ONBLD_TOOLS |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1190 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1191 |
# |
0 | 1192 |
# Setup environmental variables |
1193 |
# |
|
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1194 |
if [ -f /etc/nightly.conf ]; then |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1195 |
. /etc/nightly.conf |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1196 |
fi |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1197 |
|
0 | 1198 |
if [ -f $1 ]; then |
1199 |
if [[ $1 = */* ]]; then |
|
1200 |
. $1 |
|
1201 |
else |
|
1202 |
. ./$1 |
|
1203 |
fi |
|
1204 |
else |
|
1205 |
if [ -f $OPTHOME/onbld/env/$1 ]; then |
|
1206 |
. $OPTHOME/onbld/env/$1 |
|
1207 |
else |
|
1208 |
echo "Cannot find env file as either $1 or $OPTHOME/onbld/env/$1" |
|
1209 |
exit 1 |
|
1210 |
fi |
|
1211 |
fi |
|
1212 |
||
2947 | 1213 |
# contents of stdenv.sh inserted after next line: |
1214 |
# STDENV_START |
|
1215 |
# STDENV_END |
|
1216 |
||
13272
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
1217 |
# Check if we have sufficient data to continue... |
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
1218 |
[[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set." |
13290
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1219 |
if [[ "${NIGHTLY_OPTIONS}" == ~(F)n ]] ; then |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1220 |
# Check if the gate data are valid if we don't do a "bringover" below |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1221 |
[[ -d "${CODEMGR_WS}" ]] || \ |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1222 |
fatal_error "Error: ${CODEMGR_WS} is not a directory." |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1223 |
[[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || \ |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1224 |
fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found." |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
1225 |
fi |
13272
f7d89c5253a8
450 RFE: Do a small illumos.sh cleanup
Roland Mainz <roland.mainz@nrubsig.org>
parents:
13215
diff
changeset
|
1226 |
|
0 | 1227 |
# |
1228 |
# place ourselves in a new task, respecting BUILD_PROJECT if set. |
|
1229 |
# |
|
1230 |
if [ -z "$BUILD_PROJECT" ]; then |
|
1231 |
/usr/bin/newtask -c $$ |
|
1232 |
else |
|
1233 |
/usr/bin/newtask -c $$ -p $BUILD_PROJECT |
|
1234 |
fi |
|
1235 |
||
1236 |
ps -o taskid= -p $$ | read build_taskid |
|
1237 |
ps -o project= -p $$ | read build_project |
|
1238 |
||
1239 |
# |
|
1240 |
# See if NIGHTLY_OPTIONS is set |
|
1241 |
# |
|
1242 |
if [ "$NIGHTLY_OPTIONS" = "" ]; then |
|
1243 |
NIGHTLY_OPTIONS="-aBm" |
|
1244 |
fi |
|
1245 |
||
1246 |
# |
|
1247 |
# If BRINGOVER_WS was not specified, let it default to CLONE_WS |
|
1248 |
# |
|
1249 |
if [ "$BRINGOVER_WS" = "" ]; then |
|
1250 |
BRINGOVER_WS=$CLONE_WS |
|
1251 |
fi |
|
1252 |
||
1253 |
# |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1254 |
# If CLOSED_BRINGOVER_WS was not specified, let it default to CLOSED_CLONE_WS |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1255 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1256 |
if [ "$CLOSED_BRINGOVER_WS" = "" ]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1257 |
CLOSED_BRINGOVER_WS=$CLOSED_CLONE_WS |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1258 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1259 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1260 |
# |
900 | 1261 |
# If BRINGOVER_FILES was not specified, default to usr |
458
92c1210ccd92
4933161 nightly should allow the env file to choose what files to bringover
mike_s
parents:
411
diff
changeset
|
1262 |
# |
92c1210ccd92
4933161 nightly should allow the env file to choose what files to bringover
mike_s
parents:
411
diff
changeset
|
1263 |
if [ "$BRINGOVER_FILES" = "" ]; then |
900 | 1264 |
BRINGOVER_FILES="usr" |
458
92c1210ccd92
4933161 nightly should allow the env file to choose what files to bringover
mike_s
parents:
411
diff
changeset
|
1265 |
fi |
92c1210ccd92
4933161 nightly should allow the env file to choose what files to bringover
mike_s
parents:
411
diff
changeset
|
1266 |
|
1167 | 1267 |
# |
1268 |
# If the closed sources are not present, the closed binaries must be |
|
1269 |
# present for the build to succeed. If there's no pointer to the |
|
1270 |
# closed binaries, flag that now, rather than forcing the user to wait |
|
1271 |
# a couple hours (or more) to find out. |
|
1272 |
# |
|
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
1273 |
orig_closed_is_present="$CLOSED_IS_PRESENT" |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
1274 |
check_closed_tree |
1167 | 1275 |
|
458
92c1210ccd92
4933161 nightly should allow the env file to choose what files to bringover
mike_s
parents:
411
diff
changeset
|
1276 |
# |
0 | 1277 |
# Note: changes to the option letters here should also be applied to the |
2294
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1278 |
# bldenv script. `d' is listed for backward compatibility. |
0 | 1279 |
# |
2371 | 1280 |
NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-} |
0 | 1281 |
OPTIND=1 |
12776
0a254b4b5ca4
6932341 bfu should be removed
jmcp <James.McPherson@Sun.COM>
parents:
12658
diff
changeset
|
1282 |
while getopts +ABCDdFfGIilMmNnOoPpRrS:TtUuWwXxz FLAG $NIGHTLY_OPTIONS |
0 | 1283 |
do |
1284 |
case $FLAG in |
|
1285 |
A ) A_FLAG=y |
|
12478
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1286 |
# |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1287 |
# If ELF_DATA_BASELINE_DIR is not defined, and we are on SWAN |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1288 |
# (based on CLOSED_IS_PRESENT), then refuse to run. The value |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1289 |
# of ELF version checking is greatly enhanced by including |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1290 |
# the baseline gate comparison. |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1291 |
if [ "$CLOSED_IS_PRESENT" = 'yes' -a \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1292 |
"$ELF_DATA_BASELINE_DIR" = '' ]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1293 |
echo "ELF_DATA_BASELINE_DIR must be set if the A" \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1294 |
"flag is present in\nNIGHTLY_OPTIONS and closed" \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1295 |
"sources are present. Update environment file." |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1296 |
exit 1; |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
1297 |
fi |
0 | 1298 |
;; |
1299 |
B ) D_FLAG=y |
|
1300 |
;; # old version of D |
|
3644 | 1301 |
C ) C_FLAG=y |
0 | 1302 |
;; |
1303 |
D ) D_FLAG=y |
|
1304 |
;; |
|
3644 | 1305 |
F ) F_FLAG=y |
0 | 1306 |
;; |
3644 | 1307 |
f ) f_FLAG=y |
0 | 1308 |
;; |
12776
0a254b4b5ca4
6932341 bfu should be removed
jmcp <James.McPherson@Sun.COM>
parents:
12658
diff
changeset
|
1309 |
G ) u_FLAG=y |
0 | 1310 |
;; |
12776
0a254b4b5ca4
6932341 bfu should be removed
jmcp <James.McPherson@Sun.COM>
parents:
12658
diff
changeset
|
1311 |
I ) m_FLAG=y |
0 | 1312 |
p_FLAG=y |
1313 |
u_FLAG=y |
|
1314 |
;; |
|
3644 | 1315 |
i ) i_FLAG=y |
1316 |
;; |
|
1317 |
l ) l_FLAG=y |
|
0 | 1318 |
;; |
3644 | 1319 |
M ) M_FLAG=y |
0 | 1320 |
;; |
3644 | 1321 |
m ) m_FLAG=y |
0 | 1322 |
;; |
3644 | 1323 |
N ) N_FLAG=y |
0 | 1324 |
;; |
1325 |
n ) n_FLAG=y |
|
1326 |
;; |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1327 |
O ) O_FLAG=y |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1328 |
;; |
0 | 1329 |
o ) o_FLAG=y |
1330 |
;; |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1331 |
P ) P_FLAG=y |
3644 | 1332 |
;; # obsolete |
1333 |
p ) p_FLAG=y |
|
0 | 1334 |
;; |
3644 | 1335 |
R ) m_FLAG=y |
1336 |
p_FLAG=y |
|
0 | 1337 |
;; |
1338 |
r ) r_FLAG=y |
|
1339 |
;; |
|
3644 | 1340 |
S ) |
1341 |
set_S_flag $OPTARG |
|
0 | 1342 |
;; |
3644 | 1343 |
T ) T_FLAG=y |
1344 |
;; # obsolete |
|
5797 | 1345 |
+t ) t_FLAG=n |
0 | 1346 |
;; |
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
1347 |
U ) if [ -z "${PARENT_ROOT}" ]; then |
0 | 1348 |
echo "PARENT_ROOT must be set if the U flag is" \ |
1349 |
"present in NIGHTLY_OPTIONS." |
|
1350 |
exit 1 |
|
1351 |
fi |
|
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
1352 |
NIGHTLY_PARENT_ROOT=$PARENT_ROOT |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
1353 |
if [ -n "${PARENT_TOOLS_ROOT}" ]; then |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
1354 |
NIGHTLY_PARENT_TOOLS_ROOT=$PARENT_TOOLS_ROOT |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1355 |
fi |
0 | 1356 |
U_FLAG=y |
1357 |
;; |
|
3644 | 1358 |
u ) u_FLAG=y |
0 | 1359 |
;; |
1360 |
W ) W_FLAG=y |
|
1361 |
;; |
|
3644 | 1362 |
|
1363 |
w ) w_FLAG=y |
|
0 | 1364 |
;; |
1365 |
X ) # now that we no longer need realmode builds, just |
|
1366 |
# copy IHV packages. only meaningful on x86. |
|
1367 |
if [ "$MACH" = "i386" ]; then |
|
1368 |
X_FLAG=y |
|
1369 |
fi |
|
1370 |
;; |
|
3644 | 1371 |
x ) XMOD_OPT="-x" |
1372 |
;; |
|
0 | 1373 |
\? ) echo "$USAGE" |
1374 |
exit 1 |
|
1375 |
;; |
|
1376 |
esac |
|
1377 |
done |
|
1378 |
||
1379 |
if [ $ISUSER -ne 0 ]; then |
|
1380 |
if [ "$o_FLAG" = "y" ]; then |
|
1381 |
echo "Old-style build requires root permission." |
|
1382 |
exit 1 |
|
1383 |
fi |
|
1384 |
||
1385 |
# Set default value for STAFFER, if needed. |
|
1386 |
if [ -z "$STAFFER" -o "$STAFFER" = "nobody" ]; then |
|
1387 |
STAFFER=`/usr/xpg4/bin/id -un` |
|
1388 |
export STAFFER |
|
1389 |
fi |
|
1390 |
fi |
|
1391 |
||
1392 |
if [ -z "$MAILTO" -o "$MAILTO" = "nobody" ]; then |
|
1393 |
MAILTO=$STAFFER |
|
1394 |
export MAILTO |
|
1395 |
fi |
|
1396 |
||
12374
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
1397 |
PATH="$OPTHOME/onbld/bin:$OPTHOME/onbld/bin/${MACH}:/usr/ccs/bin" |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
1398 |
PATH="$PATH:$OPTHOME/SUNWspro/bin:$TEAMWARE/bin:/usr/bin:/usr/sbin:/usr/ucb" |
108edb7148a6
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds (fix sfw)
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12277
diff
changeset
|
1399 |
PATH="$PATH:/usr/openwin/bin:/usr/sfw/bin:/opt/sfw/bin:." |
0 | 1400 |
export PATH |
1401 |
||
900 | 1402 |
# roots of source trees, both relative to $SRC and absolute. |
1403 |
relsrcdirs="." |
|
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
1404 |
if [[ -d $CODEMGR_WS/usr/closed && "$CLOSED_IS_PRESENT" != no ]]; then |
1167 | 1405 |
relsrcdirs="$relsrcdirs ../closed" |
1406 |
fi |
|
900 | 1407 |
abssrcdirs="" |
1408 |
for d in $relsrcdirs; do |
|
1409 |
abssrcdirs="$abssrcdirs $SRC/$d" |
|
1410 |
done |
|
1411 |
||
0 | 1412 |
unset CH |
1413 |
if [ "$o_FLAG" = "y" ]; then |
|
1414 |
# root invoked old-style build -- make sure it works as it always has |
|
1415 |
# by exporting 'CH'. The current Makefile.master doesn't use this, but |
|
1416 |
# the old ones still do. |
|
1417 |
PROTOCMPTERSE="protocmp.terse" |
|
1418 |
CH= |
|
1419 |
export CH |
|
1420 |
else |
|
1421 |
PROTOCMPTERSE="protocmp.terse -gu" |
|
1422 |
fi |
|
1423 |
POUND_SIGN="#" |
|
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1424 |
# have we set RELEASE_DATE in our env file? |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1425 |
if [ -z "$RELEASE_DATE" ]; then |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1426 |
RELEASE_DATE=$(LC_ALL=C date +"%B %Y") |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1427 |
fi |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1428 |
BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d) |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1429 |
BASEWSDIR=$(basename $CODEMGR_WS) |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1430 |
DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\"" |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1431 |
|
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1432 |
# we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process |
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1433 |
# by avoiding repeated shell invocations to evaluate Makefile.master definitions. |
11846
c4f025711cda
6931974 removal of nightly -0 flag missed a couple spots
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11845
diff
changeset
|
1434 |
# we export o_FLAG and X_FLAG for use by makebfu, and by usr/src/pkg/Makefile |
10738
6cd5e5169fec
6880460 some root-build bits were missed by 6864230
jmcp <James.McPherson@Sun.COM>
parents:
10517
diff
changeset
|
1435 |
export o_FLAG X_FLAG POUND_SIGN RELEASE_DATE DEV_CM |
0 | 1436 |
|
2294
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1437 |
maketype="distributed" |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1438 |
MAKE=dmake |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1439 |
# get the dmake version string alone |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1440 |
DMAKE_VERSION=$( $MAKE -v ) |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1441 |
DMAKE_VERSION=${DMAKE_VERSION#*: } |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1442 |
# focus in on just the dotted version number alone |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1443 |
DMAKE_MAJOR=$( echo $DMAKE_VERSION | \ |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1444 |
sed -e 's/.*\<\([^.]*\.[^ ]*\).*$/\1/' ) |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1445 |
# extract the second (or final) integer |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1446 |
DMAKE_MINOR=${DMAKE_MAJOR#*.} |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1447 |
DMAKE_MINOR=${DMAKE_MINOR%%.*} |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1448 |
# extract the first integer |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1449 |
DMAKE_MAJOR=${DMAKE_MAJOR%%.*} |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1450 |
CHECK_DMAKE=${CHECK_DMAKE:-y} |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1451 |
# x86 was built on the 12th, sparc on the 13th. |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1452 |
if [ "$CHECK_DMAKE" = "y" -a \ |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1453 |
"$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/12" -a \ |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1454 |
"$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/13" -a \( \ |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1455 |
"$DMAKE_MAJOR" -lt 7 -o \ |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1456 |
"$DMAKE_MAJOR" -eq 7 -a "$DMAKE_MINOR" -lt 4 \) ]; then |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1457 |
if [ -z "$DMAKE_VERSION" ]; then |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1458 |
echo "$MAKE is missing." |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1459 |
exit 1 |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1460 |
fi |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1461 |
echo `whence $MAKE`" version is:" |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1462 |
echo " ${DMAKE_VERSION}" |
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1463 |
cat <<EOF |
0 | 1464 |
|
1465 |
This version may not be safe for use. Either set TEAMWARE to a better |
|
1466 |
path or (if you really want to use this version of dmake anyway), add |
|
1467 |
the following to your environment to disable this check: |
|
1468 |
||
1469 |
CHECK_DMAKE=n |
|
1470 |
EOF |
|
2294
658bd7c13512
4416654 warning filter list in nightly should be cleaned up
meem
parents:
2230
diff
changeset
|
1471 |
exit 1 |
0 | 1472 |
fi |
1473 |
export PATH |
|
1474 |
export MAKE |
|
1475 |
||
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1476 |
if [[ "$O_FLAG" = y ]]; then |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1477 |
export TONICBUILD="" |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1478 |
else |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1479 |
export TONICBUILD="#" |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1480 |
fi |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1481 |
|
0 | 1482 |
if [ "${SUNWSPRO}" != "" ]; then |
1483 |
PATH="${SUNWSPRO}/bin:$PATH" |
|
1484 |
export PATH |
|
1485 |
fi |
|
1486 |
||
11763
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1487 |
hostname=$(uname -n) |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1488 |
if [[ $DMAKE_MAX_JOBS != +([0-9]) || $DMAKE_MAX_JOBS -eq 0 ]] |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1489 |
then |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1490 |
maxjobs= |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1491 |
if [[ -f $HOME/.make.machines ]] |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1492 |
then |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1493 |
# Note: there is a hard tab and space character in the []s |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1494 |
# below. |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1495 |
egrep -i "^[ ]*$hostname[ \.]" \ |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1496 |
$HOME/.make.machines | read host jobs |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1497 |
maxjobs=${jobs##*=} |
0 | 1498 |
fi |
11763
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1499 |
|
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1500 |
if [[ $maxjobs != +([0-9]) || $maxjobs -eq 0 ]] |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1501 |
then |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1502 |
# default |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1503 |
maxjobs=4 |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1504 |
fi |
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1505 |
|
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1506 |
export DMAKE_MAX_JOBS=$maxjobs |
0 | 1507 |
fi |
11763
093f70f0db00
6929447 nightly sets DMAKE_MAX_JOBS incorrectly
Will Fiveash <Will.Fiveash@Sun.COM>
parents:
11690
diff
changeset
|
1508 |
|
0 | 1509 |
DMAKE_MODE=parallel; |
1510 |
export DMAKE_MODE |
|
1511 |
||
1512 |
if [ -z "${ROOT}" ]; then |
|
1513 |
echo "ROOT must be set." |
|
1514 |
exit 1 |
|
1515 |
fi |
|
1516 |
||
1517 |
# |
|
1518 |
# if -V flag was given, reset VERSION to V_ARG |
|
1519 |
# |
|
1520 |
if [ "$V_FLAG" = "y" ]; then |
|
1521 |
VERSION=$V_ARG |
|
1522 |
fi |
|
1523 |
||
851
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1524 |
# |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1525 |
# Check for IHV root for copying ihv proto area |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1526 |
# |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1527 |
if [ "$X_FLAG" = "y" ]; then |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1528 |
if [ "$IA32_IHV_ROOT" = "" ]; then |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1529 |
echo "IA32_IHV_ROOT: must be set for copying ihv proto" |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1530 |
args_ok=n |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1531 |
fi |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1532 |
if [ ! -d "$IA32_IHV_ROOT" ]; then |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1533 |
echo "$IA32_IHV_ROOT: not found" |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1534 |
args_ok=n |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1535 |
fi |
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1536 |
if [ "$IA32_IHV_WS" = "" ]; then |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1537 |
echo "IA32_IHV_WS: must be set for copying ihv proto" |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1538 |
args_ok=n |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1539 |
fi |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1540 |
if [ ! -d "$IA32_IHV_WS" ]; then |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1541 |
echo "$IA32_IHV_WS: not found" |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1542 |
args_ok=n |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
1543 |
fi |
851
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1544 |
fi |
bbbf4a61e3b8
6345010 nightly.sh no longer copies the ihv proto files
szhou
parents:
524
diff
changeset
|
1545 |
|
0 | 1546 |
# Append source version |
1547 |
if [ "$SE_FLAG" = "y" ]; then |
|
1548 |
VERSION="${VERSION}:EXPORT" |
|
1549 |
fi |
|
1550 |
||
1551 |
if [ "$SD_FLAG" = "y" ]; then |
|
1552 |
VERSION="${VERSION}:DOMESTIC" |
|
1553 |
fi |
|
1554 |
||
1555 |
if [ "$SH_FLAG" = "y" ]; then |
|
1556 |
VERSION="${VERSION}:MODIFIED_SOURCE_PRODUCT" |
|
1557 |
fi |
|
1558 |
||
2947 | 1559 |
if [ "$SO_FLAG" = "y" ]; then |
1560 |
VERSION="${VERSION}:OPEN_ONLY" |
|
1561 |
fi |
|
1562 |
||
0 | 1563 |
TMPDIR="/tmp/nightly.tmpdir.$$" |
1564 |
export TMPDIR |
|
1565 |
rm -rf ${TMPDIR} |
|
1566 |
mkdir -p $TMPDIR || exit 1 |
|
8794
1119bce31099
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please? (fix root build)
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8789
diff
changeset
|
1567 |
chmod 777 $TMPDIR |
0 | 1568 |
|
1569 |
# |
|
2371 | 1570 |
# Keep elfsign's use of pkcs11_softtoken from looking in the user home |
1571 |
# directory, which doesn't always work. Needed until all build machines |
|
0 | 1572 |
# have the fix for 6271754 |
1573 |
# |
|
1574 |
SOFTTOKEN_DIR=$TMPDIR |
|
1575 |
export SOFTTOKEN_DIR |
|
1576 |
||
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1577 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1578 |
# Tools should only be built non-DEBUG. Keep track of the tools proto |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1579 |
# area path relative to $TOOLS, because the latter changes in an |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1580 |
# export build. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1581 |
# |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1582 |
# TOOLS_PROTO is included below for builds other than usr/src/tools |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1583 |
# that look for this location. For usr/src/tools, this will be |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1584 |
# overridden on the $MAKE command line in build_tools(). |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1585 |
# |
0 | 1586 |
TOOLS=${SRC}/tools |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1587 |
TOOLS_PROTO_REL=proto/root_${MACH}-nd |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1588 |
TOOLS_PROTO=${TOOLS}/${TOOLS_PROTO_REL}; export TOOLS_PROTO |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1589 |
|
0 | 1590 |
unset CFLAGS LD_LIBRARY_PATH LDFLAGS |
1591 |
||
1592 |
# create directories that are automatically removed if the nightly script |
|
1593 |
# fails to start correctly |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1594 |
function newdir { |
0 | 1595 |
dir=$1 |
1596 |
toadd= |
|
1597 |
while [ ! -d $dir ]; do |
|
1598 |
toadd="$dir $toadd" |
|
1599 |
dir=`dirname $dir` |
|
1600 |
done |
|
1601 |
torm= |
|
1602 |
newlist= |
|
1603 |
for dir in $toadd; do |
|
1604 |
if staffer mkdir $dir; then |
|
1605 |
newlist="$ISUSER $dir $newlist" |
|
1606 |
torm="$dir $torm" |
|
1607 |
else |
|
1608 |
[ -z "$torm" ] || staffer rmdir $torm |
|
1609 |
return 1 |
|
1610 |
fi |
|
1611 |
done |
|
1612 |
newdirlist="$newlist $newdirlist" |
|
1613 |
return 0 |
|
1614 |
} |
|
1615 |
newdirlist= |
|
1616 |
||
1617 |
[ -d $CODEMGR_WS ] || newdir $CODEMGR_WS || exit 1 |
|
1618 |
||
1619 |
# since this script assumes the build is from full source, it nullifies |
|
1620 |
# variables likely to have been set by a "ws" script; nullification |
|
1621 |
# confines the search space for headers and libraries to the proto area |
|
1622 |
# built from this immediate source. |
|
1623 |
ENVLDLIBS1= |
|
1624 |
ENVLDLIBS2= |
|
1625 |
ENVLDLIBS3= |
|
1626 |
ENVCPPFLAGS1= |
|
1627 |
ENVCPPFLAGS2= |
|
1628 |
ENVCPPFLAGS3= |
|
1629 |
ENVCPPFLAGS4= |
|
1630 |
PARENT_ROOT= |
|
1631 |
||
1632 |
export ENVLDLIBS3 ENVCPPFLAGS1 ENVCPPFLAGS2 ENVCPPFLAGS3 ENVCPPFLAGS4 \ |
|
14225
20c0ad5cefdf
3915 Add adjuncts support to the build
Keith M Wesolowski <wesolows@foobazco.org>
parents:
14218
diff
changeset
|
1633 |
ENVLDLIBS1 ENVLDLIBS2 PARENT_ROOT |
0 | 1634 |
|
1635 |
PKGARCHIVE_ORIG=$PKGARCHIVE |
|
1636 |
IA32_IHV_PKGS_ORIG=$IA32_IHV_PKGS |
|
1637 |
||
1638 |
# |
|
1639 |
# Juggle the logs and optionally send mail on completion. |
|
1640 |
# |
|
1641 |
||
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1642 |
function logshuffle { |
5797 | 1643 |
LLOG="$ATLOG/log.`date '+%F.%H:%M'`" |
0 | 1644 |
if [ -f $LLOG -o -d $LLOG ]; then |
1645 |
LLOG=$LLOG.$$ |
|
1646 |
fi |
|
1647 |
mkdir $LLOG |
|
2405
cf343ae5c543
6451117 at its conclusion, nightly should be able to run commands specified in environment
rscott
parents:
2371
diff
changeset
|
1648 |
export LLOG |
0 | 1649 |
|
1650 |
if [ "$build_ok" = "y" ]; then |
|
1651 |
mv $ATLOG/proto_list_${MACH} $LLOG |
|
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1652 |
|
8785
fd9a603be997
6414844 SUNWonbld should use protocmp
Rainer Orth <ro@techfak.uni-bielefeld.de>
parents:
8744
diff
changeset
|
1653 |
if [ -f $ATLOG/proto_list_tools_${MACH} ]; then |
fd9a603be997
6414844 SUNWonbld should use protocmp
Rainer Orth <ro@techfak.uni-bielefeld.de>
parents:
8744
diff
changeset
|
1654 |
mv $ATLOG/proto_list_tools_${MACH} $LLOG |
fd9a603be997
6414844 SUNWonbld should use protocmp
Rainer Orth <ro@techfak.uni-bielefeld.de>
parents:
8744
diff
changeset
|
1655 |
fi |
fd9a603be997
6414844 SUNWonbld should use protocmp
Rainer Orth <ro@techfak.uni-bielefeld.de>
parents:
8744
diff
changeset
|
1656 |
|
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1657 |
if [ -f $TMPDIR/wsdiff.results ]; then |
8785
fd9a603be997
6414844 SUNWonbld should use protocmp
Rainer Orth <ro@techfak.uni-bielefeld.de>
parents:
8744
diff
changeset
|
1658 |
mv $TMPDIR/wsdiff.results $LLOG |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1659 |
fi |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1660 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1661 |
if [ -f $TMPDIR/wsdiff-nd.results ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1662 |
mv $TMPDIR/wsdiff-nd.results $LLOG |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1663 |
fi |
0 | 1664 |
fi |
1665 |
||
1666 |
# |
|
1667 |
# Now that we're about to send mail, it's time to check the noise |
|
1668 |
# file. In the event that an error occurs beyond this point, it will |
|
1669 |
# be recorded in the nightly.log file, but nowhere else. This would |
|
1670 |
# include only errors that cause the copying of the noise log to fail |
|
1671 |
# or the mail itself not to be sent. |
|
1672 |
# |
|
1673 |
||
1674 |
exec >>$LOGFILE 2>&1 |
|
1675 |
if [ -s $build_noise_file ]; then |
|
1676 |
echo "\n==== Nightly build noise ====\n" | |
|
1677 |
tee -a $LOGFILE >>$mail_msg_file |
|
1678 |
cat $build_noise_file >>$LOGFILE |
|
1679 |
cat $build_noise_file >>$mail_msg_file |
|
1680 |
echo | tee -a $LOGFILE >>$mail_msg_file |
|
1681 |
fi |
|
1682 |
rm -f $build_noise_file |
|
1683 |
||
1684 |
case "$build_ok" in |
|
1685 |
y) |
|
1686 |
state=Completed |
|
1687 |
;; |
|
1688 |
i) |
|
1689 |
state=Interrupted |
|
1690 |
;; |
|
1691 |
*) |
|
1692 |
state=Failed |
|
1693 |
;; |
|
1694 |
esac |
|
2456
0bd2410bad66
6451253 6451117 should have spent a bit more time in code review
rscott
parents:
2405
diff
changeset
|
1695 |
NIGHTLY_STATUS=$state |
0bd2410bad66
6451253 6451117 should have spent a bit more time in code review
rscott
parents:
2405
diff
changeset
|
1696 |
export NIGHTLY_STATUS |
2371 | 1697 |
|
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1698 |
run_hook POST_NIGHTLY $state |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1699 |
run_hook SYS_POST_NIGHTLY $state |
2405
cf343ae5c543
6451117 at its conclusion, nightly should be able to run commands specified in environment
rscott
parents:
2371
diff
changeset
|
1700 |
|
13655
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1701 |
# |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1702 |
# mailx(1) sets From: based on the -r flag |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1703 |
# if it is given. |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1704 |
# |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1705 |
mailx_r= |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1706 |
if [[ -n "${MAILFROM}" ]]; then |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1707 |
mailx_r="-r ${MAILFROM}" |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1708 |
fi |
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1709 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1710 |
cat $build_time_file $build_environ_file $mail_msg_file \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1711 |
> ${LLOG}/mail_msg |
0 | 1712 |
if [ "$m_FLAG" = "y" ]; then |
13655
96f1427cec2e
2059 nightly(1) should support custom From: in mail
Joshua M. Clulow <josh@sysmgr.org>
parents:
13361
diff
changeset
|
1713 |
cat ${LLOG}/mail_msg | /usr/bin/mailx ${mailx_r} -s \ |
0 | 1714 |
"Nightly ${MACH} Build of `basename ${CODEMGR_WS}` ${state}." \ |
1715 |
${MAILTO} |
|
1716 |
fi |
|
1717 |
||
1718 |
if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then |
|
1719 |
staffer cp ${LLOG}/mail_msg $PARENT_WS/usr/src/mail_msg-${MACH} |
|
1720 |
staffer cp $LOGFILE $PARENT_WS/usr/src/nightly-${MACH}.log |
|
1721 |
fi |
|
1722 |
||
1723 |
mv $LOGFILE $LLOG |
|
1724 |
} |
|
1725 |
||
1726 |
# |
|
1727 |
# Remove the locks and temporary files on any exit |
|
1728 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1729 |
function cleanup { |
0 | 1730 |
logshuffle |
1731 |
||
1732 |
[ -z "$lockfile" ] || staffer rm -f $lockfile |
|
1733 |
[ -z "$atloglockfile" ] || rm -f $atloglockfile |
|
1734 |
[ -z "$ulockfile" ] || staffer rm -f $ulockfile |
|
1735 |
[ -z "$Ulockfile" ] || rm -f $Ulockfile |
|
1736 |
||
1737 |
set -- $newdirlist |
|
1738 |
while [ $# -gt 0 ]; do |
|
1739 |
ISUSER=$1 staffer rmdir $2 |
|
1740 |
shift; shift |
|
1741 |
done |
|
1742 |
rm -rf $TMPDIR |
|
1743 |
} |
|
1744 |
||
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1745 |
function cleanup_signal { |
0 | 1746 |
build_ok=i |
1747 |
# this will trigger cleanup(), above. |
|
1748 |
exit 1 |
|
1749 |
} |
|
1750 |
||
1751 |
trap cleanup 0 |
|
1752 |
trap cleanup_signal 1 2 3 15 |
|
1753 |
||
1754 |
# |
|
1755 |
# Generic lock file processing -- make sure that the lock file doesn't |
|
1756 |
# exist. If it does, it should name the build host and PID. If it |
|
1757 |
# doesn't, then make sure we can create it. Clean up locks that are |
|
1758 |
# known to be stale (assumes host name is unique among build systems |
|
1759 |
# for the workspace). |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1760 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1761 |
function create_lock { |
0 | 1762 |
lockf=$1 |
1763 |
lockvar=$2 |
|
4680 | 1764 |
|
0 | 1765 |
ldir=`dirname $lockf` |
1766 |
[ -d $ldir ] || newdir $ldir || exit 1 |
|
1767 |
eval $lockvar=$lockf |
|
4680 | 1768 |
|
1769 |
while ! staffer ln -s $hostname.$STAFFER.$$ $lockf 2> /dev/null; do |
|
1770 |
basews=`basename $CODEMGR_WS` |
|
1771 |
ls -l $lockf | nawk '{print $NF}' | IFS=. read host user pid |
|
1772 |
if [ "$host" != "$hostname" ]; then |
|
1773 |
echo "$MACH build of $basews apparently" \ |
|
1774 |
"already started by $user on $host as $pid." |
|
1775 |
exit 1 |
|
1776 |
elif kill -s 0 $pid 2>/dev/null; then |
|
1777 |
echo "$MACH build of $basews already started" \ |
|
1778 |
"by $user as $pid." |
|
1779 |
exit 1 |
|
1780 |
else |
|
1781 |
# stale lock; clear it out and try again |
|
1782 |
rm -f $lockf |
|
1783 |
fi |
|
1784 |
done |
|
0 | 1785 |
} |
1786 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1787 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1788 |
# Return the list of interesting proto areas, depending on the current |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1789 |
# options. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1790 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
1791 |
function allprotos { |
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
1792 |
typeset roots="$ROOT" |
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
1793 |
|
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
1794 |
if [[ "$F_FLAG" = n && "$MULTI_PROTO" = yes ]]; then |
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
1795 |
roots="$roots $ROOT-nd" |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1796 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1797 |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1798 |
if [[ $O_FLAG = y ]]; then |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1799 |
roots="$roots $ROOT-closed" |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1800 |
[ $MULTI_PROTO = yes ] && roots="$roots $ROOT-nd-closed" |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1801 |
fi |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
1802 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1803 |
echo $roots |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1804 |
} |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1805 |
|
0 | 1806 |
# Ensure no other instance of this script is running on this host. |
1807 |
# LOCKNAME can be set in <env_file>, and is by default, but is not |
|
1808 |
# required due to the use of $ATLOG below. |
|
1809 |
if [ -n "$LOCKNAME" ]; then |
|
1810 |
create_lock /tmp/$LOCKNAME "lockfile" |
|
1811 |
fi |
|
1812 |
# |
|
1813 |
# Create from one, two, or three other locks: |
|
1814 |
# $ATLOG/nightly.lock |
|
1815 |
# - protects against multiple builds in same workspace |
|
1816 |
# $PARENT_WS/usr/src/nightly.$MACH.lock |
|
1817 |
# - protects against multiple 'u' copy-backs |
|
1818 |
# $NIGHTLY_PARENT_ROOT/nightly.lock |
|
1819 |
# - protects against multiple 'U' copy-backs |
|
1820 |
# |
|
1821 |
# Overriding ISUSER to 1 causes the lock to be created as root if the |
|
1822 |
# script is run as root. The default is to create it as $STAFFER. |
|
1823 |
ISUSER=1 create_lock $ATLOG/nightly.lock "atloglockfile" |
|
1824 |
if [ "$u_FLAG" = "y" ]; then |
|
1825 |
create_lock $PARENT_WS/usr/src/nightly.$MACH.lock "ulockfile" |
|
1826 |
fi |
|
1827 |
if [ "$U_FLAG" = "y" ]; then |
|
1828 |
# NIGHTLY_PARENT_ROOT is written as root if script invoked as root. |
|
1829 |
ISUSER=1 create_lock $NIGHTLY_PARENT_ROOT/nightly.lock "Ulockfile" |
|
1830 |
fi |
|
1831 |
||
1832 |
# Locks have been taken, so we're doing a build and we're committed to |
|
1833 |
# the directories we may have created so far. |
|
1834 |
newdirlist= |
|
1835 |
||
1836 |
# |
|
1837 |
# Create mail_msg_file |
|
1838 |
# |
|
1839 |
mail_msg_file="${TMPDIR}/mail_msg" |
|
1840 |
touch $mail_msg_file |
|
1841 |
build_time_file="${TMPDIR}/build_time" |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1842 |
build_environ_file="${TMPDIR}/build_environ" |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1843 |
touch $build_environ_file |
0 | 1844 |
# |
1845 |
# Move old LOGFILE aside |
|
1846 |
# ATLOG directory already made by 'create_lock' above |
|
1847 |
# |
|
1848 |
if [ -f $LOGFILE ]; then |
|
1849 |
mv -f $LOGFILE ${LOGFILE}- |
|
1850 |
fi |
|
1851 |
# |
|
1852 |
# Build OsNet source |
|
1853 |
# |
|
1854 |
START_DATE=`date` |
|
1855 |
SECONDS=0 |
|
1856 |
echo "\n==== Nightly $maketype build started: $START_DATE ====" \ |
|
1857 |
| tee -a $LOGFILE > $build_time_file |
|
1858 |
||
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1859 |
echo "\nBuild project: $build_project\nBuild taskid: $build_taskid" | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1860 |
tee -a $mail_msg_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
1861 |
|
0 | 1862 |
# make sure we log only to the nightly build file |
1863 |
build_noise_file="${TMPDIR}/build_noise" |
|
1864 |
exec </dev/null >$build_noise_file 2>&1 |
|
1865 |
||
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1866 |
run_hook SYS_PRE_NIGHTLY |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1867 |
run_hook PRE_NIGHTLY |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
1868 |
|
0 | 1869 |
echo "\n==== list of environment variables ====\n" >> $LOGFILE |
1870 |
env >> $LOGFILE |
|
1871 |
||
1872 |
echo "\n==== Nightly argument issues ====\n" | tee -a $mail_msg_file >> $LOGFILE |
|
1873 |
||
2371 | 1874 |
if [ "$P_FLAG" = "y" ]; then |
1875 |
obsolete_build GPROF | tee -a $mail_msg_file >> $LOGFILE |
|
1876 |
fi |
|
1877 |
||
1878 |
if [ "$T_FLAG" = "y" ]; then |
|
1879 |
obsolete_build TRACE | tee -a $mail_msg_file >> $LOGFILE |
|
1880 |
fi |
|
1881 |
||
2947 | 1882 |
if is_source_build; then |
0 | 1883 |
if [ "$i_FLAG" = "y" -o "$i_CMD_LINE_FLAG" = "y" ]; then |
1884 |
echo "WARNING: the -S flags do not support incremental" \ |
|
1885 |
"builds; forcing clobber\n" | tee -a $mail_msg_file >> $LOGFILE |
|
1886 |
i_FLAG=n |
|
1887 |
i_CMD_LINE_FLAG=n |
|
1888 |
fi |
|
1889 |
if [ "$N_FLAG" = "n" ]; then |
|
1890 |
echo "WARNING: the -S flags do not support protocmp;" \ |
|
1891 |
"protocmp disabled\n" | \ |
|
1892 |
tee -a $mail_msg_file >> $LOGFILE |
|
1893 |
N_FLAG=y |
|
1894 |
fi |
|
1895 |
if [ "$l_FLAG" = "y" ]; then |
|
1896 |
echo "WARNING: the -S flags do not support lint;" \ |
|
1897 |
"lint disabled\n" | tee -a $mail_msg_file >> $LOGFILE |
|
1898 |
l_FLAG=n |
|
1899 |
fi |
|
1900 |
if [ "$C_FLAG" = "y" ]; then |
|
1901 |
echo "WARNING: the -S flags do not support cstyle;" \ |
|
1902 |
"cstyle check disabled\n" | tee -a $mail_msg_file >> $LOGFILE |
|
1903 |
C_FLAG=n |
|
1904 |
fi |
|
1905 |
else |
|
1906 |
if [ "$N_FLAG" = "y" ]; then |
|
1907 |
if [ "$p_FLAG" = "y" ]; then |
|
1908 |
cat <<EOF | tee -a $mail_msg_file >> $LOGFILE |
|
1909 |
WARNING: the p option (create packages) is set, but so is the N option (do |
|
1910 |
not run protocmp); this is dangerous; you should unset the N option |
|
1911 |
EOF |
|
1912 |
else |
|
1913 |
cat <<EOF | tee -a $mail_msg_file >> $LOGFILE |
|
1914 |
Warning: the N option (do not run protocmp) is set; it probably shouldn't be |
|
1915 |
EOF |
|
1916 |
fi |
|
1917 |
echo "" | tee -a $mail_msg_file >> $LOGFILE |
|
1918 |
fi |
|
1919 |
fi |
|
1920 |
||
1921 |
if [ "$D_FLAG" = "n" -a "$l_FLAG" = "y" ]; then |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1922 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1923 |
# In the past we just complained but went ahead with the lint |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1924 |
# pass, even though the proto area was built non-DEBUG. It's |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1925 |
# unlikely that non-DEBUG headers will make a difference, but |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1926 |
# rather than assuming it's a safe combination, force the user |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
1927 |
# to specify a DEBUG build. |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1928 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1929 |
echo "WARNING: DEBUG build not requested; disabling lint.\n" \ |
0 | 1930 |
| tee -a $mail_msg_file >> $LOGFILE |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1931 |
l_FLAG=n |
0 | 1932 |
fi |
1933 |
||
1934 |
if [ "$f_FLAG" = "y" ]; then |
|
1935 |
if [ "$i_FLAG" = "y" ]; then |
|
1936 |
echo "WARNING: the -f flag cannot be used during incremental" \ |
|
1937 |
"builds; ignoring -f\n" | tee -a $mail_msg_file >> $LOGFILE |
|
1938 |
f_FLAG=n |
|
1939 |
fi |
|
10517
43ea36a8f8b6
6878057 clean up false unref for usr/src/pkgdefs/SUNW0on/Makefile
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
10445
diff
changeset
|
1940 |
if [ "${l_FLAG}${p_FLAG}" != "yy" ]; then |
43ea36a8f8b6
6878057 clean up false unref for usr/src/pkgdefs/SUNW0on/Makefile
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
10445
diff
changeset
|
1941 |
echo "WARNING: the -f flag requires -l, and -p;" \ |
43ea36a8f8b6
6878057 clean up false unref for usr/src/pkgdefs/SUNW0on/Makefile
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
10445
diff
changeset
|
1942 |
"ignoring -f\n" | tee -a $mail_msg_file >> $LOGFILE |
0 | 1943 |
f_FLAG=n |
1944 |
fi |
|
1945 |
fi |
|
1946 |
||
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1947 |
if [ "$w_FLAG" = "y" -a ! -d $ROOT ]; then |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1948 |
echo "WARNING: -w specified, but $ROOT does not exist;" \ |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1949 |
"ignoring -w\n" | tee -a $mail_msg_file >> $LOGFILE |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1950 |
w_FLAG=n |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1951 |
fi |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1952 |
|
0 | 1953 |
if [ "$t_FLAG" = "n" ]; then |
1954 |
# |
|
1955 |
# We're not doing a tools build, so make sure elfsign(1) is |
|
1956 |
# new enough to safely sign non-crypto binaries. We test |
|
1957 |
# debugging output from elfsign to detect the old version. |
|
1958 |
# |
|
1959 |
newelfsigntest=`SUNW_CRYPTO_DEBUG=stderr /usr/bin/elfsign verify \ |
|
1960 |
-e /usr/lib/security/pkcs11_softtoken.so.1 2>&1 \ |
|
1961 |
| egrep algorithmOID` |
|
1962 |
if [ -z "$newelfsigntest" ]; then |
|
1963 |
echo "WARNING: /usr/bin/elfsign out of date;" \ |
|
1964 |
"will only sign crypto modules\n" | \ |
|
1965 |
tee -a $mail_msg_file >> $LOGFILE |
|
1966 |
export ELFSIGN_OBJECT=true |
|
1967 |
elif [ "$VERIFY_ELFSIGN" = "y" ]; then |
|
1968 |
echo "WARNING: VERIFY_ELFSIGN=y requires" \ |
|
1969 |
"the -t flag; ignoring VERIFY_ELFSIGN\n" | \ |
|
1970 |
tee -a $mail_msg_file >> $LOGFILE |
|
1971 |
fi |
|
1972 |
fi |
|
1973 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1974 |
[ "$O_FLAG" = y ] && MULTI_PROTO=yes |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1975 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1976 |
case $MULTI_PROTO in |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1977 |
yes|no) ;; |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1978 |
*) |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1979 |
echo "WARNING: MULTI_PROTO is \"$MULTI_PROTO\"; " \ |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1980 |
"should be \"yes\" or \"no\"." | tee -a $mail_msg_file >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1981 |
echo "Setting MULTI_PROTO to \"no\".\n" | \ |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1982 |
tee -a $mail_msg_file >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1983 |
export MULTI_PROTO=no |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1984 |
;; |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1985 |
esac |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1986 |
|
0 | 1987 |
echo "\n==== Build version ====\n" | tee -a $mail_msg_file >> $LOGFILE |
1988 |
echo $VERSION | tee -a $mail_msg_file >> $LOGFILE |
|
1989 |
||
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1990 |
# Save the current proto area if we're comparing against the last build |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1991 |
if [ "$w_FLAG" = "y" -a -d "$ROOT" ]; then |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1992 |
if [ -d "$ROOT.prev" ]; then |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1993 |
rm -rf $ROOT.prev |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1994 |
fi |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1995 |
mv $ROOT $ROOT.prev |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1996 |
fi |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
1997 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1998 |
# Same for non-DEBUG proto area |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
1999 |
if [ "$w_FLAG" = "y" -a "$MULTI_PROTO" = yes -a -d "$ROOT-nd" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2000 |
if [ -d "$ROOT-nd.prev" ]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2001 |
rm -rf $ROOT-nd.prev |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2002 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2003 |
mv $ROOT-nd $ROOT-nd.prev |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2004 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2005 |
|
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2006 |
# |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2007 |
# Echo the SCM type of the parent workspace, this can't just be which_scm |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2008 |
# as that does not know how to identify various network repositories. |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2009 |
# |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2010 |
function parent_wstype { |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2011 |
typeset scm_type junk |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2012 |
|
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2013 |
CODEMGR_WS="$BRINGOVER_WS" "$WHICH_SCM" 2>/dev/null \ |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2014 |
| read scm_type junk |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2015 |
if [[ -z "$scm_type" || "$scm_type" == unknown ]]; then |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2016 |
# Probe BRINGOVER_WS to determine its type |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2017 |
if [[ $BRINGOVER_WS == svn*://* ]]; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2018 |
scm_type="subversion" |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2019 |
elif [[ $BRINGOVER_WS == file://* ]] && |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2020 |
egrep -s "This is a Subversion repository" \ |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2021 |
${BRINGOVER_WS#file://}/README.txt 2> /dev/null; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2022 |
scm_type="subversion" |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2023 |
elif [[ $BRINGOVER_WS == ssh://* ]]; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2024 |
scm_type="mercurial" |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2025 |
elif [[ $BRINGOVER_WS == http://* ]] && \ |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2026 |
wget -q -O- --save-headers "$BRINGOVER_WS/?cmd=heads" | \ |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2027 |
egrep -s "application/mercurial" 2> /dev/null; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2028 |
scm_type="mercurial" |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2029 |
elif svn info $BRINGOVER_WS > /dev/null 2>&1; then |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2030 |
scm_type="subversion" |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2031 |
else |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2032 |
scm_type="none" |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2033 |
fi |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2034 |
fi |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2035 |
|
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2036 |
# fold both unsupported and unrecognized results into "none" |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2037 |
case "$scm_type" in |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2038 |
none|subversion|teamware|mercurial) |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2039 |
;; |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2040 |
*) scm_type=none |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2041 |
;; |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2042 |
esac |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2043 |
|
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2044 |
echo $scm_type |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2045 |
} |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2046 |
|
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2047 |
# Echo the SCM types of $CODEMGR_WS and $BRINGOVER_WS |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2048 |
function child_wstype { |
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2049 |
typeset scm_type junk |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2050 |
|
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2051 |
# Probe CODEMGR_WS to determine its type |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2052 |
if [[ -d $CODEMGR_WS ]]; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2053 |
$WHICH_SCM | read scm_type junk || exit 1 |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2054 |
fi |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2055 |
|
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2056 |
case "$scm_type" in |
13949
31eec1000095
3272 findunref should support git
Richard Lowe <richlowe@richlowe.net>
parents:
13938
diff
changeset
|
2057 |
none|subversion|git|teamware|mercurial) |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2058 |
;; |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2059 |
*) scm_type=none |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2060 |
;; |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2061 |
esac |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2062 |
|
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2063 |
echo $scm_type |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2064 |
} |
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2065 |
|
13361
2502776ad797
224 findunref build shouldn't fail if SCM can't be determined
Richard Lowe <richlowe@richlowe.net>
parents:
13325
diff
changeset
|
2066 |
SCM_TYPE=$(child_wstype) |
7544
7ecb3a3bcf8f
6738408 can't build using nightly script from gate
John.Zolnowsky@Sun.COM
parents:
7264
diff
changeset
|
2067 |
|
0 | 2068 |
# |
2069 |
# Decide whether to clobber |
|
2070 |
# |
|
2071 |
if [ "$i_FLAG" = "n" -a -d "$SRC" ]; then |
|
2072 |
echo "\n==== Make clobber at `date` ====\n" >> $LOGFILE |
|
2073 |
||
2074 |
cd $SRC |
|
2075 |
# remove old clobber file |
|
2076 |
rm -f $SRC/clobber.out |
|
2077 |
rm -f $SRC/clobber-${MACH}.out |
|
2078 |
||
2079 |
# Remove all .make.state* files, just in case we are restarting |
|
2080 |
# the build after having interrupted a previous 'make clobber'. |
|
13660
189bdb3d9698
1960 developer tools should support git
Richard Lowe <richlowe@richlowe.net>
parents:
13655
diff
changeset
|
2081 |
find . \( -name SCCS -o -name .hg -o -name .svn -o -name .git \ |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2082 |
-o -name 'interfaces.*' \) -prune \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2083 |
-o -name '.make.*' -print | xargs rm -f |
0 | 2084 |
|
2085 |
$MAKE -ek clobber 2>&1 | tee -a $SRC/clobber-${MACH}.out >> $LOGFILE |
|
2086 |
echo "\n==== Make clobber ERRORS ====\n" >> $mail_msg_file |
|
2087 |
grep "$MAKE:" $SRC/clobber-${MACH}.out | |
|
2088 |
egrep -v "Ignoring unknown host" \ |
|
2089 |
>> $mail_msg_file |
|
2090 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2091 |
if [[ "$t_FLAG" = "y" || "$O_FLAG" = "y" ]]; then |
0 | 2092 |
echo "\n==== Make tools clobber at `date` ====\n" >> $LOGFILE |
2093 |
cd ${TOOLS} |
|
2094 |
rm -f ${TOOLS}/clobber-${MACH}.out |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2095 |
$MAKE TOOLS_PROTO=$TOOLS_PROTO -ek clobber 2>&1 | \ |
0 | 2096 |
tee -a ${TOOLS}/clobber-${MACH}.out >> $LOGFILE |
2097 |
echo "\n==== Make tools clobber ERRORS ====\n" \ |
|
2098 |
>> $mail_msg_file |
|
2099 |
grep "$MAKE:" ${TOOLS}/clobber-${MACH}.out \ |
|
2100 |
>> $mail_msg_file |
|
2101 |
rm -rf ${TOOLS_PROTO} |
|
2102 |
mkdir -p ${TOOLS_PROTO} |
|
2103 |
fi |
|
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
2104 |
|
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
2105 |
typeset roots=$(allprotos) |
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
2106 |
echo "\n\nClearing $roots" >> "$LOGFILE" |
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
2107 |
rm -rf $roots |
0 | 2108 |
|
2109 |
# Get back to a clean workspace as much as possible to catch |
|
2110 |
# problems that only occur on fresh workspaces. |
|
2111 |
# Remove all .make.state* files, libraries, and .o's that may |
|
900 | 2112 |
# have been omitted from clobber. A couple of libraries are |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2113 |
# under source code control, so leave them alone. |
0 | 2114 |
# We should probably blow away temporary directories too. |
2115 |
cd $SRC |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2116 |
find $relsrcdirs \( -name SCCS -o -name .hg -o -name .svn \ |
13660
189bdb3d9698
1960 developer tools should support git
Richard Lowe <richlowe@richlowe.net>
parents:
13655
diff
changeset
|
2117 |
-o -name .git -o -name 'interfaces.*' \) -prune -o \ |
0 | 2118 |
\( -name '.make.*' -o -name 'lib*.a' -o -name 'lib*.so*' -o \ |
900 | 2119 |
-name '*.o' \) -print | \ |
2120 |
grep -v 'tools/ctf/dwarf/.*/libdwarf' | xargs rm -f |
|
0 | 2121 |
else |
2122 |
echo "\n==== No clobber at `date` ====\n" >> $LOGFILE |
|
2123 |
fi |
|
2124 |
||
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2125 |
type bringover_teamware > /dev/null 2>&1 || function bringover_teamware { |
0 | 2126 |
# sleep on the parent workspace's lock |
2127 |
while egrep -s write $BRINGOVER_WS/Codemgr_wsdata/locks |
|
2128 |
do |
|
2129 |
sleep 120 |
|
2130 |
done |
|
2131 |
||
5797 | 2132 |
if [[ -z $BRINGOVER ]]; then |
2133 |
BRINGOVER=$TEAMWARE/bin/bringover |
|
2134 |
fi |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2135 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2136 |
staffer $BRINGOVER -c "nightly update" -p $BRINGOVER_WS \ |
1810 | 2137 |
-w $CODEMGR_WS $BRINGOVER_FILES < /dev/null 2>&1 || |
2138 |
touch $TMPDIR/bringover_failed |
|
2139 |
||
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2140 |
staffer bringovercheck $CODEMGR_WS >$TMPDIR/bringovercheck.out 2>&1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2141 |
if [ -s $TMPDIR/bringovercheck.out ]; then |
2371 | 2142 |
echo "\n==== POST-BRINGOVER CLEANUP NOISE ====\n" |
2143 |
cat $TMPDIR/bringovercheck.out |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2144 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2145 |
} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2146 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2147 |
type bringover_mercurial > /dev/null 2>&1 || function bringover_mercurial { |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2148 |
typeset -x PATH=$PATH |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2149 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2150 |
# If the repository doesn't exist yet, then we want to populate it. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2151 |
if [[ ! -d $CODEMGR_WS/.hg ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2152 |
staffer hg init $CODEMGR_WS |
8787
cf95a2b24554
6759002 using nightly to create an hg workspace does not set default path
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8785
diff
changeset
|
2153 |
staffer echo "[paths]" > $CODEMGR_WS/.hg/hgrc |
cf95a2b24554
6759002 using nightly to create an hg workspace does not set default path
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8785
diff
changeset
|
2154 |
staffer echo "default=$BRINGOVER_WS" >> $CODEMGR_WS/.hg/hgrc |
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2155 |
touch $TMPDIR/new_repository |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2156 |
fi |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2157 |
|
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2158 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2159 |
# If the user set CLOSED_BRINGOVER_WS and didn't set CLOSED_IS_PRESENT |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2160 |
# to "no," then we'll want to initialise the closed repository |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2161 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2162 |
# We use $orig_closed_is_present instead of $CLOSED_IS_PRESENT, |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2163 |
# because for newly-created source trees, the latter will be "no" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2164 |
# until after the bringover completes. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2165 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2166 |
if [[ "$orig_closed_is_present" != "no" && \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2167 |
-n "$CLOSED_BRINGOVER_WS" && \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2168 |
! -d $CODEMGR_WS/usr/closed/.hg ]]; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2169 |
staffer mkdir -p $CODEMGR_WS/usr/closed |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2170 |
staffer hg init $CODEMGR_WS/usr/closed |
8787
cf95a2b24554
6759002 using nightly to create an hg workspace does not set default path
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8785
diff
changeset
|
2171 |
staffer echo "[paths]" > $CODEMGR_WS/usr/closed/.hg/hgrc |
cf95a2b24554
6759002 using nightly to create an hg workspace does not set default path
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8785
diff
changeset
|
2172 |
staffer echo "default=$CLOSED_BRINGOVER_WS" >> $CODEMGR_WS/usr/closed/.hg/hgrc |
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2173 |
touch $TMPDIR/new_closed |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2174 |
export CLOSED_IS_PRESENT=yes |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2175 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2176 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2177 |
typeset -x HGMERGE="/bin/false" |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2178 |
|
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2179 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2180 |
# If the user has changes, regardless of whether those changes are |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2181 |
# committed, and regardless of whether those changes conflict, then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2182 |
# we'll attempt to merge them either implicitly (uncommitted) or |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2183 |
# explicitly (committed). |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2184 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2185 |
# These are the messages we'll use to help clarify mercurial output |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2186 |
# in those cases. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2187 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2188 |
typeset mergefailmsg="\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2189 |
***\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2190 |
*** nightly was unable to automatically merge your changes. You should\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2191 |
*** redo the full merge manually, following the steps outlined by mercurial\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2192 |
*** above, then restart nightly.\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2193 |
***\n" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2194 |
typeset mergepassmsg="\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2195 |
***\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2196 |
*** nightly successfully merged your changes. This means that your working\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2197 |
*** directory has been updated, but those changes are not yet committed.\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2198 |
*** After nightly completes, you should validate the results of the merge,\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2199 |
*** then use hg commit manually.\n\ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2200 |
***\n" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2201 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2202 |
# |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2203 |
# For each repository in turn: |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2204 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2205 |
# 1. Do the pull. If this fails, dump the output and bail out. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2206 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2207 |
# 2. If the pull resulted in an extra head, do an explicit merge. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2208 |
# If this fails, dump the output and bail out. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2209 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2210 |
# Because we can't rely on Mercurial to exit with a failure code |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2211 |
# when a merge fails (Mercurial issue #186), we must grep the |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2212 |
# output of pull/merge to check for attempted and/or failed merges. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2213 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2214 |
# 3. If a merge failed, set the message and fail the bringover. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2215 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2216 |
# 4. Otherwise, if a merge succeeded, set the message |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2217 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2218 |
# 5. Dump the output, and any message from step 3 or 4. |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2219 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2220 |
|
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2221 |
typeset HG_SOURCE=$BRINGOVER_WS |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2222 |
if [ ! -f $TMPDIR/new_repository ]; then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2223 |
HG_SOURCE=$TMPDIR/open_bundle.hg |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2224 |
staffer hg --cwd $CODEMGR_WS incoming --bundle $HG_SOURCE \ |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2225 |
-v $BRINGOVER_WS > $TMPDIR/incoming_open.out |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2226 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2227 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2228 |
# If there are no incoming changesets, then incoming will |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2229 |
# fail, and there will be no bundle file. Reset the source, |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2230 |
# to allow the remaining logic to complete with no false |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2231 |
# negatives. (Unlike incoming, pull will return success |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2232 |
# for the no-change case.) |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2233 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2234 |
if (( $? != 0 )); then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2235 |
HG_SOURCE=$BRINGOVER_WS |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2236 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2237 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2238 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2239 |
staffer hg --cwd $CODEMGR_WS pull -u $HG_SOURCE \ |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2240 |
> $TMPDIR/pull_open.out 2>&1 |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2241 |
if (( $? != 0 )); then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2242 |
printf "%s: pull failed as follows:\n\n" "$CODEMGR_WS" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2243 |
cat $TMPDIR/pull_open.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2244 |
if grep "^merging.*failed" $TMPDIR/pull_open.out > /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2245 |
printf "$mergefailmsg" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2246 |
fi |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2247 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2248 |
return |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2249 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2250 |
|
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2251 |
if grep "not updating" $TMPDIR/pull_open.out > /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2252 |
staffer hg --cwd $CODEMGR_WS merge \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2253 |
>> $TMPDIR/pull_open.out 2>&1 |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2254 |
if (( $? != 0 )); then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2255 |
printf "%s: merge failed as follows:\n\n" \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2256 |
"$CODEMGR_WS" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2257 |
cat $TMPDIR/pull_open.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2258 |
if grep "^merging.*failed" $TMPDIR/pull_open.out \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2259 |
> /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2260 |
printf "$mergefailmsg" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2261 |
fi |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2262 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2263 |
return |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2264 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2265 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2266 |
|
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2267 |
printf "updated %s with the following results:\n" "$CODEMGR_WS" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2268 |
cat $TMPDIR/pull_open.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2269 |
if grep "^merging" $TMPDIR/pull_open.out >/dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2270 |
printf "$mergepassmsg" |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2271 |
fi |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2272 |
printf "\n" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2273 |
|
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2274 |
# |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2275 |
# We only want to update usr/closed if it exists, and we haven't been |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2276 |
# told not to via $CLOSED_IS_PRESENT, and we actually know where to |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2277 |
# pull from ($CLOSED_BRINGOVER_WS). |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2278 |
# |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2279 |
if [[ $CLOSED_IS_PRESENT = yes && \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2280 |
-d $CODEMGR_WS/usr/closed/.hg && \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2281 |
-n $CLOSED_BRINGOVER_WS ]]; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2282 |
|
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2283 |
HG_SOURCE=$CLOSED_BRINGOVER_WS |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2284 |
if [ ! -f $TMPDIR/new_closed ]; then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2285 |
HG_SOURCE=$TMPDIR/closed_bundle.hg |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2286 |
staffer hg --cwd $CODEMGR_WS/usr/closed incoming \ |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2287 |
--bundle $HG_SOURCE -v $CLOSED_BRINGOVER_WS \ |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2288 |
> $TMPDIR/incoming_closed.out |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2289 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2290 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2291 |
# If there are no incoming changesets, then incoming will |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2292 |
# fail, and there will be no bundle file. Reset the source, |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2293 |
# to allow the remaining logic to complete with no false |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2294 |
# negatives. (Unlike incoming, pull will return success |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2295 |
# for the no-change case.) |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2296 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2297 |
if (( $? != 0 )); then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2298 |
HG_SOURCE=$CLOSED_BRINGOVER_WS |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2299 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2300 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2301 |
|
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2302 |
staffer hg --cwd $CODEMGR_WS/usr/closed pull -u \ |
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2303 |
$HG_SOURCE > $TMPDIR/pull_closed.out 2>&1 |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2304 |
if (( $? != 0 )); then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2305 |
printf "closed pull failed as follows:\n\n" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2306 |
cat $TMPDIR/pull_closed.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2307 |
if grep "^merging.*failed" $TMPDIR/pull_closed.out \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2308 |
> /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2309 |
printf "$mergefailmsg" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2310 |
fi |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2311 |
touch $TMPDIR/bringover_failed |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2312 |
return |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2313 |
fi |
7264
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2314 |
|
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2315 |
if grep "not updating" $TMPDIR/pull_closed.out > /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2316 |
staffer hg --cwd $CODEMGR_WS/usr/closed merge \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2317 |
>> $TMPDIR/pull_closed.out 2>&1 |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2318 |
if (( $? != 0 )); then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2319 |
printf "closed merge failed as follows:\n\n" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2320 |
cat $TMPDIR/pull_closed.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2321 |
if grep "^merging.*failed" $TMPDIR/pull_closed.out > /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2322 |
printf "$mergefailmsg" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2323 |
fi |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2324 |
touch $TMPDIR/bringover_failed |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2325 |
return |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2326 |
fi |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2327 |
fi |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2328 |
|
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2329 |
printf "updated %s with the following results:\n" \ |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2330 |
"$CODEMGR_WS/usr/closed" |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2331 |
cat $TMPDIR/pull_closed.out |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2332 |
if grep "^merging" $TMPDIR/pull_closed.out > /dev/null 2>&1; then |
89c9135b80e3
6730623 nightly should create usr/closed if explicitly asked
mjnelson
parents:
7123
diff
changeset
|
2333 |
printf "$mergepassmsg" |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2334 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2335 |
fi |
8789
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2336 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2337 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2338 |
# Per-changeset output is neither useful nor manageable for a |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2339 |
# newly-created repository. |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2340 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2341 |
if [ -f $TMPDIR/new_repository ]; then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2342 |
return |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2343 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2344 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2345 |
printf "\nadded the following changesets to open repository:\n" |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2346 |
cat $TMPDIR/incoming_open.out |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2347 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2348 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2349 |
# The closed repository could have been newly created, even though |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2350 |
# the open one previously existed... |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2351 |
# |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2352 |
if [ -f $TMPDIR/new_closed ]; then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2353 |
return |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2354 |
fi |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2355 |
|
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2356 |
if [ -f $TMPDIR/incoming_closed.out ]; then |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2357 |
printf "\nadded the following changesets to closed repository:\n" |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2358 |
cat $TMPDIR/incoming_closed.out |
1b073e3e4539
6736013 nightly 'bringover' ("hg pull -u") should list files changed again. pretty please?
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
8787
diff
changeset
|
2359 |
fi |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2360 |
} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2361 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2362 |
type bringover_subversion > /dev/null 2>&1 || function bringover_subversion { |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2363 |
typeset -x PATH=$PATH |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2364 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2365 |
if [[ ! -d $CODEMGR_WS/.svn ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2366 |
staffer svn checkout $BRINGOVER_WS $CODEMGR_WS || |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2367 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2368 |
else |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2369 |
typeset root |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2370 |
root=$(staffer svn info $CODEMGR_WS | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2371 |
nawk '/^Repository Root:/ {print $NF}') |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2372 |
if [[ $root != $BRINGOVER_WS ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2373 |
# We fail here because there's no way to update |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2374 |
# from a named repo. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2375 |
cat <<-EOF |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2376 |
\$BRINGOVER_WS doesn't match repository root: |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2377 |
\$BRINGOVER_WS: $BRINGOVER_WS |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2378 |
Repository root: $root |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2379 |
EOF |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2380 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2381 |
else |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2382 |
# If a conflict happens, svn still exits 0. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2383 |
staffer svn update $CODEMGR_WS | tee $TMPDIR/pull.out || |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2384 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2385 |
if grep "^C" $TMPDIR/pull.out > /dev/null 2>&1; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2386 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2387 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2388 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2389 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2390 |
} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2391 |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2392 |
type bringover_none > /dev/null 2>&1 || function bringover_none { |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2393 |
echo "Couldn't figure out what kind of SCM to use for $BRINGOVER_WS." |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2394 |
touch $TMPDIR/bringover_failed |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2395 |
} |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2396 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2397 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2398 |
# Decide whether to bringover to the codemgr workspace |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2399 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2400 |
if [ "$n_FLAG" = "n" ]; then |
13161
35133fa0d604
115 /opt/onbld/bin/nightly[2377]: wstypes: line 2346: http_get: not found
Richard Lowe <richlowe@richlowe.net>
parents:
13015
diff
changeset
|
2401 |
PARENT_SCM_TYPE=$(parent_wstype) |
7123
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2402 |
|
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2403 |
if [[ $SCM_TYPE != none && $SCM_TYPE != $PARENT_SCM_TYPE ]]; then |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2404 |
echo "cannot bringover from $PARENT_SCM_TYPE to $SCM_TYPE, " \ |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2405 |
"quitting at `date`." | tee -a $mail_msg_file >> $LOGFILE |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2406 |
exit 1 |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2407 |
fi |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2408 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2409 |
run_hook PRE_BRINGOVER |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2410 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2411 |
echo "\n==== bringover to $CODEMGR_WS at `date` ====\n" >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2412 |
echo "\n==== BRINGOVER LOG ====\n" >> $mail_msg_file |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2413 |
|
7123
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2414 |
eval "bringover_${PARENT_SCM_TYPE}" 2>&1 | |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2415 |
tee -a $mail_msg_file >> $LOGFILE |
1810 | 2416 |
|
2371 | 2417 |
if [ -f $TMPDIR/bringover_failed ]; then |
1810 | 2418 |
rm -f $TMPDIR/bringover_failed |
2419 |
build_ok=n |
|
2371 | 2420 |
echo "trouble with bringover, quitting at `date`." | |
1810 | 2421 |
tee -a $mail_msg_file >> $LOGFILE |
0 | 2422 |
exit 1 |
2423 |
fi |
|
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2424 |
|
7123
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2425 |
# |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2426 |
# It's possible that we used the bringover above to create |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2427 |
# $CODEMGR_WS. If so, then SCM_TYPE was previously "none," |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2428 |
# but should now be the same as $BRINGOVER_WS. |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2429 |
# |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2430 |
[[ $SCM_TYPE = none ]] && SCM_TYPE=$PARENT_SCM_TYPE |
6e84ae5cc433
6725705 findunref build fails under nightly if $CLONE_WS is set but non-existent
mjnelson
parents:
7078
diff
changeset
|
2431 |
|
4973
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
2432 |
run_hook POST_BRINGOVER |
e9e56fdeb64d
6584986 *nightly* needs a hook for shared build machines
sommerfe
parents:
4680
diff
changeset
|
2433 |
|
1202
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2434 |
# |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2435 |
# Possible transition from pre-split workspace to split |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2436 |
# workspace. See if the bringover changed anything. |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2437 |
# |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2438 |
CLOSED_IS_PRESENT="$orig_closed_is_present" |
02db040f16e8
6366785 nightly doesn't handle transition from pre-split to split workspace
kupfer
parents:
1168
diff
changeset
|
2439 |
check_closed_tree |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2440 |
|
0 | 2441 |
else |
2442 |
echo "\n==== No bringover to $CODEMGR_WS ====\n" >> $LOGFILE |
|
2443 |
fi |
|
2444 |
||
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2445 |
if [[ "$O_FLAG" = y && "$CLOSED_IS_PRESENT" != "yes" ]]; then |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2446 |
build_ok=n |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2447 |
echo "OpenSolaris binary deliverables need usr/closed." \ |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2448 |
| tee -a "$mail_msg_file" >> $LOGFILE |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2449 |
exit 1 |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2450 |
fi |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2451 |
|
13290
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
2452 |
# Safeguards |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
2453 |
[[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set." |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
2454 |
[[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory." |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
2455 |
[[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found." |
6489e7702a16
689 nightly.sh doesn't do fresh bringovers
Roland Mainz <roland.mainz@nexenta.com>
parents:
13272
diff
changeset
|
2456 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2457 |
echo "\n==== Build environment ====\n" | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2458 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2459 |
# System |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2460 |
whence uname | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2461 |
uname -a 2>&1 | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2462 |
echo | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2463 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2464 |
# make |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2465 |
whence $MAKE | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2466 |
$MAKE -v | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2467 |
echo "number of concurrent jobs = $DMAKE_MAX_JOBS" | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2468 |
tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2469 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2470 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2471 |
# Report the compiler versions. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2472 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2473 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2474 |
if [[ ! -f $SRC/Makefile ]]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2475 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2476 |
echo "\nUnable to find \"Makefile\" in $SRC." | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2477 |
tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2478 |
exit 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2479 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2480 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2481 |
( cd $SRC |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2482 |
for target in cc-version cc64-version java-version; do |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2483 |
echo |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2484 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2485 |
# Put statefile somewhere we know we can write to rather than trip |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2486 |
# over a read-only $srcroot. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2487 |
# |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2488 |
rm -f $TMPDIR/make-state |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2489 |
export SRC |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2490 |
if $MAKE -K $TMPDIR/make-state -e $target 2>/dev/null; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2491 |
continue |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2492 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2493 |
touch $TMPDIR/nocompiler |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2494 |
done |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2495 |
echo |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2496 |
) | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2497 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2498 |
if [ -f $TMPDIR/nocompiler ]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2499 |
rm -f $TMPDIR/nocompiler |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2500 |
build_ok=n |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2501 |
echo "Aborting due to missing compiler." | |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2502 |
tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2503 |
exit 1 |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2504 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2505 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2506 |
# as |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2507 |
whence as | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2508 |
as -V 2>&1 | head -1 | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2509 |
echo | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2510 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2511 |
# Check that we're running a capable link-editor |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2512 |
whence ld | tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2513 |
LDVER=`ld -V 2>&1` |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2514 |
echo $LDVER | tee -a $build_environ_file >> $LOGFILE |
13938
cab67b95c26b
3298 illumos link-editor and related tools should be differentiable
Richard Lowe <richlowe@richlowe.net>
parents:
13660
diff
changeset
|
2515 |
LDVER=`echo $LDVER | sed -e "s/.*-1\.\([0-9]*\).*/\1/"` |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2516 |
if [ `expr $LDVER \< 422` -eq 1 ]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2517 |
echo "The link-editor needs to be at version 422 or higher to build" | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2518 |
tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2519 |
echo "the latest stuff. Hope your build works." | \ |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2520 |
tee -a $build_environ_file >> $LOGFILE |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2521 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2522 |
|
0 | 2523 |
# |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2524 |
# Build and use the workspace's tools if requested |
0 | 2525 |
# |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2526 |
if [[ "$t_FLAG" = "y" || "$O_FLAG" = y ]]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2527 |
set_non_debug_build_flags |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2528 |
|
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2529 |
build_tools ${TOOLS_PROTO} |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2530 |
if [[ $? != 0 && "$t_FLAG" = y ]]; then |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2531 |
use_tools $TOOLS_PROTO |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2532 |
fi |
0 | 2533 |
fi |
2534 |
||
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2535 |
# |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2536 |
# copy ihv proto area in addition to the build itself |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2537 |
# |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2538 |
if [ "$X_FLAG" = "y" ]; then |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2539 |
copy_ihv_proto |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2540 |
fi |
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2541 |
|
0 | 2542 |
if [ "$i_FLAG" = "y" -a "$SH_FLAG" = "y" ]; then |
2543 |
echo "\n==== NOT Building base OS-Net source ====\n" | \ |
|
2544 |
tee -a $LOGFILE >> $mail_msg_file |
|
2545 |
else |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2546 |
# timestamp the start of the normal build; the findunref tool uses it. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2547 |
touch $SRC/.build.tstamp |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2548 |
|
0 | 2549 |
normal_build |
2550 |
fi |
|
2551 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2552 |
# |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2553 |
# Generate the THIRDPARTYLICENSE files if needed. This is done after |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2554 |
# the build, so that dynamically-created license files are there. |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2555 |
# It's done before findunref to help identify license files that need |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2556 |
# to be added to tools/opensolaris/license-list. |
5357 | 2557 |
# |
2558 |
if [ "$O_FLAG" = y -a "$build_ok" = y ]; then |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2559 |
echo "\n==== Generating THIRDPARTYLICENSE files ====\n" | |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2560 |
tee -a "$mail_msg_file" >> "$LOGFILE" |
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2561 |
|
13010
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2562 |
if [ -d $ROOT/licenses/usr ]; then |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2563 |
( cd $ROOT/licenses ; \ |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2564 |
mktpl $SRC/pkg/license-list ) >> "$LOGFILE" 2>&1 |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2565 |
if (( $? != 0 )) ; then |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2566 |
echo "Couldn't create THIRDPARTYLICENSE files" | |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2567 |
tee -a "$mail_msg_file" >> "$LOGFILE" |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2568 |
fi |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2569 |
else |
c0270875939a
6929502 packages are missing some license files
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12899
diff
changeset
|
2570 |
echo "No licenses found under $ROOT/licenses" | |
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
2571 |
tee -a "$mail_msg_file" >> "$LOGFILE" |
5357 | 2572 |
fi |
2573 |
fi |
|
2574 |
||
0 | 2575 |
ORIG_SRC=$SRC |
2576 |
BINARCHIVE=${CODEMGR_WS}/bin-${MACH}.cpio.Z |
|
2577 |
||
2578 |
if [ "$SE_FLAG" = "y" -o "$SD_FLAG" = "y" -o "$SH_FLAG" = "y" ]; then |
|
2579 |
save_binaries |
|
2580 |
fi |
|
2581 |
||
2582 |
||
2583 |
# EXPORT_SRC comes after CRYPT_SRC since a domestic build will need |
|
2584 |
# $SRC pointing to the export_source usr/src. |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2585 |
|
0 | 2586 |
if [ "$SE_FLAG" = "y" -o "$SD_FLAG" = "y" -o "$SH_FLAG" = "y" ]; then |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2587 |
if [ "$SD_FLAG" = "y" -a $build_ok = y ]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2588 |
set_up_source_build ${CODEMGR_WS} ${CRYPT_SRC} CRYPT_SRC |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2589 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2590 |
|
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2591 |
if [ $build_ok = y ]; then |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2592 |
set_up_source_build ${CODEMGR_WS} ${EXPORT_SRC} EXPORT_SRC |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2593 |
fi |
0 | 2594 |
fi |
2595 |
||
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2596 |
if [ "$SD_FLAG" = "y" -a $build_ok = y ]; then |
0 | 2597 |
# drop the crypt files in place. |
2598 |
cd ${EXPORT_SRC} |
|
2599 |
echo "\nextracting crypt_files.cpio.Z onto export_source.\n" \ |
|
2600 |
>> ${LOGFILE} |
|
2601 |
zcat ${CODEMGR_WS}/crypt_files.cpio.Z | \ |
|
2602 |
cpio -idmucvB 2>/dev/null >> ${LOGFILE} |
|
2603 |
if [ "$?" = "0" ]; then |
|
2604 |
echo "\n==== DOMESTIC extraction succeeded ====\n" \ |
|
2605 |
>> $mail_msg_file |
|
2606 |
else |
|
2607 |
echo "\n==== DOMESTIC extraction failed ====\n" \ |
|
2608 |
>> $mail_msg_file |
|
2609 |
fi |
|
2610 |
||
2611 |
fi |
|
2612 |
||
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
2613 |
if [ "$SO_FLAG" = "y" -a "$build_ok" = y ]; then |
2947 | 2614 |
# |
13325
ab46f88a2660
842 src/lib/Makefile has libc_i18n vestiges
Garrett D'Amore <garrett@nexenta.com>
parents:
13290
diff
changeset
|
2615 |
# Copy the open sources into their own tree. |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2616 |
# If copy_source fails, it will have already generated an |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2617 |
# error message and set build_ok=n, so we don't need to worry |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2618 |
# about that here. |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2619 |
# |
2947 | 2620 |
copy_source $CODEMGR_WS $OPEN_SRCDIR OPEN_SOURCE usr/src |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2621 |
fi |
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
2622 |
|
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
2623 |
if [ "$SO_FLAG" = "y" -a "$build_ok" = y ]; then |
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
2624 |
SRC=$OPEN_SRCDIR/usr/src |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2625 |
export CLOSED_IS_PRESENT=no |
2947 | 2626 |
fi |
2627 |
||
2628 |
if is_source_build && [ $build_ok = y ] ; then |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2629 |
# remove proto area(s) here, since we don't clobber |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2630 |
rm -rf `allprotos` |
0 | 2631 |
if [ "$t_FLAG" = "y" ]; then |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2632 |
set_non_debug_build_flags |
2230
fb155af30623
6218814 nightly builds tools/ for EXPORT/CRYPT builds in original source tree
danmcd
parents:
2118
diff
changeset
|
2633 |
ORIG_TOOLS=$TOOLS |
2947 | 2634 |
# |
2635 |
# SRC was set earlier to point to the source build |
|
2636 |
# source tree (e.g., $EXPORT_SRC). |
|
2637 |
# |
|
2638 |
TOOLS=${SRC}/tools |
|
12276
5faf8d02346b
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12210
diff
changeset
|
2639 |
TOOLS_PROTO=${TOOLS}/${TOOLS_PROTO_REL}; export TOOLS_PROTO |
5faf8d02346b
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12210
diff
changeset
|
2640 |
build_tools ${TOOLS_PROTO} |
5faf8d02346b
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12210
diff
changeset
|
2641 |
if [[ $? != 0 ]]; then |
5faf8d02346b
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12210
diff
changeset
|
2642 |
use_tools ${TOOLS_PROTO} |
5faf8d02346b
6936772 nightly.sh inclusion of tools proto in allprotos causes issues for source builds
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
12210
diff
changeset
|
2643 |
fi |
0 | 2644 |
fi |
2645 |
||
2646 |
normal_build |
|
2647 |
fi |
|
2648 |
||
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2649 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2650 |
# There are several checks that need to look at the proto area, but |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2651 |
# they only need to look at one, and they don't care whether it's |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2652 |
# DEBUG or non-DEBUG. |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2653 |
# |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2654 |
if [[ "$MULTI_PROTO" = yes && "$D_FLAG" = n ]]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2655 |
checkroot=$ROOT-nd |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2656 |
else |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2657 |
checkroot=$ROOT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2658 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2659 |
|
0 | 2660 |
if [ "$build_ok" = "y" ]; then |
2661 |
echo "\n==== Creating protolist system file at `date` ====" \ |
|
2662 |
>> $LOGFILE |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2663 |
protolist $checkroot > $ATLOG/proto_list_${MACH} |
0 | 2664 |
echo "==== protolist system file created at `date` ====\n" \ |
2665 |
>> $LOGFILE |
|
2666 |
||
2667 |
if [ "$N_FLAG" != "y" ]; then |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2668 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2669 |
E1= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2670 |
f1= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2671 |
if [ -d "$SRC/pkgdefs" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2672 |
f1="$SRC/pkgdefs/etc/exception_list_$MACH" |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2673 |
if [ "$X_FLAG" = "y" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2674 |
f1="$f1 $IA32_IHV_WS/usr/src/pkgdefs/etc/exception_list_$MACH" |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2675 |
fi |
0 | 2676 |
fi |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2677 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2678 |
for f in $f1; do |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2679 |
if [ -f "$f" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2680 |
E1="$E1 -e $f" |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2681 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2682 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2683 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2684 |
E2= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2685 |
f2= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2686 |
if [ -d "$SRC/pkg" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2687 |
f2="$f2 exceptions/packaging" |
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2688 |
fi |
0 | 2689 |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2690 |
for f in $f2; do |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2691 |
if [ -f "$f" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2692 |
E2="$E2 -e $f" |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2693 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2694 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2695 |
|
0 | 2696 |
if [ -f "$REF_PROTO_LIST" ]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2697 |
# |
2908
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2698 |
# For builds that copy the IHV proto area (-X), add the |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2699 |
# IHV proto list to the reference list if the reference |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2700 |
# was built without -X. |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2701 |
# |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2702 |
# For builds that don't copy the IHV proto area, add the |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2703 |
# IHV proto list to the build's proto list if the |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2704 |
# reference was built with -X. |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2705 |
# |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2706 |
# Use the presence of the first file entry of the cached |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2707 |
# IHV proto list in the reference list to determine |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2708 |
# whether it was built with -X or not. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2709 |
# |
11855
606f75cdda48
6932330 nightly.sh changes failed to notice that ihv proto was squirreled away in pkgdefs
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11846
diff
changeset
|
2710 |
IHV_REF_PROTO_LIST=$SRC/pkg/proto_list_ihv_$MACH |
2908
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2711 |
grepfor=$(nawk '$1 == "f" { print $2; exit }' \ |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2712 |
$IHV_REF_PROTO_LIST 2> /dev/null) |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2713 |
if [ $? = 0 -a -n "$grepfor" ]; then |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2714 |
if [ "$X_FLAG" = "y" ]; then |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2715 |
grep -w "$grepfor" \ |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2716 |
$REF_PROTO_LIST > /dev/null |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2717 |
if [ ! "$?" = "0" ]; then |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2718 |
REF_IHV_PROTO="-d $IHV_REF_PROTO_LIST" |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2719 |
fi |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2720 |
else |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2721 |
grep -w "$grepfor" \ |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2722 |
$REF_PROTO_LIST > /dev/null |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2723 |
if [ "$?" = "0" ]; then |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2724 |
IHV_PROTO_LIST="$IHV_REF_PROTO_LIST" |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2725 |
fi |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2726 |
fi |
73d7b826e6ed
6479443 nightly x86 builds showing apparently newly removed files
dduvall
parents:
2868
diff
changeset
|
2727 |
fi |
0 | 2728 |
fi |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2729 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2730 |
|
11845
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2731 |
if [ "$N_FLAG" != "y" -a -f $SRC/pkgdefs/Makefile ]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2732 |
echo "\n==== Impact on SVr4 packages ====\n" >> $mail_msg_file |
11845
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2733 |
# |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2734 |
# Compare the build's proto list with current package |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2735 |
# definitions to audit the quality of package |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2736 |
# definitions and makefile install targets. Use the |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2737 |
# current exception list. |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2738 |
# |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2739 |
PKGDEFS_LIST="" |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2740 |
for d in $abssrcdirs; do |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2741 |
if [ -d $d/pkgdefs ]; then |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2742 |
PKGDEFS_LIST="$PKGDEFS_LIST -d $d/pkgdefs" |
900 | 2743 |
fi |
11845
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2744 |
done |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2745 |
if [ "$X_FLAG" = "y" -a \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2746 |
-d $IA32_IHV_WS/usr/src/pkgdefs ]; then |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2747 |
PKGDEFS_LIST="$PKGDEFS_LIST -d $IA32_IHV_WS/usr/src/pkgdefs" |
2868
c6c11cf3e587
6460124 nightly -X doesn't properly copy the IHV proto area
dduvall
parents:
2730
diff
changeset
|
2748 |
fi |
11845
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2749 |
$PROTOCMPTERSE \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2750 |
"Files missing from the proto area:" \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2751 |
"Files missing from packages:" \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2752 |
"Inconsistencies between pkgdefs and proto area:" \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2753 |
${E1} \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2754 |
${PKGDEFS_LIST} \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2755 |
$ATLOG/proto_list_${MACH} \ |
5c6cbc713b93
6931951 nightly.sh test to avoid building ON SVr4 packages in an open-only ON build is wrong
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents:
11838
diff
changeset
|
2756 |
>> $mail_msg_file |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2757 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2758 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2759 |
if [ "$N_FLAG" != "y" -a -d $SRC/pkg ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2760 |
echo "\n==== Validating manifests against proto area ====\n" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2761 |
>> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2762 |
( cd $SRC/pkg ; $MAKE -e protocmp ROOT="$checkroot" ) \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2763 |
>> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2764 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2765 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2766 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2767 |
if [ "$N_FLAG" != "y" -a -f "$REF_PROTO_LIST" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2768 |
echo "\n==== Impact on proto area ====\n" >> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2769 |
if [ -n "$E2" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2770 |
ELIST=$E2 |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2771 |
else |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2772 |
ELIST=$E1 |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2773 |
fi |
0 | 2774 |
$PROTOCMPTERSE \ |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2775 |
"Files in yesterday's proto area, but not today's:" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2776 |
"Files in today's proto area, but not yesterday's:" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2777 |
"Files that changed between yesterday and today:" \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2778 |
${ELIST} \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2779 |
-d $REF_PROTO_LIST \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2780 |
$REF_IHV_PROTO \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2781 |
$ATLOG/proto_list_${MACH} \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2782 |
$IHV_PROTO_LIST \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2783 |
>> $mail_msg_file |
0 | 2784 |
fi |
2785 |
fi |
|
2786 |
||
2787 |
if [ "$u_FLAG" = "y" -a "$build_ok" = "y" ]; then |
|
2788 |
staffer cp $ATLOG/proto_list_${MACH} \ |
|
2789 |
$PARENT_WS/usr/src/proto_list_${MACH} |
|
2790 |
fi |
|
2791 |
||
2792 |
# Update parent proto area if necessary. This is done now |
|
2793 |
# so that the proto area has either DEBUG or non-DEBUG kernels. |
|
2794 |
# Note that this clears out the lock file, so we can dispense with |
|
2795 |
# the variable now. |
|
2796 |
if [ "$U_FLAG" = "y" -a "$build_ok" = "y" ]; then |
|
2797 |
echo "\n==== Copying proto area to $NIGHTLY_PARENT_ROOT ====\n" | \ |
|
2798 |
tee -a $LOGFILE >> $mail_msg_file |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2799 |
rm -rf $NIGHTLY_PARENT_ROOT/* |
0 | 2800 |
unset Ulockfile |
2801 |
mkdir -p $NIGHTLY_PARENT_ROOT |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2802 |
if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2803 |
( cd $ROOT; tar cf - . | |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2804 |
( cd $NIGHTLY_PARENT_ROOT; umask 0; tar xpf - ) ) 2>&1 | |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2805 |
tee -a $mail_msg_file >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2806 |
fi |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2807 |
if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2808 |
rm -rf $NIGHTLY_PARENT_ROOT-nd/* |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2809 |
mkdir -p $NIGHTLY_PARENT_ROOT-nd |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2810 |
cd $ROOT-nd |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2811 |
( tar cf - . | |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2812 |
( cd $NIGHTLY_PARENT_ROOT-nd; umask 0; tar xpf - ) ) 2>&1 | |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2813 |
tee -a $mail_msg_file >> $LOGFILE |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
2814 |
fi |
11961
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2815 |
if [ -n "${NIGHTLY_PARENT_TOOLS_ROOT}" ]; then |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2816 |
echo "\n==== Copying tools proto area to $NIGHTLY_PARENT_TOOLS_ROOT ====\n" | \ |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2817 |
tee -a $LOGFILE >> $mail_msg_file |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2818 |
rm -rf $NIGHTLY_PARENT_TOOLS_ROOT/* |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2819 |
mkdir -p $NIGHTLY_PARENT_TOOLS_ROOT |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2820 |
if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2821 |
( cd $TOOLS_PROTO; tar cf - . | |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2822 |
( cd $NIGHTLY_PARENT_TOOLS_ROOT; |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2823 |
umask 0; tar xpf - ) ) 2>&1 | |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2824 |
tee -a $mail_msg_file >> $LOGFILE |
cf8b29303819
6935095 nightly.sh is once again borked for SFW
Mark J. Nelson <Mark.J.Nelson@Oracle.COM>
parents:
11855
diff
changeset
|
2825 |
fi |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2826 |
fi |
0 | 2827 |
fi |
2828 |
||
2829 |
# |
|
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2830 |
# ELF verification: ABI (-A) and runtime (-r) checks |
0 | 2831 |
# |
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2832 |
if [[ ($build_ok = y) && ( ($A_FLAG = y) || ($r_FLAG = y) ) ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2833 |
# Directory ELF-data.$MACH holds the files produced by these tests. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2834 |
elf_ddir=$SRC/ELF-data.$MACH |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2835 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2836 |
# If there is a previous ELF-data backup directory, remove it. Then, |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2837 |
# rotate current ELF-data directory into its place and create a new |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2838 |
# empty directory |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2839 |
rm -rf $elf_ddir.ref |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2840 |
if [[ -d $elf_ddir ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2841 |
mv $elf_ddir $elf_ddir.ref |
0 | 2842 |
fi |
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2843 |
mkdir -p $elf_ddir |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2844 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2845 |
# Call find_elf to produce a list of the ELF objects in the proto area. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2846 |
# This list is passed to check_rtime and interface_check, preventing |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2847 |
# them from separately calling find_elf to do the same work twice. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2848 |
find_elf -fr $checkroot > $elf_ddir/object_list |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2849 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2850 |
if [[ $A_FLAG = y ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2851 |
echo "\n==== Check versioning and ABI information ====\n" | \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2852 |
tee -a $LOGFILE >> $mail_msg_file |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2853 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2854 |
# Produce interface description for the proto. Report errors. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2855 |
interface_check -o -w $elf_ddir -f object_list \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2856 |
-i interface -E interface.err |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2857 |
if [[ -s $elf_ddir/interface.err ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2858 |
tee -a $LOGFILE < $elf_ddir/interface.err \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2859 |
>> $mail_msg_file |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2860 |
fi |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2861 |
|
12478
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2862 |
# If ELF_DATA_BASELINE_DIR is defined, compare the new interface |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2863 |
# description file to that from the baseline gate. Issue a |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2864 |
# warning if the baseline is not present, and keep going. |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2865 |
if [[ "$ELF_DATA_BASELINE_DIR" != '' ]]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2866 |
base_ifile="$ELF_DATA_BASELINE_DIR/interface" |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2867 |
|
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2868 |
echo "\n==== Compare versioning and ABI information" \ |
12486
adfcb325b195
6952650 nightly builds should use daily S10 interface description files (fix nightly nit)
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12478
diff
changeset
|
2869 |
"to baseline ====\n" | \ |
12478
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2870 |
tee -a $LOGFILE >> $mail_msg_file |
12486
adfcb325b195
6952650 nightly builds should use daily S10 interface description files (fix nightly nit)
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12478
diff
changeset
|
2871 |
echo "Baseline: $base_ifile\n" >> $LOGFILE |
12478
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2872 |
|
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2873 |
if [[ -f $base_ifile ]]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2874 |
interface_cmp -d -o $base_ifile \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2875 |
$elf_ddir/interface > $elf_ddir/interface.cmp |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2876 |
if [[ -s $elf_ddir/interface.cmp ]]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2877 |
echo | tee -a $LOGFILE >> $mail_msg_file |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2878 |
tee -a $LOGFILE < \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2879 |
$elf_ddir/interface.cmp \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2880 |
>> $mail_msg_file |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2881 |
fi |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2882 |
else |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2883 |
echo "baseline not available. comparison" \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2884 |
"skipped" | \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2885 |
tee -a $LOGFILE >> $mail_msg_file |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2886 |
fi |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2887 |
|
0 | 2888 |
fi |
2889 |
fi |
|
2890 |
||
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2891 |
if [[ $r_FLAG = y ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2892 |
echo "\n==== Check ELF runtime attributes ====\n" | \ |
0 | 2893 |
tee -a $LOGFILE >> $mail_msg_file |
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2894 |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
2895 |
# If we're doing a DEBUG build the proto area will be left |
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2896 |
# with debuggable objects, thus don't assert -s. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2897 |
if [[ $D_FLAG = y ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2898 |
rtime_sflag="" |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2899 |
else |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2900 |
rtime_sflag="-s" |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2901 |
fi |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2902 |
check_rtime -i -m -v $rtime_sflag -o -w $elf_ddir \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2903 |
-D object_list -f object_list -E runtime.err \ |
10445
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2904 |
-I runtime.attr.raw |
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2905 |
|
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2906 |
# check_rtime -I output needs to be sorted in order to |
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2907 |
# compare it to that from previous builds. |
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2908 |
sort $elf_ddir/runtime.attr.raw > $elf_ddir/runtime.attr |
c04fc41621a9
6878175 Fix for 6866605 can produce large noisy nightly -r output
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10355
diff
changeset
|
2909 |
rm $elf_ddir/runtime.attr.raw |
10355
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2910 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2911 |
# Report errors |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2912 |
if [[ -s $elf_ddir/runtime.err ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2913 |
tee -a $LOGFILE < $elf_ddir/runtime.err \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2914 |
>> $mail_msg_file |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2915 |
fi |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2916 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2917 |
# If there is an ELF-data directory from a previous build, |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2918 |
# then diff the attr files. These files contain information |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2919 |
# about dependencies, versioning, and runpaths. There is some |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2920 |
# overlap with the ABI checking done above, but this also |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2921 |
# flushes out non-ABI interface differences along with the |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2922 |
# other information. |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2923 |
echo "\n==== Diff ELF runtime attributes" \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2924 |
"(since last build) ====\n" | \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2925 |
tee -a $LOGFILE >> $mail_msg_file >> $mail_msg_file |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2926 |
|
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2927 |
if [[ -f $elf_ddir.ref/runtime.attr ]]; then |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2928 |
diff $elf_ddir.ref/runtime.attr \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2929 |
$elf_ddir/runtime.attr \ |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2930 |
>> $mail_msg_file |
26c444652867
6866605 SUNWonbld ELF analysis tools need overhaul
Ali Bahrami <Ali.Bahrami@Sun.COM>
parents:
10313
diff
changeset
|
2931 |
fi |
0 | 2932 |
fi |
12478
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2933 |
|
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2934 |
# If -u set, copy contents of ELF-data.$MACH to the parent workspace. |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2935 |
if [[ "$u_FLAG" = "y" ]]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2936 |
p_elf_ddir=$PARENT_WS/usr/src/ELF-data.$MACH |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2937 |
|
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2938 |
# If parent lacks the ELF-data.$MACH directory, create it |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2939 |
if [[ ! -d $p_elf_ddir ]]; then |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2940 |
staffer mkdir -p $p_elf_ddir |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2941 |
fi |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2942 |
|
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2943 |
# These files are used asynchronously by other builds for ABI |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2944 |
# verification, as above for the -A option. As such, we require |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2945 |
# the file replacement to be atomic. Copy the data to a temp |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2946 |
# file in the same filesystem and then rename into place. |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2947 |
( |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2948 |
cd $elf_ddir |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2949 |
for elf_dfile in *; do |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2950 |
staffer cp $elf_dfile \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2951 |
${p_elf_ddir}/${elf_dfile}.new |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2952 |
staffer mv -f ${p_elf_ddir}/${elf_dfile}.new \ |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2953 |
${p_elf_ddir}/${elf_dfile} |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2954 |
done |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2955 |
) |
a267bf553e0e
6952658 onbld ELF tools could be more flexible for non-OSnet objects
Ali Bahrami <Ali.Bahrami@Oracle.COM>
parents:
12374
diff
changeset
|
2956 |
fi |
0 | 2957 |
fi |
2958 |
||
2959 |
# DEBUG lint of kernel begins |
|
2960 |
||
2961 |
if [ "$i_CMD_LINE_FLAG" = "n" -a "$l_FLAG" = "y" ]; then |
|
2962 |
if [ "$LINTDIRS" = "" ]; then |
|
2963 |
# LINTDIRS="$SRC/uts y $SRC/stand y $SRC/psm y" |
|
2964 |
LINTDIRS="$SRC y" |
|
2965 |
fi |
|
2966 |
set $LINTDIRS |
|
2967 |
while [ $# -gt 0 ]; do |
|
2968 |
dolint $1 $2; shift; shift |
|
2969 |
done |
|
2970 |
else |
|
2971 |
echo "\n==== No '$MAKE lint' ====\n" >> $LOGFILE |
|
2972 |
fi |
|
2973 |
||
2974 |
# "make check" begins |
|
2975 |
||
2976 |
if [ "$i_CMD_LINE_FLAG" = "n" -a "$C_FLAG" = "y" ]; then |
|
2977 |
# remove old check.out |
|
2978 |
rm -f $SRC/check.out |
|
2979 |
||
2980 |
rm -f $SRC/check-${MACH}.out |
|
2981 |
cd $SRC |
|
13215
25c1876a8d9c
334 "make check" fails if MULTI_PROTO is yes and only building non-debug
Albert Lee <trisk@opensolaris.org>
parents:
13193
diff
changeset
|
2982 |
$MAKE -ek check ROOT="$checkroot" 2>&1 | tee -a $SRC/check-${MACH}.out \ |
25c1876a8d9c
334 "make check" fails if MULTI_PROTO is yes and only building non-debug
Albert Lee <trisk@opensolaris.org>
parents:
13193
diff
changeset
|
2983 |
>> $LOGFILE |
0 | 2984 |
echo "\n==== cstyle/hdrchk errors ====\n" >> $mail_msg_file |
2985 |
||
2986 |
grep ":" $SRC/check-${MACH}.out | |
|
2987 |
egrep -v "Ignoring unknown host" | \ |
|
2988 |
sort | uniq >> $mail_msg_file |
|
2989 |
else |
|
2990 |
echo "\n==== No '$MAKE check' ====\n" >> $LOGFILE |
|
2991 |
fi |
|
2992 |
||
2993 |
echo "\n==== Find core files ====\n" | \ |
|
2994 |
tee -a $LOGFILE >> $mail_msg_file |
|
2995 |
||
900 | 2996 |
find $abssrcdirs -name core -a -type f -exec file {} \; | \ |
0 | 2997 |
tee -a $LOGFILE >> $mail_msg_file |
2998 |
||
2999 |
if [ "$f_FLAG" = "y" -a "$build_ok" = "y" ]; then |
|
3000 |
echo "\n==== Diff unreferenced files (since last build) ====\n" \ |
|
3001 |
| tee -a $LOGFILE >>$mail_msg_file |
|
3002 |
rm -f $SRC/unref-${MACH}.ref |
|
3003 |
if [ -f $SRC/unref-${MACH}.out ]; then |
|
3004 |
mv $SRC/unref-${MACH}.out $SRC/unref-${MACH}.ref |
|
3005 |
fi |
|
3006 |
||
10313
ca42e2f0424a
6869889 findunref needs to grok mercurial
meem <Peter.Memishian@Sun.COM>
parents:
10222
diff
changeset
|
3007 |
findunref -S $SCM_TYPE -t $SRC/.build.tstamp -s usr $CODEMGR_WS \ |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
3008 |
${TOOLS}/findunref/exception_list 2>> $mail_msg_file | \ |
10313
ca42e2f0424a
6869889 findunref needs to grok mercurial
meem <Peter.Memishian@Sun.COM>
parents:
10222
diff
changeset
|
3009 |
sort > $SRC/unref-${MACH}.out |
0 | 3010 |
|
3011 |
if [ ! -f $SRC/unref-${MACH}.ref ]; then |
|
3012 |
cp $SRC/unref-${MACH}.out $SRC/unref-${MACH}.ref |
|
3013 |
fi |
|
3014 |
||
3015 |
diff $SRC/unref-${MACH}.ref $SRC/unref-${MACH}.out >>$mail_msg_file |
|
3016 |
fi |
|
3017 |
||
5357 | 3018 |
# |
3019 |
# Generate the OpenSolaris deliverables if requested. Some of these |
|
3020 |
# steps need to come after findunref and are commented below. |
|
3021 |
# |
|
11562
1ce42c60d482
6855998 put signed crypto in its own tarball, not with the closed bins
Mike Kupfer <Mike.Kupfer@Sun.COM>
parents:
10934
diff
changeset
|
3022 |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3023 |
# If we are doing an OpenSolaris _source_ build (-S O) then we do |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3024 |
# not have usr/closed available to us to generate closedbins from, |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3025 |
# so skip this part. |
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3026 |
if [ "$SO_FLAG" = n -a "$O_FLAG" = y -a "$build_ok" = y ]; then |
5357 | 3027 |
echo "\n==== Generating OpenSolaris tarballs ====\n" | \ |
3028 |
tee -a $mail_msg_file >> $LOGFILE |
|
3029 |
||
3030 |
cd $CODEMGR_WS |
|
3031 |
||
3032 |
# |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3033 |
# This step grovels through the package manifests, so it |
5357 | 3034 |
# must come after findunref. |
3035 |
# |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3036 |
# We assume no DEBUG vs non-DEBUG package content variation |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3037 |
# here; if that changes, then the "make all" in $SRC/pkg will |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3038 |
# need to be moved into the conditionals and repeated for each |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3039 |
# different build. |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3040 |
# |
5357 | 3041 |
echo "Generating closed binaries tarball(s)..." >> $LOGFILE |
3042 |
closed_basename=on-closed-bins |
|
3043 |
if [ "$D_FLAG" = y ]; then |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3044 |
bindrop "$closed_basename" >>"$LOGFILE" 2>&1 |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
3045 |
if (( $? != 0 )) ; then |
5357 | 3046 |
echo "Couldn't create DEBUG closed binaries." | |
3047 |
tee -a $mail_msg_file >> $LOGFILE |
|
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
3048 |
build_ok=n |
5357 | 3049 |
fi |
3050 |
fi |
|
3051 |
if [ "$F_FLAG" = n ]; then |
|
12210
436b06ce515d
6593513 make nightly -O cheaper
jmcp <James.McPherson@Sun.COM>
parents:
11961
diff
changeset
|
3052 |
bindrop -n "$closed_basename-nd" >>"$LOGFILE" 2>&1 |
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
3053 |
if (( $? != 0 )) ; then |
5357 | 3054 |
echo "Couldn't create non-DEBUG closed binaries." | |
3055 |
tee -a $mail_msg_file >> $LOGFILE |
|
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
3056 |
build_ok=n |
5357 | 3057 |
fi |
3058 |
fi |
|
3059 |
||
3060 |
echo "Generating README.opensolaris..." >> $LOGFILE |
|
3061 |
cat $SRC/tools/opensolaris/README.opensolaris.tmpl | \ |
|
3062 |
mkreadme_osol $CODEMGR_WS/README.opensolaris >> $LOGFILE 2>&1 |
|
7078
935563142864
6538468 add Mercurial support to ON developer tools
mjnelson
parents:
6972
diff
changeset
|
3063 |
if (( $? != 0 )) ; then |
5357 | 3064 |
echo "Couldn't create README.opensolaris." | |
3065 |
tee -a $mail_msg_file >> $LOGFILE |
|
12649
87a8e25df5cf
6919429 new crypto tarball doesn't play well with ON Tonic builds
Mike Kupfer <Mike.Kupfer@Oracle.COM>
parents:
12486
diff
changeset
|
3066 |
build_ok=n |
5357 | 3067 |
fi |
3068 |
fi |
|
3069 |
||
0 | 3070 |
# Verify that the usual lists of files, such as exception lists, |
3071 |
# contain only valid references to files. If the build has failed, |
|
3072 |
# then don't check the proto area. |
|
3073 |
CHECK_PATHS=${CHECK_PATHS:-y} |
|
3074 |
if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then |
|
3075 |
echo "\n==== Check lists of files ====\n" | tee -a $LOGFILE \ |
|
3076 |
>>$mail_msg_file |
|
3077 |
arg=-b |
|
3078 |
[ "$build_ok" = y ] && arg= |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3079 |
checkpaths $arg $checkroot 2>&1 | tee -a $LOGFILE >>$mail_msg_file |
0 | 3080 |
fi |
3081 |
||
3082 |
if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then |
|
3083 |
echo "\n==== Impact on file permissions ====\n" \ |
|
3084 |
>> $mail_msg_file |
|
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3085 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3086 |
abspkgdefs= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3087 |
abspkg= |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3088 |
for d in $abssrcdirs; do |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3089 |
if [ -d "$d/pkgdefs" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3090 |
abspkgdefs="$abspkgdefs $d" |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3091 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3092 |
if [ -d "$d/pkg" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3093 |
abspkg="$abspkg $d" |
0 | 3094 |
fi |
11838
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3095 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3096 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3097 |
if [ -n "$abspkgdefs" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3098 |
pmodes -qvdP \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3099 |
`find $abspkgdefs -name pkginfo.tmpl -print -o \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3100 |
-name .del\* -prune | sed -e 's:/pkginfo.tmpl$::' | \ |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3101 |
sort -u` >> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3102 |
fi |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3103 |
|
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3104 |
if [ -n "$abspkg" ]; then |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3105 |
for d in "$abspkg"; do |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3106 |
( cd $d/pkg ; $MAKE -e pmodes ) >> $mail_msg_file |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3107 |
done |
32bb5d254240
PSARC 2010/067 Interim modernization updates
Liane Praza <Liane.Praza@Sun.COM>
parents:
11763
diff
changeset
|
3108 |
fi |
0 | 3109 |
fi |
3110 |
||
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
3111 |
if [ "$w_FLAG" = "y" -a "$build_ok" = "y" ]; then |
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3112 |
if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3113 |
do_wsdiff DEBUG $ROOT.prev $ROOT |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3114 |
fi |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
3115 |
|
4162
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3116 |
if [[ "$MULTI_PROTO" = yes && "$F_FLAG" = n ]]; then |
4bfd590bb99a
6455242 nightly should be able to preserve all proto areas from a single build.
kupfer
parents:
3827
diff
changeset
|
3117 |
do_wsdiff non-DEBUG $ROOT-nd.prev $ROOT-nd |
2538
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
3118 |
fi |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
3119 |
fi |
b5894d78c55a
5016095 nightly should help determine what really changes from build to build
esaxe
parents:
2456
diff
changeset
|
3120 |
|
0 | 3121 |
END_DATE=`date` |
3122 |
echo "==== Nightly $maketype build completed: $END_DATE ====" | \ |
|
3123 |
tee -a $LOGFILE >> $build_time_file |
|
3124 |
||
10194
1f03122e3c81
6675948 when ksh is ksh93, nightly prints decimal number of hours
Darren Moffat <Darren.Moffat@Sun.COM>
parents:
8794
diff
changeset
|
3125 |
typeset -i10 hours |
0 | 3126 |
typeset -Z2 minutes |
3127 |
typeset -Z2 seconds |
|
3128 |
||
3129 |
elapsed_time=$SECONDS |
|
3130 |
((hours = elapsed_time / 3600 )) |
|
3131 |
((minutes = elapsed_time / 60 % 60)) |
|
3132 |
((seconds = elapsed_time % 60)) |
|
3133 |
||
3134 |
echo "\n==== Total build time ====" | \ |
|
3135 |
tee -a $LOGFILE >> $build_time_file |
|
3136 |
echo "\nreal ${hours}:${minutes}:${seconds}" | \ |
|
3137 |
tee -a $LOGFILE >> $build_time_file |
|
3138 |
||
3139 |
if [ "$u_FLAG" = "y" -a "$f_FLAG" = "y" -a "$build_ok" = "y" ]; then |
|
3140 |
staffer cp ${SRC}/unref-${MACH}.out $PARENT_WS/usr/src/ |
|
3141 |
||
3142 |
# |
|
3143 |
# Produce a master list of unreferenced files -- ideally, we'd |
|
3144 |
# generate the master just once after all of the nightlies |
|
3145 |
# have finished, but there's no simple way to know when that |
|
3146 |
# will be. Instead, we assume that we're the last nightly to |
|
3147 |
# finish and merge all of the unref-${MACH}.out files in |
|
3148 |
# $PARENT_WS/usr/src/. If we are in fact the final ${MACH} to |
|
3149 |
# finish, then this file will be the authoritative master |
|
3150 |
# list. Otherwise, another ${MACH}'s nightly will eventually |
|
3151 |
# overwrite ours with its own master, but in the meantime our |
|
3152 |
# temporary "master" will be no worse than any older master |
|
3153 |
# which was already on the parent. |
|
3154 |
# |
|
3155 |
||
3156 |
set -- $PARENT_WS/usr/src/unref-*.out |
|
3157 |
cp "$1" ${TMPDIR}/unref.merge |
|
3158 |
shift |
|
3159 |
||
3160 |
for unreffile; do |
|
3161 |
comm -12 ${TMPDIR}/unref.merge "$unreffile" > ${TMPDIR}/unref.$$ |
|
3162 |
mv ${TMPDIR}/unref.$$ ${TMPDIR}/unref.merge |
|
3163 |
done |
|
3164 |
||
3165 |
staffer cp ${TMPDIR}/unref.merge $PARENT_WS/usr/src/unrefmaster.out |
|
3166 |
fi |
|
3167 |
||
3168 |
# |
|
3169 |
# All done save for the sweeping up. |
|
2371 | 3170 |
# (whichever exit we hit here will trigger the "cleanup" trap which |
0 | 3171 |
# optionally sends mail on completion). |
3172 |
# |
|
3173 |
if [ "$build_ok" = "y" ]; then |
|
3174 |
exit 0 |
|
3175 |
fi |
|
3176 |
exit 1 |