xref: /titanic_44/usr/src/tools/env/developer.sh (revision 10d63b7db37a83b39c7f511cf9426c9d03ea0760)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5b84bdc30Smeem# Common Development and Distribution License (the "License").
6b84bdc30Smeem# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
216fec3625Sdduvall
227c478bd9Sstevel@tonic-gate#
235253169eSAli Bahrami# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate#
256fec3625Sdduvall
267c478bd9Sstevel@tonic-gate#	Configuration variables for the runtime environment of the nightly
277c478bd9Sstevel@tonic-gate# build script and other tools for construction and packaging of releases.
287c478bd9Sstevel@tonic-gate# This script is sourced by 'nightly' and 'bldenv' to set up the environment
297c478bd9Sstevel@tonic-gate# for the build. This example is suitable for building a developers workspace,
307c478bd9Sstevel@tonic-gate# which will contain the resulting packages and archives. It is based off
317c478bd9Sstevel@tonic-gate# the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
328e5ce8adSAli Bahrami#	check ELF ABI/versioning (-A)
337c478bd9Sstevel@tonic-gate#	runs 'make check' (-C)
347c478bd9Sstevel@tonic-gate#	DEBUG and non-DEBUG builds (-D)
357c478bd9Sstevel@tonic-gate#	runs lint in usr/src (-l plus the LINTDIRS variable)
367c478bd9Sstevel@tonic-gate#	sends mail on completion (-m and the MAILTO variable)
377c478bd9Sstevel@tonic-gate#	creates packages for PIT/RE (-p)
387c478bd9Sstevel@tonic-gate#	checks for changes in ELF runpaths (-r)
397c478bd9Sstevel@tonic-gate#
4078add226SjmcpNIGHTLY_OPTIONS="-ACDlmpr";		export NIGHTLY_OPTIONS
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate# This is a variable for the rest of the script - GATE doesn't matter to
437c478bd9Sstevel@tonic-gate# nightly itself
447c478bd9Sstevel@tonic-gateGATE=onnv-bugfixes;			export GATE
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate# CODEMGR_WS - where is your workspace at (or what should nightly name it)
477c478bd9Sstevel@tonic-gateCODEMGR_WS="/builds/$GATE";			export CODEMGR_WS
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate# PARENT_WS is used to determine the parent of this workspace. This is
507c478bd9Sstevel@tonic-gate# for the options that deal with the parent workspace (such as where the
517c478bd9Sstevel@tonic-gate# proto area will go).
529a70fc3bSMark J. Nelson#
539a70fc3bSMark J. Nelson# If you use this, it must be local (or nfs): nightly cannot copy
549a70fc3bSMark J. Nelson# over ssh or http.
557c478bd9Sstevel@tonic-gatePARENT_WS="/ws/onnv-gate";			export PARENT_WS
567c478bd9Sstevel@tonic-gate
579a70fc3bSMark J. Nelson# CLONE_WS is the workspace nightly should do a bringover from.
5886110fccSMark J. NelsonCLONE_WS="ssh://anonhg@onnv.sfbay.sun.com//export/onnv-clone";	export CLONE_WS
599a70fc3bSMark J. Nelson
609a70fc3bSMark J. Nelson# CLOSED_CLONE_WS is the workspace from which nightly should acquire
619a70fc3bSMark J. Nelson# the usr/closed tree.
629a70fc3bSMark J. NelsonCLOSED_CLONE_WS="${CLONE_WS}/usr/closed";	export CLOSED_CLONE_WS
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate# The bringover, if any, is done as STAFFER.
657c478bd9Sstevel@tonic-gate# Set STAFFER to your own login as gatekeeper or developer
667c478bd9Sstevel@tonic-gate# The point is to use group "staff" and avoid referencing the parent
677c478bd9Sstevel@tonic-gate# workspace as root.
687c478bd9Sstevel@tonic-gate# Some scripts optionally send mail messages to MAILTO.
697c478bd9Sstevel@tonic-gate#
707c478bd9Sstevel@tonic-gateSTAFFER=nobody;				export STAFFER
717c478bd9Sstevel@tonic-gateMAILTO=$STAFFER;			export MAILTO
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# The project (see project(4)) under which to run this build.  If not
747c478bd9Sstevel@tonic-gate# specified, the build is simply run in a new task in the current project.
757c478bd9Sstevel@tonic-gateBUILD_PROJECT=;				export BUILD_PROJECT
767c478bd9Sstevel@tonic-gate
77*60a61f7aSJosef 'Jeff' Sipek# You should not need to change the next three lines
787c478bd9Sstevel@tonic-gateATLOG="$CODEMGR_WS/log";			export ATLOG
797c478bd9Sstevel@tonic-gateLOGFILE="$ATLOG/nightly.log";			export LOGFILE
807c478bd9Sstevel@tonic-gateMACH=`uname -p`;				export MACH
817c478bd9Sstevel@tonic-gate
825253169eSAli Bahrami# When the -A flag is specified, and ELF_DATA_BASELINE_DIR is defined,
835253169eSAli Bahrami# the ELF interface description file resulting from the build is compared
845253169eSAli Bahrami# to that from the specified directory. This ensures that our object
855253169eSAli Bahrami# versioning evolves in a backward compatible manner.
865253169eSAli Bahrami#
875253169eSAli Bahrami# You should not need to change this unless you wish to use locally cached
885253169eSAli Bahrami# baseline files. If you use this, it must be local (or nfs): nightly cannot
895253169eSAli Bahrami# copy over ssh or http.
905253169eSAli Bahrami#
915253169eSAli BahramiELF_DATA_BASELINE_DIR="/ws/onnv-gate/usr/src/ELF-data-baseline.$MACH";	export ELF_DATA_BASELINE_DIR
925253169eSAli Bahrami
93597bd30bSMike Kupfer# This is usually just needed if the closed tree is missing, or when
94597bd30bSMike Kupfer# building a project gate with the -O (cap oh) flag.
95597bd30bSMike Kupfer# ON_CRYPTO_BINS="$PARENT_WS/packages/$MACH/on-crypto.$MACH.tar.bz2"
96597bd30bSMike Kupfer# export ON_CRYPTO_BINS
97597bd30bSMike Kupfer
987c478bd9Sstevel@tonic-gate# REF_PROTO_LIST - for comparing the list of stuff in your proto area
997c478bd9Sstevel@tonic-gate# with. Generally this should be left alone, since you want to see differences
1007c478bd9Sstevel@tonic-gate# from your parent (the gate).
1017c478bd9Sstevel@tonic-gate#
1027c478bd9Sstevel@tonic-gateREF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate#
1057c478bd9Sstevel@tonic-gate#	build environment variables, including version info for mcs, motd,
1067c478bd9Sstevel@tonic-gate# motd, uname and boot messages. Mostly you shouldn't change this except
1077c478bd9Sstevel@tonic-gate# when the release slips (nah) or you move an environment file to a new
1087c478bd9Sstevel@tonic-gate# release
1097c478bd9Sstevel@tonic-gate#
1107c478bd9Sstevel@tonic-gateROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
1117c478bd9Sstevel@tonic-gateSRC="$CODEMGR_WS/usr/src";         	export SRC
1127c478bd9Sstevel@tonic-gateVERSION="$GATE";			export VERSION
1137c478bd9Sstevel@tonic-gate
1147c478bd9Sstevel@tonic-gate#
1157c478bd9Sstevel@tonic-gate# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
1167c478bd9Sstevel@tonic-gate# there might be special reasons to override them here, but that
1177c478bd9Sstevel@tonic-gate# should not be the case in general
1187c478bd9Sstevel@tonic-gate#
1197c478bd9Sstevel@tonic-gate# RELEASE="5.10.1";			export RELEASE
1207c478bd9Sstevel@tonic-gate# RELEASE_DATE="October 2007";		export RELEASE_DATE
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gate# proto area in parent for optionally depositing a copy of headers and
1237c478bd9Sstevel@tonic-gate# libraries corresponding to the protolibs target
1247c478bd9Sstevel@tonic-gate# not applicable given the NIGHTLY_OPTIONS
1257c478bd9Sstevel@tonic-gate#
1267c478bd9Sstevel@tonic-gatePARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
127ead1f93eSLiane PrazaPARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gate#
130ead1f93eSLiane Praza# Package creation variables.  You probably shouldn't change these,
131ead1f93eSLiane Praza# either.
132ead1f93eSLiane Praza#
133ead1f93eSLiane Praza# PKGARCHIVE determines where repositories will be created.
134ead1f93eSLiane Praza#
135ead1f93eSLiane Praza# PKGPUBLISHER* control the publisher settings for those repositories.
1367c478bd9Sstevel@tonic-gate#
1377c478bd9Sstevel@tonic-gatePKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
138ead1f93eSLiane Praza# PKGPUBLISHER_REDIST="on-redist";			export PKGPUBLISHER_REDIST
139ead1f93eSLiane Praza# PKGPUBLISHER_NONREDIST="on-extra";			export PKGPUBLISHER_NONREDIST
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gate# we want make to do as much as it can, just in case there's more than
1427c478bd9Sstevel@tonic-gate# one problem.
1437c478bd9Sstevel@tonic-gateMAKEFLAGS=k;	export MAKEFLAGS
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gate# Magic variable to prevent the devpro compilers/teamware from sending
1467c478bd9Sstevel@tonic-gate# mail back to devpro on every use.
1477c478bd9Sstevel@tonic-gateUT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gate# Build tools - don't set these unless you know what you're doing.  These
1507c478bd9Sstevel@tonic-gate# variables allows you to get the compilers and onbld files locally or
1517c478bd9Sstevel@tonic-gate# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
1527c478bd9Sstevel@tonic-gate# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
1537c478bd9Sstevel@tonic-gate# SUNWonbld and SPRO_ROOT to where you keep the compilers.
1547c478bd9Sstevel@tonic-gate#
1557c478bd9Sstevel@tonic-gate#BUILD_TOOLS=/opt;				export BUILD_TOOLS
1567c478bd9Sstevel@tonic-gate#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
157853de45fSdh155122#SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
1587c478bd9Sstevel@tonic-gate
1597c478bd9Sstevel@tonic-gate# This goes along with lint - it is a series of the form "A [y|n]" which
1607c478bd9Sstevel@tonic-gate# means "go to directory A and run 'make lint'" Then mail me (y) the
1617c478bd9Sstevel@tonic-gate# difference in the lint output. 'y' should only be used if the area you're
1627c478bd9Sstevel@tonic-gate# linting is actually lint clean or you'll get lots of mail.
1637c478bd9Sstevel@tonic-gate# You shouldn't need to change this though.
1647c478bd9Sstevel@tonic-gate#LINTDIRS="$SRC y";	export LINTDIRS
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate#
1677c478bd9Sstevel@tonic-gate# Reference to IA32 IHV workspace, proto area and packages
1687c478bd9Sstevel@tonic-gate#
1697c478bd9Sstevel@tonic-gate#IA32_IHV_WS=/ws/${GATE}-ihv;				export IA32_IHV_WS
1707c478bd9Sstevel@tonic-gate#IA32_IHV_ROOT=$IA32_IHV_WS/proto/root_i386;		export IA32_IHV_ROOT
1717c478bd9Sstevel@tonic-gate#IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly;	export IA32_IHV_PKGS
1727c478bd9Sstevel@tonic-gate
1737c478bd9Sstevel@tonic-gate#
1746fec3625Sdduvall# Reference to binary-only IA32 IHV packages
1757c478bd9Sstevel@tonic-gate#
1766fec3625Sdduvall#IA32_IHV_BINARY_PKGS=/ws/${GATE}-ihv-bin
1777c478bd9Sstevel@tonic-gate#export IA32_IHV_BINARY_PKGS
1787c478bd9Sstevel@tonic-gate
1797c478bd9Sstevel@tonic-gate# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
1807c478bd9Sstevel@tonic-gate# if the 'N' option is not specified, is to run this test.
1817c478bd9Sstevel@tonic-gate#CHECK_PATHS=y
1827c478bd9Sstevel@tonic-gate
1837c478bd9Sstevel@tonic-gate# Set this flag to 'y' to enable the use of elfsigncmp to validate the
1847c478bd9Sstevel@tonic-gate# output of elfsign.  Doing so requires that 't' be set in NIGHTLY_OPTIONS.
1857c478bd9Sstevel@tonic-gate# The default is to not verify them.
1867c478bd9Sstevel@tonic-gate#VERIFY_ELFSIGN=n
187a5c06a9eSmike_s
188a5c06a9eSmike_s# BRINGOVER_FILES is the list of files nightly passes to bringover.
189fb9f9b97Skupfer# If not set the default is "usr", but it can be used for bringing
190a5c06a9eSmike_s# over deleted_files or other nifty directories.
191fb9f9b97Skupfer#BRINGOVER_FILES="usr deleted_files"
1924802ef38Srscott
19340bc9153Srscott# POST_NIGHTLY can be any command to be run at the end of nightly.  See
19440bc9153Srscott# nightly(1) for interactions between environment variables and this command.
1954802ef38Srscott#POST_NIGHTLY=
196