Xmind is a popular free and open source application for creating and managing mind maps. The official installer for Linux is only available in .deb format. Here’s how to transform that into an rpm that can be installed on Fedora and others.
One of the (many) holy grails for sysadmins is the ability to install packages created for one distribution (e.g., .deb for Debian or Ubuntu) on systems that by default use another (e.g., .rpm on Red Hat or SuSE). As the details around how desktop applications are configured on some systems (e.g. Ubuntu’s Unity) vary over time existing tools may not hold up over the long term.
In my case there was a need to install Xmind on both Windows and my Fedora Linux desktop (as those who have been reading this blog for awhile know, I’m still in deep immersion mode with Fedora 19 in preparation for the release of Red Hat Enteprise 7).
Because Xmind has only released a .deb package rated for Ubuntu, I needed to figure out how best to tranform that into something that could be installed on Fedora.
One option would be to explode the .deb and then recompile on my Fedora system. The other was to use a package conversion tool to actually make it into an rpm.
The alien utility has a pretty good reputation for reliably being able to do the latter. My few experiences with it have been good, so I decided to give it a try for this project.
Installing was as simple as “yum install alien”. The command line syntax to transform xmind was an uncluttered:
alien -r --scripts xmind-linux-220.127.116.11401221918_amd64.deb
The “–scripts” switch was necessary to ensure that pre and post package scripts for things like desktop configuration fired. Using it is a bit of a risk when attempting to install a package designed for Ubuntu onto Fedora, but it seemed worth it.
As it turned out everything worked just fine. The resulting package, called xmind-3.4.1-2.x86_64.rpm, installed flawlessly into /usr/local/xmind (I could have tried using rpm’s “–relocate” for installing into /opt/xmind but decided not to press my luck).
Apart from differences in desktop environments, one fundamental difference between Debian and Red Hat derived distributions (including SuSE) is whereas 64-bit libraries are installed under /lib and /usr/lib in Debian, they’re under /lib64 and /usr/lib64 in Red Hat. As a result some packages may refuse to install because they’re looking in the wrong place for their dependencies. This wasn’t an issue with Xmind because of its implementation as an Eclipse workbench application, and Red Hat’s locating of its 64-bit java binaries under /usr/lib/jvm.