Product SiteDocumentation Site

5.5. Coexistence with Other Packaging Systems

Debian packages are not the only software packages used in the free software world. The main competitor is the RPM format of the Red Hat Linux distribution and its many derivatives. Red Hat is a very popular, commercial distribution. It is thus common for software provided by third parties to be offered as RPM packages rather than Debian.
In this case, you should know that the program rpm, which handles RPM packages, is available as a Debian package, so it is possible to use this package format on Debian. Care should be taken, however, to limit these manipulations to extract the information from a package or to verify its integrity. It is, in truth, unreasonable to use rpm to install an RPM on a Debian system; RPM uses its own database, separate from those of native software (such as dpkg). This is why it is not possible to ensure a stable coexistence of two packaging systems.
On the other hand, the alien utility can convert RPM packages into Debian packages, and vice versa.
$ fakeroot alien --to-deb phpMyAdmin-5.2.1-2.fc39.src.rpm
[..]
Warning: Skipping conversion of scripts in package phpMyAdmin: postinst
Warning: Use the --scripts parameter to include the scripts.
[..]
phpmyadmin_5.2.1-3_all.deb generated
$ ls -sh phpmyadmin_5.2.1-3_all.deb
  7.2M phpmyadmin_5.2.1-3_all.deb
$ dpkg -c phpmyadmin_5.2.1-3_all.deb
drwxr-xr-x root/root         0 2024-05-21 20:49 ./
-rw-r--r-- root/root   7461668 2023-02-08 01:15 ./phpMyAdmin-5.2.1-all-languages.tar.xz
-rw-r--r-- root/root       833 2023-02-08 01:15 ./phpMyAdmin-5.2.1-all-languages.tar.xz.asc
-rw-r--r-- root/root      1077 2023-07-20 20:00 ./phpMyAdmin-bundled.php
-rw-r--r-- root/root       637 2023-07-20 20:00 ./phpMyAdmin-certs.patch
-rw-r--r-- root/root      1181 2023-07-20 20:00 ./phpMyAdmin.htaccess
-rw-r--r-- root/root       430 2023-07-20 20:00 ./phpMyAdmin.nginx
-rw-r--r-- root/root     38997 2023-07-20 20:00 ./phpMyAdmin.spec
-rw-r--r-- root/root     34198 2023-07-20 20:00 ./phpmyadmin.keyring
drwxr-xr-x root/root         0 2024-05-21 20:49 ./usr/
drwxr-xr-x root/root         0 2024-05-21 20:49 ./usr/share/
drwxr-xr-x root/root         0 2024-05-21 20:49 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-05-21 20:49 ./usr/share/doc/phpmyadmin/
-rw-r--r-- root/root       214 2024-05-21 20:49 ./usr/share/doc/phpmyadmin/changelog.Debian.gz
-rw-r--r-- root/root      1303 2024-05-21 20:49 ./usr/share/doc/phpmyadmin/copyright
[..]
$ dpkg -I phpmyadmin_5.2.1-3_all.deb
 new Debian package, version 2.0.
 size 7500852 bytes: control archive=1092 bytes.
     583 bytes,    15 lines      control
     618 bytes,    10 lines      md5sums
     446 bytes,    11 lines   *  postinst             #!/bin/sh
 Package: phpmyadmin
 Version: 5.2.1-3
 Architecture: all
 Maintainer: debian <debian@debian>
 Installed-Size: 7377
 Section: alien
 Priority: extra
 Description: A web interface for MySQL and MariaDB
  phpMyAdmin is a tool written in PHP intended to handle the administration of
  MySQL over the Web. Currently it can create and drop databases,
  create/drop/alter tables, delete/edit/add fields, execute any SQL statement,
  manage keys on fields, manage privileges,export data into various formats and
  is available in 50 languages
  .
  (Converted from a rpm package by alien version 8.95.6.)
You will find that this process is extremely simple. You must know, however, that the package generated does not have any dependency information, since the dependencies in the two packaging formats don't have systematic correspondence. The administrator must thus manually ensure that the converted package will function correctly, and this is why Debian packages thus generated should be avoided as much as possible. Fortunately, Debian has the largest collection of software packages of all distributions, and it is likely that whatever you seek is already in there.
Looking at the man page for the alien command, you will also note that this program handles other packaging formats, especially the one used by the Slackware distribution (it is made of a simple tar.gz archive).
The stability of the software deployed using the dpkg tool contributes to Debian's fame. The APT suite of tools, described in the following chapter, preserves this advantage, while relieving the administrator from managing the status of packages, a necessary but difficult task.