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


   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.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  23 
  24 
  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
  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.
  35 
  36 Layout of /opt/onbld
  37 --------------------
  38 
  39 /opt/onbld/etc/abi
  40         contains Solaris ABI database (ABI_*.db) and exceptions
  41         for ABI Auditing tool (interface_check, interface_cmp).
  42 
  43 /opt/onbld/gk
  44         gk account's home directory.
  45 
  46 /opt/onbld/bin
  47         basic bin directory - contains scripts.
  48 
  49 /opt/onbld/bin/${MACH}
  50         architecture-specific bin directory for binaries.
  51 
  52 /opt/onbld/env
  53         build environment files.
  54 
  55 /opt/onbld/lib
  56         libraries used by the build tools.
  57 
  58 /opt/onbld/lib/python<version>/
  59         python modules used by the build tools.
  60 
  61 /opt/onbld/lib/python<version>/onbld/hgext
  62         Mercurial extensions.
  63 
  64 /opt/onbld/lib/python/ 
  65         symlink to the modules directory of the currently preferred


  84         sets the environment up differently and may cause everything
  85         to rebuild (because of different -I or -L paths).
  86 
  87 build_cscope
  88         builds cscope databases in the uts, the platform subdirectories
  89         of uts, and in usr/src. Uses cscope-fast.
  90 
  91 cdm 
  92         A Mercurial extension providing various commands useful for ON
  93         development
  94 
  95 check_rtime
  96         checks ELF attributes used by ELF dynamic objects in the proto area.
  97         Used by 'nightly's -r option, to check a number of ELF runtime
  98         attributes for consistency with common build rules.  nightly uses
  99         the -o option to simplify the output for diffing with previous
 100         build results.  It also uses the -i option to obtain NEEDED and RUNPATH
 101         entries, which help detect changes in software dependencies and makes
 102         sure objects don't have any strange runpaths like /opt/SUNWspro/lib.
 103 
 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 codereview
 110         Given two filenames, creates a postscript file with the file 
 111         differences highlighted.
 112 
 113 codesign
 114         Tools for signing cryptographic modules using the official
 115         Sun release keys stored on a remote signing server. This
 116         directory contains signit, a client program for signing
 117         files with the signing server; signproto, a shell script
 118         that finds crypto modules in $ROOT and signs them using
 119         signit; and codesign_server.pl, the code that runs on the
 120         server. The codesign_server code is not used on an ON
 121         build machine but is kept here for source control purposes.
 122 
 123 copyrightchk
 124         Checks that files have appropriate SMI copyright notices.
 125         Primarily used by wx
 126 
 127 cscope-fast
 128         The fast version of cscope that we use internally. Seems to work,
 129         but may need more testing before it's placed in the gate. The source
 130         just really needs to be here.
 131         
 132 cstyle
 133         checks C source for compliance with OS/Net guidelines.
 134 
 135 ctfconvert
 136         Convert symbolic debugging information in an object file to the Compact
 137         ANSI-C Type Format (CTF).
 138 
 139 ctfdump
 140         Decode and display CTF data stored in a raw file or in an ELF file.
 141 
 142 ctfmerge
 143         Merge the CTF data from one or more object files.
 144 
 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 elfcmp
 154         Compares two ELF modules (e.g. .o files, executables) section by
 155         section.  Useful for determining whether "trivial" changes -
 156         cstyle, lint, etc - actually changed the code.  The -S option
 157         is used to test whether two binaries are the same except for
 158         the elfsign signature.
 159 
 160 find_elf
 161         Search a directory tree for ELF objects, and produce one line of
 162         output per object. Used by check_rtime and interface_check to locate
 163         the objects to examine.
 164 
 165 findunref
 166         Finds all files in a source tree that have access times older than a
 167         certain time and are not in a specified list of exceptions.  Since
 168         'nightly' timestamps the start of the build, and findunref uses its
 169         timestamp (by default), this can be used to find all files that were
 170         unreferenced during a nightly build).  Since some files are only used
 171         during a SPARC or Intel build, 'findunref' needs to be run on
 172         workspaces from both architectures and the results need to be merged.


 209         gates to ensure that older releases remain compatible with the
 210         development gate. It can also be used to validate new changes to
 211         the development gate before they are integrated.
 212 
 213 lintdump
 214         dumps the contents of one or more lint libraries; see lintdump(1)
 215 
 216 ndrgen
 217         Network Data Language (NDL) RPC protocol compiler to support DCE
 218         RPC/MSRPC and SMB/CIFS.  ndrgen takes an input protocol definition
 219         file (say, proto.ndl) and generates an output C source file
 220         (proto_ndr.c) containing the Network Data Representation (NDR)
 221         marshalling routines to implement the RPC protocol.
 222 
 223 nightly
 224         nightly build script. Takes an environment (or 'env') file describing
 225         such things as the workspace, the parent, and what to build. See
 226         env/developer and env/gatekeeper for sample, hopefully well-commented
 227         env files.
 228 
 229 pmodes
 230         enforces proper file ownership and permissions in pkgmap and package
 231         prototype* files.  converts files if necessary
 232 
 233 protocmp
 234         compares proto lists and the package definitions. Used by nightly
 235         to determine if the proto area matches the packages, and to detect
 236         differences between a childs proto area and a parents.
 237 
 238 protocmp.terse
 239         transforms the output of protocmp into something a bit more friendly
 240 
 241 protolist
 242         create a list of what's in the proto area, to feed to protocmp.
 243 
 244 
 245 ws
 246         creates a shell with the environment set up to build in the given
 247         workspace. Used mostly for non-full-build workspaces, so it sets up
 248         to pull headers and libraries from the proto area of the parent if
 249         they aren't in the childs proto area.
 250 
 251 tokenize
 252         Used to build the sun4u boot block.


 262         Reports the current Source Code Management (SCM) system in use
 263         and the top-level directory of the workspace.
 264 
 265 wsdiff
 266         Detect object differences between two ON proto areas. Used by
 267         nightly(1) to determine what changed between two builds. Handy
 268         for identifying the set of built objects impacted by a given
 269         source change. This information is needed for patch construction.
 270 
 271 
 272 How to do a full build
 273 ----------------------
 274 
 275 1. Find an environment file that might do what you want to do. If you're just
 276    a developer wanting to do a full build in a child of the gate, copy the
 277    'developer' environment file to a new name (private to you and/or the
 278    work being done in this workspace, to avoid collisions with others). Then
 279    edit the file and tailor it to your workspace. Remember that this file
 280    is a shell script, so it can do more than set environment variables.
 281 
 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
 284    option. 'nightly' will first look for your environment file in
 285    /opt/onbld/env, and if it's not there then it will look for it as an
 286    absolute or relative path. Some people put their environment files in
 287    their workspace to keep them close.
 288 
 289 3. When 'nightly' is complete, it will send a summary of what happened to
 290    $MAILTO. Usually, the less info in the mail the better. If you have failures,
 291    you can go look at the full log of what happened, generally in
 292    $CODEMGR_WS/log/log.<date>/nightly.log (the mail_msg it sent and the proto
 293    list are there too). You can also find the individual build logs, like
 294    'make clobber' and 'make install' output in $SRC, under names like
 295    clobber-${MACH}.out and install-${MACH}.out (for a DEBUG build). These
 296    will be smaller than nightly.log, and maybe more searchable.
 297 
 298 Files you have to update to add a tool
 299 --------------------------------------
 300 
 301 1.  Add the tool in its appropriate place.
 302 2.  Update the Makefile as required.
 303 3.  Update usr/src/pkg/manifests/developer-build-onbld.mf


   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.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  23 
  24 
  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
  28 in $ROOT/opt/onbld.






  29 
  30 Layout of /opt/onbld
  31 --------------------
  32 
  33 /opt/onbld/etc/abi
  34         contains Solaris ABI database (ABI_*.db) and exceptions
  35         for ABI Auditing tool (interface_check, interface_cmp).
  36 



  37 /opt/onbld/bin
  38         basic bin directory - contains scripts.
  39 
  40 /opt/onbld/bin/${MACH}
  41         architecture-specific bin directory for binaries.
  42 
  43 /opt/onbld/env
  44         build environment files.
  45 
  46 /opt/onbld/lib
  47         libraries used by the build tools.
  48 
  49 /opt/onbld/lib/python<version>/
  50         python modules used by the build tools.
  51 
  52 /opt/onbld/lib/python<version>/onbld/hgext
  53         Mercurial extensions.
  54 
  55 /opt/onbld/lib/python/ 
  56         symlink to the modules directory of the currently preferred


  75         sets the environment up differently and may cause everything
  76         to rebuild (because of different -I or -L paths).
  77 
  78 build_cscope
  79         builds cscope databases in the uts, the platform subdirectories
  80         of uts, and in usr/src. Uses cscope-fast.
  81 
  82 cdm 
  83         A Mercurial extension providing various commands useful for ON
  84         development
  85 
  86 check_rtime
  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.
  94 





  95 codereview
  96         Given two filenames, creates a postscript file with the file 
  97         differences highlighted.
  98 
  99 codesign
 100         Tools for signing cryptographic modules using the official
 101         Sun release keys stored on a remote signing server. This
 102         directory contains signit, a client program for signing
 103         files with the signing server; signproto, a shell script
 104         that finds crypto modules in $ROOT and signs them using
 105         signit; and codesign_server.pl, the code that runs on the
 106         server. The codesign_server code is not used on an ON
 107         build machine but is kept here for source control purposes.
 108 
 109 copyrightchk
 110         Checks that files have appropriate SMI copyright notices.
 111         Primarily used by wx
 112 
 113 cscope-fast
 114         The fast version of cscope that we use internally. Seems to work,
 115         but may need more testing before it's placed in the gate. The source
 116         just really needs to be here.
 117         
 118 cstyle
 119         checks C source for compliance with OS/Net guidelines.
 120 
 121 ctfconvert
 122         Convert symbolic debugging information in an object file to the Compact
 123         ANSI-C Type Format (CTF).
 124 
 125 ctfdump
 126         Decode and display CTF data stored in a raw file or in an ELF file.
 127 
 128 ctfmerge
 129         Merge the CTF data from one or more object files.
 130 








 131 elfcmp
 132         Compares two ELF modules (e.g. .o files, executables) section by
 133         section.  Useful for determining whether "trivial" changes -
 134         cstyle, lint, etc - actually changed the code.  The -S option
 135         is used to test whether two binaries are the same except for
 136         the elfsign signature.
 137 
 138 find_elf
 139         Search a directory tree for ELF objects, and produce one line of
 140         output per object. Used by check_rtime and interface_check to locate
 141         the objects to examine.
 142 
 143 findunref
 144         Finds all files in a source tree that have access times older than a
 145         certain time and are not in a specified list of exceptions.  Since
 146         'nightly' timestamps the start of the build, and findunref uses its
 147         timestamp (by default), this can be used to find all files that were
 148         unreferenced during a nightly build).  Since some files are only used
 149         during a SPARC or Intel build, 'findunref' needs to be run on
 150         workspaces from both architectures and the results need to be merged.


 187         gates to ensure that older releases remain compatible with the
 188         development gate. It can also be used to validate new changes to
 189         the development gate before they are integrated.
 190 
 191 lintdump
 192         dumps the contents of one or more lint libraries; see lintdump(1)
 193 
 194 ndrgen
 195         Network Data Language (NDL) RPC protocol compiler to support DCE
 196         RPC/MSRPC and SMB/CIFS.  ndrgen takes an input protocol definition
 197         file (say, proto.ndl) and generates an output C source file
 198         (proto_ndr.c) containing the Network Data Representation (NDR)
 199         marshalling routines to implement the RPC protocol.
 200 
 201 nightly
 202         nightly build script. Takes an environment (or 'env') file describing
 203         such things as the workspace, the parent, and what to build. See
 204         env/developer and env/gatekeeper for sample, hopefully well-commented
 205         env files.
 206 




 207 protocmp
 208         compares proto lists and the package definitions. Used by nightly
 209         to determine if the proto area matches the packages, and to detect
 210         differences between a childs proto area and a parents.
 211 
 212 protocmp.terse
 213         transforms the output of protocmp into something a bit more friendly
 214 
 215 protolist
 216         create a list of what's in the proto area, to feed to protocmp.
 217 
 218 
 219 ws
 220         creates a shell with the environment set up to build in the given
 221         workspace. Used mostly for non-full-build workspaces, so it sets up
 222         to pull headers and libraries from the proto area of the parent if
 223         they aren't in the childs proto area.
 224 
 225 tokenize
 226         Used to build the sun4u boot block.


 236         Reports the current Source Code Management (SCM) system in use
 237         and the top-level directory of the workspace.
 238 
 239 wsdiff
 240         Detect object differences between two ON proto areas. Used by
 241         nightly(1) to determine what changed between two builds. Handy
 242         for identifying the set of built objects impacted by a given
 243         source change. This information is needed for patch construction.
 244 
 245 
 246 How to do a full build
 247 ----------------------
 248 
 249 1. Find an environment file that might do what you want to do. If you're just
 250    a developer wanting to do a full build in a child of the gate, copy the
 251    'developer' environment file to a new name (private to you and/or the
 252    work being done in this workspace, to avoid collisions with others). Then
 253    edit the file and tailor it to your workspace. Remember that this file
 254    is a shell script, so it can do more than set environment variables.
 255 
 256 2. Run 'nightly' and give it your environment file as an

 257    option. 'nightly' will first look for your environment file in
 258    /opt/onbld/env, and if it's not there then it will look for it as an
 259    absolute or relative path. Some people put their environment files in
 260    their workspace to keep them close.
 261 
 262 3. When 'nightly' is complete, it will send a summary of what happened to
 263    $MAILTO. Usually, the less info in the mail the better. If you have failures,
 264    you can go look at the full log of what happened, generally in
 265    $CODEMGR_WS/log/log.<date>/nightly.log (the mail_msg it sent and the proto
 266    list are there too). You can also find the individual build logs, like
 267    'make clobber' and 'make install' output in $SRC, under names like
 268    clobber-${MACH}.out and install-${MACH}.out (for a DEBUG build). These
 269    will be smaller than nightly.log, and maybe more searchable.
 270 
 271 Files you have to update to add a tool
 272 --------------------------------------
 273 
 274 1.  Add the tool in its appropriate place.
 275 2.  Update the Makefile as required.
 276 3.  Update usr/src/pkg/manifests/developer-build-onbld.mf