1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
25 # Copyright 2017 Nexenta Systems, Inc.
26 #
27
28 # Configuration variables for the runtime environment of the nightly
29 # build script and other tools for construction and packaging of
30 # releases.
31 # This example is for building an nza-kernel workspace under Jenkins.
32 # It sets NIGHTLY_OPTIONS to make nightly do:
33 # DEBUG and non-DEBUG builds (-D)
34 # do not bringover from the parent (-n) (Jenkins does that)
35 # runs 'make check' (-C)
36 # runs lint in usr/src (-l plus the LINTDIRS variable)
37 # sends mail on completion (-m and the MAILTO variable)
38 # creates packages for PIT/RE (-p)
39 # checks for changes in ELF runpaths (-r)
40 # build and use this workspace's tools in $SRC/tools (-t)
41 #
42 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
43 # be executed directly.
44 # - This script is only interpreted by ksh93 and explicitly allows the
45 # use of ksh93 language extensions.
46 #
47 export NIGHTLY_OPTIONS='-CDlnprt'
48
49 # CODEMGR_WS - where is your workspace (Jenkins variable)
50 export CODEMGR_WS=${WORKSPACE:-`pwd`}
51
52 # This is a variable for the rest of the script - GATE doesn't matter to
53 # nightly itself (Jenkins variable)
54 GATE=${JOB_NAME:-`basename ${CODEMGR_WS}`}
55
56 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
57 # where NCPUS is the number of logical CPUs on your build system.
58 # export DMAKE_MAX_JOBS=8 (use default from $HOME/.make.machines)
59
60 # PARENT_WS is used to determine the parent of this workspace. This is
61 # for the options that deal with the parent workspace (such as where the
62 # proto area will go).
63 export PARENT_WS=/nonesuch
64
65 # CLONE_WS is the workspace nightly should do a bringover from.
66 # export CLONE_WS=''
67
68 # The bringover, if any, is done as STAFFER.
69 # Set STAFFER to your own login as gatekeeper or developer
70 # The point is to use group "staff" and avoid referencing the parent
71 # workspace as root.
72 # Some scripts optionally send mail messages to MAILTO.
73 #
74 export STAFFER="$LOGNAME"
75 export MAILTO="$STAFFER"
76
77 # If you wish the mail messages to be From: an arbitrary address, export
78 # MAILFROM.
79 #export MAILFROM="user@example.com"
80
81 # The project (see project(4)) under which to run this build. If not
82 # specified, the build is simply run in a new task in the current project.
83 export BUILD_PROJECT=''
84
85 # You should not need to change the next three lines
86 export ATLOG="$CODEMGR_WS/log"
87 export LOGFILE="$ATLOG/nightly.log"
88 export MACH="$(uname -p)"
89
90 #
91 # The following two macros are the closed/crypto binaries. Once
92 # Illumos has totally freed itself, we can remove these references.
93 #
94 # Location of encumbered binaries.
95 export ON_CLOSED_BINS="$CODEMGR_WS/closed"
96 # Location of signed cryptographic binaries.
97 export ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
98
99 #
100 # REF_PROTO_LIST - for comparing the list of stuff in your proto area
101 # with. Generally this should be left alone, since you want to see differences
102 # from your parent (the gate).
103 #
104 export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
105
106 export ROOT="$CODEMGR_WS/proto/root_${MACH}"
107 export SRC="$CODEMGR_WS/usr/src"
108 export MULTI_PROTO="yes"
109
110 #
111 # Build environment variables, including version info for mcs, motd,
112 # motd, uname and boot messages. Mostly you shouldn't change this except
113 # when a release name changes, etc.
114 #
115 # With modern SCM systems like git, one typically wants the
116 # change set ID (hash) in the version sring.
117 GIT_REV=`git rev-parse --short=10 HEAD`
118 export VERSION="NexentaOS_4:${GIT_REV}"
119 export ONNV_BUILDNUM=152
120
121 #
122 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
123 # there might be special reasons to override them here.
124 #
125 # export RELEASE='5.11'
126 # export RELEASE_DATE='October 2007'
127
128 # Override RELEASE_CM, DEV_CM used for mcs processing
129 # For developer builds, include the WS basename & date.
130 # Note that in a release build only RELEASE_CM goes in,
131 # and in a developer build, BOTH comments are used.
132 DATE=`date +%Y-%m-%d`;
133 RELEASE_CM='"@(#)SunOS '$RELEASE' '$VERSION' '$RELEASE_DATE'"'
134 DEV_CM='"@(#)SunOS Developer: '$LOGNAME' '$GATE' '$DATE'"'
135 export RELEASE_CM DEV_CM
136
137 # proto area in parent for optionally depositing a copy of headers and
138 # libraries corresponding to the protolibs target
139 # not applicable given the NIGHTLY_OPTIONS
140 #
141 export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
142 export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
143
144 # Package creation variables. You probably shouldn't change these,
145 # either.
146 #
147 # PKGARCHIVE determines where the repository will be created.
148 #
149 # PKGPUBLISHER_REDIST controls the publisher setting for the repository.
150 #
151 export PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"
152 # export PKGPUBLISHER_REDIST='on-redist'
153
154 # Package manifest format version.
155 export PKGFMT_OUTPUT='v1'
156
157 # we want make to do as much as it can, just in case there's more than
158 # one problem.
159 export MAKEFLAGS='k'
160
161 # Magic variable to prevent the devpro compilers/teamware from sending
162 # mail back to devpro on every use.
163 export UT_NO_USAGE_TRACKING='1'
164
165 # Build tools - don't change these unless you know what you're doing. These
166 # variables allows you to get the compilers and onbld files locally or
167 # through cachefs. Set BUILD_TOOLS to pull everything from one location.
168 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
169 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
170 # exists to make it easier to test new versions of the compiler.
171 export BUILD_TOOLS='/opt'
172 #export ONBLD_TOOLS='/opt/onbld'
173 export SPRO_ROOT='/opt/SUNWspro'
174 export SPRO_VROOT="$SPRO_ROOT"
175
176 # path to onbld tool binaries
177 ONBLD_BIN="${ONBLD_TOOLS}/bin"
178
179 # help lint find the proper note.h file
180 export ONLY_LINT_DEFS=-I${SPRO_ROOT}/sunstudio12.1/prod/include/lint
181
182 # Causes GCC to be used as the main compiler
183 export __GNUC=""
184
185 # We _want_ the shadow builds on our jenkins server so we know
186 # if/when we have lost our "compiler neutrality". This is
187 # normally uncommented for developer builds to save time.
188 # Turns off shadow compiler when set to 1
189 # export CW_NO_SHADOW=1
190
191 # This goes along with lint - it is a series of the form "A [y|n]" which
192 # means "go to directory A and run 'make lint'" Then mail me (y) the
193 # difference in the lint output. 'y' should only be used if the area you're
194 # linting is actually lint clean or you'll get lots of mail.
195 # You shouldn't need to change this though.
196 #export LINTDIRS="$SRC y"
197
198 # Set this flag to 'n' to disable the automatic validation of the dmake
199 # version in use. The default is to check it.
200 #CHECK_DMAKE='y'
201
202 # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
203 # if the 'N' option is not specified, is to run this test.
204 #CHECK_PATHS='y'
205
206 # POST_NIGHTLY can be any command to be run at the end of nightly. See
207 # nightly(1) for interactions between environment variables and this command.
208 POST_NIGHTLY=${CODEMGR_WS}/usr/src/tools/scripts/check_mail_msg
209
210 # Uncomment this to disable support for SMB printing.
211 export ENABLE_SMB_PRINTING='#'