make_release_packages revision 1057
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
c7fd128f8ea8a527fe27c1b95ab46df7155bc8e4Tinderbox User# Permission is hereby granted, free of charge, to any person obtaining a
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews# copy of this software and associated documentation files (the "Software"),
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews# to deal in the Software without restriction, including without limitation
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews# and/or sell copies of the Software, and to permit persons to whom the
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# Software is furnished to do so, subject to the following conditions:
0726d872f6f36901ea09321df57084614e5bb6faTinderbox User# The above copyright notice and this permission notice (including the next
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# paragraph) shall be included in all copies or substantial portions of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# DEALINGS IN THE SOFTWARE.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Create and fill a package staging area for X
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This script should be run from the base of the build tree.
415d630b6309922caee8469384a6fab75cf05032Mark Andrews# -v Enable verbose mode
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# -p <publisher> Set publisher name in built repo to <publisher>
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User# Make sure that we aren't affected by the personal environment of
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# whoever is running this script
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsPATH=/usr/bin:/usr/ccs/bin:/opt/onbld/bin:${PATH}
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User# Path to directory in build tree containing build tools
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsVERBOSE_FLAGS="" # verbosity flags passed to make
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsPUBLISHER_FLAGS="" # publisher flags passed to make
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsset -- $(getopt p:v $*)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsif [ $? != 0 ] ; then
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntfor i in $* ; do
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews -p) PUBLISHER_FLAGS="PKGPUBLISHER=$2"; shift 2;;
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsif [[ -z "${XNV_BUILDNUM}" ]] ; then
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews # Get build version from hg by searching for most recent tag matching nv_*
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews perl -l -n -e 'if ($_ =~ m/^tag:\s+nv_([\d\.]+)/) {print $1 ; exit}')"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews if [[ -z "${BUILD_TAG}" ]] ; then
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews fatal_error "BUILD_TAG could not be found from hg_log"
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox Userprint "Building packages for X Consolidation, Nevada build ${XNV_BUILDNUM}"
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews# Remove old packages
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt${XMAKE} install XNV_BUILDNUM="${XNV_BUILDNUM}" "${PUBLISHER_FLAGS}" > "${LOG}" 2>&1
7cc0a5d21ef046bfd630c4769943d896a7d7472cTinderbox User${XMAKE} check XNV_BUILDNUM="${XNV_BUILDNUM}" > "${CHECK_LOG}" 2>&1
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsprint "Result log is in ${LOG}"
551e6d2414c4f47d58a9bb0b37f206f915a4f5acTinderbox User"${BUILD_TOOLS}/find-build-errors" -s "${LOG}"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews"${BUILD_TOOLS}/find-build-errors" -s "${CHECK_LOG}"