Simple utility to convert deb(ian) packages to xbps packages. Written in posix compliant shell.
If you like to install xdeb, copy the script to /usr/local/bin/
.
In addition to copying the script, a couple of dependencies are needed:
Install them using xbps-install binutils tar curl xbps
.
Unless you set XDEB_PKGROOT
yourself (ie. ${HOME}/.config/xdeb
), the script will operate in the current directory.
The resulting binary will be exported to ${XDEB_PKGROOT}/binpkgs
. (./binpkgs
by default)
- Download the latest release
- Make the xdeb script executable (
chmod 0744 xdeb
) - Convert the package (
./xdeb -Sde <name>_<version>_<arch>.deb
) - Install the package (
xbps-install -R binpkgs <name>
)
You should generally run xdeb with -Sde
, which stands for "Sync dependency file, enable dependencies, remove empty directories".
xdeb can now resolve the runtime dependencies.
This allows reliable conversion for nearly all deb packages.
The -m
flag adds the -32bit
suffix to the package and all it's dependencies.
The example shows how to convert a 32bit
package.
./xdeb -Sedm --arch x86_64 ~/Downloads/Simplenote-linux-1.16.0-beta1-i386.deb
Installing the newly converted package requires the multilib repositories to be installed.
By default, xdeb will show a warning if a file is already present on the system (And not a directory).
This behavior ensures that the converting package won't break the system.
If xdeb complains about conflicting files,
manually removing them from the destdir directory and rebuilding with -rb
might help.
Having a package already installed (For example when updating it) will output a lot of conflicts.
To counteract this, xdeb has the -i
flag, which silences file conflicts.
usage: xdeb [-S] [-d] [-Sd] [--deps] ... FILE
-d # Automatic dependencies
-S # Sync runtime dependency file
-c # Clean everything except shlibs and binpkgs
-r # Clean repodata (Use when rebuilding a package)
-q # Don't build the package at all
-C # Clean all files
-b # No extract, just build files in destdir
-e # Remove empty directories
-m # Add the -32bit suffix
-i # Ignore file conflicts
--deps # Add manual dependencies
--arch # Add an arch for the package to run on
--revision # Set package revision. Alternative to -R, to not remove the repodata
--help | -h # Show this page
example:
xdeb -Cq # Remove all files and quit
xdeb -Sd FILE # Sync depdendency list and create package
xdeb --deps 'ar>0' FILE # Add ar as a manual dependency and create package
Converting Minecraft.deb
:
$ ./xdeb -Sedr --deps 'oracle-jre>=8' ~/Downloads/Minecraft.deb
[+] Extracted files
[-] Unable to find dependency for libcef.so
[-] Unable to find dependency for libGLdispatch.so.0
[+] Resolved dependencies (oracle-jre>=8 alsa-lib>=0 atk>=0 at-spi2-atk>=0 at-spi2-core>=0 avahi-libs>=0 avahi-libs>=0 libblkid>=0 bzip2>=0 cairo>=0 cairo>=0 glibc>=0 glibc>=0 libcups>=0 libdatrie>=0 dbus-libs>=0 glibc>=0 libEGL>=0 libepoxy>=0 expat>=0 libffi>=0 fontconfig>=0 freetype>=0 fribidi>=0 libgcc>=0 GConf>=0 gtk+3>=0 gdk-pixbuf>=0 gtk+>=0 glib>=0 glib>=0 libGL>=0 libglvnd>=0 glib>=0 gmp>=0 gnutls>=0 glib>=0 graphite>=0 gtk+3>=0 gtk+>=0 libharfbuzz>=0 nettle>=0 libidn2>=0 libmount>=0 glibc>=0 nettle>=0 nspr>=0 nss>=0 nss>=0 p11-kit>=0 pango>=0 pango>=0 pango>=0 libpcre>=0 pixman>=0 nspr>=0 nspr>=0 libpng>=0 glibc>=0 glibc>=0 glibc>=0 nss>=0 libstdc++>=0 libtasn1>=0 libthai>=0 libunistring>=0 libuuid>=0 wayland>=0 wayland>=0 wayland>=0 libX11>=0 libX11>=0 libXau>=0 libxcb>=0 libxcb>=0 libxcb>=0 libXcomposite>=0 libXcursor>=0 libXdamage>=0 libXdmcp>=0 libXext>=0 libXfixes>=0 libXinerama>=0 libXi>=0 libxkbcommon>=0 libXrandr>=0 libXrender>=0 libXScrnSaver>=0 libXtst>=0 zlib>=0 )
[+] 'Parsed' deb control file
[+] Created Package
index: skipping `minecraft-launcher-2.1.17417_1' (x86_64), already registered.
index: 5 packages registered.
[+] Done. Install using `xbps-install -R binpkgs minecraft-launcher-2.1.17417_1`
$ sudo xbps-install -R ./binpkgs minecraft-launcher-2.1.17417_1
Name Action Version New version Download size
GConf install - 3.2.6_9 -
minecraft-launcher install - 2.1.17417_1 -
Size required on disk: 198MB
Space available on disk: 276GB
Do you want to continue? [Y/n] n
If the package just depends on a package with no specific version, add >0
to match any version (i.e. --deps 'ar>0 base-system>0 curl>0'
)
- The VoidLinux-Team refuses to ship more chromium based browsers.
- Electron based applications, like Simplenote
- Proprietary applications like Discord or Minecraft.
Using one of the packages listed above on VoidLinux, requires having to build them yourself.
This requires getting to know the build system, cloning the (~150MB) void-packages repository, etc.
This script handles everything automatically, without accessing the internet by default.
The deb package format is undoubtedly the most commonly used format, since Debian is the most popular Linux distro.
You can expect nearly every Linux application to provide a binary deb package.
- Convert a package
- Restore changes made by this script
- Dependency resolving (
xdeb -Sd
) - Show conflicting files
- Remove bundled shlibs
- Exclude dependencies