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