The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 13:17:28

tux_99
Member
Registered: 2025-06-17
Posts: 17  

drpm - a simple tool to handle deb packages for people used to rpm

As a newbie to the debian/devuan world (but not to Linux) I found that my biggest obstacle was all things related to packages since because of almost 3 decades of using RPM based distros my brain is hardwired to the rpm commands to query installed packages and their dependencies.

So in a quest to both familiarize myself with the equivalent dpkg and apk commands and to make my life on Devuan easier I decided to write a small tool (a Perl script) that translates common rpm commands to the equivalent dpkg/apk commands.

For now the tool supports the following rpm commands (these are the ones I use most commonly) but I might add more in the future:

rpm -qa
rpm -qi <pkgname>
rpm -qip <filename>
rpm -ql <pkgname>
rpm -qlp <filename>
rpm -qR <pkgname>
rpm -q --whatrequires <pkgname>
rpm -q --changelog <pkgname>
rpm -qf </path/file>

The tool is called 'drpm' (I couldn't call it 'rpm' as the rpm binary is available in the debian repositories so there would have been a name clash). It can be downloaded here: https://downloads.linuxtech.net/drpm/

That link will download a zip file which contains the script, just unzip it and place the script somewhere in your path (for example in /usr/local/bin/ ) and make it executable:

chmod 755 /usr/local/bin/drpm

In addition to that you need to install one dependency (a Perl library) from the debian/devuan repos:

sudo apt install libswitch-perl

There is no man page for now but if you run drpm in a terminal without any arguments you will get a brief help message.
The tool is provided "as is", the MIT license applies.
It should work on any distro that uses dpkg and apt for package management.

I hope it will be useful to fellow Devuan newbies who are coming from rpm-based distros.
Any bugs or problems please let me know.

Here are some examples of drpm being used on Devuan Excalibur:

user@vm:~$ drpm -qa|grep xorg
xorg 1:7.7+24
xorg-docs-core 1:1.7.3-1
xorg-sgml-doctools 1:1.11-1.1
xserver-xorg 1:7.7+24
xserver-xorg-core 2:21.1.16-1.1devuan1
xserver-xorg-input-all 1:7.7+24
xserver-xorg-input-libinput 1.5.0-1
xserver-xorg-input-wacom 1.2.3-1
xserver-xorg-legacy 2:21.1.16-1.1devuan1
xserver-xorg-video-fbdev 1:0.5.0-2
xserver-xorg-video-intel 2:2.99.917+git20210115-1
xserver-xorg-video-qxl 0.1.6-1.1
xserver-xorg-video-vesa 1:2.6.0-2
xserver-xorg-video-vmware 1:13.4.0-1
user@vm:~$ drpm -qi xserver-xorg
Package: xserver-xorg
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 203
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Architecture: amd64
Source: xorg
Version: 1:7.7+24
Provides: xserver
Depends: xserver-xorg-core, xserver-xorg-video-all | xorg-driver-video, xserver-xorg-input-all | xorg-driver-input, xkb-data, x11-xkb-utils
Recommends: libgl1-mesa-dri, xserver-xorg-legacy
Description: X.Org X server
 This package depends on the full suite of the server and drivers for the
 X.Org X server.  It does not provide the actual server itself.
Homepage: https://www.x.org/
user@vm:~$ drpm -q --whatrequires xserver-xorg
xserver-xorg
Reverse Depends:
  xorg
user@vm:~$ drpm -qR xserver-xorg
xserver-xorg
  Depends: xserver-xorg-core
 |Depends: xserver-xorg-input-all
  Depends: xkb-data
  Depends: x11-xkb-utils
user@vm:~$  drpm -qf /usr/bin/Xorg 
xserver-xorg-core: /usr/bin/Xorg

Last edited by tux_99 (Today 04:31:21)

Online

#2 Yesterday 15:19:55

greenjeans
Member
Registered: 2017-04-07
Posts: 1,003  
Website

Re: drpm - a simple tool to handle deb packages for people used to rpm

Cool script! I really like little utilities that help folks ease into a new system and get up and running quickly, nice work!


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded April 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Online

#3 Yesterday 16:21:02

tux_99
Member
Registered: 2025-06-17
Posts: 17  

Re: drpm - a simple tool to handle deb packages for people used to rpm

Thanks greenjeans, when I find some time for it I will try to make a deb package for this tool, not because it really needs it (it's just a simple script with one dependency) but rather as an opportunity to learn how to make deb packages.

Online

#4 Yesterday 16:35:36

greenjeans
Member
Registered: 2017-04-07
Posts: 1,003  
Website

Re: drpm - a simple tool to handle deb packages for people used to rpm

but rather as an opportunity to learn how to make deb packages

.

Nice, pretty much what i've been doing for the last week or so, been meaning for a long time to learn to package, so i'm easing into it with easy stuff, just building the structure manually and using dpkg-deb --build.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded April 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. wink Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Online

Board footer