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 # Copyright 2010 Sun Microsystems, Inc. All rights reserved. 22 # Use is subject to license terms. 23 # 24 25 # Configuration variables for the runtime environment of the nightly 26 # build script and other tools for construction and packaging of releases. 27 # This script is sourced by 'nightly' and 'bldenv' to set up the environment 28 # for the build. This example is suitable for building an OpenSolaris 29 # workspace, which will contain the resulting archives. It is based 30 # off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do: 31 # DEBUG build only (-D, -F) 32 # do not run protocmp or checkpaths (-N) 33 # do not bringover from the parent (-n) 34 # creates cpio archives for bfu (-a) 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 # checks for changes in ELF runpaths (-r) 39 # build and use this workspace's tools in $SRC/tools (-t) 40 # 41 NIGHTLY_OPTIONS="-FNnaCDlmrt"; export NIGHTLY_OPTIONS 42 43 # This is a variable for the rest of the script - GATE doesn't matter to 44 # nightly itself 45 GATE=testws; export GATE 46 47 # CODEMGR_WS - where is your workspace at (or what should nightly name it) 48 CODEMGR_WS="/export/$GATE"; export CODEMGR_WS 49 50 # G11N_PKGDIR - where does the globalization package live 51 G11N_PKGDIR="$CODEMGR_WS/usr/src/pkgdefs/SUNW0on"; export G11N_PKGDIR 52 53 # Location of encumbered binaries. 54 ON_CLOSED_BINS="$CODEMGR_WS/closed"; export ON_CLOSED_BINS 55 56 # This flag controls whether to build the closed source. If 57 # undefined, nightly(1) and bldenv(1) will set it according to whether 58 # the closed source tree is present. CLOSED_IS_PRESENT="no" means not 59 # building the closed sources. 60 # CLOSED_IS_PRESENT="no"; export CLOSED_IS_PRESENT 61 62 # Maximum number of dmake jobs. The recommended number is 2 + (2 * 63 # NCPUS), where NCPUS is the number of CPUs on your build system. 64 maxjobs() { 65 ncpu=`/usr/sbin/psrinfo -p` 66 expr $ncpu \* 2 + 2 67 } 68 DMAKE_MAX_JOBS=`maxjobs`; export DMAKE_MAX_JOBS 69 70 # path to onbld tool binaries 71 ONBLD_BIN="/opt/onbld/bin" 72 73 # used by bfu. 74 FASTFS=$ONBLD_BIN/`uname -p`/fastfs; export FASTFS 75 BFULD=$ONBLD_BIN/`uname -p`/bfuld; export BFULD 76 GZIPBIN=/usr/bin/gzip; export GZIPBIN 77 ACR=$ONBLD_BIN/acr; export ACR 78 79 # PARENT_WS is used to determine the parent of this workspace. This is 80 # for the options that deal with the parent workspace (such as where the 81 # proto area will go). 82 PARENT_WS=""; export PARENT_WS 83 84 # CLONE_WS is the workspace nightly should do a bringover from. 85 CLONE_WS="ssh://anon (at] hg.opensolaris.org//hg/onnv/onnv-gate" 86 export CLONE_WS 87 88 # The bringover, if any, is done as STAFFER. 89 # Set STAFFER to your own login as gatekeeper or developer 90 # The point is to use group "staff" and avoid referencing the parent 91 # workspace as root. 92 # Some scripts optionally send mail messages to MAILTO. 93 # 94 STAFFER=nobody; export STAFFER 95 MAILTO=$STAFFER; export MAILTO 96 97 # The project (see project(4)) under which to run this build. If not 98 # specified, the build is simply run in a new task in the current project. 99 BUILD_PROJECT=; export BUILD_PROJECT 100 101 # You should not need to change the next four lines 102 LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME 103 ATLOG="$CODEMGR_WS/log"; export ATLOG 104 LOGFILE="$ATLOG/nightly.log"; export LOGFILE 105 MACH=`uname -p`; export MACH 106 107 # Location of signed cryptographic binaries. 108 ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2" 109 export ON_CRYPTO_BINS 110 111 # REF_PROTO_LIST - for comparing the list of stuff in your proto area 112 # with. Generally this should be left alone, since you want to see differences 113 # from your parent (the gate). 114 # 115 REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST 116 117 # where cpio archives of the OS are placed. Usually this should be left 118 # alone too. 119 CPIODIR="${CODEMGR_WS}/archives/${MACH}/nightly"; export CPIODIR 120 121 # 122 # build environment variables, including version info for mcs, motd, 123 # motd, uname and boot messages. Mostly you shouldn't change this except 124 # when the release slips (nah) or you move an environment file to a new 125 # release 126 # 127 ROOT="$CODEMGR_WS/proto/root_${MACH}"; export ROOT 128 SRC="$CODEMGR_WS/usr/src"; export SRC 129 VERSION="$GATE"; export VERSION 130 131 # 132 # the RELEASE and RELEASE_DATE variables are set in Makefile.master; 133 # there might be special reasons to override them here, but that 134 # should not be the case in general 135 # 136 # RELEASE="5.11"; export RELEASE 137 # RELEASE_DATE="October 2007"; export RELEASE_DATE 138 139 # proto area in parent for optionally depositing a copy of headers and 140 # libraries corresponding to the protolibs target 141 # not applicable given the NIGHTLY_OPTIONS 142 # 143 PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT 144 145 # 146 # package creation variable. you probably shouldn't change this either. 147 # 148 PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"; export PKGARCHIVE 149 150 # we want make to do as much as it can, just in case there's more than 151 # one problem. 152 MAKEFLAGS=k; export MAKEFLAGS 153 154 # Magic variable to prevent the devpro compilers/teamware from sending 155 # mail back to devpro on every use. 156 UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING 157 158 # Build tools - don't change these unless you know what you're doing. These 159 # variables allows you to get the compilers and onbld files locally or 160 # through cachefs. Set BUILD_TOOLS to pull everything from one location. 161 # Alternately, you can set ONBLD_TOOLS to where you keep the contents of 162 # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT 163 # exists to make it easier to test new versions of the compiler. 164 BUILD_TOOLS=/opt; export BUILD_TOOLS 165 #ONBLD_TOOLS=/opt/onbld; export ONBLD_TOOLS 166 SPRO_ROOT=/opt/SUNWspro; export SPRO_ROOT 167 SPRO_VROOT=$SPRO_ROOT; export SPRO_VROOT 168 169 # This goes along with lint - it is a series of the form "A [y|n]" which 170 # means "go to directory A and run 'make lint'" Then mail me (y) the 171 # difference in the lint output. 'y' should only be used if the area you're 172 # linting is actually lint clean or you'll get lots of mail. 173 # You shouldn't need to change this though. 174 #LINTDIRS="$SRC y"; export LINTDIRS 175 176 # Set this flag to 'n' to disable the automatic validation of the dmake 177 # version in use. The default is to check it. 178 #CHECK_DMAKE=y 179 180 # Set this flag to 'n' to disable the use of 'checkpaths'. The default, 181 # if the 'N' option is not specified, is to run this test. 182 #CHECK_PATHS=y 183 184 # BRINGOVER_FILES is the list of files nightly passes to bringover. 185 # If not set the default is "usr", but it can be used for bringing 186 # over deleted_files or other nifty directories. 187 #BRINGOVER_FILES="usr deleted_files" 188 189 # POST_NIGHTLY can be any command to be run at the end of nightly. See 190 # nightly(1) for interactions between environment variables and this command. 191 #POST_NIGHTLY= 192