Print this page
Add git-active utility
| 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]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 #ident "%Z%%M% %I% %E% SMI"
26 26
27 27 This directory contains the tools used to do a full build of the
28 28 OS/Net workspace. They usually live in the /opt/onbld directory on build
29 29 machines. From here, 'make install' will build and install the tools
30 30 in $ROOT/opt/onbld. If you like, 'make pkg' will build the SUNWonbld
31 31 package in $(PKGARCHIVE). Installing that package will populate the
32 32 /opt/onbld directory, and create a root account for building called 'gk',
33 33 which uses csh and has a home directory of /opt/onbld/gk. You can
34 34 use this account to do full builds with 'nightly'. You don't have to,
35 35 but the 'gk' account has the path setup properly, has a .make.machines
36 36 file for dmake, and has a .login that sets up for dmake.
37 37
38 38 Layout of /opt/onbld
39 39 --------------------
40 40
41 41 /opt/onbld/etc/abi
42 42 contains Solaris ABI database (ABI_*.db) and exceptions
43 43 for ABI Auditing tool (intf_check).
44 44
45 45 /opt/onbld/gk
46 46 gk account's home directory.
47 47
48 48 /opt/onbld/bin
49 49 basic bin directory - contains scripts.
50 50
51 51 /opt/onbld/bin/${MACH}
52 52 architecture-specific bin directory for binaries.
53 53
54 54 /opt/onbld/env
55 55 build environment files.
56 56
57 57 /opt/onbld/lib
58 58 libraries used by the build tools.
59 59
60 60 /opt/onbld/lib/python
61 61 python modules used by the build tools.
62 62
63 63 /opt/onbld/lib/python/onbld/hgext
64 64 Mercurial extensions.
65 65
66 66 /opt/onbld/man
67 67 rudimentary man pages for some of the tools.
68 68
69 69
70 70 Tool Summary
71 71 ------------
72 72
73 73 bfu
74 74 bonwick/faulkner upgrade. Loads a set of cpio archives created
75 75 by 'mkbfu' onto a machine, either live or on alternate root
76 76 and /usr filesystems. Attempts to preserve important files,
77 77 but may require manual intervention before reboot to resolve
78 78 changes to preserved files.
79 79
80 80 bfuld
81 81 Used by bfu to survive getting a new runtime linker when extracting
82 82 new cpio archives onto a live system. Patches binaries to use
83 83 a saved runtime linker in /tmp during the bfu process.
84 84 Not run by anything but bfu.
85 85
86 86 bldenv
87 87 companion to 'nightly.' Takes the same environment file you
88 88 used with 'nightly,' and starts a shell with the environment
89 89 set up the same way as 'nightly' set it up. This is useful
90 90 if you're trying to quickly rebuild portions of a workspace
91 91 built by 'nightly'. 'ws' should not be used for this since it
92 92 sets the environment up differently and may cause everything
93 93 to rebuild (because of different -I or -L paths).
94 94
95 95 build_cscope
96 96 builds cscope databases in the uts, the platform subdirectories
97 97 of uts, and in usr/src. Uses cscope-fast.
98 98
99 99 cdm
100 100 A Mercurial extension providing various commands useful for ON
101 101 development
102 102
103 103 check_rtime
104 104 checks ELF attributes used by ELF dynamic objects in the proto area.
105 105 Used by 'nightly's -r option, to check a number of ELF runtime
106 106 attributes for consistency with common build rules. nightly uses
107 107 the -o option to simplify the output for diffing with previous
108 108 build results. It also uses the -i option to obtain NEEDED and RUNPATH
109 109 entries, which help detect changes in software dependencies and makes
110 110 sure objects don't have any strange runpaths like /opt/SUNWspro/lib.
111 111
112 112 checkproto
113 113 Runs protocmp and protolist on a workspace (or uses the environment
114 114 variable CODEMGR_WS to determine the workspace). Checks the proto area
115 115 against the packages.
116 116
117 117 codereview
118 118 Given two filenames, creates a postscript file with the file
119 119 differences highlighted.
120 120
121 121 codesign
122 122 Tools for signing cryptographic modules using the official
123 123 Sun release keys stored on a remote signing server. This
124 124 directory contains signit, a client program for signing
125 125 files with the signing server; signproto, a shell script
126 126 that finds crypto modules in $ROOT and signs them using
127 127 signit; and codesign_server.pl, the code that runs on the
128 128 server. The codesign_server code is not used on an ON
129 129 build machine but is kept here for source control purposes.
130 130
131 131 copyrightchk
132 132 Checks that files have appropriate SMI copyright notices.
133 133 Primarily used by wx
134 134
135 135 cscope-fast
136 136 The fast version of cscope that we use internally. Seems to work,
137 137 but may need more testing before it's placed in the gate. The source
138 138 just really needs to be here.
139 139
140 140 cstyle
141 141 checks C source for compliance with OS/Net guidelines.
142 142
143 143 ctfconvert
144 144 Convert symbolic debugging information in an object file to the Compact
145 145 ANSI-C Type Format (CTF).
146 146
147 147 ctfdump
148 148 Decode and display CTF data stored in a raw file or in an ELF file.
149 149
150 150 ctfmerge
151 151 Merge the CTF data from one or more object files.
152 152
153 153 depcheck
154 154 A tool to try an assess the dependencies of executables. This tool
155 155 is not a definitive dependency check, but it does use "strings" and
156 156 "ldd" to gather as much information as it can. The dependency check
157 157 tool can handle filenames and pkgnames. Before using the dependency
158 158 checker you must build a database which reflects the properties and
159 159 files in your system.
160 160
161 161 elfcmp
162 162 Compares two ELF modules (e.g. .o files, executables) section by
163 163 section. Useful for determining whether "trivial" changes -
164 164 cstyle, lint, etc - actually changed the code. The -S option
165 165 is used to test whether two binaries are the same except for
166 166 the elfsign signature.
167 167
168 168 elfsign
169 169 Built from the same sources as the shipped elfsign(1), this
170 170 version is used in nightly -t builds to assure that the signing
171 171 process and format is the same as will be used on the target
172 172 system.
173 173
174 174 elfsigncmp
175 175 This script can be used in lieu of elfsign during a build.
176 176 It uses elfsign to sign a copy of the object and elfcmp -S to
177 177 verify that the signing caused no damage before updating
178 178 the object to be signed.
179 179
180 180 findunref
181 181 Finds all files in a source tree that have access times older than a
182 182 certain time and are not in a specified list of exceptions. Since
183 183 'nightly' timestamps the start of the build, and findunref uses its
184 184 timestamp (by default), this can be used to find all files that were
185 185 unreferenced during a nightly build). Since some files are only used
186 186 during a SPARC or Intel build, 'findunref' needs to be run on
187 187 workspaces from both architectures and the results need to be merged.
|
↓ open down ↓ |
187 lines elided |
↑ open up ↑ |
188 188 For instance, if $INTELSRC and $SPARCSRC are set to the usr/src
189 189 directories of your Intel and SPARC nightly workspaces, then you
190 190 can merge the results like so:
191 191
192 192 $ findunref $INTELSRC $INTELSRC/tools/findunref/exception_list | \
193 193 sort > ~/unref-i386.out
194 194 $ findunref $SPARCSRC $SPARCSRC/tools/findunref/exception_list | \
195 195 sort > ~/unref-sparc.out
196 196 $ comm -12 ~/unref-i386.out ~/unref-sparc.out > ~/unref.out
197 197
198 +git-active
199 + helper used by webrev to generate file lists for Git workspaces.
200 +
198 201 hdrchk
199 202 checks headers for compliance with OS/Net standards (form, includes,
200 203 C++ guards).
201 204
202 205 hgsetup
203 206 creates a basic Mercurial configuration for the user.
204 207
205 208 hg-active
206 209 helper used by webrev to generate file lists for Mercurial
207 210 workspaces.
208 211
209 212 install.bin
210 213 binary version of /usr/sbin/install. Used to be vastly faster
211 214 (since /usr/sbin/install is a shell script), but may only be a bit
212 215 faster now. One speedup includes avoiding the name service for the
213 216 well-known, never-changing password entries like 'root' and 'sys.'
214 217
215 218 intf_check
216 219 detects and reports ABI versioning and stability problems.
217 220
218 221 lintdump
219 222 dumps the contents of one or more lint libraries; see lintdump(1)
220 223
221 224 keywords
222 225 checks files for proper SCCS keywords.
223 226
224 227 makebfu
225 228 simple wrapper around 'mkbfu' for use outside nightly (when in a build
226 229 shell from 'ws' or 'bldenv').
227 230
228 231 mkbfu
229 232 makes cpio archives out of the proto area suitable for bfu'ing.
230 233 Used by 'nightly' and 'makebfu'.
231 234
232 235 ndrgen
233 236 Network Data Language (NDL) RPC protocol compiler to support DCE
234 237 RPC/MSRPC and SMB/CIFS. ndrgen takes an input protocol definition
235 238 file (say, proto.ndl) and generates an output C source file
236 239 (proto_ndr.c) containing the Network Data Representation (NDR)
237 240 marshalling routines to implement the RPC protocol.
238 241
239 242 nightly
240 243 nightly build script. Takes an environment (or 'env') file describing
241 244 such things as the workspace, the parent, and what to build. See
242 245 env/developer and env/gatekeeper for sample, hopefully well-commented
243 246 env files.
244 247
245 248 pmodes
246 249 enforces proper file ownership and permissions in pkgmap and package
247 250 prototype* files. converts files if necessary
248 251
249 252 protocmp
250 253 compares proto lists and the package definitions. Used by nightly
251 254 to determine if the proto area matches the packages, and to detect
252 255 differences between a childs proto area and a parents.
253 256
254 257 protocmp.terse
255 258 transforms the output of protocmp into something a bit more friendly
256 259
257 260 protolist
258 261 create a list of what's in the proto area, to feed to protocmp.
259 262
260 263 rtichk
261 264 checks that a set of CRs have approved RTIs. Primarily used
262 265 by wx
263 266
264 267 sccscp
265 268 copy a file under SCCS control to another location in a workspace.
266 269 also updates teamware's nametable.
267 270
268 271 sccshist
269 272 Display the history, comments and diffs, of a file under SCCS
270 273 control.
271 274
272 275 sccsmv
273 276 rename a file under SCCS control to another location in a workspace.
274 277 also updates teamware's nametable.
275 278
276 279 sccsrm
277 280 delete a file under SCCS control workspace. also updates teamware's
278 281 nametable. Actually renames it to .del-<file>-`date` so that others
279 282 will see it move when it is brought over (in case they were working
280 283 on it).
281 284
282 285 ws
283 286 creates a shell with the environment set up to build in the given
284 287 workspace. Used mostly for non-full-build workspaces, so it sets up
285 288 to pull headers and libraries from the proto area of the parent if
286 289 they aren't in the childs proto area.
287 290
288 291 wx
289 292 A great workspace tool by bonwick. See wx.README for information
290 293 and warnings.
291 294
292 295 wx2hg
293 296 Converts a TeamWare workspace under the control of wx to a
294 297 Mercurial workspace, discarding intermediate deltas.
295 298
296 299 tokenize
297 300 Used to build the sun4u boot block.
298 301
299 302 webrev
300 303 Generates a set of HTML pages that show side-by-side diffs of
301 304 changes in your workspace, for easy communication of code
302 305 review materials. Can automagically find edited files or use a
303 306 manually-generated list; knows how to use wx's active file for
304 307 lists of checked-out files and proposed SCCS comments.
305 308
306 309 which_scm
307 310 Reports the current Source Code Management (SCM) system in use
308 311 and the top-level directory of the workspace.
309 312
310 313 wsdiff
311 314 Detect object differences between two ON proto areas. Used by
312 315 nightly(1) to determine what changed between two builds. Handy
313 316 for identifying the set of built objects impacted by a given
314 317 source change. This information is needed for patch construction.
315 318
316 319
317 320 How to do a full build
318 321 ----------------------
319 322
320 323 1. Find an environment file that might do what you want to do. If you're just
321 324 a developer wanting to do a full build in a child of the gate, copy the
322 325 'developer' environment file to a new name (private to you and/or the
323 326 work being done in this workspace, to avoid collisions with others). Then
324 327 edit the file and tailor it to your workspace. Remember that this file
325 328 is a shell script, so it can do more than set environment variables.
326 329
327 330 2. Login as 'gk' (or root, but your PATH and .make.machines for dmake will
328 331 not be right). Run 'nightly' and give it your environment file as an
329 332 option. 'nightly' will first look for your environment file in
330 333 /opt/onbld/env, and if it's not there then it will look for it as an
331 334 absolute or relative path. Some people put their environment files in
332 335 their workspace to keep them close.
333 336
334 337 3. When 'nightly' is complete, it will send a summary of what happened to
335 338 $MAILTO. Usually, the less info in the mail the better. If you have failures,
336 339 you can go look at the full log of what happened, generally in
337 340 $CODEMGR_WS/log/log.<date>/nightly.log (the mail_msg it sent and the proto
338 341 list are there too). You can also find the individual build logs, like
339 342 'make clobber' and 'make install' output in $SRC, under names like
340 343 clobber-${MACH}.out and install-${MACH}.out (for a DEBUG build). These
341 344 will be smaller than nightly.log, and maybe more searchable.
342 345
343 346 Files you have to update to add a tool
344 347 --------------------------------------
345 348
346 349 1. Add the tool in its appropriate place.
347 350 2. Update the Makefile as required.
348 351 3. Update usr/src/tools/SUNWonbld/prototype_*.
349 352 4. Update usr/src/tools/README.tools (this file).
350 353 5. Repeat 1-4 for any man pages.
|
↓ open down ↓ |
143 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX