Recently our colleague Estêvão Valadão has released a new tool for the Arch Linux user community, called vABS (Versioned Arch Build System). It’s meant to be a supplement to the ABS and aims to help Arch Linux users to compile and install old version of some softwares.
Before understanding vABS and how it works, we need to understand how ABS works.
What is ABS
ABS is the acronym for Arch Build System, a ports-like system for building and packaging software from source code. When we say it’s a ports-like we mean that it is based and inspired by the ports system, a tool used in BSD systems for source code software compiling automation, and uses the same logic (download, unpack, patch, compile and install). The whole process is based on guidelines from a small scripts, called PKGBUILDs.
In Arch, ABS stores a directory tree that contains the PKGBUILDs in /var/abs. In order to compile the source code following the instructions in PKGBUILD we use the makepkg command. Shortly after compiling the source code, a packet with the extension .pkg.tar.gz is generated. To install is very easy! You only need pacman, the official binary package manager for Arch Linux.
In theory it seems to be very complicated, but in practice it’s all very simple. After the examples everything will be clear.
First of all, to use ABS you need to ensure that ABS itself and the base-devel package (which contains the program makepkg) are already installed in your system. To install them, use the following command line:
$ sudo pacman -S abs base-devel
After completing the installation, we will update our tree with the command ABS abs:
$ sudo abs
Then we look up the program folder we intend to install. As an example we will use the ABS to install Wine version 1.3.25, this way we enter int the directory with the following command:
$ cd /var/abs/community/
And make the search for the package:
$ ls | grep wine q4wine wine winefish winegame wine_gecko winestuff winetricks
Okay, we found the folder. Now let’s copy it to our user’s home folder while we create a new folder named wine:
$ cp -R wine ~/wine $ cd ~/wine $ ls PKGBUILD wine.install
Now we can run the makepkg command:
Do not worry, the process is long and generates a lot of output, after all he is compiling the Wine source code. Once this is complete we will have the .pkg.tar.xz package compiled and ready for installation:
$ ls pkg PKGBUILD src wine-1.3.25-1-i686.pkg.tar.xz wine-1.3.25.tar.bz2 wine.install
To install wine, we will use pacman:
$ sudo pacman -U wine-1.3.25-1-i686.pkg.tar.xz
Okay, we’re done! To confirm the installation will do the following test:
$ wine --version wine-1.3.25
Everything is okay, as expected! See how it’s simpler than we thought?! To uninstall the package, simply use the following command:
$ sudo pacman -R wine verificando dependências... Remover (1): wine-1.3.25-1 Tamanho Total dos Pacotes a Remover: 119,47 MB Deseja remover estes pacotes? [S/n] s (1/1) removendo wine [#############] 100%
What About vABS?
Well, as you may have noticed, the ABS offers only the latest version of PKGBUILDs. If a problem is found in this software latest version, this can be an issue since there isn’t a possibility to automatically downgrade (return to previous versions). Here enters vABS, it keeps the different versions of the official PKGBUILDs, which is extremely useful in times of need.
Coincidentally, the Wine developers have changed dramatically the sound virtualization layer Wine, which resulted in some problems. This means that we need to uninstall Wine 1.3.25 and install Wine 1.3.24. For this, vABS will help us.
How Do We Use vABS
The vABS usage is very simple. First, you should access the URL vabs.archlinux-br.org with your favorite browser. Then choose the architecture (i686 in my case) and navigate to the following directory: community/W/wine-1.3.24-1. In this directory we find the following files:
PKGBUILD wine-1.3.24-1.tgz wine.install
Let’s download the .tgz package, which contains all the files we need to compile Wine, for the root folder of the user. Use the following commands:
$ cd ~ $ wget http://vabs.archlinux-br.org/i686/community/W/wine-1.3.24-1/wine-1.3.24-1.tgz
Then unzip it with the following command:
$ tar -zxf wine-1.3.24-1.tgz $ cd wine-1.3.24-1
Now compile the package as we did with ABS:
$ makepkg $ ls pkg PKGBUILD src wine-1.3.24-1-i686.pkg.tar.xz wine-1.3.24.tar.bz2 wine.install $ sudo pacman -U wine-1.3.24-1-i686.pkg.tar.xz resolvendo dependências... procurando por conflitos interrelacionados... Alvos (1): wine-1.3.24-1 Tamanho Total do Download: 0,00 MB Tamanho Total da Instalação: 119,28 MB Prosseguir com a instalação? [S/n] s (1/1) verificando integridade do pacote [###########] 100% (1/1) verificando conflitos de arquivo [###########] 100% (1/1) instalando wine [###########] 100% This wine package is wow64 enabled. This means it can run 32bit/64bit Windows apps on x86_64. If you are on x86_64, the default WINEARCH will be win64. This will cause a lot of Windows applications to malfunction even if they usually work in wine. Please create your ~/.wine with 'WINEARCH=win32 winecfg' if you are unsure and on x86_64. See the Arch wiki on wine for more information. Dependências opcionais para wine giflib libpng libldap lcms libxml2 mpg123 openal jack libcups gnutls v4l-utils oss
Now a little test to prove that we have successfully installed the older Wine version (1.3.24):
$ wine --version wine-1.3.24
ABS is an amazing tool for Arch Linux users but has its limitations. The vABS fills the gaps of ABS and, in my view, become an essential tool for all the Arch Linux community, almost as essential as AUR. Of course, we still need a tool to automatize this process, similar to yaourt. Perhaps, who knows, even yaourt may offer an integration with vABS in a near future.
Thinking a little further, I think it would be interesting to create a way of absorbing the functionality of vABS into ABS, becoming a unified tool. From what I talked to Estêvão (and the little knowledge I have about the solution infrastructure), it is not so simple to do because the way the ABS works. But maybe this is a good time to think about a paradigm and backward compatibility shift?! Not always support the obsolete is a good policy, we must always allow room for the new, even if it is intended to run in parallel with the old.