Child pages
  • Building O.I. by sb

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Using TWW sb tool to build OpenIndiana OS 

WHAT: This page document the process to build OpenIndiana OS using a tool called "sb".



HOW: See "Procedure to setup TWW tool-sets on O.I-148."

TWW tool-sets  overview 

/opt/TWWfsw/bin/sb is part of TWW Inc's GNU licensed tool-sets.

  • /opt/TWWfsw/bin/sb : sb is a python script to automate the software building process.
  • /opt/TWWfsw/bin/pb : pb is a python wrapper script to act as proxy to different package manager to create native package formats for RPM,SVR4,SD-UX and others.
  • /opt/TWWfsw/bin/pkg-info,pkg-inst,pkg-rm : pkg-info, pkg-inst and pkg-rm are python wrapper script provide a layer of abstraction in terms of query package information, package installation and package removal.

pb and pkg-* tools are not subject of this page. We are going to only describe sb for building O.I. OS(software).

sb aim for high degree of automation in the domain of software building. In short, it is a DSL(Domain Specific Language) to describe and repeat software building process as much as possible by program(sb). Don't worry, it still can not replace software packager's job. But it surely can increase software building quality and speed.  

O.I. is still branded and keeping itself very close to Solaris-2.11 and TWW tool-sets for Solaris 2.10 works on Solaris 2.11 x86 and Sparc CPUs.

Procedure to setup TWW tool-sets on O.I-148.

  1. Lets use as example host.
    1. Setup tww-init directory and machine info.
      Code Block$ mkdir tww-init;cd tww-init$ pwd
      /export/home/tjyang/tww-init$ uname -a
      SunOS 5.11 oi_147 i86pc i386 i86pc$ grep tjyang /etc/user_attr
      tjyang::::type=normal;profiles=Primary Administrator$
  2. Install a few tools by  "pfexec pkg install lftp git gnu-make wget rsync zip developer/object-file header-math imake makedepend"
  3. Use lftp to grab pkgutils-1.6.4.pkgadd.tar and others for i386-pc-solaris2.10 OS platform.
    Code Block$ lftp
    cd ok, cwd=/dists/9.0/support/i386-pc-solaris2.10
    lftp>mget \
    pkgutils-1.6.4.pkgadd.tar \
    sbutils-1.3.0-2.pkgadd.pkg-inst \
    pbutils-1.1.22-1.pkgadd.pkg-inst \
  4. untar pkgutils and use pkgadd to install TWW* SVR4 packages. Answer yes to all the questions.
    Code Block$ ls -lrt
    total 142449
    -rw-r--r--   1 tjyang   tjyang   24161554 Mar 18  2010 sbutils-1.3.0-2.pkgadd.pkg-inst
    drwxr-xr-x   4 tjyang   tjyang         7 Feb 18 21:47 TWWpkgutils16u
    drwxr-xr-x   3 tjyang   tjyang         5 Feb 18 21:47 TWWpkgutils16c
    drwxr-xr-x   3 tjyang   tjyang         6 Feb 18 21:47 TWWpkgutils16m
    -rw-r--r--   1 tjyang   tjyang   30825984 Feb 18 21:47 pkgutils-1.6.4.pkgadd.tar
    -rw-r--r--   1 tjyang   tjyang   10723264 Feb 18 23:38 pbutils-1.1.22-1.pkgadd.pkg-inst
    -rw-r--r--   1 tjyang   tjyang   7251511 Feb 18 23:38 pbutils-1.1.22-1.rpm.pkg-inst$ for i in TWW*; do pfexec pkgadd -d . $i; done
  5. Install sbutils,pbutils and (optional) rpm package manager for Solaris x86.
    Code Block$pfexec /opt/TWWfsw/bin/pkg-inst \
    sbutils-1.3.0-2.pkgadd.pkg-inst \
    pbutils-1.1.22-1.pkgadd.pkg-inst \
  6. Make sure /opt/SUNWspro/bin is in PATH of /opt/TWWfsw/sbutils13/etc/sbutils.conf since TWW packages use OS vendor supported compiler by default.
    Code Block
    environment {
      PATH = "/opt/TWWfsw/sbutils13/lib/aux/bash/bin:\
  7. Quick check of installed tool-sets
    Code Block$ sb --version;pb --version;pkg-inst --version
  8. Read to get the big picture.
  9. RTFM of TWW tool-sets.
    Code Block
    man sb
    man 4 depot-db.xml
    man 4 sb-db.xml
    man 4 sbutils.conf

Use sb to create your first hello-world  package source

Code Block
 mkdir -p hello-2.7/src
 cd hello-2.7/src/

Using sb with GNU Makefile to build all O.I. consolidations.

Run "/opt/TWWfsw/bin/sb -m"  with a wrong module name "test" to list out available consolidations.

Code Block
oi@openindiana:~/oi$ sb -m test oi.xml
  error: while the program was found in the repository, no modules
  error: matching any requested were found. the modules I know about
  error: are: caiman, default, distro, g11n, gnome, illumos, ips,
  error: osnet, setup, sfw, sic_team, tww, vpanels, x.

Before and After Digitization

English Instruction to build consolidations

Digitized the instruction into The Written Words(XML) that a program(sb) can repeat

Setup the build Environment

To be published.

Creating the O.I. distro

Code Block
      <module name="distro">
case "${SB_SYSTYPE}" in
if [ ! -x /usr/bin/distro_const ] ; then
pfexec pkg install install/distribution-constructor
pfexec cp ${SLIMCD}/slim_cd_x86.xml  ${SLIMCD}/tjyang_slim_cd_x86.xml
pfexec perl -pi -e "s!OpenIndiana_Live_X86!${DISTRO_NAME}!"  ${SLIMCD}/tjyang_slim_cd_x86.xml
pfexec rm -f  /rpool/dc/media/${DISTRO_NAME}.*
time pfexec distro_const build ${SLIMCD}/tjyang_slim_cd_x86.xml
]]>      </build>
scp /rpool/dc/media/${DISTRO_NAME}.* tjyang@