OpenGrok

Cross Reference: README
xref: /caiman/slim_source/usr/src/README
Home | History | Annotate | Line # | Download | only in src
      1 #
      2 # CDDL HEADER START
      3 #
      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.
      7 #
      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 # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
     22 #
     23 
     24 
     25 Welcome to the mercurial source repository for the Caiman Project:
     26 GUI Install, Text Install, Distribution Constructor and Auto Installer.
     27 This source also includes the libraries needed for the Caiman Project.
     28 --------------------------------------------------------------------
     29 
     30 To setup a machine for building this source repository:
     31 -------------------------------------------------------
     32 NOTE: The following steps require the user to have sufficient privileges,
     33 via pfexec or sudo, to install software on the build system.
     34  1. Get the SunStudio compilers.  There are two choices:
     35  	a) Mount/symlink or rsync cache the /ws/on11update-tools autofs.  This is
     36  	   highly recommended for Oracle internal developers.  The compilers
     37  	   are found at /ws/on11update-tools/SUNWspro/sunstudio12.1 (which is a
     38  	   symlink to the specific patched version used).
     39  	b) Via the Image Packaging System (IPS). To install, run the command
     40  	   "pkg install developer/sunstudio12u1".  This package may not
     41  	   be identical to the on11update-tools version, so is not preferred.
     42 	    
     43 	    Alternatively, the package "pkg:/developer/solaris-studio-express"
     44 	    may be used. However, Solaris Studio 12 update 1 is the currently
     45 	    supported build environment.
     46 
     47  2. Get the OS/Net Build Tools.  There are two choices:
     48  	a) Mount/symlink or rsync cache the /ws/on11update-tools autofs.  This is
     49  	   highly recommended for Oracle internal developers.  The onbld tools
     50  	   are found at /ws/on11update-tools/onbld/
     51 
     52         b) Via the Image Packaging System (IPS).  The repo for on-onbuild is here:
     53            http://ipkg.us.oracle.com/internal/solaris11/on/onbld
     54 
     55            To install, run the 
     56            command "pkg install pkg://on-onbuild/developer/build/onbld".
     57 
     58  3. Install required IPS packages:
     59 
     60 	developer/build/dmake
     61 	developer/swig
     62 	system/boot/wanboot/internal
     63 	system/header
     64 	system/library/install/libinstzones
     65 	system/library/libdiskmgt/header-libdiskmgt
     66 	system/zones/internal
     67 	text/gnu-gettext
     68 	text/gnu-grep
     69 	text/locale
     70 
     71     To get these packages, run "pkg install <package>"
     72 
     73 To setup the repository to be built:
     74 ------------------------------------
     75  1. cd usr/src in the repository
     76 
     77  2. cp tools/env/developer.sh .; chmod +w developer.sh
     78 
     79     Some environment variables which might need to be changed:
     80     * You should set the path to your repository defined by CODEMGR_WS.
     81     * You may need to change the SPRO_ROOT variable to point to your
     82       installed compilers. Likely locations are:
     83 	 /opt/SUNWspro (default)
     84 	 /opt
     85 	 /ws/on11update-tools
     86 
     87      In some circumstances overriding the SPRO_VROOT variable may be useful,
     88      as well as symlinks from /opt to your compiler location.
     89 
     90 To build this repository use the following steps:
     91 -------------------------------------------------
     92  1. cd usr/src in the repository
     93 
     94  2. To build, run: /opt/onbld/bin/nightly developer.sh 
     95     This updates the source from the Mercurial repository.
     96  
     97     If you do not wish to do a Mercurial pull as part of the nightly run,
     98     use the -n option.
     99 
    100     /opt/onbld/bin/nightly -n developer.sh
    101 
    102  3. Before packages can be published to the redist repositories, the
    103     package manifests in usr/src/pkg/manifests must be free from
    104     pkglint(1) ERRORs and pkgfmt(1) ERRORS. Please refer to 
    105     usr/src/pkg/README.pkg for more details.
    106 
    107 To run unit tests and slim_code_cleanliness after building packages:
    108 --------------------------------------------------------------------
    109 
    110  1. cd usr/src/tools/tests
    111  2.  Follow the README and run the slim_unit tests
    112  3.  If there is new unit tests failures, those must be fixed before putback.
    113 
    114 To check for pep8 slim_code_cleanliness:
    115 ----------------------------------------
    116 
    117  1. Install the Python setup tools:
    118                 pkg install library/python-2/setuptools-26
    119  
    120  2. In order to use easy_install, you might need to setup http_proxy:
    121 
    122     i.e:
    123 
    124      http_proxy=http://www-proxy.us.oracle.com/
    125 
    126  3. Install the pep8 tool:
    127 
    128                 easy_install pep8
    129                 (The warning messages during installation may be ignored)
    130 
    131      And the python setup tools will find it, download, and install it for you as /usr/bin/pep8
    132 
    133  4.  You can check for pep8 cleanliness mimicking the command that hudson uses:
    134 
    135 /usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source <file/folder>
    136 
    137 i.e.:
    138 
    139 # cd lib/install_target
    140 # /usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source logical.py
    141 
    142 logical.py:58:23: E241 multiple spaces after ','
    143     def __init__(self,  name):
    144                       ^
    145 1
    146 
    147 --------------------------------------------------------------------
    148 Notes:
    149 
    150 Please send questions, comments, contributions to:
    151          caiman-discuss (at) opensolaris.org
    152