The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow A spotter’s guide to open-source Linux package formats
A spotter’s guide to open-source Linux package formats E-mail
by David M Williams   
Wednesday, 16 January 2008
So then, if you’re looking for new open source apps and can find a package this means two things right up. Firstly, the package may or may not be usable on your system depending on the format it is in and the format you can work with. Secondly, if the package is acceptable, you can be confident it will install without any fuss and without any need to compile it or go to any great effort.

For the dead keen, it is possible to pull all the files out of a package and then manually install it. As said earlier, the rpm package format uses the cpio archive format internally. A simple command, rpm2cpio, will assist by dumping the internal archive. You can use the following command to extract all the files without actually installing them:

rpm2cpio examplepackage.rpm | cpio –i

Handily, in a similar fashion, the Debian package format is a collection of tarballs in an archive format called ar; as you might expect this is closely related to tar but is much more basic. One feature is it does not support folders.

Extract the contents of a Debian package like so:

ar –x examplepackage.deb

This will spill out two tarballs – control.tar.gz and data.tar.gz – and a single-lined text file called debian-binary.

debian-binary merely contains the Debian packaging version used; control.tar.gz contains install scripts and useful information. data.tar.gz holds the actual binary files and configuration items themselves, all the files needed for the program to work. At a pinch you could just extract this archive with tar –xf although if the app is complex the install scripts will be doing much more work than this.

Earlier, I said one of the great features of a package manager was its ability to keep your apps up-to-date as newer versions are released. The tools used will obviously vary based on your distro, but do check out Apt (Advanced Package Tool), Yum (Yellowdog updater modified), Synaptic (a graphical front-end on top of apt) and up2date.

Apt is a mature piece of software which came with Debian and related distros but now supports rpm also. It is not so much a single tool as a collection of utilities; the most commonly used parts of Apt are apt-get and apt-cache which pull down packages from available repositories and query what’s available, respectively. Synaptic offers no new functionality overall but bundles everything together in a single easy-to-use graphical tool.

Similar to Apt, Yum is a command-line utility for rpm packages. It can query what’s available, install packages, and perform all the other required functions like listing what’s been installed and uninstalling previously installed packages.

up2date is also an rpm tool, but it seeks to provide access to Yum and Apt repositories giving a richer suite.

Get online, get software, get into the FOSS way.

Please enable JavaScript in your browser to post your comment!


Get stories like this delivered daily - FREE - subscribe now


 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
Suscribers
904,266
13,751
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff
Subscribe to our free e-newsletter