The primary reason I wanted to try Void Linux was for its build system, xbps-src, a complement to Void's binary package management system, XBPS. It can be used to build and install source packages from Void's Github repository or to build and install software made available as source packages from third parties. In this post, I present my experience building two programs that are not available from Void either as binary or source packages -- Opera Developer and Firefox Developer Edition.
While not delving into its technical features, I did want to experiment with xbps-src as it is one of the cornerstone features of Void that make it unique and worth using for a non casual user. At first, I chose to package Firefox Developer Edition, a program that isn't available from Void's free or non-free binary repositories. It is also not available in Void's source Github repository, a large component of Void's source package management system. On distributions where FDE is not available, I typically use a script based on Installing Multiple Versions of Firefox Including Multiple Profiles to install it. In this case it was a perfect candidate, besides Kmail built for Plasma 5 -- which would be too complicated for a first attempt, with which to try xbps-src.
Unfortunately, this attempt was not successful because, although Void is rolling, it is not bleeding edge as far as Mozilla associated packages are concerned (see below), and a recent enough Mozilla dependency was not available. So I thought Opera Developer would be a simpler alternative. Again, this had an obsolete dependency (see below), which I think is a fault of Void, whereas the FDE complication may not be.
In order to use xbps-src and its associated tools, the system has to be prepared.
sudo xbps-install xtools
git clone https://github.com/voidlinux/void-packagesThis will create the directory void-packages with the source tree of all Void packages in void-packages/srcpkgs. The following representation of void-packages is reproduced from the Github repository's README.
/void-packages |- common |- etc |- srcpkgs | |- xbps | |- template | |- hostdir | |- binpkgs ... | |- ccache-
... | |- distcc- ... | |- repocache ... | |- sources ... | |- masterdir | |- builddir -> ... | |- destdir -> ... | |- host -> bind mounted from | |- void-packages -> bind mounted from
./xbps-src binary-bootstrapThis installs the binary bootstrap packages; if the user desires building the bootstrap packages themselves, bootstrap can be used instead of binary-bootstrap. Void uses some utilities -- two that are part of XBPS and one that is not -- to manage the chroot and bind mount of the build environemnt. I chose the xbps-uchroot utility. In order to enable it, I executed:
# cd /usr/bin/ $ echo XBPS_CHROOT_CMD=uchroot >> etc/conf # chown root:xbuilder xbps-uchroot # chmod 4750 xbps-uchroot # usermod -a -G xbuilder brook
xgensum -f srcpkgs/opera-developer/templateFinally, the package is built with:
./xbps-src pkg opera-developer
The same series of commands used as for Opera Developer will build the Firefox Developer Edition binary.
xgensum -f srcpkgs/firefox-developer-edition/template
./xbps-src pkg firefox-developer-editionAfter creating the skeleton template with the xnew command, using the template for the Void packaged Firefox as a guide, I modified it with appropriate changes, most importantly the very different URL used in the
distfileparameter due to fewer available options for obtaining the FDE source packages. The final version of the template I used is available here.
sudo xbps-install --repository=./hostdir/binpkgs opera-developer-54.0.2920.0_1or with one of the xtools
Sadly in both of my attempted builds, there were unresolvable problems. In the case of Opera Developer, the build completed successfully, but the package could not be installed due to an unresolved dependency on rpi-userland>=0.0.0.0.20150907_1. This dependency, to my knowledge was not created by the Opera source package, and it certainly was not required by the template itself, but by void-packages/common/shlibs.
In the case of Firefox Developer Edition, the template I used as a guide, the Firefox template in Void srcpkgs, indicates an nss of version >=3.35, which is also the version available in Void srcpkgs, however it seems that Mozilla requires version >=3.36.1 for this version of FDE, and late in the build process there is an error indicating that the nss is not installed or the version is too old. There was no problem, however, with the build time dependency of the nss development package.
Although the builds were not successful, this experiment instilled a very positive impression of the xbps-src program itself. However, some of the infrastructure, such as the one with void-packages/common/shlibs which creates a systemwide dependency on an obsolete package, and the lack of a current nss by Mozilla standards, was dissapointing.