Thursday, July 30, 2009

Introducing the Yocto Package Manager (yPkg)

Many times I've needed a newer version of a library or a tool not provided on the computer labs at university. Rather than pester the admin, I would generally install software into $HOME/.local and go on my merry way. This was fine until I started hitting my quota and had to manually clean out my installed software. So I decided to write a simple package manager with a minimal set of features to allow me to more easily install and remove software, a micro package manager. I was going to call it µPkg, but the aim it to have the smallest package manager possible and the smallest official SI prefix is y (yocto). Hence the name yPkg

Features it does not have:
  • Build scripts
  • Package upgrades
  • Regression tests
  • Checksums
You get the software yourself, you validate it yourself, you build it your self. All it does it create a simple environment to build in, creates a package and generates a footprint. The footprint can then be later used to remove the package.

Here is an example of how to use it:
~ $ ypkg init hello
(ypkg) ~/.ypkg/hello $ wget
(ypkg) ~/.ypkg/hello $ tar zxf hello-2.4.tar.gz
(ypkg) ~/.ypkg/hello $ cd hello-2.4
(ypkg) ~/.ypkg/hello $ ./configure --prefix=$HOME/.local
(ypkg) ~/.ypkg/hello $ make
(ypkg) ~/.ypkg/hello $ make DESTDIR=$PWD/../pkg install
(ypkg) ~/.ypkg/hello $ exit
~ $ ypkg build hello
~ $ ypkg gen_footprint hello
~ $ ypkg install hello
~ $ ypkg list
~ $ cat ~/.ypkg/hello.footprint
~ $ ypkg uninstall hello
The source is available here