Configuring OpenSolaris: Installing SFE (Spec Files Extras)

What are SFEs?

What is spec-files-extra? SFE is a repository of RPM-like spec files for building Solaris SVr4 packages from various Open Source modules. ~ The SFE Site

And if you follow the installation instructions closely-enough, without getting too bogged down in the details, you can probably be up and running SFE Enabled faster than I can write this blog. However those instructions are slightly dated, and even as a Sophomore to the OSol world, I hit a few bumps along the way, so here’s the short-list to get you going quickly!


As it happens I started following the original instruction-set, returned a few hours later and someone had done a bit of “Find & Replace” re-branding; just to mess with my head I believe… So – just to clear up some confusion:

  • JDS-CBE (Java Desktop Source – Common Build Environment (?))
  • OSD-CBE(OpenSolaris Desktop – Common Build Environment(?))

Old Name, New Name, respectively.

Currently, they are the same thing and you will need the underlying “CBE” portion of them, even if you don’t intend to do further OSol Desktop Development. Careful not to follow the original instruction sheets blindly though, or your in for a world of trouble – instead, keep reading here!

Installing the Common Build Environment (CBE)

Reference Links

All of the information on this page was pulled-from and relates back to the following links. Hopefully, however, this blogpost will save you from dredging through them for the insight you need. Hopefully…

Useful Links (for now)

  1. Spec File Extra – Main Site
  2. JDS / OSD / CBE Installation Guide
  3. OSD Download Center on Sun
  4. SFE Index on SourceForge

Less Relevant Extra’s

  1. OSD Source Code Tour
  2. JDS / OSD Source Location
  3. pkgbuild Home on SourceForge

(Do Not) Build CBE from Source

(Rant: Feel free to skip to next section!)
Given my Sun AMD_X64 system, I was unusually motivated to build something from source. Unfortunately, after a great effort it was not to be. After downloading jds-cbe-1.6.2-src.tar, one should be able to run the cbe-install script and things will be happy.

The CBE appeared to build and install the first several tools correctly including v.1.9 and v.1.10 of AutoMake (or was it AutoConf ?), disregarding that they both already exist. When the script got to building: libtool-1.5.22 it demanded AutoMake-1.9a and some other weird tool (also v.1.9.a). If I went to the directory under $HOME/PACKAGES, found libtool-1.5.22 I could “configure, make, make install” just fine. However, the “cbe-install” script was still not happy and would never complete. No luck with the jds-cbe-1.6.2-src.tar either…

Install From Binaries

  1. (As stated elsewhere) “You don’t need root access for installing the CBE or building GNOME, but the build-user needs to have the ‘Software Installation’ profile for installing the packages that the CBE creates,”… Of course, giving yourself said permissions may require ROOT access (on a one-time basis). That said, from the desktop:
    - Click: System | Administration | Users & Groups
    - Select your userName and click: Properties
    - Click the 'User Profiles' Tab and check 'Software Installation'
    - Click 'OK' (twice).
  2. Install SunStudio Express from the IPS package manager. Building SFE packages requires a compiler and now’s a good time to grab it.
    - Select the '' repository
    - Select 'All Categories'
    - Search for: studio
    - Check and Install: sunstudioexpress
    - Search for: sfwhea
    - Check and Install: SUNWsfwhea
  3. Visit the OSD Download Center (Link #3) and grab the: jds-cbe-1.6.2-i386.tar.bz2 binary package.
    Warning: The _src_ does NOT build cleanly on OSol 2009.06, so for now don’t even waste your time!
  4. athena: 453$ bunzip2 jds-cbe-1.6.2-i386.tar.bz2
    athena: 454$ tar -xvf jds-cbe-1.6.2-i386.tar
    athena: 456$ cd jds-cbe-1.6.2
    athena: 459$ ./cbe-install
  5. Follow the scripts instructions, mostly you want the defaults.
    • Specifically confirm your compiler is: /usr/bin/cc
    • The install script will complain, as your compiler is NEWER than the script, and doesn’t provide the expected version-output. This is OK!
  6. Now you need to download the SFE Spec-Files, which as I understand it, are essentially header-files of meta-data for each SFE package. Thus when you tell the system to install one it has all the install info it needs on hand.

    athena: 460$ cd ~
    athena: 461$ svn co SFE
  7. At this point you will want to add to your ~/.bashrc file:
    PATH=$PATH:/opt/jdsbld/bin          # JDS-CBE   - packages we installed
  8. Now source the ~/.bashrc, and then run the in the /opt/jdsbld/bin …
    athena: 466$ source ~/.bashrc
    athena: 467$ . /opt/jdsbld/bin/

Congratulations! At this point you have installed the CBE, downloaded the SFE spec files from subversion, and configured your environment to start building SFE spec-file packages! Every time you want to install SFE packages you should run the second console line from ‘step 8’ above, and of course running the first line “source ~/.bashrc” will always revert you to your normal working shell-environment.

Installing a SFE Package

athena: 468$ . /opt/jdsbld/bin/
athena: 468$ pkgtool build --download SFEfoo.spec

Or, while not bullet-proof, you can often use the dependency-checking option.

pkgtool build --download SFEfoo.spec --autodeps

Other Approaches

Unknown to me, there was already a well written article to this effect. If you found my post unclear or unhelpful you may have better luck reading this: pkgbuild on OpenSolaris

As a final and entirely different method you may want to search for the sfe-bootstrap-latest script. Supposedly it is an all inclusive script to get you running. I believe it was originally published in THIS forum thread: sfe-bootstrap-latest script

This entry was posted in 2009.06, OpenSolaris and tagged , , , , , . Bookmark the permalink.

2 Responses to Configuring OpenSolaris: Installing SFE (Spec Files Extras)

Comments are closed.