--- old/usr/src/pkg/manifests/developer-build-onbld.mf	2014-01-26 21:59:57.735045611 -0500
+++ new/usr/src/pkg/manifests/developer-build-onbld.mf	2014-01-26 21:59:57.763750015 -0500
@@ -81,7 +81,6 @@
 $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/tokenize mode=0555
 $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/tokenize.exe mode=0555
 file path=opt/onbld/bin/Install mode=0555
-file path=opt/onbld/bin/bindrop mode=0555
 file path=opt/onbld/bin/bldenv mode=0555
 file path=opt/onbld/bin/bringovercheck mode=0555
 file path=opt/onbld/bin/build_cscope mode=0555
@@ -90,7 +89,6 @@
 file path=opt/onbld/bin/checkpaths mode=0555
 file path=opt/onbld/bin/checkproto mode=0555
 file path=opt/onbld/bin/copyrightchk mode=0555
-file path=opt/onbld/bin/cryptodrop mode=0555
 file path=opt/onbld/bin/cstyle mode=0555
 file path=opt/onbld/bin/ctfcvtptbl mode=0555
 file path=opt/onbld/bin/ctffindmod mode=0555
@@ -110,8 +108,6 @@
 file path=opt/onbld/bin/jstyle mode=0555
 file path=opt/onbld/bin/make_pkg_db mode=0555
 file path=opt/onbld/bin/mapfilechk mode=0555
-file path=opt/onbld/bin/mkreadme_osol mode=0555
-file path=opt/onbld/bin/mktpl mode=0555
 file path=opt/onbld/bin/nightly mode=0555
 file path=opt/onbld/bin/onu mode=0555
 file path=opt/onbld/bin/protocmp.terse mode=0555
--- old/usr/src/req.flg	2014-01-26 21:59:58.330011057 -0500
+++ new/usr/src/req.flg	2014-01-26 21:59:58.343539151 -0500
@@ -32,7 +32,3 @@
 echo_file usr/src/Makefile.msg.targ
 echo_file usr/src/Makefile.psm
 echo_file usr/src/Makefile.psm.targ
-echo_file usr/closed/cmd/cmd-crypto/etc/certs/SUNWosnetCF
-echo_file usr/closed/cmd/cmd-crypto/etc/certs/SUNWosnetSE
-echo_file usr/closed/cmd/cmd-crypto/etc/keys/SUNWosnetCF
-echo_file usr/closed/cmd/cmd-crypto/etc/keys/SUNWosnetSE
--- old/usr/src/tools/scripts/Install.sh	2014-01-26 21:59:58.740269484 -0500
+++ new/usr/src/tools/scripts/Install.sh	2014-01-26 21:59:58.753553718 -0500
@@ -372,46 +372,8 @@
 }
 
 #
-# usage: fixcrypto listfile ctop
-# Massage entries in listfile for crypto modules, so that they point
-# into ctop.
-#
-function fixcrypto {
-	typeset listfile=$1
-	typeset ctop=$2
-
-	typeset ccontents=/tmp/crypto-toc$$
-	find "$ctop" -type f -print > $ccontents
-	typeset root=root_$MACH
-	[ "$OBJD" = obj ] && root=root_$MACH-nd
-
-	grep -v ^MOD $listfile > $listfile.no-mod
-	grep ^MOD $listfile | while read tag srcdir module targdir size impl; do
-		#
-		# We don't just grep for ${OBJD}$size/$module because
-		# there can be generic and platform-dependent versions
-		# of a module.
-		#
-		newsrcfile=$(grep -w $root/$targdir/${OBJD}$size/$module $ccontents)
-		if [ -n "$newsrcfile" ]; then
-			# srcdir doesn't include final objNN or debugNN
-			echo $tag $module $targdir $size $impl \
-			    $(dirname $(dirname "$newsrcfile"))
-		else
-			echo $tag $module $targdir $size $impl $srcdir
-		fi
-	done > $listfile.mod
-	cat $listfile.mod $listfile.no-mod > $listfile
-
-	rm -f $listfile.mod
-	rm -f $listfile.no-mod
-	rm -f $ccontents
-}
-
-#
 # Copy a module, or create a link, as needed.
 #
-
 function copymod {
 	case $1 in
 	MOD)
@@ -542,24 +504,6 @@
 	    egrep "^MOD|^CONF|^LINK|^SYMLINK" > $modlist
 	[ "$VERBOSE" = "V" ] && cat $modlist
 	check_modlist $modlist
-	if [ -n "$ON_CRYPTO_BINS" ]; then
-		cryptotar="$ON_CRYPTO_BINS"
-		if [ "$OBJD" = obj ]; then
-			isa=$(uname -p)
-			cryptotar=$(echo "$ON_CRYPTO_BINS" |
-			    sed -e s/.$isa.tar.bz2/-nd.$isa.tar.bz2/)
-		fi
-		[ -f "$cryptotar" ] || fail "crypto ($cryptotar) doesn't exist"
-		cryptotree=$(mktemp -d /tmp/crypto.XXXXXX)
-		[ -n "$cryptotree" ] || fail "can't create tree for crypto"
-		unpack_crypto "$cryptotar" "$cryptotree"
-		#
-		# fixcrypto must come before fixglom, because
-		# fixcrypto uses the unglommed path to find things in
-		# the unpacked crypto.
-		#
-		fixcrypto $modlist "$cryptotree"
-	fi
 	if [ "$GLOM" = "yes" ]; then
 		fixglom $modlist $GLOMNAME
 		filtimpl $modlist $IMPL
@@ -732,10 +676,6 @@
 	fi
 
 	srctrees=$SRC
-	if [ -z "$ON_CRYPTO_BINS" ]; then
-		echo "Warning: ON_CRYPTO_BINS not set; pre-signed" \
-		    "crypto not provided."
-	fi
 	if [[ $WANT64 = "yes" ]] ; then
 		# kmdbmod for sparc and x86 are built and installed
 		# in different places
--- old/usr/src/tools/scripts/Makefile	2014-01-26 21:59:59.210923600 -0500
+++ new/usr/src/tools/scripts/Makefile	2014-01-26 21:59:59.223927116 -0500
@@ -27,13 +27,11 @@
 
 SHFILES= \
 	Install \
-	bindrop \
 	bldenv \
 	build_cscope \
 	bringovercheck \
 	checkpaths \
 	checkproto \
-	cryptodrop \
 	cstyle \
 	elfcmp \
 	flg.flp \
@@ -54,8 +52,6 @@
 	interface_check \
 	interface_cmp \
 	jstyle \
-	mkreadme_osol \
-	mktpl \
 	validate_flg \
 	validate_paths \
 	wdiff
--- old/usr/src/tools/scripts/bindrop.sh	2014-01-26 21:59:59.812455649 -0500
+++ /dev/null	2014-01-26 21:59:59.000000000 -0500
@@ -1,278 +0,0 @@
-#! /usr/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# Create an encumbered binaries tarball from a full build proto area,
-# less the contents of an OpenSolaris proto area.  Special handling
-# for crypto binaries that need to be signed by Sun Release
-# Engineering.
-#
-
-usage="bindrop [-n] basename"
-
-isa=`uname -p`
-
-PATH="$PATH:/usr/bin:/usr/sfw/bin"
-
-function fail {
-	print -u2 "bindrop: $@"
-	exit 1
-}
-
-function warn {
-	print -u2 "bindrop: warning: $@"
-}
-
-[[ -n "$SRC" ]] || fail "SRC must be set."
-[[ -n "$CODEMGR_WS" ]] || fail "CODEMGR_WS must be set."
-
-#
-# Create the README from boilerplate and the contents of the closed
-# binary tree.
-#
-# usage: mkreadme targetdir
-#
-function mkreadme {
-	typeset targetdir="$1"
-	typeset readme="README.ON-BINARIES.$isa"
-
-	sed -e s/@ISA@/$isa/ -e s/@DELIVERY@/ON-BINARIES/ \
-	    "$SRC/tools/opensolaris/README.binaries.tmpl" > "$targetdir/$readme"
-	(cd "$targetdir"; find "$rootdir" -type f -print | \
-	    sort >> "$targetdir/$readme")
-}
-
-nondebug=n
-while getopts n flag; do
-	case $flag in
-	n)
-		nondebug=y
-		;;
-	?)
-		print -u2 "usage: $usage"
-		exit 1
-		;;
-	esac
-done
-shift $(($OPTIND - 1))
-
-if [[ $# -ne 1 ]]; then
-	print -u2 "usage: $usage"
-	exit 1
-fi
-
-tarfile="$CODEMGR_WS/$1.$isa.tar"
-
-rootdir="root_$isa"
-suffix=""
-if [[ "$nondebug" = y ]]; then
-	rootdir="root_$isa-nd"
-	suffix="-nd"
-fi
-
-[[ -d "${ROOT}${suffix}-closed" ]] || fail "can't find closed root proto area."
-
-tmpdir=$(mktemp -dt bindropXXXXX)
-[[ -n "$tmpdir" ]] || fail "can't create temporary directory."
-mkdir -p "$tmpdir/closed/$rootdir" || exit 1
-
-#
-# This will hold a temp list of directories that must be kept, even if
-# empty.
-#
-needdirs=$(mktemp -t needdirsXXXXX)
-[[ -n "$needdirs" ]] || fail "can't create temporary directory list file."
-
-#
-# Copy the closed root parallel tree into a temp directory.
-#
-(cd "${ROOT}${suffix}-closed"; tar cf - .) | (cd "$tmpdir/closed/$rootdir"; tar xpf -)
-
-#
-# Remove internal ON crypto signing certs
-#
-delete="
-	etc/certs/SUNWosnetSE
-	etc/certs/SUNWosnetSolaris
-	etc/crypto/certs/SUNWosnet
-	etc/crypto/certs/SUNWosnetLimited
-	etc/crypto/certs/SUNWosnetCF
-	etc/crypto/certs/SUNWosnetCFLimited
-	"
-
-#
-# Remove miscellaneous files that we don't want to ship.
-#
-
-# SUNWsvvs (SVVS test drivers).
-delete="$delete
-	usr/include/sys/svvslo.h
-	usr/include/sys/tidg.h
-	usr/include/sys/tivc.h
-	usr/include/sys/tmux.h
-	usr/kernel/drv/amd64/svvslo
-	usr/kernel/drv/amd64/tidg
-	usr/kernel/drv/amd64/tivc
-	usr/kernel/drv/amd64/tmux
-	usr/kernel/drv/sparcv9/svvslo
-	usr/kernel/drv/sparcv9/tidg
-	usr/kernel/drv/sparcv9/tivc
-	usr/kernel/drv/sparcv9/tmux
-	usr/kernel/drv/svvslo
-	usr/kernel/drv/svvslo.conf
-	usr/kernel/drv/tidg
-	usr/kernel/drv/tidg.conf
-	usr/kernel/drv/tivc
-	usr/kernel/drv/tivc.conf
-	usr/kernel/drv/tmux
-	usr/kernel/drv/tmux.conf
-	usr/kernel/strmod/amd64/lmodb
-	usr/kernel/strmod/amd64/lmode
-	usr/kernel/strmod/amd64/lmodr
-	usr/kernel/strmod/amd64/lmodt
-	usr/kernel/strmod/lmodb
-	usr/kernel/strmod/lmode
-	usr/kernel/strmod/lmodr
-	usr/kernel/strmod/lmodt
-	usr/kernel/strmod/sparcv9/lmodb
-	usr/kernel/strmod/sparcv9/lmode
-	usr/kernel/strmod/sparcv9/lmodr
-	usr/kernel/strmod/sparcv9/lmodt
-"
-# encumbered binaries and associated files
-delete="$delete
-	kernel/drv/amd64/bmc
-	kernel/drv/bmc
-	kernel/drv/bmc.conf
-	kernel/drv/ifp.conf
-	kernel/drv/sparcv9/ifp
-	kernel/drv/sparcv9/isp
-	kernel/drv/sparcv9/qus
-	kernel/drv/spwr
-	kernel/kmdb/sparcv9/isp
-	usr/has/bin/ksh
-	usr/has/bin/pfksh
-	usr/has/bin/rksh
-	usr/include/sys/scsi/adapters/ifpcmd.h
-	usr/include/sys/scsi/adapters/ifpio.h
-	usr/include/sys/scsi/adapters/ifpmail.h
-	usr/include/sys/scsi/adapters/ifpreg.h
-	usr/include/sys/scsi/adapters/ifpvar.h
-	usr/include/sys/scsi/adapters/ispcmd.h
-	usr/include/sys/scsi/adapters/ispmail.h
-	usr/include/sys/scsi/adapters/ispreg.h
-	usr/include/sys/scsi/adapters/ispvar.h
-	usr/lib/mdb/kvm/sparcv9/isp.so
-	usr/platform/sun4u/include/sys/memtestio.h
-	usr/platform/sun4u/include/sys/memtestio_ch.h
-	usr/platform/sun4u/include/sys/memtestio_chp.h
-	usr/platform/sun4u/include/sys/memtestio_ja.h
-	usr/platform/sun4u/include/sys/memtestio_jg.h
-	usr/platform/sun4u/include/sys/memtestio_sf.h
-	usr/platform/sun4u/include/sys/memtestio_sr.h
-	usr/platform/sun4u/include/sys/memtestio_u.h
-	usr/platform/sun4u/include/sys/memtestio_pn.h
-	usr/platform/sun4v/include/sys/memtestio.h
-	usr/platform/sun4v/include/sys/memtestio_ni.h
-	usr/platform/sun4v/include/sys/memtestio_v.h
-"
-# memory fault injector test framework
-delete="$delete
-	usr/bin/mtst
-	platform/sun4u/kernel/drv/sparcv9/memtest
-	platform/sun4u/kernel/drv/memtest.conf
-	platform/sun4v/kernel/drv/sparcv9/memtest
-	platform/sun4v/kernel/drv/memtest.conf
-	kernel/drv/memtest.conf
-	kernel/drv/memtest
-	kernel/drv/amd64/memtest
-	usr/platform/i86pc/lib/mtst/mtst_AuthenticAMD_15.so
-	usr/platform/i86pc/lib/mtst/mtst_AuthenticAMD.so
-	usr/platform/i86pc/lib/mtst/mtst_generic.so
-	usr/platform/i86pc/lib/mtst/mtst_GenuineIntel.so
-"
-for f in $delete; do
-	rm -rf "$tmpdir/closed/$rootdir/$f"
-done
-
-#
-# Remove any header files.  If they're in the closed tree, they're
-# probably not freely redistributable.
-#
-(cd "$tmpdir/closed/$rootdir"; find . -name \*.h \
-	-a \! -name lc_core.h \
-	-a \! -name localedef.h \
-	-exec rm -f {} \;)
-
-#
-# Remove empty directories that the open tree doesn't need.
-#
-# Step 1: walk the redistributable manifests to find out which directories
-# are specified in the open packages; save that list to a temporary
-# file $needdirs.
-#
-MACH=$(uname -p)
-(cd "$SRC/pkg/packages.$MACH"; \
-	nawk '/^dir/ {sub(/.+ path=/, ""); print $1;}' *.metadata.*.redist | \
-	sort -u > "$needdirs")
-
-#
-# Step 2: go to our closed directory, and find all the subdirectories,
-# filtering out the ones needed by the open packages (saved in that
-# temporary file).  Sort in reverse order, so that parent directories
-# come after any subdirectories, and pipe that to rmdir.  If there are
-# still any lingering files, rmdir will complain.  That's fine--we
-# only want to delete empty directories--so redirect the complaints to
-# /dev/null.
-#
-(cd "$tmpdir/closed/$rootdir"; \
-	find * -type d -print | /usr/xpg4/bin/grep -xv -f $needdirs | \
-	sort -r | xargs -l rmdir 2>/dev/null )
-
-rm "$needdirs"
-
-#
-# Exclude signed crypto binaries; they are delivered in their
-# own tarball.
-#
-ROOT="$tmpdir/closed/$rootdir" findcrypto "$SRC/tools/codesign/creds" |
-    awk '{ print $2 }' | (cd "$tmpdir/closed/$rootdir"; xargs rm -f)
-
-#
-# Add binary license files.
-#
-
-cp -p "$SRC/tools/opensolaris/BINARYLICENSE.txt" "$tmpdir/closed" || \
-    fail "can't add BINARYLICENSE.txt"
-mkreadme "$tmpdir/closed"
-if [ -f "$CODEMGR_WS/THIRDPARTYLICENSE.ON-BINARIES" ]; then
-    cp -p "$CODEMGR_WS/THIRDPARTYLICENSE.ON-BINARIES" "$tmpdir/closed"
-fi
-
-(cd "$tmpdir"; tar cf "$tarfile" closed) || fail "can't create $tarfile."
-bzip2 -f "$tarfile" || fail "can't compress $tarfile".
-
-rm -rf "$tmpdir"
-
-exit 0
--- old/usr/src/tools/scripts/bldenv.sh	2014-01-26 21:59:59.972081727 -0500
+++ new/usr/src/tools/scripts/bldenv.sh	2014-01-26 21:59:59.984995821 -0500
@@ -164,24 +164,25 @@
 
 # clear environment variables we know to be bad for the build
 unset \
+	CH \
 	LD_OPTIONS \
-        LD_LIBRARY_PATH \
-        LD_AUDIT \
-        LD_BIND_NOW \
-        LD_BREADTH \
-        LD_CONFIG \
+	LD_LIBRARY_PATH \
+	LD_AUDIT \
+	LD_BIND_NOW \
+	LD_BREADTH \
+	LD_CONFIG \
 	LD_DEBUG \
-        LD_FLAGS \
-        LD_LIBRARY_PATH_64 \
-        LD_NOVERSION \
-        LD_ORIGIN \
+	LD_FLAGS \
+	LD_LIBRARY_PATH_64 \
+	LD_NOVERSION \
+	LD_ORIGIN \
 	LD_LOADFLTR \
-        LD_NOAUXFLTR \
-        LD_NOCONFIG \
-        LD_NODIRCONFIG \
-        LD_NOOBJALTER \
+	LD_NOAUXFLTR \
+	LD_NOCONFIG \
+	LD_NODIRCONFIG \
+	LD_NOOBJALTER \
 	LD_PRELOAD \
-        LD_PROFILE \
+	LD_PROFILE \
 	CONFIG \
 	GROUP \
 	OWNER \
@@ -227,11 +228,9 @@
 # must match the getopts in nightly.sh
 OPTIND=1
 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
-while getopts '+0AaBCDdFfGIilMmNnopRrtUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
+while getopts '+0ABCDdFfGIilMmNnpRrtUuw' FLAG "$NIGHTLY_OPTIONS"
 do
 	case "$FLAG" in
-	  o)	flags.o=true  ;;
-	  +o)	flags.o=false ;;
 	  t)	flags.t=true  ;;
 	  +t)	flags.t=false ;;
 	  *)	;;
@@ -303,19 +302,10 @@
 
 export DMAKE_MODE=${DMAKE_MODE:-parallel}
 
-if "${flags.o}" ; then
-	export CH=
-else
-	unset CH
-fi
 DEF_STRIPFLAG="-s"
 
 TMPDIR="/tmp"
 
-# "o_FLAG" is used by "nightly.sh" (it may be useful to rename this
-# variable using a more descriptive name later)
-export o_FLAG="$(${flags.o} && print 'y' || print 'n')"
-
 export \
 	PATH TMPDIR \
 	POUND_SIGN \
--- old/usr/src/tools/scripts/checkpaths.sh	2014-01-26 22:00:00.415132703 -0500
+++ new/usr/src/tools/scripts/checkpaths.sh	2014-01-26 22:00:00.428244397 -0500
@@ -114,17 +114,9 @@
 
 if [ -f $SRC/tools/opensolaris/license-list ]; then
 	sed -e 's/$/.descrip/' < $SRC/tools/opensolaris/license-list | \
-		validate_paths -n SRC/tools/opensolaris/license-list \
-		    -e ^usr/closed
+		validate_paths -n SRC/tools/opensolaris/license-list
 fi
 
-# Finally, make sure the that (req|inc).flg files are in good shape.
-# If SCCS files are not expected to be present, though, then don't
-# check them.
-if [ ! -d "$CODEMGR_WS/Codemgr_wsdata" ]; then
-	f_flg='-f'
-fi
-
-validate_flg $f_flg -e ^usr/closed/
+validate_flg -f
 
 exit 0
--- old/usr/src/tools/scripts/cryptodrop.sh	2014-01-26 22:00:00.831546234 -0500
+++ /dev/null	2014-01-26 22:00:00.000000000 -0500
@@ -1,162 +0,0 @@
-#!/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Create a tarball with crypto binaries.
-#
-
-usage="cryptodrop [-n] result-path"
-
-isa=`uname -p`
-
-function fail {
-	print -u2 "cryptodrop: $@"
-	exit 1
-}
-
-[[ -n "$ROOT" ]] || fail "ROOT must be set."
-# Verify below (after adjusting for -n) that $ROOT exists, is a directory.
-[[ -n "$SRC" ]] || fail "SRC must be set."
-[[ -d "$SRC" ]] || fail "SRC ($SRC) is not a directory."
-[[ -n "$CODEMGR_WS" ]] || fail "CODEMGR_WS must be set."
-[[ -d "$CODEMGR_WS" ]] || fail "CODEMGR_WS ($CODEMGR_WS) is not a directory."
-
-#
-# Wrapper over cpio to filter out "NNN blocks" messages.
-#
-function cpio_filt {
-	integer cpio_stat
-
-	cpio "$@" > "$cpio_log" 2>&1
-	cpio_stat=$?
-	cat "$cpio_log" | awk '$0 !~ /[0-9]+ blocks/ { print }'
-	return $cpio_stat
-}
-
-#
-# Create the README from boilerplate and the contents of the closed
-# binary tree.
-#
-# usage: mkreadme targetdir
-#
-function mkreadme {
-	typeset targetdir="$1"
-	typeset readme="README.CRYPTO-BINARIES.$isa"
-
-	sed -e s/@ISA@/$isa/ -e s/@DELIVERY@/CRYPTO-BINARIES/ \
-	    "$SRC/tools/opensolaris/README.binaries.tmpl" > "$targetdir/$readme"
-	(cd "$targetdir"; find "$rootdir" -type f -print | \
-	    sort >> "$targetdir/$readme")
-}
-
-nondebug=n
-while getopts n flag; do
-	case $flag in
-	n)
-		nondebug=y
-		if [ "$MULTI_PROTO" = yes ]; then
-			export ROOT="$ROOT-nd"
-		fi
-		;;
-	?)
-		print -u2 "usage: $usage"
-		exit 1
-		;;
-	esac
-done
-shift $(($OPTIND - 1))
-
-if [[ $# -ne 1 ]]; then
-	print -u2 "usage: $usage"
-	exit 1
-fi
-[[ -d "$ROOT" ]] || fail "ROOT ($ROOT) is not a directory."
-
-tarfile="$1"
-
-if [[ "$nondebug" = n ]]; then
-	rootdir="root_$isa"
-else
-	rootdir="root_$isa-nd"
-fi
-
-tmpdir=$(mktemp -dt cryptodropXXXXX)
-[[ -n "$tmpdir" ]] || fail "could not create temporary directory."
-tmproot="$tmpdir/proto/$rootdir"
-mkdir -p "$tmproot" || exit 1
-cpio_log="$tmpdir/cpio.log"
-filelist="$tmpdir/files"
-
-#
-# Copy the crypto binaries into a temp directory.  This is a bit messy
-# because we want to preserve the permissions of intermediate
-# directories without including all the contents of those
-# directories.
-#
-
-# Echo all the parent directories of the given file.
-function alldirs {
-	d=$(dirname "$1")
-	while [ "$d" != . ]; do
-		echo $d
-		d=$(dirname "$d")
-	done
-}
-
-findcrypto "$SRC/tools/codesign/creds" | awk '{ print $2 }' > "$filelist"
-#
-# Both alldirs and the cpio -p invocation assume that findcrypto only
-# produces relative paths.
-#
-for f in $(cat "$filelist"); do
-	if [[ "$f" = /* ]]; then
-		fail "findcrypto produced absolute path ($f)"
-	fi
-done
-for f in $(cat "$filelist"); do
-	echo "$f"
-	alldirs "$f"
-done | sort -u | (cd "$ROOT"; cpio_filt -pdm "$tmproot")
-[[ $? -eq 0 ]] || fail "could not copy crypto files."
-
-rm -f "$cpio_log" "$filelist"
-
-#
-# Insert binary license files.
-#
-cp -p "$SRC/tools/opensolaris/BINARYLICENSE.txt" "$tmpdir/proto" || \
-    fail "could not add BINARYLICENSE.txt"
-mkreadme "$tmpdir/proto" || exit 1
-cp -p "$CODEMGR_WS/THIRDPARTYLICENSE.ON-CRYPTO" "$tmpdir/proto" || \
-    fail "could not add THIRDPARTYLICENSE.ON-CRYPTO."
-
-(cd "$tmpdir"; tar cf "$tarfile" proto) || fail "could not create $tarfile."
-bzip2 -f "$tarfile" || fail "could not compress $tarfile".
-
-rm -rf "$tmpdir"
-
-exit 0
--- old/usr/src/tools/scripts/mkreadme_osol.pl	2014-01-26 22:00:00.987829676 -0500
+++ /dev/null	2014-01-26 22:00:01.000000000 -0500
@@ -1,135 +0,0 @@
-#! /usr/perl5/bin/perl
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Generate README.opensolaris from a template for inclusion in a
-# delivery wad.
-# Usage: mkreadme_osol README.opensolaris < template
-#
-
-use strict;
-use warnings;
-
-#
-# Timeout and retry settings for wget.  Allow one retry for the
-# occasional glitch, but don't wait longer than 5 minutes (so as not
-# to hold up the build).
-#
-my $timeout = 150;
-my $tries = 2;
-
-#
-# Markers in the web pages that we download.
-#
-my $begin_data = qr/\[begin README tag - do not delete\]/;
-my $end_data = qr/\[end README tag - do not delete\]/;
-
-my $readme_fn = shift || die "missing README filepath\n";
-open(README_OUT, ">$readme_fn") || die "couldn't open $readme_fn\n";
-my @lines = <STDIN>;
-
-my %content;
-
-if (! $ENV{"HTTP_PROXY"}) {
-	if ($ENV{"http_proxy"}) {
-		$ENV{"HTTP_PROXY"} = $ENV{"http_proxy"};
-	} else {
-		$ENV{"HTTP_PROXY"} = "http://webcache.sfbay:8080";
-	}
-}
-if (! $ENV{"http_proxy"}) {
-	$ENV{"http_proxy"} = $ENV{"HTTP_PROXY"};
-}
-
-#
-# Make a pass through the input file and download any web pages that
-# are included by reference.
-#
-foreach (@lines) {
-	chomp;
-	if (/^<!-- #include (.+) -->$/) {
-		my $url = $1;
-		print "Getting $url\n";
-		# Download the page into $content{$url}.
-		$content{$url} =
-		    `/usr/sfw/bin/wget -q -O - -T $timeout -t $tries $url`;
-		if (! $content{$url}) {
-			die "$url: invalid or empty URI.\n";
-		}
-		#
-		# Clean up the downloaded contents: remove carriage
-		# returns, strip out content that is outside the
-		# delimiter tags, convert HTML-encoded characters back
-		# into plain text.
-		#
-		$content{$url} =~ s/\r//g;
-		my @c = split /\n/, $content{$url};
-		my $l;
-		# Work forwards to find start.
-		while (defined ($l = shift @c)) {
-			if ($l =~ /$begin_data/) {
-				last;
-			}
-		}
-		if (! defined $l) {
-			print "Warning: content start delimiter not found\n";
-		} else {
-			# Work backwards to find end.
-			while (defined ($l = pop @c)) {
-				if ($l =~ /$end_data/) {
-					last;
-				}
-			}
-			if (! defined $l) {
-				print "Warning: content end delimiter ",
-				    "not found\n";
-			}
-		}
-		$content{$url} = join "\n", @c;
-		$content{$url} =~ s/&amp;/&/g;
-		$content{$url} =~ s/&lt;/</g;
-		$content{$url} =~ s/&#60;/</g;
-		$content{$url} =~ s/&gt;/>/g;
-		$content{$url} =~ s/&#62;/>/g;
-	}
-}
-
-#
-# Make a second pass through the input file.  Pass most text on
-# verbatim; replace #include directives with the content that was
-# downloaded by the previous pass.
-#
-foreach (@lines) {
-	if (/^<!-- #include (.+) -->$/ && exists($content{$1})) {
-		print README_OUT $content{$1};
-	} else {
-		print README_OUT "$_\n";
-	}
-}
-
-print README_OUT "\n\n";
-close(README_OUT);
--- old/usr/src/tools/scripts/mktpl.pl	2014-01-26 22:00:01.147087341 -0500
+++ /dev/null	2014-01-26 22:00:01.000000000 -0500
@@ -1,148 +0,0 @@
-#! /usr/bin/perl -w
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# Create THIRDPARTYLICENSE files using the index file in $CODEMGR_WS.
-#
-
-use Cwd;
-use Env;
-use strict;
-use vars qw($opt_c);
-use Getopt::Std;
-
-# -c: only generate crypto license file
-my $usage = "mktpl [-c] license-list-file";
-
-my $top = $ENV{"CODEMGR_WS"};
-if (! $top) {
-	die "CODEMGR_WS must be set.\n";
-}
-
-if (! getopts('c')) {
-	die "usage: $usage\n";
-}
-if (@ARGV != 1) {
-	die "usage: $usage\n";
-}
-
-my $indexfile = $ARGV[0];
-
-my $exitstatus = 0;
-
-#
-# Create a THIRDPARTYLICENSE file from the given license list and suffix.
-#
-sub maketpl {
-	my ($suffix, @tpllist) = @_;
-	my $licnum = 1;
-	my $tplname = "$top/THIRDPARTYLICENSE.$suffix";
-
-	if (! @tpllist) {
-		unlink $tplname;
-		return;
-	}
-
-	open(TPL, ">$tplname") or die "Can't create $tplname: $!\n";
-
-	print TPL "DO NOT TRANSLATE OR LOCALIZE.\n\n";
-
-	foreach my $licfile (@tpllist) {
-		my $descrip = `cat "$licfile.descrip"`;
-		if (! $descrip) {
-			warn "Missing description for $licfile\n";
-			$exitstatus = 1;
-			$descrip = "(MISSING DESCRIPTION for $licfile)\n";
-		}
-		print TPL "$licnum)  The following software may be included ",
-		    "in this product:\n\n";
-		print TPL "\t$descrip\n";
-		print TPL "    Use of this software is governed by the ",
-		    "terms of the following license:\n";
-		print TPL "\n";
-		if (open(LIC, "<$licfile")) {
-			while (<LIC>) {
-				print TPL "    " . $_;
-			}
-			close LIC;
-		} else {
-			warn "Can't open $licfile: $!\n";
-			$exitstatus = 1;
-			print TPL "    (MISSING LICENSE: $licfile)\n";
-		}
-		print TPL "\n";
-		$licnum++;
-	}
-
-	close TPL or die "I/O error on $tplname: $!\n";
-}
-
-#
-# Return non-zero if we expect the crypto for the given
-# third-party license file to be signed.  Else, return zero.
-#
-my $hashes = qr"/(rng|md4|md5|sha1/sha2)/";
-sub signedcrypto {
-	my ($licpath) = @_;
-
-	return 0 if $licpath =~ m#$hashes#;
-	return 1;
-}
-
-#
-# Make file list for each TPL file.
-#
-
-chdir($top) or die "Can't chdir to $top: $!\n";
-$top = getcwd();
-
-my $isclosed = qr"^usr/closed";
-my $iscrypto = qr"(^usr/src/common/crypto)|(^usr/src/lib/pkcs11)";
-
-my @closedlist;
-my @cryptolist;
-
-open(IX, "<$indexfile") or die "Can't open $indexfile: $!\n";
-while (<IX>) {
-	chomp;
-	my $lic = $_;
-	if (! $opt_c && $lic =~ /$isclosed/) {
-		push @closedlist, $lic;
-	}
-	if ($lic =~ /$iscrypto/ && signedcrypto($lic)) {
-		push @cryptolist, $lic;
-	}
-}
-close IX;
-
-#
-# Generate each TPL file.
-#
-
-maketpl("ON-BINARIES", @closedlist);
-maketpl("ON-CRYPTO", @cryptolist);
-
-exit $exitstatus;
--- old/usr/src/tools/scripts/nightly.1	2014-01-26 22:00:01.306006463 -0500
+++ new/usr/src/tools/scripts/nightly.1	2014-01-26 22:00:01.320766404 -0500
@@ -146,10 +146,6 @@
 Suppress the bringover so that the build will start immediately with
 current source code
 .TP
-.B \-o
-Do an "old style" (pre-S10) build using root privileges to set OWNER
-and GROUP from the Makefiles.
-.TP
 .B \-p
 Create packages for regular install
 .TP
@@ -209,9 +205,6 @@
 Do not run protocmp or checkpaths (note: this option is not
 recommended, especially in conjunction with the \-p option)
 .TP
-.B \-W
-Do not report warnings (for freeware gate ONLY)
-.TP
 .B \-w
 Report which proto area objects differ between this and the last build.
 See wsdiff(1) for details. Note that the proto areas used for comparison
@@ -235,14 +228,6 @@
 .TP 10
 .B \-V VERS
 set the build version string to VERS, overriding VERSION
-.TP
-.B \-X
-Copies the proto area and packages from the IHV and IHV-bin gates into the
-nightly proto and package areas.  This is only available on i386.  See
-.B REALMODE ENVIRONMENT VARIABLES
-and
-.B BUILDING THE IHV WORKSPACE
-below.
 
 .LP
 .SH ENVIRONMENT VARIABLES
@@ -278,20 +263,6 @@
 it defaults to $CLONE_WS.
 .RE
 .LP
-.B CLOSED_BRINGOVER_WS
-.RS 5
-A full Mercurial workspace has two repositories: one for open source
-and one for closed source.  If this variable is non-null, 
-.I nightly
-will pull from the repository that it names to get the closed source.
-It defaults to $CLOSED_CLONE_WS.
-.LP
-If $CODEMGR_WS already exists and contains only the open repository,
-.I nightly
-will ignore this variable; you'll need to pull the closed repository
-by hand if you want it.
-.RE
-.LP
 .B CLONE_WS
 .RS 5
 This is the workspace from which
@@ -300,15 +271,6 @@
 often distinct from the parent, particularly if the parent is a gate.
 .RE
 .LP
-.B CLOSED_CLONE_WS
-.RS 5
-This is the default closed-source Mercurial repository that 
-.I nightly
-might pull from (see
-.B CLOSED_BRINGOVER_WS
-for details).
-.RE
-.LP
 .B SRC
 .RS 5
 Root of OS-Net source code, referenced by the Makefiles.  It is
@@ -504,22 +466,8 @@
 tells nightly
 where to find these closed binaries, so that it can add them into the
 build.
-.LP
 .RE
-.B ON_CRYPTO_BINS
-.RS 5
-This is the path to a compressed tarball that contains debug
-cryptographic binaries that have been signed to allow execution
-outside of Sun, e.g., $PARENT_WS/packages/$MACH/on-crypto.$MACH.bz2.
-.I nightly
-will automatically adjust the path for non-debug builds.  This tarball
-is needed if the closed-source tree is not present.  Also, it is
-usually needed when generating OpenSolaris deliverables from a project
-workspace.  This is because most projects do not have access to the
-necessary key and certificate that would let them sign their own
-cryptographic binaries.
 .LP
-.RE
 .B CHECK_PATHS
 .RS 5
 Normally, nightly runs the 'checkpaths' script to check for
@@ -587,41 +535,6 @@
 immedately after POST_NIGHTLY.
 .RE
 .LP
-.SH REALMODE ENVIRONMENT VARIABLES
-.LP
-The following environment variables referenced by
-.I nightly
-are only required when the -X option is used.
-.LP
-.RE
-.B IA32_IHV_WS
-.RS 5
-Reference to the IHV workspace containing IHV driver binaries.
-The IHV workspace must be fully built before starting the ON realmode build.
-.LP
-.RE
-.B IA32_IHV_ROOT
-.RS 5
-Reference to the IHV workspace proto area.
-The IHV workspace must be fully built before starting the ON realmode build.
-.LP
-.RE
-.B IA32_IHV_PKGS
-.RS 5
-Reference to the IHV workspace packages.  If this is empty or the directory
-is non-existent, then nightly will skip copying the packages.
-.LP
-.RE
-.B IA32_IHV_BINARY_PKGS
-.RS 5
-Reference to binary-only IHV packages.  If this is empty or the directory
-is non-existent, then nightly will skip copying the packages.
-.LP
-.RE
-.B SPARC_RM_PKGARCHIVE
-.RS 5
-Destination for sparc realmode package SUNWrmodu.
-Yes, this sparc package really is built on x86.
 .SH FILES
 .LP
 .RS 5
@@ -631,18 +544,6 @@
 If present, nightly executes this file just prior to executing the
 .I env
 file.  
-.SH BUILDING THE IHV WORKSPACE
-.LP
-The IHV workspace can be built with
-.I nightly.
-The recommended options are:
-.LP
-.RS 5
-NIGHTLY_OPTIONS="-pmWN"
-.RE
-.LP
-None of the realmode environment variables needed for ON realmode builds
-are required to build the IHV workspace.
 .SH EXAMPLES
 .LP
 Start with the example file in usr/src/tools/env/developer.sh
--- old/usr/src/tools/scripts/nightly.sh	2014-01-26 22:00:01.778958441 -0500
+++ new/usr/src/tools/scripts/nightly.sh	2014-01-26 22:00:01.792078212 -0500
@@ -46,8 +46,7 @@
 #
 #	For example: LINTDIRS="$SRC/uts n $SRC/stand y $SRC/psm y"
 #
-# OPTHOME and TEAMWARE may be set in the environment to override /opt
-# and /opt/teamware defaults.
+# OPTHOME  may be set in the environment to override /opt
 #
 
 #
@@ -97,10 +96,6 @@
 		set_non_debug_build_flags
 		CODESIGN_USER="$crypto_signer" \
 		    build "non-DEBUG" "$suffix-nd" "-nd" "$MULTI_PROTO"
-		if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \
-		    "$p_FLAG" = "y" ]; then
-			copy_ihv_pkgs non-DEBUG -nd
-		fi
 	else
 		echo "\n==== No non-DEBUG $open_only build ====\n" >> "$LOGFILE"
 	fi
@@ -113,10 +108,6 @@
 		set_debug_build_flags
 		CODESIGN_USER="$crypto_signer" \
 		    build "DEBUG" "$suffix" "" "$MULTI_PROTO"
-		if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \
-		    "$p_FLAG" = "y" ]; then
-			copy_ihv_pkgs DEBUG ""
-		fi
 	else
 		echo "\n==== No DEBUG $open_only build ====\n" >> "$LOGFILE"
 	fi
@@ -156,80 +147,6 @@
 	fi
 }
 
-#
-# usage: filelist DESTDIR PATTERN
-#
-function filelist {
-	DEST=$1
-	PATTERN=$2
-	cd ${DEST}
-}
-
-# function to save off binaries after a full build for later
-# restoration
-function save_binaries {
-	# save off list of binaries
-	echo "\n==== Saving binaries from build at `date` ====\n" | \
-	    tee -a $mail_msg_file >> $LOGFILE
-	rm -f ${BINARCHIVE}
-	cd ${CODEMGR_WS}
-	filelist ${CODEMGR_WS} '^preserve:' >> $LOGFILE
-	filelist ${CODEMGR_WS} '^preserve:' | \
-	    cpio -ocB 2>/dev/null | compress \
-	    > ${BINARCHIVE}
-}
-
-# delete files
-# usage: hybridize_files DESTDIR MAKE_TARGET
-function hybridize_files {
-	DEST=$1
-	MAKETARG=$2
-
-	echo "\n==== Hybridizing files at `date` ====\n" | \
-	    tee -a $mail_msg_file >> $LOGFILE
-	for i in `filelist ${DEST} '^delete:'`
-	do
-		echo "removing ${i}." | tee -a $mail_msg_file >> $LOGFILE
-		rm -rf "${i}"
-	done
-	for i in `filelist ${DEST} '^hybridize:' `
-	do
-		echo "hybridizing ${i}." | tee -a $mail_msg_file >> $LOGFILE
-		rm -f ${i}+
-		sed -e "/^# HYBRID DELETE START/,/^# HYBRID DELETE END/d" \
-		    < ${i} > ${i}+
-		mv ${i}+ ${i}
-	done
-}
-
-# restore binaries into the proper source tree.
-# usage: restore_binaries DESTDIR MAKE_TARGET
-function restore_binaries {
-	DEST=$1
-	MAKETARG=$2
-
-	echo "\n==== Restoring binaries to ${MAKETARG} at `date` ====\n" | \
-	    tee -a $mail_msg_file >> $LOGFILE
-	cd ${DEST}
-	zcat ${BINARCHIVE} | \
-	    cpio -idmucvB 2>/dev/null | tee -a $mail_msg_file >> ${LOGFILE}
-}
-
-# rename files we save binaries of
-# usage: rename_files DESTDIR MAKE_TARGET
-function rename_files {
-	DEST=$1
-	MAKETARG=$2
-	echo "\n==== Renaming source files in ${MAKETARG} at `date` ====\n" | \
-	    tee -a $mail_msg_file >> $LOGFILE
-	for i in `filelist ${DEST} '^rename:'`
-	do
-		echo ${i} | tee -a $mail_msg_file >> ${LOGFILE}
-		rm -f ${i}.export
-		mv ${i} ${i}.export
-	done
-}
-
 # Return library search directive as function of given root.
 function myldlibs {
 	echo "-L$1/lib -L$1/usr/lib"
@@ -277,12 +194,6 @@
 	/bin/time $MAKE -e install 2>&1 | \
 	    tee -a $SRC/${INSTALLOG}.out >> $LOGFILE
 
-	if [[ "$SCM_TYPE" = teamware ]]; then
-		echo "\n==== SCCS Noise ($LABEL) ====\n" >> $mail_msg_file
-		egrep 'sccs(check:| *get)' $SRC/${INSTALLOG}.out >> \
-			$mail_msg_file
-	fi
-
 	echo "\n==== Build errors ($LABEL) ====\n" >> $mail_msg_file
 	egrep ":" $SRC/${INSTALLOG}.out |
 		egrep -e "(^${MAKE}:|[ 	]error[: 	\n])" | \
@@ -300,16 +211,14 @@
 		this_build_ok=n
 	fi
 
-	if [ "$W_FLAG" = "n" ]; then
-		echo "\n==== Build warnings ($LABEL) ====\n" >>$mail_msg_file
-		egrep -i warning: $SRC/${INSTALLOG}.out \
-			| egrep -v '^tic:' \
-			| egrep -v "symbol (\`|')timezone' has differing types:" \
-		        | egrep -v "parameter <PSTAMP> set to" \
-			| egrep -v "Ignoring unknown host" \
-			| egrep -v "redefining segment flags attribute for" \
-			>> $mail_msg_file
-	fi
+	echo "\n==== Build warnings ($LABEL) ====\n" >>$mail_msg_file
+	egrep -i warning: $SRC/${INSTALLOG}.out \
+		| egrep -v '^tic:' \
+		| egrep -v "symbol (\`|')timezone' has differing types:" \
+		| egrep -v "parameter <PSTAMP> set to" \
+		| egrep -v "Ignoring unknown host" \
+		| egrep -v "redefining segment flags attribute for" \
+		>> $mail_msg_file
 
 	echo "\n==== Ended OS-Net source build at `date` ($LABEL) ====\n" \
 		>> $LOGFILE
@@ -317,7 +226,7 @@
 	echo "\n==== Elapsed build time ($LABEL) ====\n" >>$mail_msg_file
 	tail -3  $SRC/${INSTALLOG}.out >>$mail_msg_file
 
-	if [ "$i_FLAG" = "n" -a "$W_FLAG" = "n" ]; then
+	if [ "$i_FLAG" = "n" ]; then
 		rm -f $SRC/${NOISE}.ref
 		if [ -f $SRC/${NOISE}.out ]; then
 			mv $SRC/${NOISE}.out $SRC/${NOISE}.ref
@@ -406,41 +315,30 @@
 	#	Building Packages
 	#
 	if [ "$p_FLAG" = "y" -a "$this_build_ok" = "y" ]; then
-		if [ -d $SRC/pkg -o -d $SRC/pkgdefs ]; then
+		if [ -d $SRC/pkg ]; then
 			echo "\n==== Creating $LABEL packages at `date` ====\n" \
 				>> $LOGFILE
 			echo "Clearing out $PKGARCHIVE ..." >> $LOGFILE
 			rm -rf $PKGARCHIVE >> "$LOGFILE" 2>&1
 			mkdir -p $PKGARCHIVE >> "$LOGFILE" 2>&1
 
-			for d in pkg pkgdefs; do
-				if [ ! -f "$SRC/$d/Makefile" ]; then
-					continue
-				fi
-				rm -f $SRC/$d/${INSTALLOG}.out
-				cd $SRC/$d
-				/bin/time $MAKE -e install 2>&1 | \
-					tee -a $SRC/$d/${INSTALLOG}.out >> $LOGFILE
-			done
+			rm -f $SRC/pkg/${INSTALLOG}.out
+			cd $SRC/pkg
+			/bin/time $MAKE -e install 2>&1 | \
+			    tee -a $SRC/pkg/${INSTALLOG}.out >> $LOGFILE
 
 			echo "\n==== package build errors ($LABEL) ====\n" \
 				>> $mail_msg_file
 
-			for d in pkg pkgdefs; do
-				if [ ! -f "$SRC/$d/Makefile" ]; then
-					continue
-				fi
-
-				egrep "${MAKE}|ERROR|WARNING" $SRC/$d/${INSTALLOG}.out | \
-					grep ':' | \
-					grep -v PSTAMP | \
-					egrep -v "Ignoring unknown host" \
-					>> $mail_msg_file
-			done
+			egrep "${MAKE}|ERROR|WARNING" $SRC/pkg/${INSTALLOG}.out | \
+				grep ':' | \
+				grep -v PSTAMP | \
+				egrep -v "Ignoring unknown host" \
+				>> $mail_msg_file
 		else
 			#
 			# Handle it gracefully if -p was set but there are
-			# neither pkg nor pkgdefs directories.
+			# neither pkg directories.
 			#
 			echo "\n==== No $LABEL packages to build ====\n" \
 				>> $LOGFILE
@@ -536,75 +434,6 @@
 	fi
 }
 
-# Install proto area from IHV build
-
-function copy_ihv_proto {
-
-	echo "\n==== Installing IHV proto area ====\n" \
-		>> $LOGFILE
-	if [ -d "$IA32_IHV_ROOT" ]; then
-		if [ ! -d "$ROOT" ]; then
-			echo "mkdir -p $ROOT" >> $LOGFILE
-			mkdir -p $ROOT
-		fi
-		echo "copying $IA32_IHV_ROOT to $ROOT\n" >> $LOGFILE
-		cd $IA32_IHV_ROOT
-		tar cf - . | (cd $ROOT; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
-	else
-		echo "$IA32_IHV_ROOT: not found" >> $LOGFILE
-	fi
-
-	if [ "$MULTI_PROTO" = yes ]; then
-		if [ ! -d "$ROOT-nd" ]; then
-			echo "mkdir -p $ROOT-nd" >> $LOGFILE
-			mkdir -p $ROOT-nd
-		fi
-		# If there's a non-DEBUG version of the IHV proto area,
-		# copy it, but copy something if there's not.
-		if [ -d "$IA32_IHV_ROOT-nd" ]; then
-			echo "copying $IA32_IHV_ROOT-nd to $ROOT-nd\n" >> $LOGFILE
-			cd $IA32_IHV_ROOT-nd
-		elif [ -d "$IA32_IHV_ROOT" ]; then
-			echo "copying $IA32_IHV_ROOT to $ROOT-nd\n" >> $LOGFILE
-			cd $IA32_IHV_ROOT
-		else
-			echo "$IA32_IHV_ROOT{-nd,}: not found" >> $LOGFILE
-			return
-		fi
-		tar cf - . | (cd $ROOT-nd; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
-	fi
-}
-
-# Install IHV packages in PKGARCHIVE
-# usage: copy_ihv_pkgs LABEL SUFFIX
-function copy_ihv_pkgs {
-	LABEL=$1
-	SUFFIX=$2
-	# always use non-DEBUG IHV packages
-	IA32_IHV_PKGS=${IA32_IHV_PKGS_ORIG}-nd
-	PKGARCHIVE=${PKGARCHIVE_ORIG}${SUFFIX}
-
-	echo "\n==== Installing IHV packages from $IA32_IHV_PKGS ($LABEL) ====\n" \
-		>> $LOGFILE
-	if [ -d "$IA32_IHV_PKGS" ]; then
-		cd $IA32_IHV_PKGS
-		tar cf - * | \
-		   (cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
-	else
-		echo "$IA32_IHV_PKGS: not found" >> $LOGFILE
-	fi
-
-	echo "\n==== Installing IHV packages from $IA32_IHV_BINARY_PKGS ($LABEL) ====\n" \
-		>> $LOGFILE
-	if [ -d "$IA32_IHV_BINARY_PKGS" ]; then
-		cd $IA32_IHV_BINARY_PKGS
-		tar cf - * | \
-		    (cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
-	else
-		echo "$IA32_IHV_BINARY_PKGS: not found" >> $LOGFILE
-	fi
-}
-
 #
 # Build and install the onbld tools.
 #
@@ -719,9 +548,9 @@
 }
 
 #
-# Verify that the closed tree is present if it needs to be.
+# Verify that the closed bins are present
 #
-function check_closed_tree {
+function check_closed_bins {
 	if [[ ! -d "$ON_CLOSED_BINS" ]]; then
 		echo "ON_CLOSED_BINS must point to the closed binaries tree."
 		build_ok=n
@@ -729,10 +558,6 @@
 	fi
 }
 
-function obsolete_build {
-    	echo "WARNING: Obsolete $1 build requested; request will be ignored"
-}
-
 #
 # wrapper over wsdiff.
 # usage: do_wsdiff LABEL OLDPROTO NEWPROTO
@@ -777,10 +602,6 @@
 	OPTHOME=/opt
 	export OPTHOME
 fi
-if [ "$TEAMWARE" = "" ]; then
-	TEAMWARE=$OPTHOME/teamware
-	export TEAMWARE
-fi
 
 USAGE='Usage: nightly [-in] [+t] [-V VERS ] <env_file>
 
@@ -809,13 +630,11 @@
 	-R	default group of options for building a release (-mp)
 	-U	update proto area in the parent
 	-V VERS set the build version string to VERS
-	-X	copy x86 IHV proto area
 	-f	find unreferenced files
 	-i	do an incremental build (no "make clobber")
 	-l	do "make lint" in $LINTDIRS (default: $SRC y)
 	-m	send mail to $MAILTO at end of build
 	-n      do not do a bringover
-	-o	build using root privileges to set OWNER/GROUP (old style)
 	-p	create packages
 	-r	check ELF runtime attributes in the proto area
 	-t	build and use the tools in $SRC/tools (default setting)
@@ -823,8 +642,6 @@
 	-u	update proto_list_$MACH and friends in the parent workspace;
 		when used with -f, also build an unrefmaster.out in the parent
 	-w	report on differences between previous and current proto areas
-	-z	compress cpio archives with gzip
-	-W	Do not report warnings (freeware gate ONLY)
 '
 #
 #	A log file will be generated under the name $LOGFILE
@@ -844,20 +661,13 @@
 m_FLAG=n
 N_FLAG=n
 n_FLAG=n
-o_FLAG=n
-P_FLAG=n
 p_FLAG=n
 r_FLAG=n
-T_FLAG=n
 t_FLAG=y
 U_FLAG=n
 u_FLAG=n
 V_FLAG=n
-W_FLAG=n
 w_FLAG=n
-X_FLAG=n
-#
-XMOD_OPT=
 #
 build_ok=y
 
@@ -1010,20 +820,13 @@
 fi
 
 #
-# If CLOSED_BRINGOVER_WS was not specified, let it default to CLOSED_CLONE_WS
-#
-if [ "$CLOSED_BRINGOVER_WS" = "" ]; then
-	CLOSED_BRINGOVER_WS=$CLOSED_CLONE_WS
-fi
-
-#
 # If BRINGOVER_FILES was not specified, default to usr
 #
 if [ "$BRINGOVER_FILES" = "" ]; then
 	BRINGOVER_FILES="usr"
 fi
 
-check_closed_tree
+check_closed_bins
 
 #
 # Note: changes to the option letters here should also be applied to the
@@ -1031,7 +834,7 @@
 #
 NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-}
 OPTIND=1
-while getopts +ABCDdFfGIilMmNnoPpRrTtUuWwXxz FLAG $NIGHTLY_OPTIONS
+while getopts +ABCDdFfGIilMmNnpRrtUuw FLAG $NIGHTLY_OPTIONS
 do
 	case $FLAG in
 	  A )	A_FLAG=y
@@ -1064,10 +867,6 @@
 		;;
 	  n )	n_FLAG=y
 		;;
-	  o )	o_FLAG=y
-		;;
-	  P )	P_FLAG=y
-		;; # obsolete
 	  p )	p_FLAG=y
 		;;
 	  R )	m_FLAG=y
@@ -1075,8 +874,6 @@
 		;;
 	  r )	r_FLAG=y
 		;;
-	  T )	T_FLAG=y
-		;; # obsolete
 	 +t )	t_FLAG=n
 		;;
 	  U )   if [ -z "${PARENT_ROOT}" ]; then
@@ -1092,19 +889,8 @@
 		;;
 	  u )	u_FLAG=y
 		;;
-	  W )	W_FLAG=y
-		;;
-
 	  w )	w_FLAG=y
 		;;
-	  X )	# now that we no longer need realmode builds, just
-		# copy IHV packages.  only meaningful on x86.
-		if [ "$MACH" = "i386" ]; then
-			X_FLAG=y
-		fi
-		;;
-	  x )	XMOD_OPT="-x"
-		;;
 	 \? )	echo "$USAGE"
 		exit 1
 		;;
@@ -1112,11 +898,6 @@
 done
 
 if [ $ISUSER -ne 0 ]; then
-	if [ "$o_FLAG" = "y" ]; then
-		echo "Old-style build requires root permission."
-		exit 1
-	fi
-
 	# Set default value for STAFFER, if needed.
 	if [ -z "$STAFFER" -o "$STAFFER" = "nobody" ]; then
 		STAFFER=`/usr/xpg4/bin/id -un`
@@ -1130,7 +911,7 @@
 fi
 
 PATH="$OPTHOME/onbld/bin:$OPTHOME/onbld/bin/${MACH}:/usr/ccs/bin"
-PATH="$PATH:$OPTHOME/SUNWspro/bin:$TEAMWARE/bin:/usr/bin:/usr/sbin:/usr/ucb"
+PATH="$PATH:$OPTHOME/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/ucb"
 PATH="$PATH:/usr/openwin/bin:/usr/sfw/bin:/opt/sfw/bin:."
 export PATH
 
@@ -1138,17 +919,7 @@
 relsrcdirs="."
 abssrcdirs="$SRC"
 
-unset CH
-if [ "$o_FLAG" = "y" ]; then
-# root invoked old-style build -- make sure it works as it always has
-# by exporting 'CH'.  The current Makefile.master doesn't use this, but
-# the old ones still do.
-	PROTOCMPTERSE="protocmp.terse"
-	CH=
-	export CH
-else
-	PROTOCMPTERSE="protocmp.terse -gu"
-fi
+PROTOCMPTERSE="protocmp.terse -gu"
 POUND_SIGN="#"
 # have we set RELEASE_DATE in our env file?
 if [ -z "$RELEASE_DATE" ]; then
@@ -1159,9 +930,9 @@
 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
 
 # we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process
-# by avoiding repeated shell invocations to evaluate Makefile.master definitions.
-# we export o_FLAG and X_FLAG for use by makebfu, and by usr/src/pkg/Makefile
-export o_FLAG X_FLAG POUND_SIGN RELEASE_DATE DEV_CM
+# by avoiding repeated shell invocations to evaluate Makefile.master
+# definitions.
+export POUND_SIGN RELEASE_DATE DEV_CM
 
 maketype="distributed"
 if [[ -z "$MAKE" ]]; then
@@ -1196,9 +967,8 @@
 	echo "  ${DMAKE_VERSION}"
 	cat <<EOF
 
-This version may not be safe for use.  Either set TEAMWARE to a better
-path or (if you really want to use this version of dmake anyway), add
-the following to your environment to disable this check:
+This version may not be safe for use, if you really want to use this version
+anyway add the following to your environment to disable this check:
 
   CHECK_DMAKE=n
 EOF
@@ -1249,28 +1019,6 @@
 	VERSION=$V_ARG
 fi
 
-#
-# Check for IHV root for copying ihv proto area
-#
-if [ "$X_FLAG" = "y" ]; then
-        if [ "$IA32_IHV_ROOT" = "" ]; then
-		echo "IA32_IHV_ROOT: must be set for copying ihv proto"
-		args_ok=n
-        fi
-        if [ ! -d "$IA32_IHV_ROOT" ]; then
-                echo "$IA32_IHV_ROOT: not found"
-                args_ok=n
-        fi
-        if [ "$IA32_IHV_WS" = "" ]; then
-		echo "IA32_IHV_WS: must be set for copying ihv proto"
-		args_ok=n
-        fi
-        if [ ! -d "$IA32_IHV_WS" ]; then
-                echo "$IA32_IHV_WS: not found"
-                args_ok=n
-        fi
-fi
-
 TMPDIR="/tmp/nightly.tmpdir.$$"
 export TMPDIR
 rm -rf ${TMPDIR}
@@ -1344,7 +1092,6 @@
 	ENVLDLIBS1 ENVLDLIBS2 PARENT_ROOT
 
 PKGARCHIVE_ORIG=$PKGARCHIVE
-IA32_IHV_PKGS_ORIG=$IA32_IHV_PKGS
 
 #
 # Juggle the logs and optionally send mail on completion.
@@ -1577,14 +1324,6 @@
 
 echo "\n==== Nightly argument issues ====\n" | tee -a $mail_msg_file >> $LOGFILE
 
-if [ "$P_FLAG" = "y" ]; then
-	obsolete_build GPROF | tee -a $mail_msg_file >> $LOGFILE
-fi
-
-if [ "$T_FLAG" = "y" ]; then
-	obsolete_build TRACE | tee -a $mail_msg_file >> $LOGFILE
-fi
-
 if [ "$N_FLAG" = "y" ]; then
 	if [ "$p_FLAG" = "y" ]; then
 		cat <<EOF | tee -a $mail_msg_file >> $LOGFILE
@@ -1693,20 +1432,12 @@
 	    | read scm_type junk
 	if [[ -z "$scm_type" || "$scm_type" == unknown ]]; then
 		# Probe BRINGOVER_WS to determine its type
-		if [[ $BRINGOVER_WS == svn*://* ]]; then
-			scm_type="subversion"
-		elif [[ $BRINGOVER_WS == file://* ]] &&
-		    egrep -s "This is a Subversion repository" \
-		    ${BRINGOVER_WS#file://}/README.txt 2> /dev/null; then
-			scm_type="subversion"
-		elif [[ $BRINGOVER_WS == ssh://* ]]; then
+		if [[ $BRINGOVER_WS == ssh://* ]]; then
 			scm_type="mercurial"
 		elif [[ $BRINGOVER_WS == http://* ]] && \
 		    wget -q -O- --save-headers "$BRINGOVER_WS/?cmd=heads" | \
 		    egrep -s "application/mercurial" 2> /dev/null; then
 			scm_type="mercurial"
-		elif svn info $BRINGOVER_WS > /dev/null 2>&1; then
-			scm_type="subversion"
 		else
 			scm_type="none"
 		fi
@@ -1714,7 +1445,7 @@
 
 	# fold both unsupported and unrecognized results into "none"
 	case "$scm_type" in
-	none|subversion|teamware|mercurial)
+	mercurial)
 		;;
 	*)	scm_type=none
 		;;
@@ -1733,7 +1464,7 @@
 	fi
 
 	case "$scm_type" in
-	none|subversion|git|teamware|mercurial)
+	none|git|mercurial)
 		;;
 	*)	scm_type=none
 		;;
@@ -1801,28 +1532,6 @@
 	echo "\n==== No clobber at `date` ====\n" >> $LOGFILE
 fi
 
-type bringover_teamware > /dev/null 2>&1 || function bringover_teamware {
-	# sleep on the parent workspace's lock
-	while egrep -s write $BRINGOVER_WS/Codemgr_wsdata/locks
-	do
-		sleep 120
-	done
-
-	if [[ -z $BRINGOVER ]]; then
-		BRINGOVER=$TEAMWARE/bin/bringover
-	fi
-
-	staffer $BRINGOVER -c "nightly update" -p $BRINGOVER_WS \
-	    -w $CODEMGR_WS $BRINGOVER_FILES < /dev/null 2>&1 ||
-		touch $TMPDIR/bringover_failed
-
-        staffer bringovercheck $CODEMGR_WS >$TMPDIR/bringovercheck.out 2>&1
-	if [ -s $TMPDIR/bringovercheck.out ]; then
-		echo "\n==== POST-BRINGOVER CLEANUP NOISE ====\n"
-		cat $TMPDIR/bringovercheck.out
-	fi
-}
-
 type bringover_mercurial > /dev/null 2>&1 || function bringover_mercurial {
 	typeset -x PATH=$PATH
 
@@ -1941,49 +1650,6 @@
 
 	printf "\nadded the following changesets to open repository:\n"
 	cat $TMPDIR/incoming_open.out
-
-	#
-	# The closed repository could have been newly created, even though
-	# the open one previously existed...
-	#
-	if [ -f $TMPDIR/new_closed ]; then
-		return
-	fi
-
-	if [ -f $TMPDIR/incoming_closed.out ]; then
-		printf "\nadded the following changesets to closed repository:\n"
-		cat $TMPDIR/incoming_closed.out
-	fi
-}
-
-type bringover_subversion > /dev/null 2>&1 || function bringover_subversion {
-	typeset -x PATH=$PATH
-
-	if [[ ! -d $CODEMGR_WS/.svn ]]; then
-		staffer svn checkout $BRINGOVER_WS $CODEMGR_WS ||
-			touch $TMPDIR/bringover_failed
-	else
-		typeset root
-		root=$(staffer svn info $CODEMGR_WS |
-			nawk '/^Repository Root:/ {print $NF}')
-		if [[ $root != $BRINGOVER_WS ]]; then
-			# We fail here because there's no way to update
-			# from a named repo.
-			cat <<-EOF
-			\$BRINGOVER_WS doesn't match repository root:
-			  \$BRINGOVER_WS:  $BRINGOVER_WS
-			  Repository root: $root
-			EOF
-			touch $TMPDIR/bringover_failed
-		else
-			# If a conflict happens, svn still exits 0.
-			staffer svn update $CODEMGR_WS | tee $TMPDIR/pull.out ||
-				touch $TMPDIR/bringover_failed
-			if grep "^C" $TMPDIR/pull.out > /dev/null 2>&1; then
-				touch $TMPDIR/bringover_failed
-			fi
-		fi
-	fi
 }
 
 type bringover_none > /dev/null 2>&1 || function bringover_none {
@@ -2028,7 +1694,7 @@
 
 	run_hook POST_BRINGOVER
 
-	check_closed_tree
+	check_closed_bins
 
 else
 	echo "\n==== No bringover to $CODEMGR_WS ====\n" >> $LOGFILE
@@ -2117,13 +1783,6 @@
 	fi
 fi
 
-#
-# copy ihv proto area in addition to the build itself
-#
-if [ "$X_FLAG" = "y" ]; then
-	copy_ihv_proto
-fi
-
 # timestamp the start of the normal build; the findunref tool uses it.
 touch $SRC/.build.tstamp
 
@@ -2155,13 +1814,6 @@
 
 		E1=
 		f1=
-		if [ -d "$SRC/pkgdefs" ]; then
-			f1="$SRC/pkgdefs/etc/exception_list_$MACH"
-			if [ "$X_FLAG" = "y" ]; then
-				f1="$f1 $IA32_IHV_WS/usr/src/pkgdefs/etc/exception_list_$MACH"
-			fi
-		fi
-
 		for f in $f1; do
 			if [ -f "$f" ]; then
 				E1="$E1 -e $f"
@@ -2179,68 +1831,6 @@
 				E2="$E2 -e $f"
 			fi
 		done
-
-		if [ -f "$REF_PROTO_LIST" ]; then
-			#
-			# For builds that copy the IHV proto area (-X), add the
-			# IHV proto list to the reference list if the reference
-			# was built without -X.
-			#
-			# For builds that don't copy the IHV proto area, add the
-			# IHV proto list to the build's proto list if the
-			# reference was built with -X.
-			#
-			# Use the presence of the first file entry of the cached
-			# IHV proto list in the reference list to determine
-			# whether it was built with -X or not.
-			#
-			IHV_REF_PROTO_LIST=$SRC/pkg/proto_list_ihv_$MACH
-			grepfor=$(nawk '$1 == "f" { print $2; exit }' \
-				$IHV_REF_PROTO_LIST 2> /dev/null)
-			if [ $? = 0 -a -n "$grepfor" ]; then
-				if [ "$X_FLAG" = "y" ]; then
-					grep -w "$grepfor" \
-						$REF_PROTO_LIST > /dev/null
-					if [ ! "$?" = "0" ]; then
-						REF_IHV_PROTO="-d $IHV_REF_PROTO_LIST"
-					fi
-				else
-					grep -w "$grepfor" \
-						$REF_PROTO_LIST > /dev/null
-					if [ "$?" = "0" ]; then
-						IHV_PROTO_LIST="$IHV_REF_PROTO_LIST"
-					fi
-				fi
-			fi
-		fi
-	fi
-
-	if [ "$N_FLAG" != "y" -a -f $SRC/pkgdefs/Makefile ]; then
-		echo "\n==== Impact on SVr4 packages ====\n" >> $mail_msg_file
-		#
-		# Compare the build's proto list with current package
-		# definitions to audit the quality of package
-		# definitions and makefile install targets. Use the
-		# current exception list.
-		#
-		PKGDEFS_LIST=""
-		for d in $abssrcdirs; do
-			if [ -d $d/pkgdefs ]; then
-				PKGDEFS_LIST="$PKGDEFS_LIST -d $d/pkgdefs"
-			fi
-		done
-		if [ "$X_FLAG" = "y" -a \
-		    -d $IA32_IHV_WS/usr/src/pkgdefs ]; then
-			PKGDEFS_LIST="$PKGDEFS_LIST -d $IA32_IHV_WS/usr/src/pkgdefs"
-		fi
-		$PROTOCMPTERSE \
-		    "Files missing from the proto area:" \
-		    "Files missing from packages:" \
-		    "Inconsistencies between pkgdefs and proto area:" \
-		    ${E1} \
-		    ${PKGDEFS_LIST} \
-		    $ATLOG/proto_list_${MACH} \
-		    >> $mail_msg_file
 	fi
 
 	if [ "$N_FLAG" != "y" -a -d $SRC/pkg ]; then
@@ -2264,9 +1854,7 @@
 			"Files that changed between yesterday and today:" \
 			${ELIST} \
 			-d $REF_PROTO_LIST \
-			$REF_IHV_PROTO \
 			$ATLOG/proto_list_${MACH} \
-			$IHV_PROTO_LIST \
 			>> $mail_msg_file
 	fi
 fi
@@ -2502,11 +2090,6 @@
 	diff $SRC/unref-${MACH}.ref $SRC/unref-${MACH}.out >>$mail_msg_file
 fi
 
-#
-# Generate the OpenSolaris deliverables if requested.  Some of these
-# steps need to come after findunref and are commented below.
-#
-
 # Verify that the usual lists of files, such as exception lists,
 # contain only valid references to files.  If the build has failed,
 # then don't check the proto area.
@@ -2523,24 +2106,13 @@
 	echo "\n==== Impact on file permissions ====\n" \
 		>> $mail_msg_file
 
-	abspkgdefs=
 	abspkg=
 	for d in $abssrcdirs; do
-		if [ -d "$d/pkgdefs" ]; then
-			abspkgdefs="$abspkgdefs $d"
-		fi
 		if [ -d "$d/pkg" ]; then
 			abspkg="$abspkg $d"
 		fi
 	done
 
-	if [ -n "$abspkgdefs" ]; then
-		pmodes -qvdP \
-		    `find $abspkgdefs -name pkginfo.tmpl -print -o \
-		    -name .del\* -prune | sed -e 's:/pkginfo.tmpl$::' | \
-		    sort -u` >> $mail_msg_file
-	fi
-
 	if [ -n "$abspkg" ]; then
 		for d in "$abspkg"; do
 			( cd $d/pkg ; $MAKE -e pmodes ) >> $mail_msg_file
--- old/usr/src/tools/scripts/wx2hg.1	2014-01-26 22:00:02.444949421 -0500
+++ /dev/null	2014-01-26 22:00:02.000000000 -0500
@@ -1,238 +0,0 @@
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License (the "License").
-.\" You may not use this file except in compliance with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
-.\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
-.\"
-.\" CDDL HEADER END
-.\"
-.\" Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-.\" Use is subject to license terms.
-.\"
-.\" ident	"%Z%%M%	%I%	%E% SMI"
-.TH wx2hg 1 "29 Jul 2008"
-.SH NAME
-.I wx2hg
-\- Convert a wx-managed workspace to Mercurial.
-.SH SYNOPSIS
-.B wx2hg
-[ \fB\-u\fR ]
-[ \fB\-r\fR \fIhg_rev\fR ]
-[ \fB\-t\fR \fIhg_ws\fR ]
-\fItw_ws\fR
-.LP
-.SH DESCRIPTION
-.I wx2hg
-takes a Teamware workspace
-and converts it to a workspace that is managed by
-Mercurial.  It is aimed at OS/Net projects that were started under
-Teamware but which expect to deliver into a
-Mercurial gate.  As such, it assumes the following usage model:
-.LP
-Suppose that you have a project workspace, which has some changes
-relative to its parent workspace.
-.I wx2hg
-checks for the existence of, and creates if necessary,
-a Mercurial workspace called
-\fItw_ws\fR\-hg that is in sync with the Mercurial twin
-of its parent workspace.
-Then it applies the changes from your project workspace to this Mercurial
-workspace.
-You can review the changes
-before committing them.  Note that any
-intermediate deltas will be lost; note also that your child workspace
-must be up-to-date with respect to the parent.
-.LP
-.I wx2hg
-uses 
-.BR wx (1)
-to determine which files have been renamed or altered.  If your
-workspace is not already controlled by
-.BR wx (1),
-.I wx2hg
-puts it under
-.BR wx (1)
-control.  If your workspace is already under 
-.BR wx (1)
-control,
-.I wx2hg
-runs 
-.BR wx update
-to ensure that the
-.BR wx (1)
-state files are up-to-date.  This step can take a while.  If you are
-sure that 
-.BR wx (1)
-already has the right list of files, you can skip this step by using
-the
-.B \-u
-option.
-.LP
-You can use the
-.B \-t
-.I hg_ws
-option to name the Mercurial target workspace, rather than having
-.I wx2hg
-default to using \fItw_ws\fR\-hg.  
-.LP
-.I wx2hg
-checks the Mercurial workspace against the Teamware parent.  If it
-finds a discrepancy, it assumes that the Teamware parent corresponds
-to an older revision within the mercurial workspace.  You must rerun 
-.I wx2hg 
-and use the
-.B \-r 
-.I hg_rev
-option to specify that revision.  (See below for more discussion on
-recovery from errors.)
-With the 
-.B \-r
-option,
-.I wx2hg
-updates the Mercurial working directory
-to that older revision and then applies your
-changes.  You will need to use mercurial to merge your changes with
-later changes in the workspace before pushing your changes to a parent
-workspace.
-.LP
-.I wx2hg
-exits with an error if it detects a rename conflict.
-.LP
-If 
-.I wx2hg
-exits with an error, you can discard any changes made prior to the
-error, then use the
-.B \-t
-option to reuse the workspace.  To discard changes made prior to the
-error, use this command:
-.LP
-.RS 5
-hg \-R \fIhg_ws\fR update \-C
-.RE
-.LP
-.SH OPTIONS
-.IP "\fB\-r\fR \fIhg_rev\fR" 10
-Use
-.I hg_rev
-as the Mercurial changeset that corresponds to the point
-in time at which your teamware workspace was synchronized with its parent.
-If you don't have any nested repositories, you may specify
-.I hg_rev
-as a changeset id or a Mercurial tag.  If you have nested repositories,
-like usr/closed in ON, then you should specify a Mercurial tag common to
-both (or all) repositories.  This tag may be local (ie a local tag that you
-create yourself using \fIhg tag -l\fR) or version controlled (ie a tag
-that the gatekeepers created, such as \fIonnv_96\fR).
-If you use
-.I hg_rev
-without specifying \fIhg_ws\fR, then the tags must resolve correctly
-in the Mercurial twin(s) of your Teamware parent.
-If you use
-.I hg_rev
-in conjunction with \fIhg_ws\fR, then the tags must resolve correctly
-in your existing Mercurial repositories.
-.IP "\fB\-t\fR \fIhg_ws\fR" 10
-Use an existing Mercurial workspace as the target, rather than
-creating one.  If you use an existing workspace, you must also create any
-nested repositories (like usr/closed) before running wx2hg.
-.IP
-If omitted, 
-.I tw_ws
-must be a child of /ws/onnv-clone, and
-.I wx2hg
-will create the Mercurial workspace \fItw_ws\fR\-hg.
-.IP \fB\-u\fR
-Skip the "wx update" step if the workspace is already under
-.BR wx (1)
-control.
-.LP
-.SH SEE ALSO
-.BR hg "(1), " wx (1)
-.LP
-.SH DIAGNOSTICS
-.LP
-wx2hg: 
-.I tw_parent
-is not recognized as a gate; please provide a Mercurial workspace (-t
-hg_ws) that matches it.
-.LP
-.RS 5
-This means that 
-.I tw_parent
-does not contain a Codemgr_wsdata/hg_twin file pointing at its mercurial
-equivalent.  If necessary, you may reparent
-.I tw_ws
-to a workspace that specifies an hg_twin
-and rerun 
-.IR wx2hg .
-Otherwise, you must use the
-.B \-t
-option to specify an existing
-Mercurial workspace whose contents matches the parent of
-.IR tw_ws .
-.RE
-.LP
-teamware parent ... doesn't match its mercurial twin
-.LP
-.RS 5
-.I wx2hg
-detected an unexpected difference between the Teamware parent and the
-Mercurial workspace.  This likely means that the parent of your
-teamware workspace is not in synch with the mercurial parent.  In that
-case, ask the maintainer of the parent workspace to resynchronize
-them, or use
-.B \-r
-to specify a revision of the Mercurial workspace that matches the
-Teamware parent.
-.RE
-.LP
-wx2hg will only migrate checked-in files; please check in these files with wx
-ci and try again
-.LP
-.RS 5
-In order to minimize spurious conflicts due to SCCS keyword
-substitution, 
-.I wx2hg
-only migrates changes in checked-in files.  Please check in your
-changes with 
-.I wx delget
-prior to migration.
-.RE
-.SH FILES
-.IP \fItw_ws\fR/Codemgr_wsdata/hg_twin
-is read by wx2hg from the parent workspace of the teamware workspace
-being converted in order to find the mercurial equivalent of that
-workspace.  The first line of hg_twin contains the URL of the
-mercurial equivalent workspace.  Since a single teamware workspace may
-be split into multiple mercurial repositories, the 2nd and subsequent
-lines of the file contain the relative paths within the first
-repository of additional child repositories.  The maintainer of a gate
-being converted is responsible for creating this file to allow
-teamware children of the teamware gate to be converted into mercurial
-children of the mercurial gate.
-.RE
-.SH BUGS
-If a file is both renamed and updated, doing an "hg diff" in the
-Mercurial workspace will
-show the entire (new) contents of the file, not just the updates.
-.LP
-There is no attempt at automated recovery in case of a rename
-conflict.
-.LP
-If a Teamware workspace is split into multiple Mercurial twin
-workspaces (as is the case with the ON closed source tree), then
-Teamware filemv commands that result in moving across repository
-boundaries will result in file removal from the source repository and
-file addition to the destination repository.  So a webrev will not
-show changes to such files, merely entire old and new contents.
