usr/src/README
author Dan Price <daniel.price@oracle.com>
Tue, 19 Jun 2012 15:59:08 -0700
changeset 1721 4ee0239d9a9f
parent 1640 851d069ece17
permissions -rw-r--r--
7176734 adjust for new IPS progress module API

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
#


Welcome to the mercurial source repository for the Caiman Project:
GUI Install, Text Install, Distribution Constructor and Auto Installer.
This source also includes the libraries needed for the Caiman Project.
--------------------------------------------------------------------

To setup a machine for building this source repository:
-------------------------------------------------------
NOTE: The following steps require the user to have sufficient privileges,
via pfexec or sudo, to install software on the build system.
 1. Get the SunStudio compilers.  There are two choices:
 	a) Mount/symlink or rsync cache the /ws/on11update-tools autofs.  This is
 	   highly recommended for Oracle internal developers.  The compilers
 	   are found at /ws/on11update-tools/SUNWspro/sunstudio12.1 (which is a
 	   symlink to the specific patched version used).
 	b) Via the Image Packaging System (IPS). To install, run the command
 	   "pkg install developer/sunstudio12u1".  This package may not
 	   be identical to the on11update-tools version, so is not preferred.
	    
	    Alternatively, the package "pkg:/developer/solaris-studio-express"
	    may be used. However, Solaris Studio 12 update 1 is the currently
	    supported build environment.

 2. Get the OS/Net Build Tools.  There are two choices:
 	a) Mount/symlink or rsync cache the /ws/on11update-tools autofs.  This is
 	   highly recommended for Oracle internal developers.  The onbld tools
 	   are found at /ws/on11update-tools/onbld/

        b) Via the Image Packaging System (IPS).  The repo for on-onbuild is here:
           http://ipkg.us.oracle.com/internal/solaris11/on/onbld

           To install, run the 
           command "pkg install pkg://on-onbuild/developer/build/onbld".

 3. Install required IPS packages:

	developer/build/dmake
	developer/swig
	system/boot/wanboot/internal
	system/header
	system/library/install/libinstzones
	system/library/libdiskmgt/header-libdiskmgt
	system/zones/internal
	text/gnu-gettext
	text/gnu-grep
	text/locale

    To get these packages, run "pkg install <package>"

To setup the repository to be built:
------------------------------------
 1. cd usr/src in the repository

 2. cp tools/env/developer.sh .; chmod +w developer.sh

    Some environment variables which might need to be changed:
    * You should set the path to your repository defined by CODEMGR_WS.
    * You may need to change the SPRO_ROOT variable to point to your
      installed compilers. Likely locations are:
	 /opt/SUNWspro (default)
	 /opt
	 /ws/on11update-tools

     In some circumstances overriding the SPRO_VROOT variable may be useful,
     as well as symlinks from /opt to your compiler location.

To build this repository use the following steps:
-------------------------------------------------
 1. cd usr/src in the repository

 2. To build, run: /opt/onbld/bin/nightly developer.sh 
    This updates the source from the Mercurial repository.
 
    If you do not wish to do a Mercurial pull as part of the nightly run,
    use the -n option.

    /opt/onbld/bin/nightly -n developer.sh

 3. Before packages can be published to the redist repositories, the
    package manifests in usr/src/pkg/manifests must be free from
    pkglint(1) ERRORs and pkgfmt(1) ERRORS. Please refer to 
    usr/src/pkg/README.pkg for more details.

To run unit tests and slim_code_cleanliness after building packages:
--------------------------------------------------------------------

 1. cd usr/src/tools/tests
 2.  Follow the README and run the slim_unit tests
 3.  If there is new unit tests failures, those must be fixed before putback.

To check for pep8 slim_code_cleanliness:
----------------------------------------

 1. Install the Python setup tools:
                pkg install library/python-2/setuptools-26
 
 2. In order to use easy_install, you might need to setup http_proxy:

    i.e:

     http_proxy=http://www-proxy.us.oracle.com/

 3. Install the pep8 tool:

                easy_install pep8
                (The warning messages during installation may be ignored)

     And the python setup tools will find it, download, and install it for you as /usr/bin/pep8

 4.  You can check for pep8 cleanliness mimicking the command that hudson uses:

/usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source <file/folder>

i.e.:

# cd lib/install_target
# /usr/bin/pep8 --ignore=E261,W291,W293 --count -r --show-source logical.py

logical.py:58:23: E241 multiple spaces after ','
    def __init__(self,  name):
                      ^
1

--------------------------------------------------------------------
Notes:

Please send questions, comments, contributions to:
         caiman-discuss (at) opensolaris.org