--- old/usr/src/Makefile.master	2018-01-25 19:54:33.906953651 +0000
+++ new/usr/src/Makefile.master	2018-01-25 19:54:33.936645102 +0000
@@ -134,9 +134,16 @@
 MBH_PATCH=	$(ONBLD_TOOLS)/bin/$(MACH)/mbh_patch
 BTXLD=		$(ONBLD_TOOLS)/bin/$(MACH)/btxld
 VTFONTCVT=	$(ONBLD_TOOLS)/bin/$(MACH)/vtfontcvt
+# echo(1) and true(1) are specified without absolute paths, so that the shell
+# spawned by make(1) may use the built-in versions.  This is minimally
+# problematic, as the shell spawned by make(1) is known and under control, the
+# only risk being if the shell falls back to $PATH.
+#
+# We specifically want an echo(1) that does interpolation of escape sequences,
+# which ksh93, /bin/sh, and bash will all provide.
 ECHO=		echo
-INS=		install
 TRUE=		true
+INS=		$(ONBLD_TOOLS)/bin/$(MACH)/install
 SYMLINK=	/usr/bin/ln -s
 LN=		/usr/bin/ln
 CHMOD=		/usr/bin/chmod
--- old/usr/src/pkg/manifests/developer-build-onbld.mf	2018-01-25 19:54:34.922754563 +0000
+++ new/usr/src/pkg/manifests/developer-build-onbld.mf	2018-01-25 19:54:34.951757018 +0000
@@ -47,7 +47,6 @@
 dir path=opt/onbld/env
 dir path=opt/onbld/etc
 dir path=opt/onbld/etc/exception_lists
-dir path=opt/onbld/gk
 dir path=opt/onbld/lib
 dir path=opt/onbld/lib/$(ARCH)
 dir path=opt/onbld/lib/$(ARCH)/64
@@ -82,7 +81,6 @@
 $(i386_ONLY)file path=opt/onbld/bin/$(ARCH)/mbh_patch mode=0555
 file path=opt/onbld/bin/$(ARCH)/ndrgen mode=0555
 file path=opt/onbld/bin/$(ARCH)/ndrgen1 mode=0555
-file path=opt/onbld/bin/$(ARCH)/pmodes mode=0555
 file path=opt/onbld/bin/$(ARCH)/protocmp mode=0555
 file path=opt/onbld/bin/$(ARCH)/protolist mode=0555
 $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/stabs mode=0555
@@ -97,7 +95,6 @@
 file path=opt/onbld/bin/cddlchk mode=0555
 file path=opt/onbld/bin/check_rtime mode=0555
 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/cstyle mode=0555
 file path=opt/onbld/bin/elfcmp mode=0555
@@ -105,7 +102,6 @@
 file path=opt/onbld/bin/findcrypto mode=0555
 file path=opt/onbld/bin/flg.flp mode=0555
 file path=opt/onbld/bin/genoffsets mode=0555
-file path=opt/onbld/bin/get_depend_info mode=0555
 file path=opt/onbld/bin/git-pbchk mode=0555
 file path=opt/onbld/bin/hdrchk mode=0555
 file path=opt/onbld/bin/hg-active mode=0555
@@ -113,7 +109,6 @@
 file path=opt/onbld/bin/interface_check mode=0555
 file path=opt/onbld/bin/interface_cmp mode=0555
 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/nightly mode=0555
 file path=opt/onbld/bin/onu mode=0555
@@ -132,17 +127,12 @@
 file path=opt/onbld/bin/xref mode=0555
 file path=opt/onbld/bin/xref.mk
 file path=opt/onbld/env/illumos
-file path=opt/onbld/etc/SampleLinks
-file path=opt/onbld/etc/SamplePkgLinks
 file path=opt/onbld/etc/exception_lists/check_rtime
 file path=opt/onbld/etc/exception_lists/interface_check
 file path=opt/onbld/etc/exception_lists/interface_cmp
 file path=opt/onbld/etc/hgstyle
 file path=opt/onbld/etc/its.conf
 file path=opt/onbld/etc/its.reg
-file path=opt/onbld/gk/.cshrc
-file path=opt/onbld/gk/.login
-file path=opt/onbld/gk/gen_make.machines mode=0755
 file path=opt/onbld/lib/$(ARCH)/64/libmakestate.so.1
 file path=opt/onbld/lib/$(ARCH)/libdwarf.so.1
 file path=opt/onbld/lib/$(ARCH)/libmakestate.so.1
@@ -238,7 +228,6 @@
 file path=opt/onbld/man/man1onbld/find_elf.1onbld
 file path=opt/onbld/man/man1onbld/findunref.1onbld
 file path=opt/onbld/man/man1onbld/flg.flp.1onbld
-file path=opt/onbld/man/man1onbld/get_depend_info.1onbld
 file path=opt/onbld/man/man1onbld/git-pbchk.1onbld
 file path=opt/onbld/man/man1onbld/hdrchk.1onbld
 file path=opt/onbld/man/man1onbld/hgsetup.1onbld
@@ -246,7 +235,6 @@
 file path=opt/onbld/man/man1onbld/interface_cmp.1onbld
 file path=opt/onbld/man/man1onbld/jstyle.1onbld
 file path=opt/onbld/man/man1onbld/lintdump.1onbld
-file path=opt/onbld/man/man1onbld/make_pkg_db.1onbld
 file path=opt/onbld/man/man1onbld/mapfilechk.1onbld
 file path=opt/onbld/man/man1onbld/ndrgen.1onbld
 file path=opt/onbld/man/man1onbld/nightly.1onbld
--- old/usr/src/tools/Makefile	2018-01-25 19:54:35.782210929 +0000
+++ new/usr/src/tools/Makefile	2018-01-25 19:54:35.811592323 +0000
@@ -39,16 +39,13 @@
 	codesign \
 	cscope-fast \
 	ctf \
-	depcheck \
 	env \
 	findunref \
-	gk \
 	install.bin \
 	lintdump \
 	make \
 	ndrgen \
 	onbld \
-	pmodes \
 	protocmp \
 	protolist \
 	scripts
@@ -109,7 +106,6 @@
 	$(ROOTONBLD)/etc \
 	$(ROOTONBLD)/etc/exception_lists \
 	$(ROOTONBLD)/share \
-	$(ROOTONBLD)/gk \
 	$(ROOTONBLD)/man \
 	$(ROOTONBLD)/man/man1onbld
 
--- old/usr/src/tools/Makefile.tools	2018-01-25 19:54:36.614095290 +0000
+++ new/usr/src/tools/Makefile.tools	2018-01-25 19:54:36.643488782 +0000
@@ -40,7 +40,6 @@
 ROOTONBLDLIBPERL=	$(ROOTONBLD)/lib/perl
 ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
 ROOTONBLDENV=		$(ROOTONBLD)/env
-ROOTONBLDGK=		$(ROOTONBLD)/gk
 ROOTONBLDMAN=		$(ROOTONBLD)/man
 ROOTONBLDMAN1ONBLD=	$(ROOTONBLD)/man/man1onbld
 ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
@@ -61,8 +60,6 @@
 ROOTONBLDMACHBINARIES=	$(BINARIES:%=$(ROOTONBLDBINMACH)/%)
 ROOTONBLDETCFILES=	$(ETCFILES:%=$(ROOTONBLDETC)/%)
 ROOTONBLDENVFILES=	$(ENVFILES:%=$(ROOTONBLDENV)/%)
-ROOTONBLDGKFILES=	$(GKFILES:%=$(ROOTONBLDGK)/.%)
-ROOTONBLDGKSHFILES=	$(SHFILES:%=$(ROOTONBLDGK)/%)
 ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
 ROOTONBLDPERLMODULES=	$(PERLMODULES:%=$(ROOTONBLDLIBPERL)/%)
 ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
@@ -96,9 +93,3 @@
 
 $(ROOTONBLDENV)/%: %
 	$(INS.file)
-
-$(ROOTONBLDGK)/.%: %
-	$(INS.rename)
-
-$(ROOTONBLDGK)/%: %
-	$(INS.file)
--- old/usr/src/tools/README.tools	2018-01-25 19:54:37.441031959 +0000
+++ new/usr/src/tools/README.tools	2018-01-25 19:54:37.470465983 +0000
@@ -25,13 +25,7 @@
 This directory contains the tools used to do a full build of the
 OS/Net workspace.  They usually live in the /opt/onbld directory on build
 machines. From here, 'make install' will build and install the tools
-in $ROOT/opt/onbld. If you like, 'make pkg' will build the SUNWonbld
-package in $(PKGARCHIVE). Installing that package will populate the
-/opt/onbld directory, and create a root account for building called 'gk',
-which uses csh and has a home directory of /opt/onbld/gk. You can
-use this account to do full builds with 'nightly'. You don't have to,
-but the 'gk' account has the path setup properly, has a .make.machines
-file for dmake, and has a .login that sets up for dmake.
+in $ROOT/opt/onbld.
 
 Layout of /opt/onbld
 --------------------
@@ -40,9 +34,6 @@
 	contains Solaris ABI database (ABI_*.db) and exceptions
 	for ABI Auditing tool (interface_check, interface_cmp).
 
-/opt/onbld/gk
-	gk account's home directory.
-
 /opt/onbld/bin
 	basic bin directory - contains scripts.
 
@@ -101,11 +92,6 @@
 	entries, which help detect changes in software dependencies and makes
 	sure objects don't have any strange runpaths like /opt/SUNWspro/lib.
 
-checkproto
-	Runs protocmp and protolist on a workspace (or uses the environment
-	variable CODEMGR_WS to determine the workspace). Checks the proto area
-	against the packages.
-
 codereview
 	Given two filenames, creates a postscript file with the file 
 	differences highlighted.
@@ -142,14 +128,6 @@
 ctfmerge
 	Merge the CTF data from one or more object files.
 
-depcheck
-	A tool to try an assess the dependencies of executables.  This tool 
-	is not a definitive dependency check, but it does use "strings" and 
-	"ldd" to gather as much information as it can.  The dependency check
-	tool can handle filenames and pkgnames.  Before using the dependency
-	checker you must build a database which reflects the properties and
-	files in your system.
-
 elfcmp
 	Compares two ELF modules (e.g. .o files, executables) section by
 	section.  Useful for determining whether "trivial" changes -
@@ -226,10 +204,6 @@
 	env/developer and env/gatekeeper for sample, hopefully well-commented
 	env files.
 
-pmodes
-	enforces proper file ownership and permissions in pkgmap and package
-	prototype* files.  converts files if necessary
-
 protocmp
 	compares proto lists and the package definitions. Used by nightly
 	to determine if the proto area matches the packages, and to detect
@@ -279,8 +253,7 @@
    edit the file and tailor it to your workspace. Remember that this file
    is a shell script, so it can do more than set environment variables.
 
-2. Login as 'gk' (or root, but your PATH and .make.machines for dmake will
-   not be right). Run 'nightly' and give it your environment file as an
+2. Run 'nightly' and give it your environment file as an
    option. 'nightly' will first look for your environment file in
    /opt/onbld/env, and if it's not there then it will look for it as an
    absolute or relative path. Some people put their environment files in
--- old/usr/src/tools/depcheck/DependencyCheck.txt	2018-01-25 19:54:38.303337798 +0000
+++ /dev/null	2018-01-25 19:54:38.000000000 +0000
@@ -1,129 +0,0 @@
-
-CDDL HEADER START
-
-The contents of this file are subject to the terms of the
-Common Development and Distribution License, Version 1.0 only
-(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 2000 Sun Microsystems, Inc.  All rights reserved.
-Use is subject to license terms.
-
-ident	"%Z%%M%	%I%	%E% SMI"
-
-What does this tool do for you?
-
-This tool statically analyzes executable files and tries to figure out
-dependencies on libraries and other executable files.  It is important to
-recognize that the output of this tool may not be the definitive dependency
-list, but the output should give you pointers on possible dependencies.
-
-For more information on how this tool works, see "How does this tool work?"
-below.
-
-
-
-This set of tools contains 7 files:
-
-	1. DependencyCheck.txt - the file you are currently reading
-	2. make_pkg_db - generate database to reflect the software installed
-	3. SampleLinks - sample link resolution file for
-		/var/sadm/install/contents(see notes on make_pkg_db)
-	4. SamplePkgLinks - sample link resolution file for
-		a package pool (see notes on make_pkg_db)
-	5. get_depend_info - analyze executables, requires database files
-	6. make_pkg_db.txt - text formatted man page
-	7. get_depend_info.txt - text formatted man page
-
-
-
-
-How to use this tool:
-
-	a. run make_pkg_db with the -dbdir argument
-	b. read the README notes on make_pkg_db and decide if you
-	   want to resolve the symbolic links
-	c. run the get_depend_info tool and specify the directory with
-	   the package database files
-
-
-
-How does this tool work?
-
-At a high level, this tool uses /usr/bin/ldd and /usr/bin/strings to figure
-out what an executable file depends upon.  Since this is a static analysis
-there is no way to know if the dependencies identified will actually be
-executed.
-
-The strings command will not be run on binaries if the user specifies the
--cons option for get_depend_info.
-
-This tool cannot resolve variable substitions.  For example if a shell script
-set "$MYPATH" to "/usr/sbin" and then executes "$MYPATH/df", this tool will
-not be able to resolve that the shell script will execute "/usr/sbin/df".
-
-The only way to conclusively know all the dependencies is to do a runtime
-analysis. Furthermore, to get the complete set of dependencies, you would need
-to run all permutations of the executable being analyzed.  Clearly a definitive
-dependency check would be a tremendous amount of work and outside the scope
-of this tool.
-
-This tool divides executables into three broad groups - kernel modules,
-binaries and shell scripts.
-
-For all three types of files, all the output is verified against the entries
-in database generated by make_pkg_db.  This technique allows the tool to verify
-that a dependency was part of the Solaris installation and determine which
-package a given dependency came from.
-
-
-
-A.  Dependency Checks on Kernel Modules
-
-Kernel modules are identified by having a "/kernel/" somewhere in their
-path.  If an input is identified as a kernel module, then an ldd is run on
-that module.  If the ldd returns output, then the tool parses that output
-to see if it can find the library in /kernel or in /usr/kernel.  For example,
-if the tool runs on /kernel/drv/mydrv, the ldd will return something like
-"misc/mylib".  The tool will look for "mylib"in /kernel/misc/mylib or
-/usr/kernel/misc/mylib.
-
-If the ldd returns nothing, then a "strings" command is run on the kernel
-module.  Again, the output of the strings is compared against /kernel and
-/usr/kernel to see if there is a match.  This method was designed to catch
-the "_depends_on" string embedded in some kernel modules.
-
-Note, if the ldd succeeds, then a strings will not run on the kernel module.
-
-
-B. Binary files
-
-Binary files have both the ldd and strings command run on them.  The output of
-both programs is parsed and checked against the contents of the database
-generated by make_pkg_db.
-
-If the user specifies the -cons option on get_depend_info, then the strings
-analysis will not be done.  This is a more conservative approach which only
-uses ldd and therefore has realiable output.
-
-
-C. Shell scripts
-
-Shell scripts are parsed to remove comments and break the script into tokens
-of the file.  All the tokens in the file are cross-checked against the database
-generated by make_pkg_db to determine if a dependency exists.
-
-
--- old/usr/src/tools/depcheck/Makefile	2018-01-25 19:54:38.647485418 +0000
+++ /dev/null	2018-01-25 19:54:38.000000000 +0000
@@ -1,54 +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 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-SHFILES= \
-	get_depend_info \
-	make_pkg_db \
-
-ETCFILES= \
-	SampleLinks \
-	SamplePkgLinks
-
-MAN1ONBLDFILES= \
-	get_depend_info.1onbld \
-	make_pkg_db.1onbld
-
-include ../Makefile.tools
-
-$(ROOTONBLDETCFILES) := FILEMODE=	644
-$(ROOTONBLDMAN1ONBLDFILES) := FILEMODE=	644
-
-.KEEP_STATE:
-
-all:	$(SHFILES) $(MAN1ONBLDFILES)
-
-install: all .WAIT $(ROOTONBLDSHFILES) $(ROOTONBLDETCFILES) \
-	$(ROOTONBLDMAN1ONBLDFILES)
-
-clean:
-	$(RM) $(CLEANFILES)
-
-include ../Makefile.targ
-
--- old/usr/src/tools/depcheck/SampleLinks	2018-01-25 19:54:39.036189676 +0000
+++ /dev/null	2018-01-25 19:54:39.000000000 +0000
@@ -1,75 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2000 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# these are additions or replacements to the /var/sadm/install/contents file
-# to make link resolution come out cleanly
-
-#
-# these are provided by the install process and don't show up in contents
-#
-/dev/fd/0 c none 00 00 0000 dummy dummy SUNWcsd SUNWcsd
-/dev/fd/1 c none 00 00 0000 dummy dummy SUNWcsd SUNWcsd
-/dev/fd/2 c none 00 00 0000 dummy dummy SUNWcsd SUNWcsd
-
-#
-# these are missing link targets
-#
-/usr/openwin/lib/openwin-menu-demo f none 0000 dummy dummy 00 00 00 SUNWoldte
-/var/sadm/system/admin/INST_RELEASE f none 0000 dummy dummy 00 00 00 SUNWadmr
-
-#
-# these replace incorrect link relative pathnames
-#
-/usr/lib/libami.so.1=./libami-global.so.1 s none SUNWami
-/usr/bin/java=../java1.2/bin/java s none SUNWj2rt
-/usr/bin/javac=../java1.2/bin/javac s none SUNWj2dev
-/usr/bin/javadoc=../java1.2/bin/javadoc s none SUNWj2dev
-/usr/bin/javah=../java1.2/bin/javah s none SUNWj2dev
-/usr/bin/javald=../java1.2/bin/javald s none SUNWj2dev
-/usr/bin/javap=../java1.2/bin/javap s none SUNWj2dev
-/usr/bin/appletviewer=../java1.2/bin/appletviewer s none SUNWj2dev
-/usr/bin/extcheck=../java1.2/bin/extcheck s none SUNWj2dev
-/usr/bin/jar=../java1.2/bin/jar s none SUNWj2dev
-/usr/bin/jarsigner=../java1.2/bin/jarsigner s none SUNWj2dev
-/usr/bin/jdb=../java1.2/bin/jdb s none SUNWj2dev
-/usr/bin/native2ascii=../java1.2/bin/native2ascii s none SUNWj2dev
-/usr/bin/oldjava=../java1.2/bin/oldjava s none SUNWj2dev
-/usr/bin/rmic=../java1.2/bin/rmic s none SUNWj2dev
-/usr/bin/serialver=../java1.2/bin/serialver s none SUNWj2dev
-/usr/bin/keytool=../java1.2/bin/keytool s none SUNWj2rt
-/usr/bin/policytool=../java1.2/bin/policytool s none SUNWj2rt
-/usr/bin/rmid=../java1.2/bin/rmid s none SUNWj2rt
-/usr/bin/rmiregistry=../java1.2/bin/rmiregistry s none SUNWj2rt
-/usr/bin/tnameserv=../java1.2/bin/tnameserv s none SUNWj2rt
-/usr/include/Mrm=../dt/share/include/Mrm s none SUNWxwhl
-/usr/include/X11=../openwin/share/include/X11 s none SUNWxwhl
-/usr/include/Xm=../dt/share/include/Xm s none SUNWxwhl
-/usr/include/kcms=../openwin/share/include/kcms s none SUNWxwhl
-/usr/include/xil=../openwin/share/include/xil s none SUNWxwhl
-/usr/include/uil=../dt/share/include/uil s none SUNWxwhl
-
-# this line isn't 100% correct, but it'll do!
-/etc/openwin/etc/devdata/SUNWaccel/monitors/pnp/edidgen.vda f none 0664 root root 6678 46353 938736229 SUNWxwpls
--- old/usr/src/tools/depcheck/SamplePkgLinks	2018-01-25 19:54:39.357857870 +0000
+++ /dev/null	2018-01-25 19:54:39.000000000 +0000
@@ -1,34 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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 2000 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-1 s none usr/openwin/lib/openwin-menu-demo=openwin-menu-demo-fulldemo
-1 s none usr/lib/libami.so.1=libami-global.so.1
-1 s none usr/include/Mrm=../dt/share/include/Mrm
-1 s none usr/include/X11=../openwin/share/include/X11
-1 s none usr/include/Xm=../dt/share/include/Xm
-1 s none usr/include/kcms=../openwin/share/include/kcms
-1 s none usr/include/xil=../openwin/share/include/xil
-1 s none usr/include/uil=../dt/share/include/uil
--- old/usr/src/tools/depcheck/examples.txt	2018-01-25 19:54:39.657270114 +0000
+++ /dev/null	2018-01-25 19:54:39.000000000 +0000
@@ -1,447 +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 2009 Sun Microsystems, Inc.  All rights reserved.
-Use is subject to license terms.
-
-The first step in doing any kind of dependency checking - setting up the
-database.
-
-In this example, I use my SampleLinks file to help resolve some defficiencies
-in the pkg database.  The "OVERRIDDEN" line refer to information that was
-provided by the SampleLinks file.  The "CANNOT FIND" file refers to files
-which are links but cannot be resolved to an executable.  The "README" file
-has a more in-depth explanation.
-======================================================================
-
-
-euphoria>./make_pkg_db -dbdir DBM -ifiles SampleLinks
-...initializing the databases
-Creating directory DBM
-...making the FTYPE MODE and PKGS databases
-...opening SampleLinks
-...opening /var/sadm/install/contents
-...OVERRIDDEN: /usr/bin/appletviewer=../java/bin/appletviewer s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/extcheck=../java/bin/extcheck s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/jar=../java/bin/jar s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/jarsigner=../java/bin/jarsigner s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/java=../java/bin/java s none SUNWj2rt.2
-...OVERRIDDEN: /usr/bin/javac=../java/bin/javac s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/javadoc=../java/bin/javadoc s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/javah=../java/bin/javah s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/javald=../java/bin/javald s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/javap=../java/bin/javap s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/jdb=../java/bin/jdb s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/keytool=../java/bin/keytool s none SUNWj2rt.2
-...OVERRIDDEN: /usr/bin/native2ascii=../java/bin/native2ascii s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/oldjava=../java/bin/oldjava s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/policytool=../java/bin/policytool s none SUNWj2rt.2
-...OVERRIDDEN: /usr/bin/rmic=../java/bin/rmic s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/rmid=../java/bin/rmid s none SUNWj2rt.2
-...OVERRIDDEN: /usr/bin/rmiregistry=../java/bin/rmiregistry s none SUNWj2rt.2
-...OVERRIDDEN: /usr/bin/serialver=../java/bin/serialver s none SUNWj2dev.2
-...OVERRIDDEN: /usr/bin/tnameserv=../java/bin/tnameserv s none SUNWj2rt.2
-...OVERRIDDEN: /usr/include/Mrm=../dt/include/Mrm s none SUNWxwhl
-...OVERRIDDEN: /usr/include/X11=../openwin/include/X11 s none SUNWxwhl
-...OVERRIDDEN: /usr/include/Xm=../dt/include/Xm s none SUNWxwhl
-...OVERRIDDEN: /usr/include/kcms=../openwin/include/kcms s none SUNWxwhl
-...OVERRIDDEN: /usr/include/uil=../dt/include/uil s none SUNWxwhl
-...OVERRIDDEN: /usr/include/xil=../openwin/include/xil s none SUNWxwhl
-...making the ABSLINK database
-***CANNOT FIND ABSOLUTE PATH /usr/dt/config/C/bookmarks FOR ENTRY: /usr/dt/config/C/wsmenu/Links/Personal_Bookmarks=../../bookmarks
-***CANNOT FIND ABSOLUTE PATH /usr/dt/config/en_US.UTF-8/bookmarks FOR ENTRY: /usr/dt/config/en_US.UTF-8/wsmenu/Links/Personal_Bookmarks=../../bookmarks
-***CANNOT FIND ABSOLUTE PATH /usr/lib/locale/fr/LC_MESSAGES FOR ENTRY: /usr/lib/locale/fr_CA.ISO8859-1/LC_MESSAGES=../fr/LC_MESSAGES
-...DONE
-
-The default dependency check on /usr/bin/sh.  This analysis uses
-"/usr/bin/stings" and "/usr/bin/ldd" to glean information about 
-file being analysed.
-
-The default format of a dependency is "filename:pkgname".
-=======================================================================
-
-euphoria>./get_depend_info -dbdir DBM /usr/bin/sh   
-
-
-Analyzing /usr/bin/sh:
-/usr/lib/libgen.so.1:SUNWcsl
-/usr/lib/libsecdb.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libcmd.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/bin:SUNWcsr
-/dev/null:SUNWcsd
-/etc/profile:SUNWcsr
-/usr/5bin:SUNWscpu
-/usr/bin/pfexec:SUNWcsu
-
-A conservative analysis of the executable which only yields guaranteed
-dependencies..  This analysis does not use "/usr/bin/strings" and only
-uses "/usr/bin/ldd".
-===================================================================
-
-euphoria>get_depend_info -dbdir DBM -cons /usr/bin/sh
-
-
-Analyzing /usr/bin/sh:
-/usr/lib/libgen.so.1:SUNWcsl
-/usr/lib/libsecdb.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libcmd.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-A pkg level anaysis on the executable.  In this format, only pkg dependencies
-are listed and file dependencies are dropped from the output.
-
-======================================================================
-euphoria>get_depend_info -dbdir DBM -p /usr/bin/ls
-
-
-Analyzing /usr/bin/ls:
-P SUNWcsl       Core Solaris, (Shared Libs)
-The default dependency check on /usr/bin/sh.  This analysis uses
-"/usr/bin/stings" and "/usr/bin/ldd" to glean information about 
-file being analysed.
-
-The default format of a dependency is "filename:pkgname".
-=======================================================================
-
-euphoria>./get_depend_info -dbdir DBM /usr/bin/sh   
-
-
-Analyzing /usr/bin/sh:
-/usr/lib/libgen.so.1:SUNWcsl
-/usr/lib/libsecdb.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libcmd.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/bin:SUNWcsr
-/dev/null:SUNWcsd
-/etc/profile:SUNWcsr
-/usr/5bin:SUNWscpu
-/usr/bin/pfexec:SUNWcsu
-
-This is a dependency check on a pkg.  All the files within the pkg are analysed
-and a report is generated.  Note at the end of the listing is a summarized
-listing of pkg dependencies.
-
-=============================================================================
-euphoria>get_depend_info -dbdir DBM -pkg SUNWnisu    
-
-
-Analyzing /usr:
-Input file is a directory
-
-
-Analyzing /usr/bin:
-Input file is a directory
-
-
-Analyzing /usr/bin/aliasadm:
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/usr/bin/vi:SUNWcsu
-
-
-Analyzing /usr/bin/chkey:
-/usr/lib/librpcsvc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/etc/nsswitch.conf:SUNWcsr
-/etc/publickey:SUNWnisr
-/usr/ccs/bin/make:SUNWsprot
-
-
-Analyzing /usr/bin/getent:
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/bin/ldaplist:
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/bin/newaliases:
-/usr/lib/libresolv.so.2:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/dev/ksyms:SUNWcsd
-/dev/null:SUNWcsd
-/etc/hosts:SUNWcsr
-/etc/mail/sendmail.cf:SUNWsndmr
-/etc/mnttab:SUNWcsr
-/usr/tmp:SUNWcsu
-
-
-Analyzing /usr/bin/ypcat:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/var/yp/nicknames:SUNWnisr
-
-
-Analyzing /usr/bin/ypmatch:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/var/yp/nicknames:SUNWnisr
-
-
-Analyzing /usr/bin/ypwhich:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/var/yp/nicknames:SUNWnisr
-
-
-Analyzing /usr/lib:
-Input file is a directory
-
-
-Analyzing /usr/lib/ldap:
-Input file is a directory
-
-
-Analyzing /usr/lib/ldap/ldap_cachemgr:
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libthread.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/dev/null:SUNWcsd
-
-
-Analyzing /usr/lib/libnisdb.so:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/lib/libnisdb.so.2:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/lib/netsvc:
-Input file is a directory
-
-
-Analyzing /usr/lib/netsvc/nis:
-Input file is a directory
-
-
-Analyzing /usr/lib/netsvc/yp:
-Input file is a directory
-
-
-Analyzing /usr/lib/netsvc/yp/ypbind:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/dev/null:SUNWcsd
-/etc/hosts:SUNWcsr
-/etc/inet/ipnodes:SUNWcsr
-
-
-Analyzing /usr/lib/netsvc/yp/ypstart:
-/dev/null:SUNWcsd
-/usr/bin/ps:SUNWcsu
-/usr/sbin/fnsypd:SUNWfns
-/usr/sbin/makedbm:SUNWcsu
-/var/yp/Makefile:SUNWypr
-/var/yp/updaters:SUNWypr
-
-
-Analyzing /usr/lib/netsvc/yp/ypstop:
-/usr/bin/ps:SUNWcsu
-
-
-Analyzing /usr/lib/netsvc/yp/ypxfr:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/dev/null:SUNWcsd
-
-
-Analyzing /usr/sbin:
-Input file is a directory
-
-
-Analyzing /usr/sbin/gettable:
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/sbin/htable:
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/sbin/ldap_gen_profile:
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/etc/nsswitch.conf:SUNWcsr
-/etc/nsswitch.ldap:SUNWcsr
-
-
-Analyzing /usr/sbin/ldapclient:
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/etc/nsswitch.conf:SUNWcsr
-/etc/nsswitch.ldap:SUNWcsr
-
-
-Analyzing /usr/sbin/newkey:
-/usr/lib/librpcsvc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/usr/lib/libsldap.so.1:SUNWcsl
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libldap.so.4:SUNWcsl
-/usr/lib/libdoor.so.1:SUNWcsl
-/usr/lib/libresolv.so.2:SUNWcsl
-/etc/nsswitch.conf:SUNWcsr
-/etc/publickey:SUNWnisr
-/usr/ccs/bin/make:SUNWsprot
-
-
-Analyzing /usr/sbin/rpc.rexd:
-/usr/lib/libsocket.so.1:SUNWcsl
-/usr/lib/librpcsvc.so.1:SUNWcsl
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libbsm.so.1:SUNWcsl
-/usr/lib/libpam.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-/dev/console:SUNWcsd
-/etc/mnttab:SUNWcsr
-/var/adm/wtmpx:SUNWcsr
-
-
-Analyzing /usr/sbin/ypalias:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/sbin/ypinit:
-/dev/null:SUNWcsd
-/etc/hosts:SUNWcsr
-/etc/inet/ipnodes:SUNWcsr
-/usr/lib/netsvc/yp/ypxfr:SUNWnisu
-
-
-Analyzing /usr/sbin/yppoll:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Analyzing /usr/sbin/ypset:
-/usr/lib/libnsl.so.1:SUNWcsl
-/usr/lib/libdl.so.1:SUNWcsl
-/usr/lib/libc.so.1:SUNWcsl
-/usr/lib/libmp.so.2:SUNWcsl
-
-
-Package dependencies for SUNWnisu:
-P SUNWcsd       Core Solaris Devices
-P SUNWcsl       Core Solaris, (Shared Libs)
-P SUNWcsr       Core Solaris, (Root)
-P SUNWcsu       Core Solaris, (Usr)
-P SUNWfns       Federated Naming System
-P SUNWlibC      Sun Workshop Compilers Bundled libC
-P SUNWlibms     Sun WorkShop Bundled shared libm
-P SUNWnisr      Network Information System, (Root)
-P SUNWnisu      Network Information System, (Usr)
-P SUNWsndmr     Sendmail root
-P SUNWsprot     Solaris Bundled tools
-P SUNWypr       NIS Server for Solaris (root)
--- old/usr/src/tools/depcheck/get_depend_info	2018-01-25 19:54:39.964726296 +0000
+++ /dev/null	2018-01-25 19:54:39.000000000 +0000
@@ -1,552 +0,0 @@
-#!/usr/bin/perl
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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) 2000 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-# ident	"%Z%%M%	%I%	%E% SMI"
-
-#
-# check for perl5 -- we use things unavailable in perl4
-#
-
-die "Sorry, this program requires perl version 5.000 or up. You have $]. Stopping" if $] < 5.000;
-
-$DBM_DIR_CHARACTERIZATION = "directory for the dbm databases";
-
-$Usage =
-"Usage: get_depend_info 
-  -dbdir <$DBM_DIR_CHARACTERIZATION>  [ -s ] [ -cons ] [ -root directory ]
-  [ -f ] [ -p ] [ -pkg SUNWxxx ] [ filename ]
-  [-h for help]\n";
-
-$Help =
-"This program statically analyzes executable files and their
-symbolic links using /usr/bin/ldd and /usr/bin/strings.  It
-can accept filename(s) or packages as the list of files to be
-analyzed.  By default, the program will report the file
-dependencies and which packages those dependencies came from.
-There is one required argument:
-
-        -dbdir  <dir>			the $DBM_DIR_CHARACTERIZATION
-
-The optional argument -h produces this message instead of any processing.
-The optional argument -cons tells the tool to be conservative and not to
-run /usr/bin/strings.
-The optional argument -root allows you to specify a new root (useful for
-doing analysis on build trees).
-The optional argument -pkg allows you to specify a package name.
-The optional argument -f only outputs the filename of the dependencies
-The optional argument -p only outputs the packanames of the dependencies
-
-The optional argument -s ONLY outputs symbolic links for files or packages.
-No ldd or strings analysis is done.
-
-Some Examples:
-get_depend_info -dbdir ./DBM /usr/bin/ls
-get_depend_info -dbdir ./DBM /usr/bin/*
-get_depend_info -dbdir ./DBM -pkg SUNWnisu
-get_depend_info -f -dbdir ./DBM -pkg SUNWnisu
-get_depend_info -s -dbdir ./DBM /usr/bin/*
-get_depend_info -s -dbdir ./DBM -pkg SUNWnisu
-
-
-NOTE: Run make_pkg_db to create the database directory for get_depend_info
-";
-
-#
-# process arguments
-#
-
-@PkgList = "";
-$PackageOnly = false;
-$FileOnly = false;
-$Verbose = true;
-$Silent = false;
-$SymLink = false;
-$NoStrings = false;
-$Root = "";
-
-while (@ARGV) {
-    $arg = shift (@ARGV);
-    if ($arg eq "-h") {
-        print "$Help\n$Usage";
-        exit 0;
-    } elsif ($arg eq "-dbdir") {
-        $DBDir = shift(@ARGV) unless ($ARGV[0] =~ /^-/);
-    } elsif ($arg eq "-s") {
-	$SymLink = true;
-	$Silent = true;
-    } elsif ($arg eq "-p") {
-	$PackageOnly = true;
-	$Verbose = false;
-    } elsif ($arg eq "-f") {
-	$FileOnly = true;
-	$Verbose = false;
-    } elsif ($arg eq "-cons") {
-	$NoStrings = true;
-    } elsif ($arg eq "-pkg") {
-        $PKGName = shift(@ARGV) unless ($ARGV[0] =~ /^-/);
-    } elsif ($arg eq "-root") {
-        $Root = shift(@ARGV) unless ($ARGV[0] =~ /^-/);
-    }else {
-	push(@filelist, $arg);
-    }
-}
-
-if (!$DBDir) {
-    print STDERR "Required argument -dbdir missing. \n$Usage";
-    exit 1;
-}
-
-if ($PKGName) {
-    # For a given pkg definition directory, this subroutine will
-    # go through the proto files and look for executable files.
-    # It will then put all the executable files into @filelist
-    &HandlePackageName($PKGName);
-
-    if ($PackageOnly eq true) {
-        $Silent = true;
-    }
-}
-
-&OpenDBs;
-
-$Silent = true if (($Verbose eq false) && ($PackageOnly eq false)
-			&& ($FileOnly eq false));
-
-foreach $entry (@filelist) {
-
-	print("\n\nAnalyzing $Root$entry:\n") unless ($Silent eq true);
-
-        # make sure file exists
-	if (!(-r $entry)) {
-    		print STDERR "Could not open file $entry\n";
-    		next;
-	}
-
-
-	$file = $FTYPE{$entry};
-	$pkgs = $PKGS{$entry};
-	$abslink = $ABSLINK{$entry};
-
-	if ($file eq "d") {
-		print("Input file is a directory\n") unless ($Silent eq true);
-    		next;
-	}
-
-	# destfile represents the actual file we are interested in!
-	if ($abslink =~ /\w/) {
-		$destfile = $abslink;
-
-		if (($FTYPE{$entry} eq "s") && ($SymLink eq true)) {
-			print("$entry is linked to $destfile:$PKGS{$destfile}\n");
-		}
-	}
-	else {
-		$destfile = $entry;
-	}
-
-	# if the -s flag is set, tell 'em about sym links and go to the next file
-	next if ($SymLink eq true);
-
-	$mode = $MODE{$destfile};
-
-        # Handle the case where the user resets $ROOT
-	$destfile = "$Root$destfile" if ($Root =~ /\w/);
-	$filecmd = `/usr/bin/file $destfile 2>&1`;
-
-	# make sure we are dealing with an executable
-	if (($mode !~ /(.)(.*)7/) && ($mode !~ /(.)(.*)5/) && ($mode !~ /(.)(.*)3/) && ($mode !~ /(.)(.*)1/)){
-		print("Input file is not an executable\n");
-		next;
-	}
-
-        # Kernel modules are handled separately
-	if ($destfile =~ /\/kernel\//) {
-		&HandleKernelMod($destfile, $FTYPE{$entry});
-		&OutputPackageList if (($PackageOnly eq true) && !($PKGName));
-		next;
-	}
-
-	# take care of scripts
-	if (($filecmd =~ /script/) || ($filecmd =~ /text/)) {
-		&HandleScripts($destfile);
-		&OutputPackageList if (($PackageOnly eq true) && !($PKGName));
-		next;
-	}
-
-	# Its not a script, not a kernel module, so its get to be a binary
-	&HandleBinaries($destfile);
-	&OutputPackageList if (($PackageOnly eq true) && !($PKGName));
-}
-
-if (($PKGName) && ($SymLink eq false)) {
-	print ("\n\nPackage dependencies for $PKGName:\n");
-	&OutputPackageList;
-}
-
-&CloseDBs;
-
-#===========================END OF MAIN====================================
-
-sub GetLddInfo {		# return multi-line string of ldd info for File
-local ($FileID, $FileType) = @_;
-
-    $outstring = "* Not a File\n";
-    return ($outstring) if $FileType =~ /[Mlsdc]/;	# ldd results not useful here
-
-    #
-    # use map file to see if this is a file that gives a known bad ldd return
-    #
-
-#    if ($Unsup{$FileID} == 1) {
-#	$outstring = "* unsupported or unknown file type, per map file";
-#	return ($outstring);
-#    }
-#    $err = "";
-#    $string = `/usr/bin/ldd $FileID 2>&1`;
-#    if ($?) {	# if some error (don't just get wait status here)
-#	$errnum = 0 + $!;
-#	$err = "==$?==$errnum==";
-#	if (($err eq "==256==29==") || ($err eq "==256==0==")) {
-#	    $err = "*";			# these are normal ldd returns
-#	} else {
-#	    die "Unexpected ldd return $? $!";
-#	}
-#	$string =~ s/\/usr\/bin\/ldd:[^\0]*://g;	# trim up error line
-#    } elsif ($string =~ s/warning:.*://) {	# other normal ldd returns
-#	$err = "*";
-#    }
-
-    $outstring = "";
-    $string = `/usr/bin/ldd $FileID 2>&1`;
-    # on a non-zero ldd, return nothing
-    return ($outstring) if ($?);
-
-
-    $outstring = "";
-    @infolines = split(/\s*\n\s*/, $string);
-    foreach $line (@infolines) {
-	$line =~ s/^\s+//;			# trim leading ws
-	next unless $line;			# skip if blank
-	@words = split(/\s/, $line);
-	$filename = $words[0];
-	$outstring .= "$filename\n";
-    }
-    return ($outstring);
-}
-
-sub CloseDBs {
-	# close the dbs
-	dbmclose(FTYPE);
-	dbmclose(MODE);
-	dbmclose(PKGS);
-	dbmclose(ABSLINK);
-	dbmclose(PKGNAMES);
-}
-
-sub OpenDBs {
-	# open the databases for read-only
-	dbmopen(%FTYPE, "$DBDir/FTYPE", 0664) ||
-		die"Cannot open dbm db $DBDir/FTYPE\n";
-
-	dbmopen(%MODE, "$DBDir/MODE", 0664) ||
-		die"Cannot open dbm db $DBDir/MODE\n";
-
-	dbmopen(%PKGS, "$DBDir/PKGS", 0664) ||
-		die"Cannot open dbm db $DBDir/PKGS\n";
-
-	dbmopen(%ABSLINK, "$DBDir/ABSLINK", 0664) ||
-		die"Cannot open dbm db $DBDir/ABSLINK \n";
-
-	dbmopen(%PKGNAMES, "$DBDir/PKGNAMES", 0644) ||
-		die"Cannot open dbm db $DBDir/PKGNAMES\n";
-}
-
-sub HandleKernelMod {
-local ($entry, $ftype) = @_;
-
-	# search for the magic right, starting from the right (ie. end of path)
-	$index = rindex($entry, "kernel");
-	# rindex() returns where the "kernel" began, add 6 to get
-	# "{some path}/kernel"
-	$index += 6;
-	# OK, now pull out the absolute path
-	$KernelPath = substr($entry, 0, $index);
-
-	# There are two ways to figure out the dependencies.
-	# First, we check to see if /usr/bin/ldd will tell us.
-	# If ldd fails, then we need to look at the output of /usr/bin/strings
-
-	$LddInfo = "";
-	$LddInfo = &GetLddInfo($entry, $ftype);
-
-	if ($LddInfo =~ /\w/) {
-		@list = "";
-		@list = split(/\n/, $LddInfo);
-		foreach $file (@list) {
-			$found = 0;
-
-			# first, check to see if there is a module relative to
-			# this file
-			if ($FTYPE{"$KernelPath/$file"} =~ /\w/){
-				&Output("$KernelPath/$file");
-				$found++;
-			}
-
-			# Haven't found it yet, check /kernel
-			if (($FTYPE{"/kernel/$file"} =~ /\w/) && ($found == 0)){
-				&Output("/kernel/$file");
-				$found++;
-			}
-
-			# Haven't found it yet, check /usr/kernel
-			if (($FTYPE{"/usr/kernel/$file"} =~ /\w/) && ($found == 0)){
-				&Output("/usr/kernel/$file");
-				$found++;
-			}
-
-			if ($found == 0) {
-				print("Could not resolve $file\n");
-			}
-		}
-		return;
-	}
-
-	# the ldd failed, so now let's look at the string output
-	$string = "";
-	@infolines = "";
-	@outlines = "";
-
-    	$string = `/usr/bin/strings $entry 2>&1`;
-    	@infolines = split(/\s*\n\s*/, $string);
-
-	foreach $line (@infolines) {
-		if ($line =~ /\//){
-			push (@outlines,$line);
-		}
-    	}
-
-	foreach $line (@outlines) {
-		@words = split(/\s/, $line);
-		foreach $word (@words) {
-			$found = 0;
-
-			# first, check to see if there is a module relative to
-			# this file
-			if ($FTYPE{"$KernelPath/$word"} =~ /\w/){
-				&Output("$KernelPath/$word");
-				$found++;
-			}
-
-			# Haven't found it yet, check /kernel
-			if (($FTYPE{"/kernel/$word"} =~ /\w/) && ($found == 0)){
-				&Output("/kernel/$word");
-				$found++;
-			}
-
-			# Haven't found it yet, check /usr/kernel
-			if (($FTYPE{"/usr/kernel/$word"} =~ /\w/) && ($found == 0)){
-				&Output("/usr/kernel/$word");
-				$found++;
-			}
-		}
-	}
-}
-
-sub GetStringsInfo {		# return multi-line string of ldd info for File
-local ($FileID, $FileType) = @_;
-
-    $outstring = "* Not a File\n";
-    return ($outstring) if $FileType =~ /[Mlsdc]/;	# ldd results not useful here
-    return ($outstring) if ($NoStrings eq true);	# we are running in conservative mode
-
-    # use map file to see if this is a file that gives a known bad ldd return
-    if ($Unsup{$FileID} == 1) {
-	$outstring = "* unsupported or unknown file type, per map file";
-	return ($outstring);
-    }
-    $err = "";
-    $string = "";
-    $string = `/usr/bin/strings $FileID 2>&1`;
-
-    $outstring = "";
-    @infolines = "";
-    @outlines = "";
-    @infolines = split(/\s*\n\s*/, $string);
-
-    foreach $line (@infolines) {
-	if (($line =~ /\//) && !($line =~ /%/) && !($line =~ m%/$%)){
-		push (@outlines,$line);
-        }
-    }
-    @outlines = sort(@outlines);
-
-    foreach $word (@outlines) {
-	if ($lastword ne $word) {
-		$outstring .= $word; $outstring .= "\n";
-	}
-	$lastword = $word;
-    }
-    return ($outstring);
-}
-
-sub HandleScripts {
-local ($filename) = @_;
-	open(SCRIPT, $filename);
-
-	undef @output;
-	while (<SCRIPT>) {
-		s/^\s+//;		# trim leading ws
-		s/=/ /g;		# get rid of all =
-		s/\`/ /g;		# get rid of all `
-		next if ($_ =~ /^#/);	# strip out obvious comments
-		next unless $_;		# skip if blank
-
-		$line = $_;
-		@words = split(/\s/, $line);
-		foreach $word (@words) {
-			if (($PKGS{$word} =~ /\w/) && ($FTYPE{$word} ne "d")) {
-				push(@output, $word);
-			}
-		}
-	}
-
-	@output = sort(@output);
-	$count = 0;
-
-	# make sure we don't output dupes
-	foreach $file (@output) {
-		if ($count == 0) {
-			&Output($file);
-		}
-
-		if (($count > 0) && ($output[$count] ne $output[$count-1])) {
-			&Output($file);
-		}
-		$count++;
-	}
-
-	# remember to play nice
-	close(SCRIPT);
-}
-
-sub HandleBinaries {
-local ($filename) = @_;
-	$LddInfo = &GetLddInfo($destfile, $FTYPE{$filename});
-	$StringInfo = &GetStringsInfo($destfile, $FTYPE{$filename});
-
-	# Parse the ldd output.
-	# Libs can be found in /kernel or /usr/lib
-	@list = split(/\n/, $LddInfo);
-	foreach $file (@list) {
-		$found = 0;
-		if ($FTYPE{"/kernel/$file"} =~ /\w/){
-			&Output("/kernel/$file");
-			$found++;
-		}
-
-		if ($FTYPE{"/usr/lib/$file"} =~ /\w/){
-			&Output("/usr/lib/$file");
-			$found++;
-		}
-
-		if ($found == 0) {
-			print("Could not resolve $file\n");
-		}
-	}
-
-	# For the strings output, we parse it to see if we can match it to
-	# any files distributed in a package.
-	@list = split(/\n/, $StringInfo);
-	foreach $file (@list) {
-		if (($FTYPE{$file} =~ /\w/) && ($FTYPE{$file} ne "d")) {
-			&Output($file);
-		}
-	}
-}
-
-sub Output {
-local($filename) = @_;
-	
-        # If they want a package listing, a unique sorted list
-        # will be outputted later.  Here we simply push elements onto
-	# this list.
-	if ($PKGName) {
-		push(@PkgList, "$PKGS{$filename}\n");
-	}
-
-	if ($Verbose eq true) {
-		print("$filename:$PKGS{$filename}\n");
-		return;
-	}
-
-        # If they want a package listing, a unique sorted list
-        # will be outputted later.  Here we simply push elements onto
-	# this list.
-	if ($PackageOnly eq true) {
-		push(@PkgList, "$PKGS{$filename}\n");
-		return;
-	}
-
-	if ($FileOnly eq true) {
-		print("$filename\n");
-		return;
-	}
-}
-
-sub HandlePackageName {
-local($pkg) = @_;
-	$pkgchk = `/usr/sbin/pkgchk -l $pkg | grep Pathname | sed 's/Pathname: //'`;
-
-	@files = split(/\n/, $pkgchk);
-	foreach $file (@files) {
-		push(@filelist, $file);
-	}
-}
-
-sub OutputPackageList {
-local($filename) = @_;
-	# If the user specified a package list, here we sort
-	# the list and make sure we don't output dupes.
-	$lastpkg = "";
-	@outPkgs = sort(@PkgList);
-
-	foreach $pkg (@outPkgs) {
-		$pkg =~ s/\s*$//;   # trim extra space off the end
-
-		# make sure this entry isn't a dupe before
-		# printing it
-		if ($lastpkg ne $pkg) {
-			print("P $pkg\t$PKGNAMES{$pkg}\n");
-		}
-
-		$lastpkg = $pkg;
-	}
-
-	# reset the list for the next entry
-	@PkgList = "";
-}
-
--- old/usr/src/tools/depcheck/get_depend_info.1onbld	2018-01-25 19:54:40.269394242 +0000
+++ /dev/null	2018-01-25 19:54:40.000000000 +0000
@@ -1,200 +0,0 @@
-'\" t
-.\" 
-.\" CDDL HEADER START
-.\" 
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (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) 2005 Sun Microsystems, Inc. All rights reserved.
-.\" Use is subject to license terms.
-.\" 
-.TH GET_DEPEND_INFO 1ONBLD "Nov 2, 2000"
-.SH "NAME"
-get_depend_info \- get dependency information about a package or a file
-.SH "SYNOPSIS"
-.PP
-.nf
-\fBget_depend_info\fR [-\fBcons\fR] \-\fBdbdir\fR \fIdbm_database_pathname\fR
-                [-\fBf\fR | -\fBp\fR] [-\fBh\fR] [-\fBroot\fR \fIroot_pathname\fR]
-                [-\fBs\fR] [-\fBpkg\fR \fISUN_package\fR | \fIfilename\fR \&...]
-.fi
-.SH "DESCRIPTION"
-.PP
-The \fBget_depend_info\fR command prints dependency information about a package,
-a file, or a set of files on the standard output\&.
-.SH "OPTIONS"
-.PP
-The following options are supported:
-.sp
-.ne 2
-\fB-\fBcons\fR\fR
-.in +16n
-Turns on conservative mode, that is, refrains from using
-\fB/usr/bin/strings\fR\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBdbdir\fR\fR
-.in +16n
-Specifies the directory in which the Perl DBM databases generated by
-\fBmake_pkg_db\fR(1ONBLD) are located\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBf\fR\fR
-.in +16n
-Outputs file dependencies only\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBh\fR\fR
-.in +16n
-Displays help\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBp\fR\fR
-.in +16n
-Outputs package dependencies only\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBpkg\fR\fR
-.in +16n
-Specifies a particular package on which you want to run the dependency
-analysis\&. You must specify this option if you specify either a Sun software
-package or a third-party software package that conforms with the Sun package
-format (\fISUN_package\fR)\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBroot\fR\fR
-.in +16n
-Specifies an alternate root\&. You must also use the -\fBpkg\fR option if you
-use this option\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBs\fR\fR
-.in +16n
-Outputs symbolic links for files or packages only\&.
-.sp
-.sp 1
-.in -16n
-.SH "OPERANDS"
-.PP
-The following operands are supported:
-.sp
-.ne 2
-\fB\fIdbm_database_pathname\fR\fR
-.in +24n
-Specifies the path name of the directory in which the Perl DBM databases
-generated by \fBmake_pkg_db\fR are located\&.
-.sp
-.sp 1
-.in -24n
-.sp
-.ne 2
-\fB\fIfilename\fR\fR
-.in +24n
-Specifies the name of a file or files on which you want to run the dependency
-analysis\&.
-.sp
-.sp 1
-.in -24n
-.sp
-.ne 2
-\fB\fIroot_pathname\fR\fR
-.in +24n
-Specifies the path name of an alternate root you want to use\&.
-.sp
-.sp 1
-.in -24n
-.sp
-.ne 2
-\fB\fISUN_package\fR\fR
-.in +24n
-Specifies the name of a particular Sun software package (or any third-party
-software package that conforms with the Sun package format) on which you want
-to run the dependency analysis\&. You must use the -\fBpkg\fR option if you
-specify this operand\&.
-.sp
-.sp 1
-.in -24n
-.PP
-You can specify either a Sun software package or a file name, but not both\&.
-.SH "EXAMPLES"
-.PP
-\fBExample 1:\fR To Get a Dependency Analysis of Two Particular Files
-.PP
-.nf
-% get_depend_info -dbdir MyDir /usr/bin/ls /usr/bin/man
-.fi
-.PP
-\fBExample 2:\fR To Get a Dependency Analysis of Files Using a Wild Card
-.PP
-.nf
-% get_depend_info -dbdir MyDir /usr/sbin/*
-.fi
-.PP
-\fBExample 3:\fR To Get a Dependency Analysis of a Package in Sun Format
-.PP
-.nf
-% get_depend_info -dbdir MyDir -pkg NSCPcom
-% get_depend_info -dbdir MyDir -pkg SUNWnisu
-.fi
-.PP
-\fBExample 4:\fR To Display Help
-.PP
-.nf
-% get_depend_info -h
-.fi
-.SH "ATTRIBUTES"
-.PP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-_
-Availability	SUNWonbld
-CSI	Enabled
-Interface Stability	Evolving
-MT-Level	Unsafe
-.TE
-.sp
-.SH "SEE ALSO"
-.PP
-\fBmake_pkg_db\fR(1ONBLD), \fBattributes\fR(5)
--- old/usr/src/tools/depcheck/make_pkg_db	2018-01-25 19:54:40.605061494 +0000
+++ /dev/null	2018-01-25 19:54:40.000000000 +0000
@@ -1,527 +0,0 @@
-#!/usr/bin/perl
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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) 2000 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-# ident	"%Z%%M%	%I%	%E% SMI"
-
-$PkgDir = "/var/sadm/pkg";	# where to find the pkg directories
-$PROGRAM_NAME = "make_pkg_db";
-$DBM_DIR_CHARACTERIZATION = "directory for the dbm databases";
-$INPUT_FILES_CHARACTERIZATION = "one or more files in /var/sadm/install/contents format";
-$PKGDEFS_DIRECTORY = "package pool directory";
-
-$Usage =
-"Usage: $PROGRAM_NAME 
-  [-ifiles <$INPUT_FILES_CHARACTERIZATION>]
-  [-pkgdef <$PKGDEFS_DIRECTORY>]
-  -dbdir <$DBM_DIR_CHARACTERIZATION> 
-  [-h for help]\n";
-
-$Help =
-"This program initializes a set of dbm databases with information 
-from /var/sadm/install/contents or a user-defined package pool directory.
-There is one required argument:
-
-        -dbdir  <dir>			the $DBM_DIR_CHARACTERIZATION
-
-\nThe optional argument -h produces this message instead of any processing.
-\nThe optional argument -ifiles is used for symbolic link resolution.
-\nThe optional argument -pkgdef creates the databases based upon a package \npool directory instead of /var/sadm/install/contents on the local machine.
-";
-
-
-#
-# check for perl5 -- we use things unavailable in perl4
-#
-
-die "Sorry, this program requires perl version 5.000 or up. You have $]. Stopping" if $] < 5.000;
-
-#
-# process arguments
-#
-
-$PKGDefs = "";
-
-while (@ARGV) {
-    $arg = shift (@ARGV);
-    if ($arg eq "-h") {
-        print "$Help\n$Usage";
-        exit 0;
-    } elsif ($arg eq "-ifiles") {
-	while (($ARGV[0] !~ /^-/) && (@ARGV)){
-	    push (@IFiles, shift(@ARGV));
-	}
-    } elsif ($arg eq "-dbdir") {
-        $DBDir = shift(@ARGV) unless ($ARGV[0] =~ /^-/);
-    } elsif ($arg eq "-pkgdef") {
-        $PKGDefs = shift(@ARGV) unless ($ARGV[0] =~ /^-/);
-    } else {
-        print STDERR "Unrecognized argument $arg. \n$Usage";
-        exit 1;
-    }
-}
- 
-# make sure the package pool directory exists
-if (($PKGDefs) && !(-d $PKGDefs)) {
-	print STDERR "Cannot open the directory $PKGDefs\n";
-	exit 1;
-}
-
-# Here we define the input files which will be parsed
-if ($PKGDefs) {
-
-	$dirs = `ls $PKGDefs`;
-	@dirlist = split(/\s*\n\s*/, $dirs);
-
-	foreach $dir (@dirlist) {
-		push(@IFiles, "$PKGDefs/$dir/pkgmap");
-	}
-
-	reverse(@IFiles);
-}
-else { 
-	push(@IFiles, "/var/sadm/install/contents");
-}
-
-if (!@IFiles) {
-    print STDERR "Required argument -ifiles missing. \n$Usage";
-    exit 1;
-}
-
-if (!$DBDir) {
-    print STDERR "Required argument -dbdir missing. \n$Usage";
-    exit 1;
-}
-
-$Struct = \%struct;	# here is the structure we'll store everything in
-
-
-
-#
-# now open the dbm databases we will initialize
-#
-&yelp ("...initializing the databases\n");
-
-unless (-d "$DBDir") {
-	&yelp("Creating directory $DBDir\n");
-	mkdir($DBDir, 0777);
-}
-
-# db for package names from the /var/sadm/pkg/foo/pkginfo files
-dbmopen(%PKGNAMES, "$DBDir/PKGNAMES", 0644) || die"Cannot open dbm db $DBDir/PKGNAMES\n";
- 
-# db for entity file types
-dbmopen(%FTYPE, "$DBDir/FTYPE", 0664) || die"Cannot open dbm db $DBDir/FTYPE\n";
-
-# db for entity modes types
-dbmopen(%MODE, "$DBDir/MODE", 0664) || die"Cannot open dbm db $DBDir/MODE\n";
-
-# db for entity packages
-dbmopen(%PKGS, "$DBDir/PKGS", 0664) || die"Cannot open dbm db $DBDir/PKGS\n";
-
-# db for absolute link targets
-dbmopen(%ABSLINK, "$DBDir/ABSLINK", 0664) || die"Cannot open dbm db $DBDir/ABSLINK\n";
- 
-
-undef %FTYPE;		# remove existing records, if any
-undef %MODE;
-undef %PKGS;
-undef %ABSLINK;
-undef %PKGNAMES;
-
-$Debug = 1;				# print extra gibberish
-
-#
-# go make the package names db
-#
-
-&MakePackageNamesDB($PkgDir);
-
-#
-# read and parse each input file in contents file format
-#
-
-&yelp ("...making the FTYPE MODE and PKGS databases\n");
-foreach $IFile (@IFiles) {
-    if ($PKGDefs) {
-       unless (-r $IFile) {
-           print STDERR "Could not open file: $IFile\n";
-           next;
-       }
-       
-       @pkgname = split("/", $IFile);
-       $thisPkg = @pkgname[($#pkgname-1)];
-       $pkgInfo="$PKGDefs/$thisPkg/pkginfo";
-       $thisBaseDir="";
-       if (-r $pkgInfo) {
-            $BASEDIR = `grep '^BASEDIR' $pkgInfo`;
-            $BASEDIR =~ s/^BASEDIR=//;
-            chomp($BASEDIR);
-            $thisBaseDir = $BASEDIR;
-       }
-    }
-
-    open (IFILE, "$IFile") || die "cannot open input file $IFile\n";
-
-    # Tell the user what we are looking at UNLESS they are looking at a package
-    # pool.  A package pool could have hundreds of entries which just creates
-    # a lot of useless (and confusing) output.
-    &yelp("...opening $IFile\n") unless ($PKGDefs);
-
-    while (<IFILE>) {	# loop over file line-at-a-time
-	if ($PKGDefs) {
-		next if /^:/;		# ignore these lines from a pkgmap
-		next if (/(\S+)\s+[i]\s+/);
-	}
-	else {
-		next if /^#/;		# ignore comments
-		next if /^\s*$/;	# ignore blanks
-	}
-
-
-	chop;
-	undef $FType;
-	undef $Mode;
-
-	$line=$_;
-
-	if ($PKGDefs) {
-		&ParsePkgmapEntry($line);	
-		@Pkgs = $thisPkg;
-	}
-	else {
-		&ParseContentsEntry($_);	
-	}
-
-	# if this entry was supplied by a earlier file, skip it
-
-	if ($FTYPE{$Entity} =~ /\w/) {
-
-            # don't bother complaining about directories, we know the same
-            # directory could exist in multiple packages
-	    next if ($FTYPE{$Entity} eq "d");
-
-            if ($PKGDefs) {
-                 # In the case where we are going through a package pool, we
-                 # expect that a file may reside in multiple packages.  If
-                 # that is detected, we simply add this package to the list of
-                 # packages for that file
-     
-                 $currPkgs = $PKGS{$Entity};
-next if ($FTYPE{$Entity} eq "s");
-                 $PKGS{$Entity} = "$currPkgs $thisPkg";
-            }
-            else {
-                 # In the case where we are reading in from
-                 # /var/sadm/install.contents, we do not expect to see any
-                 # over-ridden files EXCEPT when the "-ifiles" option is used.
-	         &yelp("...OVERRIDDEN: $line\n");
-            }
-	    next;
-	} else {
-	    $Package = join(" ",@Pkgs);# store supplying packages sep by " "
-
-            # This is a hack.  In the case of directories like /bin which
-            # would belong in many packages, the $PKGS hash would not
-            # be able to handle such a long entry.  So for directories, I
-            # just place the first package I find.  For this tool, it doesn't
-            # matter since this tool does not report which directories come
-            # from which package.
-
-            if ($FType eq "d") {
-                @FirstPackage = split(" ", $Package);
-                $PKGS{$Entity} = $FirstPackage[0];
-            }
-            else {
-	        $PKGS{$Entity} = $Package; # update PKGS database
-            }
-	}
-	    
-	#
-	# put what we need from this entry line into the dbs
-	#
-
-	&yelp ("***NO FILETYPE! IGNORING ENTRY: $_\n") unless $FType;
-	$FTYPE{$Entity} = $FType;	# update the FTYPE database
-
-	#
-	# now collect the possible paths for each basename
-	#
-
-	($path, $base) = $Entity =~ /(.*\/)(.*)/;
-	push(@{$Struct->{"PATHS"}->{$base}}, $Entity);    
-	if ($FType =~ /[ls]/) {			# link
-	    $rellinkent = "$Entity;$RelEntity";
-	    push (@RelLinkEnts,$rellinkent);	# make list of ents to resolve
-	} else {
-	    $MODE{$Entity} = $Mode if $Mode ne "";	# update MODE database
-	}
-    }
-    close IFILE;
-} # end foreach $IFile
-
-#
-# now convert the relative links into absolute ones
-#
-
-&yelp ("...making the ABSLINK database\n");
-foreach $rellinkent (@RelLinkEnts) {
-    ($Entity, $RelEntity) = split(/;/, $rellinkent);
-    $AbsLink = &GetAbsLink($Entity, $RelEntity);
-    $ABSLINK{$Entity} = $AbsLink;
-}
-
-#
-# close the dbs -- we're done
-#
-
-dbmclose (FTYPE);	
-dbmclose (MODE);
-dbmclose (PKGS);
-dbmclose (ABSLINK);
-dbmclose (PKGNAMES);
-
-&yelp ("...DONE\n");
-#===========================END OF MAIN====================================
-
-sub GetAbsLink {	# convert relative link to actual one
-local ($entry, $rellink) = @_;
-
-    return $rellink if $rellink =~ /^\//;	# just return if abs already
-
-    @RelPath = split(/\//,$rellink);
-    @EntryPath = split(/\//,$entry);
-
-    #
-    # get the filename part
-    #
-
-    undef @AbsPath;
-    @AbsPath = (pop(@RelPath)) if $RelPath[$#RelPath] =~ /w/;
-    pop @EntryPath;
-
-    #
-    # pop the relative path until a relative dir shows up
-    #
-
-    while (@RelPath) {
-	$relhere = pop(@RelPath);
-	if ($relhere =~ /\w/) {			# there's a letter or number
-	    unshift (@AbsPath, $relhere);	# its a dirname; keep it
-	} elsif ($relhere =~ /^\.\.$/) {	# its a .. pop up one dir
-	    pop(@EntryPath);
-	} elsif ($relhere =~ /^\.$/) {		# it's a . -- stop
-	    last;
-	}
-    }
-
-    while (@EntryPath) {			# complete the path
-	unshift(@AbsPath, pop(@EntryPath));	# ...from the remaining entry
-    }
-    $abspath = join("/", @AbsPath);
-    if (!$FTYPE{$abspath}) {			# no installed entity !
-# NICKI - for now
-	&yelp("***CANNOT FIND ABSOLUTE PATH $abspath FOR ENTRY: $entry=$rellink\n");
-#	&yelp("***CANNOT RESOLVE ABSOLUTE PATH $abspath\n");
-
-# COMMENTED OUT BY NICKI
-#	$base = $rellink;
-#	$base =~ s/.*\///;			# get basename we're looking for
-#	@cans = @{$Struct->{"PATHS"}->{$base}};	# get all entities ...
-#	$numcans = $#cans + 1;				# ... with this base
-
-#	&yelp("   There are $numcans entries with this basename:\n");
-#	foreach $can (@cans) {
-#	    &yelp("       $can\n");
-#	}
-#	$abspath = "";
-    }
-    return $abspath;
-}
-
-sub ParseContentsEntry {
-#invocation: &ParseContentsEntry($l);	# $l is a line in the file
-local ($l) = @_;
-
-    #
-    # look for b or c entries, like:
-    #  /devices/pseudo/openeepr@0:openprom c none 38 0 0640 root sys SUNWcsd
-    #
-
-    if (($Entity,$FType,$Class,$Maj,$Min,$Mode,$Owner,$Group,@Pkgs) =
-      ($l =~ /^(\S+)\s+([bc])\s+(\w+)\s+([0-9]+)\s+([0-9]+)\s+([0-7]+)\s+([a-z]+)\s+([a-z]+)\s+([A-Z].*)/)) {
-
-    #
-    # look for d entries, like
-    #   /devices/pseudo d none 0755 root sys SUNWcsd
-    #
-
-    } elsif  (($Entity,$FType,$Class,$Mode,$Owner,$Group,@Pkgs) =
-      ($l =~ /^(\S+)\s+([d])\s+(\w+)\s+([0-7]+)\s+([a-z]+)\s+([a-z]+)\s+([A-Z].*)/)) {
-
-    #
-    # look for f or e  or v entries, like
-    #   /etc/asppp.cf f none 0744 root sys 360 27915 801314234 SUNWapppr
-    #
-
-    } elsif  (($Entity,$FType,$Class,$Mode,$Owner,$Group,
-      $Size,$Checksum,$Modtime,@Pkgs) =
-      ($l =~ /^(\S+)\s+([fev])\s+(\w+)\s+([0-7]+)\s+([a-z]+)\s+([a-z]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([A-Z].*)/)) {
-
-    #
-    # look for l or s entries, like
-    #   /bin=./usr/bin s none SUNWcsr
-    #
-
-    } elsif  (($Entity,$RelEntity,$FType,$Class,@Pkgs) =
-      ($l =~ /^([^=]+)=(\S+)\s+([ls])\s+(\w+)\s+([A-Z].*)/)) {
-    } else {
-	print STDERR "Unrecognized entry in $IFile: $l\n";
-    }
-}
-
-sub ParsePkgmapEntry {
-local ($line) = @_;
-
-	# for validation of input
-	$Unresolved = true;
-
-	# look for d entries, like
-	# 1 d root etc 775 root sys
-
-	if (($Part,$FType,$Class,$Entity,$Mode,$Owner,$Group) =
-		($line =~ /^(\S+)\s+([d])\s+(\w+)\s+(\S+)\s+(\d+)\s+(\w+)\s+(\w+)/)) {
-		# prepend a install root
-		if ($thisBaseDir eq "/") {
-			$Entity = "/$Entity";
-		}
-		else {
-			$Entity = "$thisBaseDir/$Entity";
-		}
-		$Unresolved = false;
-	}
-
-	# look for e,f or v entries, like
-	# 1 e master boot/solaris/devicedb/master 0644 root sys 75 5775 940882596
-
-	elsif (($Part,$FType,$Class,$Entity,$Mode,$Owner,$Group,$Size,$Checksum,$Modtime) =
-		($line =~ /^(\S+)\s+([efv])\s+(\w+)\s+(\S+)\s+(\d+)\s+(\w+)\s+(\w+)/)) {
-
-		# prepend a install root
-		if ($thisBaseDir eq "/") {
-			$Entity = "/$Entity";
-		}
-		else {
-			$Entity = "$thisBaseDir/$Entity";
-		}
-		$Unresolved = false;
-	}
-	elsif  (($Part, $FType, $Class, $Entity, $RelEntity) =
-		($line =~ /^(\S+)\s+([ls])\s+(\w+)\s+(\S+)[=](\S+)/)) {
-
-		# prepend a install root
-		if ($thisBaseDir eq "/") {
-			$Entity = "/$Entity";
-		}
-		else {
-			$Entity = "$thisBaseDir/$Entity";
-		}
-		$Unresolved = false;
-	}
-
-	print ("UNRESOLVED: $line\n") if ($Unresolved eq true);
-}
-
-sub ParsePrototypeEntry {
-#invocation: &ParsePrototypeEntry($l);	# $l is a line in the file
-local ($l) = @_;
-
-    #
-    # look for b or c entries, like:
-    #  /devices/pseudo/openeepr@0:openprom c none 38 0 0640 root sys SUNWcsd
-    #
-
-    if (($Entity,$FType,$Class,$Maj,$Min,$Mode,$Owner,$Group,@Pkgs) =
-      ($l =~ /^(\S+)\s+([bc])\s+(\w+)\s+([0-9]+)\s+([0-9]+)\s+([0-7]+)\s+([a-z]+)\s+([a-z]+)\s+([A-Z].*)/)) {
-
-    #
-    # look for d entries, like
-    #   d root etc 775 root sys
-    #
-
-    } elsif  (($FType,$Class,$Entity,$Mode,$Owner,$Group) =
-      ($l =~ /^([d])\s+(\w+)\s+(\S+)\s+([0-7]+)\s+(\w+)\s+(\w+)/)) {
-
-    #
-    # look for f or e  or v entries, like
-    #   e preserve etc/acct/holidays 664 bin bin
-    #
-
-    } elsif  (($FType,$Class,$Entity,$Mode,$Owner,$Group) =
-      ($l =~ /^([fev])\s+(\w+)\s+(\S+)\s+([0-7]+)\s+(\w+)\s+(\w+)/)) {
-
-    #
-    # look for l or s entries, like
-    #   l root etc/rc2.d/S21perf=../../etc/init.d/perf
-    #
-
-    } elsif  (($FType,$Class,$Entity,$RelEntity) =
-      ($l =~ /^([ls])\s+(\w+)\s+([^=]+)=(\S+)/)) {
-    } else {
-	print STDERR "Unrecognized Prototype File entry: $l\n";
-    }
-}
-
-sub yelp {
-local($String) = @_;
-    print "$String";
-}
-
-
-
-sub MakePackageNamesDB  {
-#invocation: &MakePackageNamesDB($PkgDir);
-local ($PkgDir) = @_;		# argument is parent directory of pkg dirs
-    
-    #$PkgDir = "/var/sadm/pkg";
-    opendir(PKGDIR, "$PkgDir") || die "Cannot open package directory $PkgDir\n";
-    @Pkgs = grep(/^[A-Z]/,readdir(PKGDIR));	# list of all package directories
-    foreach $Pkg (@Pkgs) {	# loop over 'em
-	$InfoFile = "$PkgDir/$Pkg/pkginfo";	# full name of the pkginfo file
-	if (-r $InfoFile) {	# if we can read it
-	    $str = `grep '^NAME=' $InfoFile`;	# just grep the entry
-	    $str =~ s/\s*\n$//;	# trim trailing ws
-	    $str =~ s/.*=\s*//;	# trim leading NAME=
-	    if ($str =~ /\w/) {	# if the name has a letter or number in it
-		$PKGNAMES{$Pkg} = $str;
-	    } else { 
-		&yelp("***Cannot find usable NAME entry in $InfoFile\n");
-	    }
-	} else {
-	    &yelp("***Cannot find readable file $InfoFile\n");
-	}
-    } # end of loop over package directories
-}
--- old/usr/src/tools/depcheck/make_pkg_db.1onbld	2018-01-25 19:54:40.905352735 +0000
+++ /dev/null	2018-01-25 19:54:40.000000000 +0000
@@ -1,196 +0,0 @@
-'\" t
-.\"
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (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) 2005 Sun Microsystems, Inc. All rights reserved.
-.\" Use is subject to license terms.
-.\"
-.TH MAKE_PKG_DB 1ONBLD "Nov 2, 2000"
-.SH "NAME"
-make_pkg_db \- create a Perl DBM database of installed software
-.SH "SYNOPSIS"
-.PP
-.nf
-\fBmake_pkg_db\fR \-\fBdbdir\fR \fIdbm_database_pathname\fR\ [-\fBh\fR]
-            [-\fBifiles\fR \fIfilename\fR\&...]
-            [-\fBpkgdef\fR \fIpackage_pool_pathname\fR]
-.fi
-.SH "DESCRIPTION"
-.PP
-The \fBmake_pkg_db\fR command (a Perl script) generates a Perl DBM database of
-software installed on a system based on \fB/var/sadm/install/contents\fR or the
-contents of a package pool directory\&. The Perl DBM database files are used by
-\fBget_depend_info\fR(1ONBLD)\&.
-.PP
-The Perl DBM database files contain information keyed on a file name\&. Some
-files, for example, list the package in which a file is included and the
-permissions of the file\&.
-.PP
-If you run \fBmake_pkg_db\ -dbdir\ \fIdbm_database_pathname\fR\fR, an error
-message such as:
-.PP
-\fB***CANNOT RESOLVE ABSOLUTE PATH /usr/java/bin/appletviewer\fR
-.PP
-is generated because the script cannot resolve symbolic links based on the
-information in \fB/var/sadm/install/contents\fR\&. In
-\fB/var/sadm/install/contents\fR, for example, \fBappletviewer\fR is specified
-as a symbolic link:
-.sp
-.nf
-\f(CW/usr/bin/appletviewer=\&.\&./java/bin/appletviewer s none SUNWj2dev\fR
-.fi
-.sp
-.PP
-Unfortunately, \fB/usr/java\fR is a symbolic link to \fB/usr/java1\&.2\fR\&.
-The correct file entry in \fB/var/sadm/install/contents\fR is therefore
-\fB/usr/java1\&.2/bin/appletviewer\fR\&. It is impossible for this script to
-resolve this link based on the information in
-\fB/var/sadm/install/contents\fR\&.
-.PP
-To correct this problem, create a file named \fBMyLinkResolution\fR and add
-this entry:
-.sp
-.nf
-\f(CW/usr/bin/appletviewer=\&.\&./java1\&.2/bin/appletviewer s none SUNWj2dev\fR
-.fi
-.sp
-.PP
-Then enter this command:
-.PP
-.sp
-.nf
-\f(CWmake_pkg_db -dbdir \fIdbm_database_pathname\fR -ifiles MyLinkResolution\fR
-.fi
-.sp
-When you execute this command, the following message is displayed:
-.sp
-.nf
-\f(CW\&.\&.\&.OVERRIDDEN: /usr/bin/appletviewer=
-\&.\&./java/bin/appletviewer s none SUNWj2dev\fR
-.fi
-.sp
-.PP
-This message indicates that the original entry in
-\fB/var/sadm/install/contents\fR is ignored and your new entry in
-\fBMyLinkResolution\fR is used instead\&.
-.PP
-\fBSampleLinks\fR is a file you can use to resolve links in
-\fB/var/sadm/install/contents\fR for Solaris (Intel Platform Edition)\&.
-\fBSamplePkgLinks\fR is a file you can use to resolve some of the links used on
-the Solaris 8 Software 1 of 2 Intel Platform Edition CD\&. You might want to
-modify these two preceding files for SPARC or for your particular environment\&.
-.PP
-The \fBmake_pkg_db\fR script verifies the files it finds against the software
-that is actually installed on the system\&. The more complete the information,
-the more accurate the output of the script\&.
-.SH "OPTIONS"
-.PP
-The following options are supported:
-.sp
-.ne 2
-\fB-\fBdbdir\fR\fR
-.in +16n
-Specifies the directory in which you want to place the output Perl DBM
-databases\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBh\fR\fR
-.in +16n
-Displays help\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBifiles\fR\fR
-.in +16n
-Specifies the name of an input file you want to use to help in resolving
-symbolic links\&.
-.sp
-.sp 1
-.in -16n
-.sp
-.ne 2
-\fB-\fBpkgdef\fR\fR
-.in +16n
-Specifies the path name of the package pool you want to use instead of
-\fB/var/sadm/install/contents\fR\&.
-.sp
-.sp 1
-.in -16n
-.SH "OPERANDS"
-.PP
-The following operands are supported:
-.sp
-.ne 2
-\fB\fIdbm_database_pathname\fR\fR
-.in +24n
-Specifies the directory in which you want to place the output Perl DBM
-databases\&.
-.sp
-.sp 1
-.in -24n
-.sp
-.ne 2
-\fB\fIfilename\fR\fR
-.in +24n
-Specifies the name of a file or files that contain data in the format used in
-\fB/var/sadm/install/contents\fR\&.
-.sp
-.sp 1
-.in -24n
-.sp
-.ne 2
-\fB\fIpackage_pool_pathname\fR\fR
-.in +24n
-Specifies the path name of the package pool you want to use instead of
-\fB/var/sadm/install/contents\fR\&.
-.sp
-.sp 1
-.in -24n
-.SH "ATTRIBUTES"
-.PP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-.TS
-box;
-cw | cw
-lw | lw .
-ATTRIBUTE TYPE	ATTRIBUTE VALUE
-Availability	SUNWonbld
-CSI	Enabled
-Interface Stability	Evolving
-MT-Level	Unsafe
-.TE
-.sp
-.SH "SEE ALSO"
-.PP
-\fBget_depend_info\fR(1ONBLD), \fBattributes\fR(5)
-.SH "NOTES"
-.PP
-DBM database files are platform dependent\&. DBM database files you generate on
-a SPARC machine, for example, do not work on an IA machine (and vice-versa)\&.
-.PP
-This script might not resolve all symbolic links\&.
--- old/usr/src/tools/gk/Makefile	2018-01-25 19:54:41.204810413 +0000
+++ /dev/null	2018-01-25 19:54:41.000000000 +0000
@@ -1,50 +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 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-GKFILES= \
-	cshrc \
-	login
-
-SHFILES = gen_make.machines
-ROOTONBLDGKSHFILES = $(SHFILES)
-
-CLEANFILES += $(GKFILES) $(SHFILES)
-
-include ../Makefile.tools
-
-.KEEP_STATE:
-
-FILEMODE = 0644
-$(ROOTONBLDGKSHFILES):= FILEMODE= 755
-
-all:	$(GKFILES) $(SHFILES)
-
-install: all .WAIT $(ROOTONBLDGKFILES) \
-	$(ROOTONBLDGKSHFILES)
-
-clean:
-	$(RM) $(CLEANFILES)
-
-include ../Makefile.targ
--- old/usr/src/tools/gk/cshrc.sh	2018-01-25 19:54:41.513449111 +0000
+++ /dev/null	2018-01-25 19:54:41.000000000 +0000
@@ -1,53 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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) 1993-1998 by Sun Microsystems, Inc.
-# All rights reserved.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# example .cshrc for root build user (often 'gk').
-
-set filec
-set history=100
-set noclobber
-set ignoreeof
-set notify
-
-unset nse1
-unset nse2
-
-umask 002
-
-# if ($?USER == 0 || $?prompt == 0) exit
-
-alias ls "ls -aF"
-
-if ( ! $?HOSTNAME ) then
-	setenv HOSTNAME `uname -n`
-endif
-
-if ( ! $?TERM ) then
-	setenv TERM sun
-endif
-
-set prompt="{${USER}:${HOSTNAME}:\!} "
--- old/usr/src/tools/gk/gen_make.machines.sh	2018-01-25 19:54:41.810665400 +0000
+++ /dev/null	2018-01-25 19:54:41.000000000 +0000
@@ -1,48 +0,0 @@
-#!/usr/bin/ksh93
-#
-# 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.
-# 
-# script to generate example .make.machines for build users
-#
-
-
-PATH=/usr/bin:/usr/sbin
-
-THISHOST=$(uname -n)
-
-cpus=$(psrinfo | grep on-line | wc -l)
-max=$(((cpus + 1) * 2))
-
-EXISTING=$(grep "^$THISHOST" $HOME/.make.machines |awk -F"=" '{print $2}')
-
-if [[ -n "$EXISTING" ]] then
-	printf "Your existing \$HOME/.make.machines has a concurrency "
-	printf "setting of $EXISTING for host\n"
-	printf "$THISHOST. If you wish to change the setting then this "
-	printf "script suggests\nsetting concurrency to $max for a single-user "
-	printf "machine. Multi-user machines might\nrequire different values.\n"
-else
-	printf "$THISHOST max=$max\n" >> $HOME/.make.machines
-	printf "dmake concurrency for host $THISHOST set to $max.\n"
-fi
--- old/usr/src/tools/gk/login.sh	2018-01-25 19:54:42.108151149 +0000
+++ /dev/null	2018-01-25 19:54:42.000000000 +0000
@@ -1,69 +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 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# example .login for root build user (often 'gk').
-# sets up for potential dmake use in parallel-make mode
-
-unset ignoreeof
-umask 002
-stty erase  werase  kill  intr 
-
-setenv NIS_PATH 'org_dir.$:$'
-setenv EDITOR /usr/bin/vi
-setenv MACH `uname -p`
-
-set noglob; eval `/usr/ucb/tset -Q -s -e -k - -m dialup:vt102`; unset noglob
-setenv MANPATH /usr/man:/usr/local/man:/usr/local/doctools/man:/opt/onbld/man
-setenv DMAKE_MODE parallel
-set hostname=`uname -n`
-if ( ! -f ~/.make.machines ) then
-	set maxjobs=4
-else
-	set maxjobs="`grep $hostname ~/.make.machines | tail -1 | awk -F= '{print $ 2;}'`"
-	if ( "$maxjobs" == "" ) then
-		set maxjobs=4
-	endif
-endif
-setenv DMAKE_MAX_JOBS $maxjobs
-
-
-set path=( \
-	/opt/onbld/bin \
-	/opt/onbld/bin/${MACH} \
-	/opt/SUNWspro/bin \
-	/opt/teamware/bin \
-	/usr/ccs/bin \
-	/usr/proc/bin \
-	/usr/openwin/bin \
-	/bin \
-	/usr/bin \
-	/usr/sbin \
-	/sbin \
-	/usr/local/bin \
-	/usr/ucb \
-	/etc \
-	/usr/etc \
-)
--- old/usr/src/tools/pmodes/Makefile	2018-01-25 19:54:42.406485668 +0000
+++ /dev/null	2018-01-25 19:54:42.000000000 +0000
@@ -1,53 +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 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# fastfs also lives in cmd/backup, but it's copied here since the backup
-# hierarchy can still build some hsm packages, and the code doesn't change
-
-PROG=	pmodes
-OBJS=	$(PROG).o binsearch.o
-SRCS=	$(OBJS:%.o=%.c)
-CLEANFILES += $(OBJS)
-
-include ../Makefile.tools
-
-CFLAGS += $(CCVERBOSE)
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += -_gcc=-Wno-uninitialized
-
-.KEEP_STATE:
-
-all:	$(PROG)
-
-$(PROG): $(OBJS)
-	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
-	$(POST_PROCESS)
-
-install: all .WAIT $(ROOTONBLDMACHPROG)
-
-lint:	lint_SRCS
-
-clean:
-	$(RM) $(CLEANFILES)
-
-include ../Makefile.targ
--- old/usr/src/tools/pmodes/README.pmodes	2018-01-25 19:54:42.704568072 +0000
+++ /dev/null	2018-01-25 19:54:42.000000000 +0000
@@ -1,119 +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 2010 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-Pmodes is a program that updates pkgmap files or pkg prototype files.
-
-
-
-Applicability:
-
-Use of pmodes has been deprecated in onnv-gate; instead, see
-validate_pkg, as delivered by developer/build/onbld, and
-exception_lists/pmodes.
-
-Other OSNet users (ie on10 patch gates and earlier) should use pmodes
-from their own workspace.
-
-The information here is suitable for pmodes users in other
-consolidations, using tools from onnv-tools.
-
-
-
-Usage: pmodes [-somwDeNndvqP] [-r file] directory  .. proto/pkgmap file....
-
-
-
-Options that modify what is changed:
-
-	-s 	Strip read and write permissions from setgid/setuid executables.
-	-o	Do not change ownership to root
-	-m	Do not change file permissions (modes)
-	-w 	Do not strip owner write permissions from non-root owned
-		binaries
-	-e	Do not change 'e' or 'v' (editable or volatile) files
-		(they are only affected when owned by bin)
-	-D	Limit changes to directories only.
-	
-Options that modify the output:
-	-n	Create a <file>.new file
-	-N	Overwrite the original pkgmap/proto file with the new file;
-		old pkgmap/proto file saved as file.old
-	-d	Produce "diff-style" output
-	-P	Ignore pkgmap files in directories.
-	-q	Do not produce error messages about directories w/ pkginfo*
-		files
-	-v	Preceed the output caused by each processed file by a
-		shortened version of the filename.
-
-	-r file	Restrict the test to the pathnames listed in "file"
-
-
-In default mode of operation, pmodes processes each argument.
-If an argument is a directory, it will first look for a pkginfo or
-pkginfo.tmpl file n order to learn the BASEDIR; it will than process
-the directory converting either the pkgmap file or, if the pkgmap file
-doesn't exist or the -P option is specified, the prototype_* files
-Names that contain .old or .new will be ignored.  If an argument is a file,
-the pkginfo* file in the same directory is used to learn the BASEDIR.
-
-Pmodes outputs a line for each change made:
-
-e m 0664 -> 0644 /var/adm/wtmpx
-d m 0775 -> 0755 /usr/lib
-d o bin -> root /usr/include/sys [755]
-f o bin -> root /usr/include/sys/cg6reg.h [0644]
-f o bin -> root /usr/include/sys/cg6var.h [0644]
-
-The first field is the "pkgmap" file type; the second field is the type
-of modification (m for mode, o for ownership).  This is followed by the
-change mode and the pathname.
-
-When ownership is changed, the file permissions are printed in square
-brackets.
-
-Multiple lines of output can be produced for a single file.
-
-With the -d option, output looks like:
-
-< d 0775 root sys /usr
-> d 0755 root sys /usr
-< d 0775 root bin /usr/include
-> d 0755 root bin /usr/include
-< d 1777 bin bin /var/preserve
-> d 1777 root bin /var/preserve
-< e 0664 root sys /etc/vfstab
-> e 0644 root sys /etc/vfstab
-
-And only one line per file is produced.
-
-
-
-Exceptions
-
-If pmodes insists on flagging errors that you believe must be
-integrated as-is, you may update the inline initializers for either
-exceptions or exempt_pkgs in pmodes.c.  If you do this, make sure that
-the bug report and your RTI include a justification for the exception.
--- old/usr/src/tools/pmodes/binsearch.c	2018-01-25 19:54:43.002159696 +0000
+++ /dev/null	2018-01-25 19:54:43.000000000 +0000
@@ -1,159 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * String list maintenance and binary search routines
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#define	ALLOCCHUNK	128
-
-struct itemlist  {
-    char **items;
-    int nallocated;
-    int nused;
-    int sorted;
-};
-
-#include "binsearch.h"
-
-itemlist
-new_itemlist(void)
-{
-	itemlist x = malloc(sizeof (struct itemlist));
-
-	x->nallocated = x->nused = 0;
-	x->sorted = 1;
-	x->items = 0;
-
-	return (x);
-}
-
-void
-item_add(itemlist l, char *s)
-{
-	if (l->nallocated < 0) {
-		char **new;
-		l->nallocated = l->nused + ALLOCCHUNK;
-		new = malloc(sizeof (char *) * l->nused);
-		memcpy(new, l->items, l->nused * sizeof (char *));
-		l->items = new;
-	} else if (l->nallocated == l->nused) {
-		if (l->nallocated)
-			l->nallocated *= 2;
-		else
-			l->nallocated = ALLOCCHUNK;
-		l->items = realloc(l->items, sizeof (char *) * l->nallocated);
-	}
-	l->items[l->nused++] = s;
-	l->sorted = l->nused <= 1;
-}
-
-void
-item_add_list(itemlist l, char **s, int n, int alloc)
-{
-	if (l->nallocated == 0) {
-		l->items = s;
-		l->nallocated = alloc ? n : -1;
-		l->nused = n;
-		l->sorted = 0;
-	} else {
-		int i;
-
-		for (i = 0; i < n; i++)
-			item_add(l, s[i]);
-
-		if (alloc)
-			free(s);
-	}
-}
-
-int
-item_addfile(itemlist l, const char *fname)
-{
-	FILE *f = fopen(fname, "r");
-	char buf[10240];
-
-	if (f == NULL)
-		return (-1);
-
-	while (fgets(buf, sizeof (buf), f) != NULL) {
-		if (buf[0] == '#' || buf[0] == '\n')
-			continue;
-
-		buf[strlen(buf)-1] = '\0';
-		item_add(l, strdup(buf));
-	}
-	fclose(f);
-
-	return (0);
-}
-
-static int
-xcmp(const void *s1, const void *s2)
-{
-	return (strcmp(*(char **)s1, *(char **)s2));
-}
-
-int
-item_search(itemlist l, const char *s)
-{
-	int lo = 0;
-	int hi = l->nused - 1;
-
-	if (!l->sorted) {
-		qsort(l->items, l->nused, sizeof (char *), xcmp);
-		l->sorted = 1;
-	}
-
-	while (lo <= hi) {
-		int mid = (lo + hi) / 2;
-		int res = strcmp(s, l->items[mid]);
-
-		if (res == 0)
-			return (mid);
-		else if (res < 0)
-			hi = mid - 1;
-		else
-			lo = mid + 1;
-	}
-	return (-1);
-}
-
-char
-*item_get(itemlist l, int i)
-{
-	if (i >= l->nused || i < 0)
-		return (NULL);
-	else
-		return (l->items[i]);
-}
--- old/usr/src/tools/pmodes/binsearch.h	2018-01-25 19:54:43.300451985 +0000
+++ /dev/null	2018-01-25 19:54:43.000000000 +0000
@@ -1,37 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-typedef struct itemlist *itemlist;
-
-itemlist new_itemlist(void);
-
-void item_add_list(itemlist, char **, int, int);
-void item_add(itemlist, char *);
-int item_addfile(itemlist, const char *);
-int item_search(itemlist, const char *);
-char *item_get(itemlist, int);
--- old/usr/src/tools/pmodes/pmodes.c	2018-01-25 19:54:43.637659773 +0000
+++ /dev/null	2018-01-25 19:54:43.000000000 +0000
@@ -1,690 +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 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- *
- * $Id: pmodes.c,v 1.23 1999/03/22 14:51:16 casper Exp $
- *
- *
- * Program to list files from packages with modes that are to
- * permissive.  Usage:
- *
- *	pmodes [options] pkgdir ...
- *
- * Pmodes currently has 4 types of modes that are changed:
- *
- *	m	remove group/other write permissions of all files,
- *		except those in the exceptions list.
- *	w	remove user write permission for executables that
- *		are not root owned.
- *	s	remove g/o read permission for set-uid/set-gid executables
- *	o	change the owner of files/directories that can be safely
- *		chowned to root.
- *
- *	Any combination of changes can be switched of by specifying -X
- *
- *	The -n option will create a "FILE.new" file for all changed
- *	pkgmap/prototype files.
- *	The -D option will limit changes to directories only.
- *
- * output:
- *
- * d m oldmode -> newmode pathname
- * | ^ whether the file/dir is group writable or even world writable
- * > type of file.
- * d o owner -> newowner pathname [mode]
- *
- *
- * Casper Dik (Casper.Dik@Holland.Sun.COM)
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include "binsearch.h"
-
-static char *exceptions[] = {
-	"/etc/lp",
-	"/var/cache/cups",
-};
-
-static char *exempt_pkgs[] = {
-	"SUNWSMSdf",	/* "data files" package for SMS */
-	"SUNWSMSr",	/* "root" package for SMS */
-	"SUNWSMSsu",	/* "user" package for SMS */
-	"SUNWnethackr",	/* "root" package for nethack */
-};
-
-#define	NEXEMPT	(sizeof (exempt_pkgs) / sizeof (char *))
-
-#define	PROTO "prototype_"
-
-#define	DEFAULT_SU 0
-#define	DEFAULT_OWNER 1
-#define	DEFAULT_MODES 1
-#define	DEFAULT_USERWRITE 1
-#define	DEFAULT_DIRSONLY 0
-#define	DEFAULT_EDITABLE 1
-
-static int nexceptions = sizeof (exceptions)/sizeof (char *);
-static int dosu = DEFAULT_SU;
-static int doowner = DEFAULT_OWNER;
-static int domodes = DEFAULT_MODES;
-static int douserwrite = DEFAULT_USERWRITE;
-static int dirsonly = DEFAULT_DIRSONLY;
-static int editable = DEFAULT_EDITABLE;
-static int makenew = 0;
-static int installnew = 0;
-static int diffout = 0;
-static int proto = 0;
-static int verbose = 0;
-static int quiet = 0;
-static int errors = 0;
-
-static void update_map(char *, char *, int);
-
-static char *program;
-
-itemlist restrictto = NULL;
-
-static void
-usage(void) {
-	(void) fprintf(stderr,
-	    "Usage: %s [-DowsnNmdePvq] [-r file] pkgdir ...\n", program);
-	exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
-	char buf[8192];
-	int c;
-	extern int optind, opterr;
-
-	opterr = 0;
-
-	program = argv[0];
-
-	while ((c = getopt(argc, argv, "eDowsnNmdPvqr:")) != EOF) {
-		switch (c) {
-		case 's': dosu = !DEFAULT_SU; break;
-		case 'o': doowner = !DEFAULT_OWNER; break;
-		case 'm': domodes = !DEFAULT_MODES; break;
-		case 'w': douserwrite = !DEFAULT_USERWRITE; break;
-		case 'D': dirsonly = !DEFAULT_DIRSONLY; break;
-		case 'e': editable = !DEFAULT_EDITABLE; break;
-		case 'N': installnew = 1; /* FALLTHROUGH */
-		case 'n': makenew = 1; break;
-		case 'd': diffout = 1; break;
-		case 'P': proto = 1; break;
-		case 'v': verbose = 1; break;
-		case 'q': quiet = 1; break;
-		case 'r':
-			if (restrictto == NULL)
-				restrictto = new_itemlist();
-			if (item_addfile(restrictto, optarg) != 0) {
-				perror(optarg);
-				exit(1);
-			}
-			break;
-		default:
-		case '?': usage(); break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-
-	if (argc < 1)
-		usage();
-
-	for (; *argv; argv++) {
-		FILE *info;
-		char name[MAXPATHLEN];
-		char basedir[MAXPATHLEN] = "/";
-		int basedir_len;
-		struct stat stb;
-		int isfile = 0;
-		boolean_t exempt = B_FALSE;
-
-		/*
-		 * If a plain file is passed on the command line, we assume
-		 * it's a prototype or pkgmap file and try to find the matching
-		 * pkginfo file
-		 */
-		if (lstat(*argv, &stb) == 0 && S_ISREG(stb.st_mode)) {
-			char *lastslash = strrchr(*argv, '/');
-
-			if (lastslash != NULL)
-				*lastslash = '\0';
-			(void) sprintf(name, "%s/pkginfo", *argv);
-			if (lastslash != NULL)
-				*lastslash = '/';
-			isfile = 1;
-		} else
-			(void) sprintf(name, "%s/pkginfo", *argv);
-
-		/* if there's no pkginfo file, it could be a prototype area */
-
-		if (access(name, R_OK) != 0)
-			(void) strcat(name, ".tmpl");
-
-		info = fopen(name, "r");
-		if (info == 0) {
-			if (!quiet)
-				(void) fprintf(stderr,
-				    "Can't open pkginfo file %s\n", name);
-			continue;
-		}
-
-		while (fgets(buf, sizeof (buf), info) != NULL && !exempt) {
-			if (strncmp(buf, "BASEDIR=", 8) == 0) {
-				(void) strcpy(basedir, buf+8);
-				basedir[strlen(basedir)-1] = '\0';
-			} else if (strncmp(buf, "PKG=", 4) == 0) {
-				int i;
-				char *str;
-
-				str = buf + sizeof ("PKG=") - 1;
-				str[strlen(str)-1] = '\0';
-				if (str[0] == '"')
-					str++;
-				if (str[strlen(str)-1] == '"')
-					str[strlen(str)-1] = '\0';
-				for (i = 0; i < NEXEMPT; i++) {
-					if (strcmp(exempt_pkgs[i], str) == 0) {
-						exempt = B_TRUE;
-						break;
-					}
-				}
-			}
-		}
-
-		(void) fclose(info);
-
-		/* exempt package */
-		if (exempt)
-			continue;
-
-		basedir_len = strlen(basedir);
-		if (basedir_len != 1)
-			basedir[basedir_len++] = '/';
-
-		(void) sprintf(name, "%s/pkgmap", *argv);
-		if (isfile)
-			update_map(*argv, basedir, basedir_len);
-		else if (!proto && access(name, R_OK) == 0)
-			update_map(name, basedir, basedir_len);
-		else {
-			DIR *d = opendir(*argv);
-			struct dirent *de;
-
-			if (d == NULL) {
-				(void) fprintf(stderr,
-					"Can't read directory \"%s\"\n", *argv);
-				continue;
-			}
-			while (de = readdir(d)) {
-				/* Skip files with .old or .new suffix */
-				if (strstr(de->d_name, PROTO) != NULL &&
-				    strncmp(de->d_name, ".del-", 5) != 0 &&
-				    strstr(de->d_name, ".old") == NULL &&
-				    strstr(de->d_name, ".new") == NULL) {
-					(void) sprintf(name, "%s/%s", *argv,
-					    de->d_name);
-					update_map(name, basedir, basedir_len);
-				}
-			}
-			(void) closedir(d);
-		}
-	}
-	return (errors != 0);
-}
-
-#define	NEXTWORD(tmp, end, warnme) \
-	do { \
-		tmp = strpbrk(tmp, "\t ");\
-		if (!tmp) {\
-			if (warnme)\
-				warn(name, lineno);\
-			return (LINE_IGNORE);\
-		}\
-		end = tmp++;\
-		while (*tmp && isspace(*tmp)) tmp++;\
-	} while (0)
-
-static void
-warn(const char *file, int line)
-{
-	(void) fprintf(stderr, "pmodes: %s, line %d: unexpected format\n",
-		file, line);
-}
-
-struct parsed_line {
-	char *start;		/* buffer start */
-	char *rest;		/* buffer after owner */
-	char *owner;		/* same size as ut_user */
-	char *old_owner;	/* same size as ut_user */
-	char group[16];		/* whatever */
-	int  modelen;		/* number of mode bytes (3 or 4); */
-	int mode;		/* the complete file mode */
-	char path[MAXPATHLEN];	/* NUL terminated pathname */
-	char type;		/* */
-	char realtype;		/* */
-};
-
-#define	LINE_OK		0
-#define	LINE_IGNORE	1
-#define	LINE_ERROR	2
-
-static void
-put_line(FILE *f, struct parsed_line *line)
-{
-	if (f != NULL)
-		if (line->rest)
-			(void) fprintf(f, "%s%.*o %s %s", line->start,
-			    line->modelen, line->mode, line->owner, line->rest);
-		else
-			(void) fputs(line->start, f);
-}
-
-/*
- * the first field is the path, the second the type, the
- * third the class, the fourth the mode, when appropriate.
- * We're interested in
- *		f (file)
- *		e (edited file)
- *		v (volatile file)
- *		d (directory)
- *		c (character devices)
- *		b (block devices)
- */
-
-static int
-parse_line(struct parsed_line *parse, char *buf, const char *name, int lineno)
-{
-	char *tmp;
-	char *p = buf;
-	char *end, *q;
-
-	parse->start = buf;
-	parse->rest = 0;		/* makes put_line work */
-
-	/* Trim trailing spaces */
-	end = buf + strlen(buf);
-	while (end > buf+1 && isspace(end[-2])) {
-		end -= 1;
-		end[-1] = end[0];
-		end[0] = '\0';
-	}
-
-	while (*p && isspace(*p))
-		p++;
-
-	if (*p == '#' || *p == ':' || *p == '\0')
-		return (LINE_IGNORE);
-
-	/*
-	 * Special directives; we really should follow the include
-	 * directives but we certainly need to look at default
-	 */
-	if (*p == '!') {
-		p++;
-		while (*p && isspace(*p))
-			p++;
-
-		if (!*p || *p == '\n')
-			return (LINE_IGNORE);
-
-		if (strncmp(p, "default", 7) == 0) {
-			NEXTWORD(p, end, 1);
-			parse->type = 'f';
-			parse->realtype = 'D';
-			strcpy(parse->path, "(default)");
-			tmp = p;
-			NEXTWORD(p, end, 1);
-			goto domode;
-		} else if (strncmp(p, "include", 7) == 0) {
-			NEXTWORD(p, end, 1);
-			if (strstr(p, PROTO) == NULL)
-				fprintf(stderr, "including file %s", p);
-		}
-		return (LINE_IGNORE);
-	}
-
-	/*
-	 * Parse the pkgmap line:
-	 * [<number>] <type> <class> <path> [<major> <minor>]
-	 * [ <mode> <owner> <group> .... ]
-	 */
-
-	/* Skip first column for non-prototype (i.e., pkgmap) files */
-	if (isdigit(*p))
-		NEXTWORD(p, end, 1);
-
-	parse->realtype = parse->type = *p;
-
-	switch (parse->type) {
-	case 'i': case 's': case 'l':
-		return (LINE_IGNORE);
-	}
-
-	NEXTWORD(p, end, 1);
-
-	/* skip class */
-	NEXTWORD(p, end, 1);
-
-	/*
-	 * p now points to pathname
-	 * At this point, we could have no mode because we are
-	 * using a default.
-	 */
-	tmp = p;
-	NEXTWORD(p, end, 0);
-
-	/* end points to space after name */
-	(void) strncpy(parse->path, tmp, end - tmp);
-	parse->path[end - tmp] = '\0';
-
-	switch (parse->type) {
-	case 'e':
-	case 'v':
-		/* type 'e' and 'v' are files, just like 'f', use 'f' in out */
-		parse->type = 'f';
-		/* FALLTHROUGH */
-	case 'f':
-	case 'd':
-	case 'p': /* FIFO - assume mode is sensible, don't treat as file */
-		break;
-
-	case 'x': /* Exclusive directory */
-		parse->type = 'd';
-		break;
-
-	/* device files have class major minor, skip */
-	case 'c':
-	case 'b':
-		NEXTWORD(p, end, 1); NEXTWORD(p, end, 1);
-		break;
-
-	default:
-		(void) fprintf(stderr, "Unknown type '%c', %s:%d\n",
-			    parse->type, name, lineno);
-		return (LINE_ERROR);
-	}
-	tmp = p;
-	NEXTWORD(p, end, 1);
-
-domode:
-	/*
-	 * the mode is either a 4 digit number (file is sticky/set-uid or
-	 * set-gid or the mode has a leading 0) or a three digit number
-	 * mode has all the mode bits, mode points to the three least
-	 * significant bit so fthe mode
-	 */
-	parse->mode = 0;
-	for (q = tmp; q < end; q++) {
-		if (!isdigit(*q) || *q > '7') {
-			(void) fprintf(stderr,
-			    "Warning: Unparseble mode \"%.*s\" at %s:%d\n",
-			    end-tmp, tmp, name, lineno);
-			return (LINE_IGNORE);
-		}
-		parse->mode <<= 3;
-		parse->mode += *q - '0';
-	}
-	parse->modelen = end - tmp;
-	tmp[0] = '\0';
-
-	parse->old_owner = parse->owner = p;
-
-	NEXTWORD(p, end, 1);
-
-	parse->rest = end+1;
-	*end = '\0';
-
-	(void) memset(parse->group, 0, sizeof (parse->group));
-	(void) strncpy(parse->group, end+1, strcspn(end+1, " \t\n"));
-
-	return (LINE_OK);
-}
-
-static void
-update_map(char *name, char *basedir, int basedir_len)
-{
-	char buf[8192];
-	int i;
-	FILE *map, *newmap;
-	char newname[MAXPATHLEN];
-	int nchanges = 0;
-	unsigned int lineno = 0;
-	struct parsed_line line;
-	char *fname;
-
-	map = fopen(name, "r");
-	if (map == 0) {
-		(void) fprintf(stderr, "Can't open \"%s\"\n", name);
-		return;
-	}
-	(void) strcpy(newname, name);
-	(void) strcat(newname, ".new");
-	if (makenew) {
-		newmap = fopen(newname, "w");
-		if (newmap == 0)
-			(void) fprintf(stderr, "Can't open %s for writing\n",
-			    name);
-	} else
-		newmap = 0;
-
-	/* Get last one or two components non-trivial of pathname */
-	if (verbose) {
-		char *tmp = name + strlen(name);
-		int cnt = 0, first = 0;
-
-		while (--tmp > name && cnt < 2) {
-			if (*tmp == '/') {
-				if (++cnt == 1)
-					first = tmp - name;
-				else  {
-					fname = tmp + 1;
-					/* Triviality check */
-					if (tmp - name > first - 4)
-						cnt--;
-				}
-			}
-		}
-		if (cnt < 2)
-			fname = name;
-	}
-
-	nchanges = 0;
-
-	for (; fgets(buf, sizeof (buf), map) != 0; put_line(newmap, &line)) {
-
-		int root_owner, mode_diff = 0;
-		int changed = 0;
-
-		lineno ++;
-
-		switch (parse_line(&line, buf, name, lineno)) {
-		case LINE_IGNORE:
-			continue;
-		case LINE_ERROR:
-			errors++;
-			continue;
-		}
-
-		if (restrictto) {
-			char nbuf[MAXPATHLEN];
-			snprintf(nbuf, sizeof (nbuf), "%.*s%s", basedir_len,
-			    basedir, line.path);
-
-			if (item_search(restrictto, nbuf) == -1)
-				continue;
-		}
-
-		if (dirsonly && line.type != 'd')
-			continue;
-
-		root_owner = strcmp(line.owner, "root") == 0;
-		if (dosu && line.type == 'f' && (line.mode & (S_ISUID|S_ISGID)))
-			mode_diff = line.mode & (S_IRGRP|S_IROTH);
-
-		/*
-		 * The following heuristics are used to determine whether a file
-		 * can be safely chown'ed to root:
-		 *	- it's not set-uid.
-		 *	and one of the following applies:
-		 *	    - it's not writable by the current owner and is
-		 *	    group/world readable
-		 *	    - it's world executable and a file
-		 *	    - owner, group and world permissions are identical
-		 *	    - it's a bin owned directory or a "non-volatile"
-		 *	    file (any owner) for which group and other r-x
-		 *	    permissions are identical, or it's a bin owned
-		 *	    executable or it's a /etc/security/dev/ device
-		 */
-
-		if (doowner && !(line.mode & S_ISUID) &&
-		    !root_owner &&
-		    ((!(line.mode & S_IWUSR) &&
-			(line.mode&(S_IRGRP|S_IROTH)) == (S_IRGRP|S_IROTH)) ||
-			(line.type == 'f' && (line.mode & S_IXOTH)) ||
-			((line.mode & 07) == ((line.mode>>3) & 07) &&
-			    (line.mode & 07) == ((line.mode>>6) & 07) &&
-			    strcmp(line.owner, "uucp") != 0) ||
-			((line.type == 'd' && strcmp(line.owner, "bin") == 0 ||
-			    (editable && strcmp(line.owner, "bin") == 0  ?
-				    line.type : line.realtype)  == 'f') &&
-			    ((line.mode & 05) == ((line.mode>>3) & 05) ||
-				(line.mode & 0100) &&
-				strcmp(line.owner, "bin") == 0) &&
-			    ((line.mode & 0105) != 0 ||
-				basedir_len < 18 &&
-				strncmp(basedir, "/etc/security/dev/",
-				    basedir_len) == 0 &&
-				strncmp(line.path, "/etc/security/dev/"
-				    + basedir_len, 18 - basedir_len) == 0)))) {
-			if (!diffout) {
-				if (!changed && verbose && !nchanges)
-					(void) printf("%s:\n", fname);
-				(void) printf("%c o %s -> root %s%s [%.*o]\n",
-					line.realtype, line.owner, basedir,
-					line.path, line.modelen, line.mode);
-			}
-			line.owner = "root";
-			root_owner = 1;
-			changed = 1;
-		}
-		/*
-		 * Strip user write bit if owner != root and executable by user.
-		 * root can write even if no write bits set
-		 * Could prevent  executables from being overwritten.
-		 */
-		if (douserwrite && line.type == 'f' && !root_owner &&
-		    (line.mode & (S_IWUSR|S_IXUSR)) == (S_IWUSR|S_IXUSR))
-			mode_diff |= S_IWUSR;
-
-
-		if (domodes && (line.mode & (S_IWGRP|S_IWOTH)) != 0 &&
-		    (line.mode & S_ISVTX) == 0) {
-			if (basedir_len <= 1) { /* root dir */
-				for (i = 0; i < nexceptions; i++) {
-					if (strcmp(line.path,
-					    exceptions[i]+basedir_len) == 0)
-						break;
-				}
-			} else {
-				for (i = 0; i < nexceptions; i++) {
-					if (strncmp(basedir, exceptions[i],
-						basedir_len) == 0 &&
-					    strcmp(line.path,
-						exceptions[i]+basedir_len) == 0)
-						break;
-				}
-			}
-			if (i == nexceptions)
-				mode_diff |= line.mode & (S_IWGRP|S_IWOTH);
-		}
-
-		if (mode_diff) {
-			int oldmode = line.mode;
-
-			line.mode &= ~mode_diff;
-
-			if (line.mode != oldmode) {
-				if (!diffout) {
-					if (!changed && verbose && !nchanges)
-						(void) printf("%s:\n", fname);
-					printf("%c %c %04o -> %04o %s%s\n",
-					    line.realtype,
-					    (mode_diff & (S_IRGRP|S_IROTH)) ?
-						's' : 'm',
-						oldmode, line.mode, basedir,
-						line.path);
-				}
-				changed = 1;
-			}
-		}
-		nchanges += changed;
-		if (diffout && changed) {
-			if (nchanges == 1 && verbose)
-				(void) printf("%s:\n", fname);
-
-			(void) printf("< %c %04o %s %s %s%s\n", line.realtype,
-			    line.mode | mode_diff, line.old_owner, line.group,
-			    basedir, line.path);
-			(void) printf("> %c %04o %s %s %s%s\n", line.realtype,
-			    line.mode, line.owner, line.group, basedir,
-			    line.path);
-		}
-	}
-	(void) fclose(map);
-
-	if (newmap != NULL) {
-		(void) fflush(newmap);
-		if (ferror(newmap)) {
-			(void) fprintf(stderr, "Error writing %s\n", name);
-			return;
-		}
-		(void) fclose(newmap);
-		if (nchanges == 0)
-			(void) unlink(newname);
-		else if (installnew) {
-			char oldname[MAXPATHLEN];
-
-			(void) strcpy(oldname, name);
-			(void) strcat(oldname, ".old");
-			if (rename(name, oldname) == -1 ||
-			    rename(newname, name) == -1)
-				(void) fprintf(stderr,
-				    "Couldn't install %s: %s\n",
-				    newname, strerror(errno));
-		}
-	}
-}
--- old/usr/src/tools/scripts/Makefile	2018-01-25 19:54:43.993812049 +0000
+++ new/usr/src/tools/scripts/Makefile	2018-01-25 19:54:44.052085348 +0000
@@ -31,7 +31,6 @@
 	build_cscope \
 	bringovercheck \
 	checkpaths \
-	checkproto \
 	cstyle \
 	elfcmp \
 	flg.flp \
--- old/usr/src/tools/scripts/checkproto.sh	2018-01-25 19:54:44.890695723 +0000
+++ /dev/null	2018-01-25 19:54:44.000000000 +0000
@@ -1,88 +0,0 @@
-#!/bin/ksh -e
-#
-# 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 2006 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-MACH=`uname -p`
-PLIST=/tmp/protolist.$$
-
-usage() {
-	echo "usage: $0 <workspace>"
-	exit 1
-}
-
-OPTIND=1
-while getopts X flag
-do
-	case $flag in
-	*)	usage
-		;;
-	esac
-done
-
-shift `expr $OPTIND - 1`
-
-if [ $# = 0 -a "${CODEMGR_WS}" != "" ]; then
-	WS=${CODEMGR_WS}
-elif [ $# -ne 1 ]; then
-	usage
-else
-	WS=$1
-fi
-
-
-GUFLAG="-gu"
-if [ "${NIGHTLY_OPTIONS%o*}" != "$NIGHTLY_OPTIONS" ]; then
-	GUFLAG=
-fi
-
-if [ ! -d ${WS} ]; then
-	echo "${WS} is not a workspace"
-	exit 1
-fi
-
-if [ -z "${SRC}" ]; then
-	SRC=${WS}/usr/src
-fi
-
-PROTO=${WS}/proto/root_${MACH}
-
-rm -f $PLIST
-
-pkglocns="${SRC}/pkgdefs"
-[ -d ${SRC}/../closed/pkgdefs ] && pkglocns="$pkglocns ${SRC}/../closed/pkgdefs"
-
-exceptions=""
-pkgdefs=""
-for p in $pkglocns; do
-	efile="$p/etc/exception_list_${MACH}"
-	[ -f $efile ] && exceptions="$exceptions -e $efile"
-	pkgdefs="$pkgdefs -d $p"
-done
-
-protolist ${PROTO} > $PLIST
-protocmp ${GUFLAG} $exceptions $pkgdefs ${PLIST}
-
-rm -f $PLIST
