[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] RE: Packaging on the 550



Hi Daniel,

> Are there package templates for the 550 cobalt.  Sun seems to have only
> released package skeletons for the older Raqs.  Any ideas?

The RaQ550 uses the same package format as the Qube3 and RaQ XTR.

So if you know how to build RPMs and/or already have some RPMs which you want 
to wrap up into a PKG, then the best advise is to download an official Sun 
Cobalt patch and to extract it with:

	/usr/bin/gpg --output filename.tar.gz --decrypt RaQ550-*.pkg

Or grab one of the free PKGmaster.com or Solarspeed.net PKG files for the 
RaQ550 and take 'em apart with:

	tar zxvf RaQ550-*.pkg

Then examine the contained files, which most should be pretty much self 
explaining. The directory and file structure of my OpenSSH-3.6.1 package for 
the RaQ550 for instance looks like this:

packing_list
pkginfo/
pkginfo/locale/
pkginfo/locale/en/
pkginfo/locale/en/mypackage.mo
pkginfo/locale/en/mypackage.po
RPMS/
RPMS/base-ssh-capstone-1.0-10.noarch.rpm
RPMS/base-ssh-glue-1.0-10.noarch.rpm
RPMS/base-ssh-locale-en-1.0-10.noarch.rpm
RPMS/base-ssh-locale-ja-1.0-10.noarch.rpm
RPMS/base-ssh-ui-1.0-10.noarch.rpm
RPMS/openssh-3.6.1p1-1.i386.rpm
RPMS/openssh-clients-3.6.1p1-1.i386.rpm
RPMS/openssh-server-3.6.1p1-1.i386.rpm
scripts/
scripts/post-install/
scripts/post-install/blah
scripts/post-uninstall/
scripts/post-uninstall/blah
scripts/pre-install/
scripts/pre-install/blah
scripts/pre-uninstall/
scripts/pre-uninstall/blah

The RPMs directory contains the needed RPMs. There is also a scripts directory 
whith scripts that run during the designated stages of install and uninstall. 

The file "packing_list" needs the closest attention as it contains the list of 
RPMs to install and allows you to name your package, define dependencies and 
allows you to limit the PKG to install only on certain architectures (RaQ550 
only - or you could build a PKG that works for XTR, Qube3 and RaQ550).

The most obscure file is pkginfo/locale/en/mypackage.mo

Take a look at pkginfo/locale/en/mypackage.po. Edit it to your needs. Then run 
the following file to create the corresponding *.po file from it:

	msgfmt mypackage.po -o mypackage.mo

You can also extract *.po files and turn 'em into a textfile again:

	msgunfmt -e mypackage.mo -o mypackage.po

These locale files allow you to make your packages multi lingual, but for 
installing a PKG you basically put a description of the package in plain 
English in there as shown in the samples. So I don't want to go into more 
details there than really necessary.

Once you are done adjusting the installation scripts, have your RPMs in the 
RPM/ folder, have adjusted both mypackage.mo and packing_list you simply 
create the PKG like you'd create a gzipped tarball:

	tar czvf RaQ550-nameofpkg.pkg *

Some of this information is outlined in the Qube3 developers guide, except for 
the most useful bits of information - of course:

ftp://ftp.cobalt.sun.com/pub/developer/TechNotes/DevGuide.pdf

Lots of that stuff is sadly undocumented, some is wrong and some just gives a 
random idea that there are quite a few useful functions under the hood which 
we're not supposed to know. ;o)

-- 

With best regards,

Michael Stauber