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.
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:
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.
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.
- # 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.
- -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
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.
Data directory structure example
- +- default.profile
- +- config.sh
- +- pkbexclude.txt
- +- repository
- +- sys-devel
- +- binutils
- +- binutils-tc01-2.20.1.pkd
- +- binutils-tc01-2.22.pkd
- default.profile is the default profile directory. While installing you can select any profile you want. All profiles have their own set of configuration files
- pkbexclude.txt indicates files and directories that shall not be added to the binary package from the build tree