4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
25 This directory contains the tools used to do a full build of the
26 OS/Net workspace. They usually live in the /opt/onbld directory on build
27 machines. From here, 'make install' will build and install the tools
34 contains Solaris ABI database (ABI_*.db) and exceptions
35 for ABI Auditing tool (interface_check, interface_cmp).
38 basic bin directory - contains scripts.
40 /opt/onbld/bin/${MACH}
41 architecture-specific bin directory for binaries.
44 build environment files.
47 libraries used by the build tools.
49 /opt/onbld/lib/python<version>/
50 python modules used by the build tools.
52 /opt/onbld/lib/python<version>/onbld/hgext
55 /opt/onbld/lib/python/
56 symlink to the modules directory of the currently preferred
57 python version. This exists to retain compatibility both for
58 tools expecting only one supported version of python, and for
59 user .hgrc files that expect to find cdm.py in
60 /opt/onbld/lib/python/onbld/hgext.
63 rudimentary man pages for some of the tools.
70 companion to 'nightly.' Takes the same environment file you
71 used with 'nightly,' and starts a shell with the environment
72 set up the same way as 'nightly' set it up. This is useful
73 if you're trying to quickly rebuild portions of a workspace
74 built by 'nightly'. 'ws' should not be used for this since it
75 sets the environment up differently and may cause everything
76 to rebuild (because of different -I or -L paths).
79 builds cscope databases in the uts, the platform subdirectories
80 of uts, and in usr/src. Uses cscope-fast.
83 A Mercurial extension providing various commands useful for ON
87 checks ELF attributes used by ELF dynamic objects in the proto area.
88 Used by 'nightly's -r option, to check a number of ELF runtime
89 attributes for consistency with common build rules. nightly uses
90 the -o option to simplify the output for diffing with previous
91 build results. It also uses the -i option to obtain NEEDED and RUNPATH
92 entries, which help detect changes in software dependencies and makes
93 sure objects don't have any strange runpaths like /opt/SUNWspro/lib.
96 Runs protocmp and protolist on a workspace (or uses the environment
97 variable CODEMGR_WS to determine the workspace). Checks the proto area
101 Given two filenames, creates a postscript file with the file
102 differences highlighted.
105 Tools for signing cryptographic modules using the official
106 Sun release keys stored on a remote signing server. This
107 directory contains signit, a client program for signing
108 files with the signing server; signproto, a shell script
109 that finds crypto modules in $ROOT and signs them using
110 signit; and codesign_server.pl, the code that runs on the
111 server. The codesign_server code is not used on an ON
112 build machine but is kept here for source control purposes.
115 Checks that files have appropriate SMI copyright notices.
119 The fast version of cscope that we use internally. Seems to work,
120 but may need more testing before it's placed in the gate. The source
121 just really needs to be here.
124 checks C source for compliance with OS/Net guidelines.
127 Convert symbolic debugging information in an object file to the Compact
128 ANSI-C Type Format (CTF).
131 Decode and display CTF data stored in a raw file or in an ELF file.
134 Merge the CTF data from one or more object files.
137 A tool to try an assess the dependencies of executables. This tool
138 is not a definitive dependency check, but it does use "strings" and
139 "ldd" to gather as much information as it can. The dependency check
140 tool can handle filenames and pkgnames. Before using the dependency
141 checker you must build a database which reflects the properties and
142 files in your system.
145 Compares two ELF modules (e.g. .o files, executables) section by
146 section. Useful for determining whether "trivial" changes -
147 cstyle, lint, etc - actually changed the code. The -S option
148 is used to test whether two binaries are the same except for
149 the elfsign signature.
152 Search a directory tree for ELF objects, and produce one line of
153 output per object. Used by check_rtime and interface_check to locate
154 the objects to examine.
157 Finds all files in a source tree that have access times older than a
158 certain time and are not in a specified list of exceptions. Since
159 'nightly' timestamps the start of the build, and findunref uses its
160 timestamp (by default), this can be used to find all files that were
161 unreferenced during a nightly build). Since some files are only used
162 during a SPARC or Intel build, 'findunref' needs to be run on
163 workspaces from both architectures and the results need to be merged.
164 For instance, if $INTELSRC and $SPARCSRC are set to the usr/src
165 directories of your Intel and SPARC nightly workspaces, then you
166 can merge the results like so:
168 $ findunref $INTELSRC $INTELSRC/tools/findunref/exception_list | \
169 sort > ~/unref-i386.out
170 $ findunref $SPARCSRC $SPARCSRC/tools/findunref/exception_list | \
171 sort > ~/unref-sparc.out
172 $ comm -12 ~/unref-i386.out ~/unref-sparc.out > ~/unref.out
175 checks headers for compliance with OS/Net standards (form, includes,
179 creates a basic Mercurial configuration for the user.
182 helper used by webrev to generate file lists for Mercurial
186 binary version of /usr/sbin/install. Used to be vastly faster
187 (since /usr/sbin/install is a shell script), but may only be a bit
188 faster now. One speedup includes avoiding the name service for the
189 well-known, never-changing password entries like 'root' and 'sys.'
192 detects and reports invalid versioning in ELF objects.
193 Optionally generates an interface description file for
197 Compares two interface description files, as produced by
198 interface_check, and flags invalid deviations in ELF object
199 versioning between them. interface_cmp can be used between Solaris
200 gates to ensure that older releases remain compatible with the
201 development gate. It can also be used to validate new changes to
202 the development gate before they are integrated.
205 dumps the contents of one or more lint libraries; see lintdump(1)
208 Network Data Language (NDL) RPC protocol compiler to support DCE
209 RPC/MSRPC and SMB/CIFS. ndrgen takes an input protocol definition
210 file (say, proto.ndl) and generates an output C source file
211 (proto_ndr.c) containing the Network Data Representation (NDR)
212 marshalling routines to implement the RPC protocol.
215 nightly build script. Takes an environment (or 'env') file describing
216 such things as the workspace, the parent, and what to build. See
217 env/developer and env/gatekeeper for sample, hopefully well-commented
221 enforces proper file ownership and permissions in pkgmap and package
222 prototype* files. converts files if necessary
225 compares proto lists and the package definitions. Used by nightly
226 to determine if the proto area matches the packages, and to detect
227 differences between a childs proto area and a parents.
230 transforms the output of protocmp into something a bit more friendly
233 create a list of what's in the proto area, to feed to protocmp.
237 creates a shell with the environment set up to build in the given
238 workspace. Used mostly for non-full-build workspaces, so it sets up
239 to pull headers and libraries from the proto area of the parent if
240 they aren't in the childs proto area.
243 Used to build the sun4u boot block.
246 Generates a set of HTML pages that show side-by-side diffs of
247 changes in your workspace, for easy communication of code
248 review materials. Can automagically find edited files or use a
249 manually-generated list; knows how to use wx's active file for
250 lists of checked-out files and proposed SCCS comments.
253 Reports the current Source Code Management (SCM) system in use
254 and the top-level directory of the workspace.
257 Detect object differences between two ON proto areas. Used by
258 nightly(1) to determine what changed between two builds. Handy
259 for identifying the set of built objects impacted by a given
260 source change. This information is needed for patch construction.
263 How to do a full build
264 ----------------------
266 1. Find an environment file that might do what you want to do. If you're just
267 a developer wanting to do a full build in a child of the gate, copy the
268 'developer' environment file to a new name (private to you and/or the
269 work being done in this workspace, to avoid collisions with others). Then
270 edit the file and tailor it to your workspace. Remember that this file
271 is a shell script, so it can do more than set environment variables.
273 2. Run 'nightly' and give it your environment file as an
274 option. 'nightly' will first look for your environment file in
275 /opt/onbld/env, and if it's not there then it will look for it as an
276 absolute or relative path. Some people put their environment files in
277 their workspace to keep them close.
279 3. When 'nightly' is complete, it will send a summary of what happened to
280 $MAILTO. Usually, the less info in the mail the better. If you have failures,
281 you can go look at the full log of what happened, generally in
282 $CODEMGR_WS/log/log.<date>/nightly.log (the mail_msg it sent and the proto
283 list are there too). You can also find the individual build logs, like
284 'make clobber' and 'make install' output in $SRC, under names like
285 clobber-${MACH}.out and install-${MACH}.out (for a DEBUG build). These
286 will be smaller than nightly.log, and maybe more searchable.
288 Files you have to update to add a tool
289 --------------------------------------
291 1. Add the tool in its appropriate place.
292 2. Update the Makefile as required.
293 3. Update usr/src/pkg/manifests/developer-build-onbld.mf
294 4. Update usr/src/tools/README.tools (this file).
295 5. Repeat 1-4 for any man pages.