Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/env/illumos.sh
+++ new/usr/src/tools/env/illumos.sh
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22 -# Copyright 2010, 2011 Nexenta Systems, Inc. All rights reserved.
22 +# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
23 23 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
24 24 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
25 25 #
26 26
27 27 # Configuration variables for the runtime environment of the nightly
28 28 # build script and other tools for construction and packaging of
29 29 # releases.
30 30 # This example is suitable for building an illumos workspace, which
31 31 # will contain the resulting archives. It is based off the onnv
32 32 # release. It sets NIGHTLY_OPTIONS to make nightly do:
33 33 # DEBUG build only (-D, -F)
34 34 # do not bringover from the parent (-n)
35 35 # runs 'make check' (-C)
36 36 # checks for new interfaces in libraries (-A)
37 37 # runs lint in usr/src (-l plus the LINTDIRS variable)
38 38 # sends mail on completion (-m and the MAILTO variable)
39 39 # creates packages for PIT/RE (-p)
40 40 # checks for changes in ELF runpaths (-r)
41 41 # build and use this workspace's tools in $SRC/tools (-t)
42 42 #
43 43 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
44 44 # be executed directly.
45 45 # - This script is only interpreted by ksh93 and explicitly allows the
46 46 # use of ksh93 language extensions.
47 47 #
48 48 export NIGHTLY_OPTIONS='-FnCDAlmprt'
49 49
50 50 #
51 51 # -- PLEASE READ THIS --
52 52 #
53 53 # The variables GATE and CODEMGR_WS must always be customised to
54 54 # match your workspace/gate location!!
55 55 #
56 56 # -- PLEASE READ THIS --
57 57 #
58 58
59 59 # This is a variable for the rest of the script - GATE doesn't matter to
60 60 # nightly itself
61 61 export GATE='testws'
62 62
63 63 # CODEMGR_WS - where is your workspace at (or what should nightly name it)
64 64 export CODEMGR_WS="$HOME/ws/$GATE"
65 65
66 66 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
67 67 # where NCPUS is the number of logical CPUs on your build system.
68 68 function maxjobs
69 69 {
70 70 nameref maxjobs=$1
71 71 integer ncpu
72 72 integer -r min_mem_per_job=512 # minimum amount of memory for a job
73 73
74 74 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
75 75 (( maxjobs=ncpu + 2 ))
76 76
77 77 # Throttle number of parallel jobs launched by dmake to a value which
78 78 # gurantees that all jobs have enough memory. This was added to avoid
79 79 # excessive paging/swapping in cases of virtual machine installations
80 80 # which have lots of CPUs but not enough memory assigned to handle
81 81 # that many parallel jobs
82 82 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
83 83 integer max_jobs_per_memory # parallel jobs which fit into physical memory
84 84 integer physical_memory # physical memory installed
85 85
86 86 # The array ".sh.match" contains the contents of capturing
87 87 # brackets in the last regex, .sh.match[1] will contain
88 88 # the value matched by ([[:digit:]]+), i.e. the amount of
89 89 # memory installed
90 90 physical_memory="10#${.sh.match[1]}"
91 91
92 92 ((
93 93 max_jobs_per_memory=round(physical_memory/min_mem_per_job) ,
94 94 maxjobs=fmax(2, fmin(maxjobs, max_jobs_per_memory))
95 95 ))
96 96 fi
97 97
98 98 return 0
99 99 }
100 100
101 101 maxjobs DMAKE_MAX_JOBS # "DMAKE_MAX_JOBS" passed as ksh(1) name reference
102 102 export DMAKE_MAX_JOBS
103 103
104 104 # path to onbld tool binaries
105 105 ONBLD_BIN='/opt/onbld/bin'
106 106
107 107 # PARENT_WS is used to determine the parent of this workspace. This is
108 108 # for the options that deal with the parent workspace (such as where the
109 109 # proto area will go).
110 110 export PARENT_WS=''
111 111
112 112 # CLONE_WS is the workspace nightly should do a bringover from.
113 113 export CLONE_WS='ssh://anonhg@hg.illumos.org/illumos-gate'
114 114
115 115 # The bringover, if any, is done as STAFFER.
116 116 # Set STAFFER to your own login as gatekeeper or developer
117 117 # The point is to use group "staff" and avoid referencing the parent
118 118 # workspace as root.
119 119 # Some scripts optionally send mail messages to MAILTO.
120 120 #
121 121 export STAFFER="$LOGNAME"
122 122 export MAILTO="$STAFFER"
123 123
124 124 # If you wish the mail messages to be From: an arbitrary address, export
125 125 # MAILFROM.
126 126 #export MAILFROM="user@example.com"
127 127
128 128 # The project (see project(4)) under which to run this build. If not
129 129 # specified, the build is simply run in a new task in the current project.
130 130 export BUILD_PROJECT=''
131 131
132 132 # You should not need to change the next three lines
133 133 export ATLOG="$CODEMGR_WS/log"
134 134 export LOGFILE="$ATLOG/nightly.log"
135 135 export MACH="$(uname -p)"
136 136
137 137 #
138 138 # The following two macros are the closed/crypto binaries. Once
139 139 # Illumos has totally freed itself, we can remove these references.
140 140 #
141 141 # Location of encumbered binaries.
142 142 export ON_CLOSED_BINS="$CODEMGR_WS/closed"
143 143 # Location of signed cryptographic binaries.
144 144 export ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
145 145
146 146 # REF_PROTO_LIST - for comparing the list of stuff in your proto area
147 147 # with. Generally this should be left alone, since you want to see differences
148 148 # from your parent (the gate).
149 149 #
150 150 export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
151 151
152 152
153 153 export ROOT="$CODEMGR_WS/proto/root_${MACH}"
154 154 export SRC="$CODEMGR_WS/usr/src"
155 155 export MULTI_PROTO="no"
156 156
157 157 #
158 158 # build environment variables, including version info for mcs, motd,
159 159 # motd, uname and boot messages. Mostly you shouldn't change this except
160 160 # when the release slips (nah) or you move an environment file to a new
161 161 # release
162 162 #
163 163 export VERSION="$GATE"
164 164
165 165 #
166 166 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
167 167 # there might be special reasons to override them here, but that
168 168 # should not be the case in general
169 169 #
170 170 # export RELEASE='5.11'
171 171 # export RELEASE_DATE='October 2007'
172 172
173 173 # proto area in parent for optionally depositing a copy of headers and
174 174 # libraries corresponding to the protolibs target
175 175 # not applicable given the NIGHTLY_OPTIONS
176 176 #
177 177 export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
178 178 export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
179 179
180 180 # Package creation variables. You probably shouldn't change these,
181 181 # either.
182 182 #
183 183 # PKGARCHIVE determines where the repository will be created.
184 184 #
185 185 # PKGPUBLISHER_REDIST controls the publisher setting for the repository.
186 186 #
187 187 export PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"
188 188 # export PKGPUBLISHER_REDIST='on-redist'
189 189
190 190 # Package manifest format version.
191 191 export PKGFMT_OUTPUT='v1'
↓ open down ↓ |
159 lines elided |
↑ open up ↑ |
192 192
193 193 # we want make to do as much as it can, just in case there's more than
194 194 # one problem.
195 195 export MAKEFLAGS='k'
196 196
197 197 # Magic variable to prevent the devpro compilers/teamware from sending
198 198 # mail back to devpro on every use.
199 199 export UT_NO_USAGE_TRACKING='1'
200 200
201 201 # Build tools - don't change these unless you know what you're doing. These
202 -# variables allows you to get the compilers and onbld files locally or
203 -# through cachefs. Set BUILD_TOOLS to pull everything from one location.
202 +# variables allows you to get the compilers and onbld files locally.
203 +# Set BUILD_TOOLS to pull everything from one location.
204 204 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
205 205 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
206 206 # exists to make it easier to test new versions of the compiler.
207 207 export BUILD_TOOLS='/opt'
208 208 #export ONBLD_TOOLS='/opt/onbld'
209 209 export SPRO_ROOT='/opt/SUNWspro'
210 210 export SPRO_VROOT="$SPRO_ROOT"
211 211
212 212 # This goes along with lint - it is a series of the form "A [y|n]" which
213 213 # means "go to directory A and run 'make lint'" Then mail me (y) the
214 214 # difference in the lint output. 'y' should only be used if the area you're
215 215 # linting is actually lint clean or you'll get lots of mail.
216 216 # You shouldn't need to change this though.
217 217 #export LINTDIRS="$SRC y"
218 218
219 219 # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
220 220 # if the 'N' option is not specified, is to run this test.
221 221 #CHECK_PATHS='y'
222 222
223 223 # POST_NIGHTLY can be any command to be run at the end of nightly. See
224 224 # nightly(1) for interactions between environment variables and this command.
225 225 #POST_NIGHTLY=
226 226
227 227 # Comment this out to disable support for IPP printing, i.e. if you
228 228 # don't want to bother providing the Apache headers this needs.
229 229 export ENABLE_IPP_PRINTING=
230 230
231 231 # Comment this out to disable support for SMB printing, i.e. if you
232 232 # don't want to bother providing the CUPS headers this needs.
233 233 export ENABLE_SMB_PRINTING=
234 234
235 235 # If your distro uses certain versions of Perl, make sure either Makefile.master
236 236 # contains your new defaults OR your .env file sets them.
237 237 # These are how you would override for building on OmniOS r151012, for example.
238 238 #export PERL_VERSION=5.16.1
239 239 #export PERL_ARCH=i86pc-solaris-thread-multi-64int
240 240 #export PERL_PKGVERS=-5161
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX