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 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
23 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
24 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
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 suitable for building an illumos workspace, which
32 # will contain the resulting archives. It is based off the onnv
33 # release. It sets NIGHTLY_OPTIONS to make nightly do:
34 # DEBUG build only (-D, -F)
35 # do not bringover from the parent (-n)
36 # runs 'make check' (-C)
37 # checks for new interfaces in libraries (-A)
38 # sends mail on completion (-m and the MAILTO variable)
39 # creates packages for PIT/RE (-p)
40 # checks for changes in ELF runpaths (-r)
41 # build and use this workspace's tools in $SRC/tools (-t)
42 #
43 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
44 # be executed directly.
45 # - This script is only interpreted by ksh93 and explicitly allows the
46 # use of ksh93 language extensions.
47 #
48 export NIGHTLY_OPTIONS='-FnCDAmprt'
49
50 # CODEMGR_WS - where is your workspace at
51 #export CODEMGR_WS="$HOME/ws/illumos-gate"
52 export CODEMGR_WS="`git rev-parse --show-toplevel`"
53
54 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
55 # where NCPUS is the number of logical CPUs on your build system.
56 function maxjobs
57 {
58 nameref maxjobs=$1
59 integer ncpu
60 integer -r min_mem_per_job=512 # minimum amount of memory for a job
61
62 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
63 (( maxjobs=ncpu + 2 ))
64
65 # Throttle number of parallel jobs launched by dmake to a value which
66 # gurantees that all jobs have enough memory. This was added to avoid
67 # excessive paging/swapping in cases of virtual machine installations
68 # which have lots of CPUs but not enough memory assigned to handle
69 # that many parallel jobs
70 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
71 integer max_jobs_per_memory # parallel jobs which fit into physical memory
72 integer physical_memory # physical memory installed
73
81 max_jobs_per_memory=round(physical_memory/min_mem_per_job) ,
82 maxjobs=fmax(2, fmin(maxjobs, max_jobs_per_memory))
83 ))
84 fi
85
86 return 0
87 }
88
89 maxjobs DMAKE_MAX_JOBS # "DMAKE_MAX_JOBS" passed as ksh(1) name reference
90 export DMAKE_MAX_JOBS
91
92 # path to onbld tool binaries
93 ONBLD_BIN='/opt/onbld/bin'
94
95 # PARENT_WS is used to determine the parent of this workspace. This is
96 # for the options that deal with the parent workspace (such as where the
97 # proto area will go).
98 export PARENT_WS=''
99
100 # CLONE_WS is the workspace nightly should do a bringover from.
101 export CLONE_WS='ssh://anonhg@hg.illumos.org/illumos-gate'
102
103 # The bringover, if any, is done as STAFFER.
104 # Set STAFFER to your own login as gatekeeper or developer
105 # The point is to use group "staff" and avoid referencing the parent
106 # workspace as root.
107 # Some scripts optionally send mail messages to MAILTO.
108 #
109 export STAFFER="$LOGNAME"
110 export MAILTO="$STAFFER"
111
112 # If you wish the mail messages to be From: an arbitrary address, export
113 # MAILFROM.
114 #export MAILFROM="user@example.com"
115
116 # The project (see project(4)) under which to run this build. If not
117 # specified, the build is simply run in a new task in the current project.
118 export BUILD_PROJECT=''
119
120 # You should not need to change the next three lines
121 export ATLOG="$CODEMGR_WS/log"
122 export LOGFILE="$ATLOG/nightly.log"
123 export MACH="$(uname -p)"
124
125 #
126 # The following macro points to the closed binaries. Once illumos has
127 # totally freed itself, we can remove this reference.
128 #
129 # Location of encumbered binaries.
130 export ON_CLOSED_BINS="$CODEMGR_WS/closed"
179 # we want make to do as much as it can, just in case there's more than
180 # one problem.
181 export MAKEFLAGS='k'
182
183 # Magic variables to prevent the devpro compilers/teamware from checking
184 # for updates or sending mail back to devpro on every use.
185 export SUNW_NO_UPDATE_NOTIFY='1'
186 export UT_NO_USAGE_TRACKING='1'
187
188 # Build tools - don't change these unless you know what you're doing. These
189 # variables allows you to get the compilers and onbld files locally.
190 # Set BUILD_TOOLS to pull everything from one location.
191 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
192 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
193 # exists to make it easier to test new versions of the compiler.
194 export BUILD_TOOLS='/opt'
195 #export ONBLD_TOOLS='/opt/onbld'
196 export SPRO_ROOT='/opt/SUNWspro'
197 export SPRO_VROOT="$SPRO_ROOT"
198
199 # Compilers may be specified using the following variables:
200 # PRIMARY_CC - primary C compiler
201 # PRIMARY_CCC - primary C++ compiler
202 #
203 # SHADOW_CCS - list of shadow C compilers
204 # SHADOW_CCCS - list of shadow C++ compilers
205 #
206 # Each entry has the form <name>,<path to binary>,<style> where name is a
207 # free-form name (possibly used in the makefiles to guard options), path is
208 # the path to the executable. style is the 'style' of command line taken by
209 # the compiler, currently either gnu (or gcc) or sun (or cc), which is also
210 # used by Makefiles to guard options.
211 #
212 # __SUNC and __GNUC must still be set to reflect the style of the primary
213 # compiler (and to influence the default primary, otherwise)
214 #
215 # for example:
216 # export PRIMARY_CC=gcc4,/opt/gcc/4.4.4/bin/gcc,gnu
217 # export PRIMARY_CCC=gcc4,/opt/gcc/4.4.4/bin/g++,gnu
218 # export SHADOW_CCS=studio12,/opt/SUNWspro/bin/cc,sun
219 # export SHADOW_CCCS=studio12,/opt/SUNWspro/bin/CC,sun
220 #
221 # There can be several space-separated entries in SHADOW_* to run multiple
222 # shadow compilers.
223 #
224 # To disable shadow compilation, unset SHADOW_* or set them to the empty string.
225 #
226 export SHADOW_CCS=gcc7,/usr/gcc/7/bin/gcc,gnu
227 export SHADOW_CCCS=gcc7,/usr/gcc/7/bin/g++,gnu
228
229 # This goes along with lint - it is a series of the form "A [y|n]" which
230 # means "go to directory A and run 'make lint'" Then mail me (y) the
231 # difference in the lint output. 'y' should only be used if the area you're
232 # linting is actually lint clean or you'll get lots of mail.
233 # You shouldn't need to change this though.
234 #export LINTDIRS="$SRC y"
235
236 # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
237 # if the 'N' option is not specified, is to run this test.
238 #CHECK_PATHS='y'
239
240 # POST_NIGHTLY can be any command to be run at the end of nightly. See
241 # nightly(1) for interactions between environment variables and this command.
242 #POST_NIGHTLY=
243
244 # Comment this out to disable support for SMB printing, i.e. if you
245 # don't want to bother providing the CUPS headers this needs.
246 export ENABLE_SMB_PRINTING=
247
248 # If your distro uses certain versions of Perl, make sure either Makefile.master
249 # contains your new defaults OR your .env file sets them.
250 # These are how you would override for building on OmniOS r151028, for example.
251 #export PERL_VERSION=5.28
252 #export PERL_ARCH=i86pc-solaris-thread-multi-64int
253 #export PERL_PKGVERS=
254
255 # If your distro uses certain versions of Python, make sure either
256 # Makefile.master contains your new defaults OR your .env file sets them.
257 #export PYTHON_VERSION=2.7
258 #export PYTHON_PKGVERS=-27
259 #export PYTHON_SUFFIX=
260 #export PYTHON3_VERSION=3.5
261 #export PYTHON3_PKGVERS=-35
262 #export PYTHON3_SUFFIX=m
263
264 # To disable building with either Python2 or Python 3 (or both), uncomment
265 # these lines:
266 #export BUILDPY2='#'
267 #export BUILDPY3='#'
|
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 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
23 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
24 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
26 # Copyright (c) 2018, Joyent, Inc.
27 #
28 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
29 # be executed directly.
30 # - This script is only interpreted by ksh93 and explicitly allows the
31 # use of ksh93 language extensions.
32
33
34 # -----------------------------------------------------------------------------
35 # Parameters you are likely to want to change
36 # -----------------------------------------------------------------------------
37
38 # DEBUG build only (-D, -F)
39 # do not bringover from the parent (-n)
40 # runs 'make check' (-C)
41 # checks for new interfaces in libraries (-A)
42 # sends mail on completion (-m and the MAILTO variable)
43 # creates packages for PIT/RE (-p)
44 # checks for changes in ELF runpaths (-r)
45 # build and use this workspace's tools in $SRC/tools (-t)
46 export NIGHTLY_OPTIONS='-FnCDAmprt'
47
48 # Some scripts optionally send mail messages to MAILTO.
49 #export MAILTO=
50
51 # CODEMGR_WS - where is your workspace at
52 export CODEMGR_WS="`git rev-parse --show-toplevel`"
53
54 # Compilers may be specified using the following variables:
55 # PRIMARY_CC - primary C compiler
56 # PRIMARY_CCC - primary C++ compiler
57 #
58 # SHADOW_CCS - list of shadow C compilers
59 # SHADOW_CCCS - list of shadow C++ compilers
60 #
61 # Each entry has the form <name>,<path to binary>,<style> where name is a
62 # free-form name (possibly used in the makefiles to guard options), path is
63 # the path to the executable. style is the 'style' of command line taken by
64 # the compiler, currently either gnu (or gcc) or sun (or cc), which is also
65 # used by Makefiles to guard options.
66 #
67 # __SUNC and __GNUC must still be set to reflect the style of the primary
68 # compiler (and to influence the default primary, otherwise)
69 #
70 # for example:
71 # export PRIMARY_CC=gcc4,/opt/gcc/4.4.4/bin/gcc,gnu
72 # export PRIMARY_CCC=gcc4,/opt/gcc/4.4.4/bin/g++,gnu
73 # export SHADOW_CCS=studio12,/opt/SUNWspro/bin/cc,sun
74 # export SHADOW_CCCS=studio12,/opt/SUNWspro/bin/CC,sun
75 #
76 # There can be several space-separated entries in SHADOW_* to run multiple
77 # shadow compilers.
78 #
79 # To disable shadow compilation, unset SHADOW_* or set them to the empty string.
80 #
81 export SHADOW_CCS=gcc7,/usr/gcc/7/bin/gcc,gnu
82 export SHADOW_CCCS=gcc7,/usr/gcc/7/bin/g++,gnu
83
84 # Comment this out to disable support for SMB printing, i.e. if you
85 # don't want to bother providing the CUPS headers this needs.
86 export ENABLE_SMB_PRINTING=
87
88 # If your distro uses certain versions of Perl, make sure either Makefile.master
89 # contains your new defaults OR your .env file sets them.
90 # These are how you would override for building on OmniOS r151028, for example.
91 #export PERL_VERSION=5.28
92 #export PERL_ARCH=i86pc-solaris-thread-multi-64int
93 #export PERL_PKGVERS=
94
95 # If your distro uses certain versions of Python, make sure either
96 # Makefile.master contains your new defaults OR your .env file sets them.
97 #export PYTHON_VERSION=2.7
98 #export PYTHON_PKGVERS=-27
99 #export PYTHON_SUFFIX=
100 #export PYTHON3_VERSION=3.5
101 #export PYTHON3_PKGVERS=-35
102 #export PYTHON3_SUFFIX=m
103
104 # To disable building with either Python2 or Python 3 (or both), uncomment
105 # these lines:
106 #export BUILDPY2='#'
107 #export BUILDPY3='#'
108
109 # Set if your distribution has different package versioning
110 #export PKGVERS_BRANCH=2018.0.0.17900
111
112 # Skip Java 8 builds on distributions that don't support it
113 #export BLD_JAVA_8=
114
115 # POST_NIGHTLY can be any command to be run at the end of nightly. See
116 # nightly(1) for interactions between environment variables and this command.
117 #POST_NIGHTLY=
118
119 # -----------------------------------------------------------------------------
120 # You are less likely to need to modify parameters below.
121 # -----------------------------------------------------------------------------
122
123 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
124 # where NCPUS is the number of logical CPUs on your build system.
125 function maxjobs
126 {
127 nameref maxjobs=$1
128 integer ncpu
129 integer -r min_mem_per_job=512 # minimum amount of memory for a job
130
131 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
132 (( maxjobs=ncpu + 2 ))
133
134 # Throttle number of parallel jobs launched by dmake to a value which
135 # gurantees that all jobs have enough memory. This was added to avoid
136 # excessive paging/swapping in cases of virtual machine installations
137 # which have lots of CPUs but not enough memory assigned to handle
138 # that many parallel jobs
139 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
140 integer max_jobs_per_memory # parallel jobs which fit into physical memory
141 integer physical_memory # physical memory installed
142
150 max_jobs_per_memory=round(physical_memory/min_mem_per_job) ,
151 maxjobs=fmax(2, fmin(maxjobs, max_jobs_per_memory))
152 ))
153 fi
154
155 return 0
156 }
157
158 maxjobs DMAKE_MAX_JOBS # "DMAKE_MAX_JOBS" passed as ksh(1) name reference
159 export DMAKE_MAX_JOBS
160
161 # path to onbld tool binaries
162 ONBLD_BIN='/opt/onbld/bin'
163
164 # PARENT_WS is used to determine the parent of this workspace. This is
165 # for the options that deal with the parent workspace (such as where the
166 # proto area will go).
167 export PARENT_WS=''
168
169 # CLONE_WS is the workspace nightly should do a bringover from.
170 # The bringover, if any, is done as STAFFER.
171 export CLONE_WS='ssh://anonhg@hg.illumos.org/illumos-gate'
172
173 # Set STAFFER to your own login as gatekeeper or developer
174 # The point is to use group "staff" and avoid referencing the parent
175 # workspace as root.
176 export STAFFER="$LOGNAME"
177 export MAILTO="${MAILTO:-$STAFFER}"
178
179 # If you wish the mail messages to be From: an arbitrary address, export
180 # MAILFROM.
181 #export MAILFROM="user@example.com"
182
183 # The project (see project(4)) under which to run this build. If not
184 # specified, the build is simply run in a new task in the current project.
185 export BUILD_PROJECT=''
186
187 # You should not need to change the next three lines
188 export ATLOG="$CODEMGR_WS/log"
189 export LOGFILE="$ATLOG/nightly.log"
190 export MACH="$(uname -p)"
191
192 #
193 # The following macro points to the closed binaries. Once illumos has
194 # totally freed itself, we can remove this reference.
195 #
196 # Location of encumbered binaries.
197 export ON_CLOSED_BINS="$CODEMGR_WS/closed"
246 # we want make to do as much as it can, just in case there's more than
247 # one problem.
248 export MAKEFLAGS='k'
249
250 # Magic variables to prevent the devpro compilers/teamware from checking
251 # for updates or sending mail back to devpro on every use.
252 export SUNW_NO_UPDATE_NOTIFY='1'
253 export UT_NO_USAGE_TRACKING='1'
254
255 # Build tools - don't change these unless you know what you're doing. These
256 # variables allows you to get the compilers and onbld files locally.
257 # Set BUILD_TOOLS to pull everything from one location.
258 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
259 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
260 # exists to make it easier to test new versions of the compiler.
261 export BUILD_TOOLS='/opt'
262 #export ONBLD_TOOLS='/opt/onbld'
263 export SPRO_ROOT='/opt/SUNWspro'
264 export SPRO_VROOT="$SPRO_ROOT"
265
266 # This goes along with lint - it is a series of the form "A [y|n]" which
267 # means "go to directory A and run 'make lint'" Then mail me (y) the
268 # difference in the lint output. 'y' should only be used if the area you're
269 # linting is actually lint clean or you'll get lots of mail.
270 # You shouldn't need to change this though.
271 #export LINTDIRS="$SRC y"
272
273 # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
274 # if the 'N' option is not specified, is to run this test.
275 #CHECK_PATHS='y'
|