1 0 stevel # 2 0 stevel # CDDL HEADER START 3 0 stevel # 4 0 stevel # The contents of this file are subject to the terms of the 5 2294 meem # Common Development and Distribution License (the "License"). 6 2294 meem # You may not use this file except in compliance with the License. 7 0 stevel # 8 0 stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel # or http://www.opensolaris.org/os/licensing. 10 0 stevel # See the License for the specific language governing permissions 11 0 stevel # and limitations under the License. 12 0 stevel # 13 0 stevel # When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel # If applicable, add the following below this CDDL HEADER, with the 16 0 stevel # fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel # information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel # 19 0 stevel # CDDL HEADER END 20 0 stevel # 21 2868 dduvall 22 0 stevel # 23 8788 Mark # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 0 stevel # Use is subject to license terms. 25 2868 dduvall # 26 2868 dduvall 27 0 stevel # Configuration variables for the runtime environment of the nightly 28 0 stevel # build script and other tools for construction and packaging of releases. 29 0 stevel # This script is sourced by 'nightly' and 'bldenv' to set up the environment 30 0 stevel # for the build. This example is suitable for building a gate, 31 0 stevel # which will contain the resulting packages and archives (builds of the gate 32 0 stevel # are done in children and then the resulting archives, packages, and proto 33 0 stevel # area are put into the parent for everyone to use). It is based off 34 0 stevel # the onnv release. It sets NIGHTLY_OPTIONS to make nightly do: 35 0 stevel # DEBUG and non-DEBUG builds (-D) 36 10517 Mark # creates a globalization package (-0) 37 0 stevel # creates cpio archives for bfu (-a) 38 0 stevel # creates packages for PIT/RE (-p) 39 0 stevel # checks for new interfaces in libraries (-A) 40 0 stevel # runs 'make check' (-C) 41 0 stevel # runs lint in usr/src (-l plus the LINTDIRS variable) 42 0 stevel # sends mail on completion (-m and the MAILTO variable) 43 0 stevel # updates the protolist in the parent for children to compare with (-u) 44 0 stevel # updates the proto area in the parent when done (-U) 45 0 stevel # checks for changes in ELF runpaths (-r) 46 0 stevel # checks for changes in unreferenced files (-f) 47 0 stevel # 48 10517 Mark NIGHTLY_OPTIONS="-0aADClmpuUrf"; export NIGHTLY_OPTIONS 49 0 stevel 50 0 stevel # This is a variable for the rest of the script - GATE doesn't matter to 51 0 stevel # nightly itself 52 0 stevel GATE=onnv-gate; export GATE 53 0 stevel 54 0 stevel # CODEMGR_WS - where is your workspace at (or what should nightly name it) 55 0 stevel # there is only one definition here, which assumes all the gate build machines 56 0 stevel # (sparc and x86) are set up the same. But remember, this is a script, so 57 0 stevel # you _could_ look at $MACH or `uname -n` and set these variables differently. 58 0 stevel CODEMGR_WS="/builds/$GATE"; export CODEMGR_WS 59 10517 Mark 60 10517 Mark # G11N_PKGDIR - where does the globalization package live 61 10517 Mark G11N_PKGDIR="$CODEMGR_WS/usr/src/pkgdefs/SUNW0on"; export G11N_PKGDIR 62 0 stevel 63 0 stevel # PARENT_WS is used to determine the parent of this workspace. This is 64 0 stevel # for the options that deal with the parent workspace (such as where the 65 0 stevel # proto area will go). 66 7298 Mark # 67 7298 Mark # If you use this, it must be local (or nfs): nightly cannot copy 68 7298 Mark # over ssh or http. 69 0 stevel PARENT_WS="/ws/$GATE"; export PARENT_WS 70 0 stevel 71 7298 Mark # CLONE_WS is the workspace nightly should do a bringover from. 72 8788 Mark CLONE_WS="ssh://anonhg (at] onnv.sfbay.sun.com//export/onnv-clone"; export CLONE_WS 73 7298 Mark 74 7298 Mark # CLOSED_CLONE_WS is the workspace from which nightly will acquire the 75 7298 Mark # usr/closed tree. 76 7298 Mark CLOSED_CLONE_WS="${CLONE_WS}/usr/closed" 77 7298 Mark export CLOSED_CLONE_WS 78 1167 kupfer 79 1167 kupfer # This flag controls whether to build the closed source. If 80 1167 kupfer # undefined, nightly(1) and bldenv(1) will set it according to whether 81 5986 kupfer # the closed source tree is present. CLOSED_IS_PRESENT="no" means not 82 5986 kupfer # building the closed sources. 83 1167 kupfer # CLOSED_IS_PRESENT="yes"; export CLOSED_IS_PRESENT 84 0 stevel 85 0 stevel # The bringover, if any, is done as STAFFER. 86 0 stevel # Set STAFFER to your own login as gatekeeper or integration engineer. 87 0 stevel # The point is to use group "staff" and avoid referencing the parent 88 0 stevel # workspace as root. 89 0 stevel # Some scripts optionally send mail messages to MAILTO. 90 0 stevel # 91 0 stevel STAFFER=nobody; export STAFFER 92 0 stevel MAILTO=$STAFFER; export MAILTO 93 0 stevel 94 0 stevel # The project (see project(4)) under which to run this build. If not 95 0 stevel # specified, the build is simply run in a new task in the current project. 96 0 stevel BUILD_PROJECT=; export BUILD_PROJECT 97 0 stevel 98 0 stevel # You should not need to change the next four lines 99 0 stevel LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME 100 0 stevel ATLOG="$CODEMGR_WS/log"; export ATLOG 101 0 stevel LOGFILE="$ATLOG/nightly.log"; export LOGFILE 102 0 stevel MACH=`uname -p`; export MACH 103 0 stevel 104 0 stevel # REF_PROTO_LIST - for comparing the list of stuff in your proto area 105 0 stevel # with. Generally this should be left alone, since you want to see differences 106 0 stevel # between todays build and yesterdays. 107 0 stevel # 108 0 stevel REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST 109 0 stevel 110 0 stevel # where cpio archives of the OS are placed. Usually this should be left 111 0 stevel # alone too. Here they don't go in the build workspace, but in the parent. 112 0 stevel # Since this is done as root, the build machine needs root acces to 113 0 stevel # the parent over NFS. 114 0 stevel CPIODIR="${PARENT_WS}/archives/${MACH}/nightly"; export CPIODIR 115 0 stevel 116 0 stevel # 117 0 stevel # build environment variables, including version info for mcs, motd, 118 0 stevel # motd, uname and boot messages. Mostly you shouldn't change this except 119 0 stevel # when the release slips (nah) or when starting a new release. 120 0 stevel # 121 0 stevel ROOT="$CODEMGR_WS/proto/root_${MACH}"; export ROOT 122 0 stevel SRC="$CODEMGR_WS/usr/src"; export SRC 123 0 stevel VERSION="$GATE"; export VERSION 124 0 stevel 125 0 stevel # 126 0 stevel # the RELEASE and RELEASE_DATE variables are set in Makefile.master; 127 0 stevel # there might be special reasons to override them here, but that 128 0 stevel # should not be the case in general 129 0 stevel # 130 0 stevel # RELEASE="5.10.1"; export RELEASE 131 0 stevel # RELEASE_DATE="October 2007"; export RELEASE_DATE 132 0 stevel 133 0 stevel # proto area in parent for optionally depositing a copy of headers and 134 0 stevel # libraries corresponding to the protolibs target 135 0 stevel # 136 0 stevel PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT 137 0 stevel 138 0 stevel # 139 0 stevel # package creation variable. This put the packages in the parent. 140 0 stevel # 141 0 stevel PKGARCHIVE="${PARENT_WS}/packages/${MACH}/nightly"; export PKGARCHIVE 142 0 stevel 143 0 stevel # we want make to do as much as it can, just in case there's more than 144 0 stevel # one problem. This is especially important with the gate, since multiple 145 0 stevel # unrelated broken things can be integrated. 146 0 stevel MAKEFLAGS=k; export MAKEFLAGS 147 0 stevel 148 0 stevel # Magic variable to prevent the devpro compilers/teamware from sending 149 0 stevel # mail back to devpro on every use. 150 0 stevel UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING 151 0 stevel 152 0 stevel # Build tools - don't set these unless you know what you're doing. These 153 0 stevel # variables allows you to get the compilers and onbld files locally or 154 0 stevel # through cachefs. Set BUILD_TOOLS to pull everything from one location. 155 0 stevel # Alternately, you can set ONBLD_TOOLS to where you keep the contents of 156 0 stevel # SUNWonbld and SPRO_ROOT to where you keep the compilers. 157 0 stevel # 158 0 stevel #BUILD_TOOLS=/opt; export BUILD_TOOLS 159 0 stevel #ONBLD_TOOLS=/opt/onbld; export ONBLD_TOOLS 160 0 stevel #SPRO_ROOT=/opt/SUNspro; export SPRO_ROOT 161 0 stevel 162 0 stevel # This goes along with lint - it is a series of the form "A [y|n]" which 163 0 stevel # means "go to directory A and run 'make lint'" Then mail me (y) the 164 0 stevel # difference in the lint output. 'y' should only be used if the area you're 165 0 stevel # linting is actually lint clean or you'll get lots of mail. 166 0 stevel # You shouldn't need to change this though. 167 0 stevel #LINTDIRS="$SRC y"; export LINTDIRS 168 0 stevel 169 0 stevel # 170 0 stevel # Reference to IA32 IHV workspace, proto area and packages 171 0 stevel # 172 0 stevel #IA32_IHV_WS=/ws/${GATE}-ihv; export IA32_IHV_WS 173 0 stevel #IA32_IHV_ROOT=$IA32_IHV_WS/proto/root_i386; export IA32_IHV_ROOT 174 0 stevel #IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly; export IA32_IHV_PKGS 175 0 stevel 176 0 stevel # 177 2868 dduvall # Reference to binary-only IA32 IHV packages 178 0 stevel # 179 2868 dduvall #IA32_IHV_BINARY_PKGS=/ws/${GATE}-ihv-bin 180 0 stevel #export IA32_IHV_BINARY_PKGS 181 0 stevel 182 0 stevel # 183 0 stevel # Destination for sparc realmode package SUNWrmodu 184 0 stevel # 185 0 stevel #SPARC_RM_PKGARCHIVE="${CODEMGR_WS}/packages/sparc_realmode/nightly" 186 0 stevel #export SPARC_RM_PKGARCHIVE 187 0 stevel 188 0 stevel # Set this flag to 'n' to disable the automatic validation of the dmake 189 0 stevel # version in use. The default is to check it. 190 0 stevel #CHECK_DMAKE=y 191 0 stevel 192 0 stevel # Set this flag to 'n' to disable the use of 'checkpaths'. The default, 193 0 stevel # if the 'N' option is not specified, is to run this test. 194 0 stevel #CHECK_PATHS=y 195 0 stevel 196 0 stevel # Set this flag to 'y' to enable the use of elfsigncmp to validate the 197 0 stevel # output of elfsign. Doing so requires that 't' be set in NIGHTLY_OPTIONS. 198 0 stevel # The default is to not verify them. 199 0 stevel #VERIFY_ELFSIGN=n 200 458 mike_s 201 458 mike_s # BRINGOVER_FILES is the list of files nightly passes to bringover. 202 1167 kupfer # If not set the default is "usr", but it can be used for bringing 203 458 mike_s # over deleted_files or other nifty directories. 204 1167 kupfer #BRINGOVER_FILES="usr deleted_files" 205 2405 rscott 206 2456 rscott # POST_NIGHTLY can be any command to be run at the end of nightly. See 207 2456 rscott # nightly(1) for interactions between environment variables and this command. 208 2405 rscott #POST_NIGHTLY= 209