Table of Contents

Howto Build PiSi Package

Last Modified Date: October 26, 2011

Author:Semen Cirit

These are some guidelines in order to help new Pardus developers to get started with PiSi package building.

Structure of a PiSi Package

A pisi package is essentially a zipped file. Let’s download one and examine it:

$ wget
$ unzip knazar-1.1-10-p11-x86_64.pisi -d package
  Archive:  knazar-0.2-3-3.pisi
  inflating: apackage/metadata.xml
  inflating: apackage/files.xml
  inflating: apackage/install.tar.lzma
$ cd package
$ ls
  files.xml  install.tar.xz  metadata.xml

files.xml contains locations, types, sizes and sha1sums of all files in the package. metadata.xml contains general information like package name, homepage, packager, etc. install.tar.lzma contains compressed files which will be installed under the system.

$ xz --decompress install.tar.lzma
$ tar xvf install.tar

Building PiSi Package

In order to build a pisi package we need to prepare at least three files by hand: pspec.xml and and translations.xml.

The pspec.xml file provides information about the software being packaged. The file includes the scripts in order to build the package. The translations.xml file has the summary and description translations for different languages supported for the related release.

Additionaly some other directories can be needed in order to build a package: comar and files directory (see AdditionalFiles on additional-files).

After preparing the package, you can build it with below command: (You can look for the parameters given with “pisi bi –help”)

pisi bi pspec.xml -vd

PiSi package can be built in different stages:

  1. –fetch: Finish building after source archive is downloaded.
  2. –unpack: Finish building after source archive is decompressed and the patches are applied.
  3. –setup: Finish building after the configuration.
  4. –build: Finish building after compiling.
  5. –check: Finish building after testing.
  6. –install: Finish building after instllation of the package.
  7. –package: Creating the .pisi file

This different stages enable to build the package progressively. For instance if building of a package takes too long, and you now that you have experienced with an error on installation step. You can only run the package from that step and you can gain time.

After the unpack step, the package is unpacked under /var/pisi/<packagename> on your system and a work directory is created under it. This directory has a pisiBuildState file which includes the current build state and the source code of the package.

After the installation step the install directory is also created under /var/pisi/<packagename> directory. This directory has the files that will be installed under a Pardus system when the package is installed.

After the packaging step the files.xml and metadata.xml files are also created under /var/pisi/<packagename>.