Development with JDS-CBE on Solaris 10 for Fun and Profit part II – lets use it to make vim

Posted in OpenSolaris, OpenSource, Packaging, Solaris & OpenSolaris, SunStudio on March 4th, 2008 by Michal Bielicki

As always there are some assumptions from my side. You read the part I article, you know the standard solaris pkgadd, pkginfo and pkgrm tools, you have at least heard of the subversion revision control system, environment variables do not scare you and a PATH is not a road through the woods. Oh yes and ‘jdsuser’ is the user I assume you setup correctly according o part I.

This part actually does not make much difference between Solaris 10 and SXCE and I think Indiana neither, but what the heck, I will describe the latter two scenarios in part III and IV, sicne especialy for Indiana you will want to know how we can help you with creating IPS packages. Anyway, lets the games begin.

First lets get into the right environment, so lets do:

. /opt/jdsbld/bin/env.sh

feels much better now that we have the right VARS and PATH set.

Now lets get the SFE repository. Create a nice directory where you want to keep all your project files. Change into it and do:

svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE

after a while of downloading you should now have a complete copy of the SFE repository. A a first example we will build a package of VIM.
Change into the freshly created SFE repo directory, and build the package. Since we want to build a package that can be transferred to other machines we have, lets make the package a one file package in datastream format. Since vim depends on cscope and ctags and pkgtool will not let us build packages whose dependencies haven’t been met, we add SFEctags.spec and SFEcscope.spec to the end of the line to build it as well.
Here we go

cd SFE
pkgtool --interactive --download --pkgformat=ds build SFEvim.spec SFEctags.spec SFEcscope.spec

After some downlaoding, some compiling we should now have a package called SFEvim.pkg in ~/jdsuser/packages/PKGS/SFEvim.pkg, which we can install and copy to other solaris 10 boxens to be installed there as well as usual with pkgadd. On our box its already installed. Would we have wanted not to install it, pkgtool would have required the command build-only instead of build, and we would have had to build and install SFEctags and SFEcscope first and than just create the SFEvim package.

Congrats for building your first SFE based SVR4 package.

Blogged with the Flock Browser

Tags: , , , , , , , , ,

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

Posted in OpenSolaris, OpenSource, Packaging, Solaris & OpenSolaris, SunStudio on March 3rd, 2008 by Michal Bielicki

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: , , , , , , , , ,

MOTION TO THE OPENSOLARIS.ORG OGB: CREATON OF THE OPENSOLARIS SOFTWARE PORTERS COMMUNITY

Posted in OpenSolaris, OpenSource, Packaging on February 15th, 2008 by Michal Bielicki


Motion to the Board: Proposed Community Group Creation

Summary
The OpenSolaris community could profit a lot from a new Community Group
that would coordinate and organize the multitude of efforts to port
software to the OpenSolaris Platform, without actually changing their
scopes or behaviors, but creating a central space where any interested
party can find each and all needed so he can port software, port
drivers, find ported software etc ..

Scope
The proposed Software Porters Community Group shall be the group that
coordinates, advocates, encourages and helps with the porting of
Software from multiple Platforms to the OpenSolaris Platform. This is
neither a proposal for a new packaging system, nor for a new collection
of software (therefore it neither is something like blastwave, nor in
its core the same like the migration community suggestion which both
want to work on specific ways of porting/packaging). Its a proposal to
create a community of porters, advocates and advisors that will help
people who want to port software, advise them, create documentation and
maintain links and resources about the many different places you can
find information and ported software. This will be handled in a way
that shall be independent of religion and politics regarding amongst
others the way packages are done o if sunstudio or gcc are the better
way to do things.

The OpenSolaris Software Porters Community will actively work to
collect from all the other projects involved in porting software (like
desktop for example) all information regarding their work and be the
central point of information regarding all things porting and ported
software to OpenSolaris.org.
Read more »

Debian packaging nightmares

Posted in Jabber, OpenSource, Packaging, Work on December 5th, 2007 by Michal Bielicki

While fixing penfires broken debian packaging I found out that the java xml parser used in openfire can’t parse DOS formattted files. aaaaaaaaaaaaaaaaaaaah. Took me 4 days to find that problem. So now I ahve a functional openfire package. Will see if I can add it to my blogsite for interested parties to download :)