Tuesday, 4 March 2014

Using PiSiDO in Pisi Linux

Using PiSiDo in Pisi Linux

Pisi Linux is a fork of the (PiSi-based) Pardus operating system and its unique technologies.

Pardus was to be abandoned, a small group of Turkish volunteers came together to preserve the unique features of Pardus. The name of this project is Anka (Turkish for Phoenix). Initially the Anka-Team believed the fork could be named Pardus-Anka. Ultimately this was not possible - hence re-branding to Pisi Linux as a reference to Pardus and its package system PiSi (Pisi is Turkish for kitty).

Pisi Linux is a easy to use distribution, with a series of unique tools like Pisi (Packages Installed Successfully as Intended), which is the package manager. I will not give you a Pisi Linux review, instead we'll assume you have the distro already installed and running and we'll tell you about a tool named PiSiDo. This tool enables you in a graphical, user-friendly way, to create pisi packages from source code. So for this i'll assume only that you have Pisi Linux installed.

The Program PiSiDo is included in the Pisi Linux Repository you can search it with the Package Manager or install it from commandline with the following command:

sudo pisi it pisido.

We created the build directory in the user's home because we will need it anyway when starting PiSiDo, since you will be asked for a workspace where the built packages will be saved.

What's important for us, based on the screenshot above, is the left-center part of the window, where you will have to enter data, and the rightside down part, where you will get to decide what actions PiSiDo will perform and to what point, so you can tell it to only unpack, build, install, etc. You'll see every step of the build process as it happens in the terminal-like window. So let's say we're not content with wget being at version 1.14 in stable and we want 1.15 as example. Since we have create a build directory we can use that as the location to download the source code in.
 $ cd ~/build
 $ wget -c
Some of the fields in the screenshot above are pretty self-explanatory, but we'll take it step by step: we used 'wget' as the name, at archive type we used compressed, not URL, since the .tar.gz is already downloaded. We left the dependency fields empty to see what will happen, entered GPLv3+ in the license field, component 'system' and we will let you fill in the remaining three fields. Except for the dependency-related fields and the type, everything else is mandatory, and so is the fact that you'll need a source archive with a configure script. That is unless you want to change the template type (cmake, Python...). When I tried to build a source (written in C) .tgz with no configure script, it failed (see screenshot below), which actually makes a lot of sense.

Now in the upper right part, press the '+' sign to add a new history entry (mandatory as well) and fill in the necessary fields, as you can see in the example below:

So that's about it! In the Build Commands section select "Only Package" and Up To Install", which will basically create a .pisi file in your build directory, but not install it, and just press the button corresponding to "Only Package". If you don't have autotools, automake and the like installed, PiSiDo will take care of that for you, but if your package requires an external dependency, you will get an error.

I also got an error, since wget depends on some GNU TLS headers, so I filled in as a Build Dependency the gnutls-devel package. I was asked to confirm the installation of that package then the build process started normally and I was notified that my fresh wget package is in the build directory. Now that your wget 1.15 package is ready, we recommend uninstalling the older version to avoid potential issues.

If you take some time to play around with PiSiDo you will see that it's also pretty easy to apply a patch to an existing source and create a new package with a new version from it.

4. Conclusion

I see this utility as a very practical tool, since package creation on many distributions is a somehow tedious job. Maybe more Linuxes should look at PiSiDo and try to help their users create packages for their favorite software more easily. All in all, Pisi Linux and its' tools looked like a fun experience, even though.