21 Jan 2009

Using Alien to convert rpm to lpia deb

Alien is a nice little linux utility that converts .rpm software packages to .deb packages so that you can install software packaged for Red Hat on Debian and Ubuntu, etc.  Clever.  But for those of us on the lpia architecture (like the dell mini 9) we require those .deb files that Alien spits out to have their “architecture” setting to be lpia, not the i386. There is no way to change it from the command line so you’re left with a .deb package that either won’t install or can be forced to install but then won’t uninstall.  You could of course unpack, edit the control file and then repack the .deb file, but there is an easier way.

Install alien if you haven’t already:

1
sudo apt-get install alien

Then ask alien to generate the build tree without actually building the package itself:

1
alien -g filename.rpm

This creates a build tree that is turned into an lpia .deb package once we’ve made a change to the control file as before.   Edit debian/control using your favourite text editor and modify the line that specifies the architecture so that it now says:

1
Architecture: lpia

And then in the directory that contains the folder “debian” run:

1
debian/rules binary

That will create a .deb file which you can then install either through the usual GUI methods or by calling:

1
dpkg -i filename.deb

And of course because you’ve installed it using the right architecture you’re also able to uninstall it should you need to.  Hooray.

comments powered by Disqus