Package Doctor - Package manager for Unix systems

Summary

The Package Doctor project is a small and lightweight implementation of a package management system. It is simple, open and easy to use and integrate. Currently based mostly around shell scripts, Package Doctor has proven to be a valuable and effective tool.

Project details

The Package Doctor project was started to fill a gap at the level of the creation customized systems from scratch, especially in the area of embedded systems. It is quite similar to other tools based on source code repositories like, for example, Gentoo's Portage. However, it is considerably simpler and more independent. Being based on BASH scripts allows a significative reduction of dependencies and makes it much easier to work with more compact systems. It also allows the creation of cross compiled binaries, using different profiles and it is also able to deal with different architectures.

Method of operation

To install a package on the system, PKD executes two steps:
  1. This first step is optional if there is already a pre-compiled binary. The binary is generated from the original source code with the aid of a file, the .pkd, wich describes the compilation and packaging process. The .pkd can be located in a user folder, on the local system repository or on an online repository. PKD is able to automatically detect whre and to get the necessary files. The system uses the .pkd to create a binary file with the extension .pkb.tar.bz2 which can be easily installed. During compilation, the system creates an UnionFS mountpoint to allow the creation of the package without interfering with the working system but allowing it to access all the necessary compilation tools. The corresponding .pkb file also contains all the data necessary for the installation process, including dependency listing.
  2. Installation of the binary .pkb.tar.bz2. The installation is made registering, in a database, all the files that will be installed and a backup of any replaced files. After that, the extraction is made onto the corresponding folders on the destination filesystem. This way it is quite easy to install, remove and update any package.

Working example

# pkd -b binutils01
[ Package Doctor ] package management system
Copyright 2010-2012 Onda Technology Institute
[ OK ] Downloading binutils-2.20.1.tar.bz2
[ OK ] Preparing build environment for package "binutils" (binutils)
[ OK ] Unpacking binutils 2.20.1
[ OK ] Preparing to compile binutils
[ OK ] Compiling binutils
[ OK ] Installing binutils
[ OK ] Building binary package /System/Data/L0/default.profile/packages/binutils-2.20.1.pkb.tar.bz2
[ OK ] Cleaning up.

Available options

-s
enable silent mode
-c
select alternate configuration file
-i
install package
-b
build package
-u
update package
-r
remove package
-g
download package source
-l
list available profiles
-p
select a profile
-h
print help screen

More information

There are no available downloads yet, since the project is very recent and hasn't yet been considered ready for distribution. For more news about this project, follow the blog Onda Technology Report.