RSS-feed

Tue, 07 Aug 2007

Solaris/SysV pkgs and blastwave


After some days of work I have created the blastwave package for the new version of lighttpd. Phil was helping me a lot to fix a lot of issues I had in the post/pre remove scripts.

As you should know already, blastwave is an open source project that provides binary packages for solaris. I am a maintainer of some packages there. Among them: lighttpd.

It is pretty easy to get any open source project compiled in a solaris 10+ box. It is not that easy to get them in previous versions, specially solaris 8. That was precisely my first contact with blastwave. I wanted to get trac working (with a lot of dependencies) in a solaris 8 box. I tried to compile the software myself, but I was a pretty tedious tasks since solaris 8 didn't have most of the libraries pre-installed. Then I found blastwave and I got everything working pretty fast, thanks to the help of some of the maintainers there.

Then, I decided to help the project and I joined it.

You may be interested in knowing how do I release and create new packages for the project. Well, I have a nice systems that I would like to show here. I keep everything under revision control software, in this case subversion. Let me show you how the filesystem tree for the lighttpd package looks like:

-rwxr-xr-x    1 drio  drio   4086 Jul 27 10:01 build_lighttpd.sh
-rw-r--r--    1 drio  drio    384 Aug  3 10:10 checkinstall
-rwxr-xr-x    1 drio  drio    529 Apr 20 14:57 copy_to.sh
-rwxr-xr-x    1 drio  drio   1001 Aug  1 15:44 cswlighttpd
-rw-r--r--    1 drio  drio    500 Aug  5 12:09 i.smfno
-rw-r--r--    1 drio  drio    509 Aug  5 12:09 i.smfyes
-rw-r--r--    1 drio  drio  11420 Apr 20 14:57 lighttpd.conf
-rw-r--r--    1 drio  drio   3091 Apr 20 14:57 lighttpd.xml
-rw-r--r--    1 drio  drio   1557 Aug  5 12:11 postinstall
-rw-r--r--    1 drio  drio    518 Aug  3 18:51 preremove
-rw-r--r--    1 drio  drio    193 Apr 20 14:57 space
-rw-r--r--    1 drio  drio   1252 Apr 20 14:57 todo.txt

Check this link if you want to know how to create a Solaris/SysV pkg. Keep in mind that in this case, the lighttpd has some extra files inside to deploy the daemon in the solaris smf framework and the ancient init.d.

The blastwave project has a nice infrastructure to compile and generate the binaries for solaris machines, both sparc and i386. Newer versions of solaris are backwards compatible so we work against solaris 8 so in that way we ensure that the packages work with this old version of solaris. I always try to compile my code using Sun Compiler, Sun Studio. But in some cases you have to use gcc because the code is too dependable of gcc particularities, specially C++ code.

What is nice about my system here is that I can get a new version of the package without having to type that much. I just make the changes in my local machine and then I run a little script that sends the code to the blastwave machines and the package gets generated pretty fast. Normally depends how much load the machine has.

Anyway, if you are interested in creating a Solaris/SysV pkg for blastwave, let me know and I can send you my code so you can reuse it.i

posted at: 01:27 | path: /blastwave | permanent link to this entry