Child pages
  • Building SFE Packages
Skip to end of metadata
Go to start of metadata

Steps for building SFE packages

  1. If you are using a dedicated build server, create a fresh zone.
  2. Obtain oi-cbe from http://hg.openindiana.org/oi-cbe/:
    # hg clone http://hg.openindiana.org/oi-cbe
    # mkdir oi-cbe/sources
    
  3. Download sunstudio12u1-patched-ii-2010Feb-sol-x86.tar.gz and desktop-cbe-mini-1.8.0.tar.bz2 and place them inside oi-cbe/sources
  4. Copy oi-cbe into the zone and execute setup-buildenv.sh in order to set up the build environment.
    As a build user with sudo or pfexec access:
    # cd oi-cbe
    # sudo ./setup-buildenv.sh -u $USER
    
    Or as root:
    # cd oi-cbe
    # ./setup-buildenv.sh -u <build user>
    
  5. Log in as the build user and check out the current SFE sources:
    # cd
    # svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk spec-files-extra
    
  6. Finally, build the desired packages. This may fail if there are additional build dependencies outside SFE, in this case the dependencies need to be installed manually, missing build dependencies which are part of SFE will be built and installed automatically due to --autodeps.
    For example, to build SFEalpine:
    # cd ~/spec-files-extra
    # . /opt/dtbld/bin/env.sh
    # pkgtool -v --download --interactive --autodeps --topdir=${HOME}/packages \
     build SFEalpine.spec
    
    Other options:
    Add --logdir=${HOME}/logs --rmlog to store log files in your home directory.
    Add --report=${HOME}/status.html to generate an HTML document with build status for each package.
    If you do so, rm ~/status.html before performing another build.

See also:

http://sourceforge.net/apps/mediawiki/pkgbuild/index.php?title=Pkgbuild_on_OpenSolaris#Quick_Setup

  • No labels

11 Comments

  1. Anonymous

    I suggest a note on top of the text: A user who doesn't want to follow the steps for making up the reference build environment can use the handy boostrap script bit.ly/bootstrap-sfe-testing-os20nn (run as regular user with sudo allowance for root (which is the default user created at install time)

    tomww

  2. Tom, 

    a few notes on using your script: Downloaded it from: http://bit.ly/bootstrap-sfe-testing-os20nn

    $ chmod u+x $builduser  (where builduser is the packager)
    
    $ pfexec ./bootstrap-sfe-testing-os20nn $builduser
    

    The compiler failed to install! Please try to manually install the package
    pkg:/developer/sunstudio12u1 and try running this script again.
    The compiler failed to install! Please try to manually install the package

    pkg:/developer/sunstudio12u1 and try running this script again.

    The compiler failed to install! Please try to manually install the package
    pkg:/developer/sunstudio12u1 and try running this script again.

    (OK - goin' to get it from SUN/Oracle)

  3. Running that script with "pfexec" doesn't match the design of the bootstrap script. It already contains pfexec (older OpenSolaris) and sudo (new ones like OpenIndiana, Solaris 11 Express, ...).

    I edited the "see also" section to have the usage on the pkgbuild wiki linked in where the use instructions are listed under "Quick Setup".

    Please re-run the bootstrap script under your rgular userid (the one enabled to use sudo) but without specifying sudo or pfexec at all. Remember to record the screen output as mentioned. The bootstrap script should work out of the box on e.g. OI 147, 148, Solaris 11 Express.

    tomww

  4. Hi Thomas, script works great - thanks! (smile)

    1. Dave,

      the perfect feedback (smile)

      Thanks much,
      Thomas

  5. setup-buildenv.sh assumed the home directory of user is /export/home/$USER which isn't always true

  6. Anonymous

    Clickin the link sunstudio12u1-patched-ii-2010Feb-sol-x86.tar.gz redirects to the page http://www.oracle.com/technetwork/indexes/downloads/sdlc-decommission-333274.html which says Sun Download Center is no more! How could I get Sun Studio 12? Any help is appreciated. Thanks in advance.

    Best regards,
    Ganapathy

    1. Anonymous

      You can use Sun Studio 12.2.

  7. Anonymous

    Hi,

    I can download pkgtool and cbe tools from OI repository:

    $ pfexec pkg refresh --full
    $ pfexec pkg install -v cbe pkgbuild

    That will install all packages which might be used in development environment (fresh installed zone).

    Regards.
    Predrag Zecevic

  8. Anonymous

    Would you consider providing a OVF image with a complete build environment?

    1. Maybe, although I would only test it with VirtualBox.

      But why would you want to build SFE packages inside a virtual machine instead of in a zone? You don't have OI installed on bare metal?