Development with JDS-CBE on Solaris 10 for Fun and Profit part I – installation and setup

JDS-CBE is the common build environment used by the Java Desktop System people as well as by porters who utilize the Spec Files Extra repository and the pkgbuild utilities. This makes it possible to use rpm like .spec files on Solaris and Opensolaris. The syntax is pretty much the same as on penguin systems besides some additional tags needed to generate correct SysV Solaris packages.

I will assume in this article that the reader knows how to setup a developers workstation on Solaris 10 with SunStudio 12 or SunStudio Express. You will need to leave space for the common build environment on /opt, space for the SFE spec files and packages bulding and storage in your home directory and of course ahve enough space on your /usr partition for installing all the nice packages you create :) I also assume that you know about having enough swap space to run sunstudio and know how to compile software with it.

OK, so lets go.
Start with patching your system to the latest patchlevel. When done, insert your Solaris10U4 DVD or mount your iso image. Once you are done with that, you will need to select the user that will be your build user (we will use jdsuser for now) and change his security preferences by issuing the following command (thanks to trochej for corrrecting me. I first advised against better knowledge to edit the user_attr file directly):

usermod -P "Software Installation" jdsuser

download the following file:

http://dlc.sun.com/osol/jds/downloads/cbe/jds-cbe-1.6.0-src.tar

and extract it somewhere where you want to build it, it will need some space since it will create quite some new packages.
Change into the directory the unpacking process created called jds-cbe-1.6.0.
We will need to edit the file cbe-install but before we do that we need to change its permissions. So go ahead and do a

chmod 755 cbe-install

and than open the file cbe-install in your favorite editor and remove the two words:

SUNWsmbaS and SUNWseuos.

Save the file and run it :)

The install will ask for an installation directory, agree with it. It will complain about the compiler version not being the recommended one, ignore that and answer yes when it asks you if you want to use this compiler anyway.
CBE will now install all required optional packages as well as create some new ones and install them in /opt/jdsbld. Once finished you have all required stuff to use SFE and specfiles on your Solaris 10 box.

To use jds-cbe, just source /opt/jdsbld/bin/env.sh like this:

. /opt/jdsbld/bin/env.sh

and yes, there is a dot at the beginning of the former line.

Enjoy :)

Tags: , , , , , , , , ,

Leave a Reply

You must be logged in to post a comment.