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