Create ips packages for Opensolaris

Дата канвертавання25.04.2016
Памер18.46 Kb.
Create IPS packages for Opensolaris
This document will touch upon how to port IPS(Image Packaging System) packages for OpenSolaris. OpenSolaris version 2008.11 was the operating system used. The first step would be setting up of the build environment. The next step would be to test the build environment. Then to create IPS packages that are not ported yet, which involves configuring the dependencies and writing the spec files and copyright file. After which testing of the IPS packages and then submitting it to OpenSolaris Source Juicer Website.
1.Setting Up The Build Environment:

Install Sun Studio Compiler:

$ pfexec pkg install ss-dev Install Required Packages:

Install GNOME development tools package SUNWgnome-common-devel :

$ pfexec pkg install SUNWgnome-common-devel
Install Perl XML::Parser package SUNWperl-xml-parser :

$ pfexec pkg install SUNWperl-xml-parser
Install GNU gettext package SUNWgnu-gettext for po procesing :

$ pfexec pkg install SUNWgnu-gettext
Install GNOME xml documentation packages SUNWgnome-xml :

$ pfexec pkg install SUNWgnome-xml-root

$ pfexec pkg install SUNWgnome-xml

$ pfexec pkg install SUNWgnome-xml-share
Install docbook catalog :

$ pfexec /usr/share/sgml/docbook/

Install JDS CBE (Common Build Environment) 1.7+. For x86 users, download CBE(Common Build Environment) from this link For SPARC users, After download, install CBE by going to the directory and type this command in the terminal : $ ./cbe-install Note that the installation must be carried when the user has Primary Administrator privileges. It will install the necessary packages from the Internet. Install Latest Pkgbuild :

The CBE has a version of pkgbuild that does not support IPS. So it has to be removed and replaced with the latest version, which is at the time of writing this document is So download from this link

Then perform these commands

$ pfexec pkgrm SFpkgbuild

Untar the pkgbuild downloaded, then go to that directory in the terminal, and perform these commands.

$ cd pkgbuild-1.3.98

$ ./configure --prefix=/opt/dtbld/ $ make $ pfexec make install

More Configuring

Then we have to fix the file /usr/share/aclocal/dirlist to prevent ACLOCAL build failure messages. So go to the file and edit it. It should have the following text.



Get tested spec files

Now the final step would be to get all the spec files and other files, so as to test the build environment. In terminal, type

$ svn co svn+ssh:// spec-files-trunk

and also

$ svn co svn+ssh:// spec-files-2-24

Then go to spec-files-2-24 directory and perform the following commands

$ cd spec-files-2-24/manpages $ make $ cd ../po-sun $ make

2.Test The Build Environment:

To build packages, we use pkgtool. We have to set the build environment first. For csh users type

$ source /opt/dtbld/bin/env.csh

For non-csh users, type

$ . /opt/dtdtbld/bin/

note that there is a space between “.” and “/”.

Then enable local repository with this command

svcadm enable pkg/server

Now to test the pkgtool, go to spec spec-files-2-24 directory and play with any spec files there, those which have extension “.spec”. For example

$ pkgtool --download --ips build-only SUNWflac.spec

If it has passed, then your build environment is set properly.

Also you can check the local repository by typing this in your web browser


There you will see a package being added if pkgtool has run successfully.

3.Create IPS Packages:

Now take a package which is to be ported to opensolaris. Build it manually, and note all the dependancies associated with it. Once itis properly installed in the system, the next stage would be to write the spec file.

Details about writing a spec file can be got from these links

How to write a spec file in detailed is mentioned here

Base spec file:
Also the copyright file has to be created for the package. Usually both the spec and copyright file are named after the package, and the spec file will has “.spec” extension, while copyright file will has “.copyright” extension. The copyright file contain the license which the package follows.
4.Testing And Submit IPS Packages:

Now once the spec and copyright files are created, use pkgtool to check if the spec file is working or not. For this, copy the copyright file to this directory


where the user field be replaced with user name. Now perform the pkgtool command to check the validity of the spec file. If passed, then it is ready for submission. The spec file must be sumbitted OpenSolaris Source Juicer

Have an opensolaris account. Then submit it in the submit button. So if the syntax is validated, then the spec file will be reviewed by a reviewer who will check the license and sother aspects. So once validated by the reviewer, then spec file is accepted into the Source Juicer repository.

Reference :

База данных защищена авторским правом © 2016
звярнуцца да адміністрацыі

    Галоўная старонка