The syntax is a bit different, but everything else, more or less the same. In fact, if you just wanna repackage a deb or an rpm, it’s even easier than in Arch, xbps-src can handle deb and rpm automatically, it detects dependencies and does repackaging on it’s own. You basically just have to feed it the deb/rpm file in a one liner, that’s it.
I should probably give an example. Here is the template file (they’re called templates in Void) for Viber. You basically just feed it the deb, do a vcopy (copy operation specific to xbps-src) and that’s it, everything else regarding the repackaging is done automatically by xbps-src.
Thanks for the explanation. How does xbps-src handle dependencies? I.e. does it somehow detect the dependencies in the original package and find corresponding Void Linux packages? What about dependency versions? What happens if a dependency is not available in the Void repos?
Regarding feeding it rpm/deb packages, it reads the dependencies from the deb/rpm package and uses the equvalent names in shlibs (shared libraries). That’s basically a list of libs that some applications expect to find, so xbps-src just makes a symbolic link to the equvalent lib with the name that the app expects to find. Look at the example I gave above with libtiff.
Regarding everything else built from source, there are 3 types of dependencies, since the packages are built in a chroot: hostdepends - dependcies that are requires by the chroot system, makedepends - dependencies that are required to build the package, depends - dependencies that are required to run the package. The ones that are required just to run the thing are the just depends, the other 2 are required for building only.
What happens if a dependency is not available in the Void repos?
You find the equivalent lib in Void (the xtools package is a great help for a lot of things, including repackaging), add it to shlibs and that’s it. If it’s proprietery or Void doesn’t have it (higly unlikely if it’s open source… I have yest to run in a case like that), you have to put in the template as a distfile (if proprietery and only binary versions are available), or you have to compile from source (also done automatically by xbps-src once it detect there are distfiles for the lib and is not present in the repos).
Building from source is also easy in most cases (when no patches need to be applied). xbps-src has build styles (gnu-make, meson, etc.), so you just define that in the buildstyle parameter and it does everything automatically, including adding missing build dependencies.
xbps-src goes through a lot of trouble to make packaging and building as automatic as possible.
I’ll put it on a spare SSD on my PC tomorrow. By any chance, is it possible to install Void on an Apple Silicon MacBook? I’m really annoyed by Fedora Asahi and I’m looking for a better distro to put on it.
IDK, depends on the CPU architecture… I’m not that famlilar with Macs, but if it’s x64 capable, yeah, no problem.
I think there was a list of supported architectures on the website 🤔…
Can’t find it now. Anyway, x86, x86_64, ARMv6/v7/v8 are all supported out of the box. PPC is also supported, but you have to build everything yourself from scratch (there was one maintainer that maintained a PPC build, but he gave up on it a year or so ago, he went on to form Chimera Linux), which can be done by crossbuilding on any of the supported architectures using xbps-src… but that’s a lot of work to be honest, if it’s a PPC architecture, you’re better off using Chimera Linux.
I do recommend trying the glibc version first, since you’d have to run everything that depends on glibc in a chroot, on a musl install. Yeah, it is doable, but if you’re not really experienced with this, just use the glibc version.
Repackaging is easy though with xbps-src.
Tell me more about it. Let’s say I have an Arch (AUR) package that I want to repackage for Void, how do I do it?
The syntax is a bit different, but everything else, more or less the same. In fact, if you just wanna repackage a deb or an rpm, it’s even easier than in Arch, xbps-src can handle deb and rpm automatically, it detects dependencies and does repackaging on it’s own. You basically just have to feed it the deb/rpm file in a one liner, that’s it.
I should probably give an example. Here is the template file (they’re called templates in Void) for Viber. You basically just feed it the deb, do a
vcopy
(copy operation specific to xbps-src) and that’s it, everything else regarding the repackaging is done automatically by xbps-src.Thanks for the explanation. How does xbps-src handle dependencies? I.e. does it somehow detect the dependencies in the original package and find corresponding Void Linux packages? What about dependency versions? What happens if a dependency is not available in the Void repos?
Regarding feeding it rpm/deb packages, it reads the dependencies from the deb/rpm package and uses the equvalent names in shlibs (shared libraries). That’s basically a list of libs that some applications expect to find, so xbps-src just makes a symbolic link to the equvalent lib with the name that the app expects to find. Look at the example I gave above with libtiff.
Regarding everything else built from source, there are 3 types of dependencies, since the packages are built in a chroot: hostdepends - dependcies that are requires by the chroot system, makedepends - dependencies that are required to build the package, depends - dependencies that are required to run the package. The ones that are required just to run the thing are the just depends, the other 2 are required for building only.
You find the equivalent lib in Void (the xtools package is a great help for a lot of things, including repackaging), add it to shlibs and that’s it. If it’s proprietery or Void doesn’t have it (higly unlikely if it’s open source… I have yest to run in a case like that), you have to put in the template as a distfile (if proprietery and only binary versions are available), or you have to compile from source (also done automatically by xbps-src once it detect there are distfiles for the lib and is not present in the repos).
Building from source is also easy in most cases (when no patches need to be applied). xbps-src has build styles (gnu-make, meson, etc.), so you just define that in the buildstyle parameter and it does everything automatically, including adding missing build dependencies.
xbps-src goes through a lot of trouble to make packaging and building as automatic as possible.
Thank you very much for this in-depth explanation. I will definitely consider Void as my next distro of choice.
I think you’ll like it 😊.
I’ll put it on a spare SSD on my PC tomorrow. By any chance, is it possible to install Void on an Apple Silicon MacBook? I’m really annoyed by Fedora Asahi and I’m looking for a better distro to put on it.
IDK, depends on the CPU architecture… I’m not that famlilar with Macs, but if it’s x64 capable, yeah, no problem.
I think there was a list of supported architectures on the website 🤔…
Can’t find it now. Anyway, x86, x86_64, ARMv6/v7/v8 are all supported out of the box. PPC is also supported, but you have to build everything yourself from scratch (there was one maintainer that maintained a PPC build, but he gave up on it a year or so ago, he went on to form Chimera Linux), which can be done by crossbuilding on any of the supported architectures using xbps-src… but that’s a lot of work to be honest, if it’s a PPC architecture, you’re better off using Chimera Linux.
I do recommend trying the glibc version first, since you’d have to run everything that depends on glibc in a chroot, on a musl install. Yeah, it is doable, but if you’re not really experienced with this, just use the glibc version.