Using Distrobox to run older bibisect binaries on bleeding edge Linux distros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Last week after updating my Arch Linux I noticed all bibisect builds failed to run with:

loading component library <file:///home/user/bibisect-linux-64-7.4/instdir/program/../program/libsdlo.so> failed /home/tdf/lode/bibisect/core74/cppuhelper/source/shlib.cxx:311.

Thorsten also saw this on another rolling distro and I decided to look into using containers to run bibisect builds. While this seems to have been some buggy package update that has now been fixed, containers will still be useful as I've been unable to run anything older than LibreOffice 6.3 on this system for a long time.

There are a couple of options to run GUI apps in containers. One is https://github.com/mviereck/x11docker (which also supports Wayland despite the name). Another is https://github.com/89luca89/distrobox

I went with Distrobox and will document how I set things up. I should later add this to the wiki.

Install xhost package, on Arch it is called xorg-xhost.

Add to the ~/.bashrc of the host machine:
xhost +si:localuser:$USER

Create ~/distroboxhomes to store the home directories of the containers. Create subdirs for the container homes.

For running bibisect repos 5.2 and newer, I picked Fedora 30. In the init hooks I added libreoffice to broadly take care of dependencies.

distrobox create --name fedora30 --image fedora:30 --init-hooks "sudo dnf install -y git java-1.8.0-openjdk.x86_64 dbus-glib kf5-kcoreaddons.x86_64 kf5-ki18n.x86_64 kf5-kconfig.x86_64 kf5-kwindowsystem.x86_64 kf5-kio.x86_64 libreoffice" --home $HOME/distroboxhomes/fedora30

In the .bash_profile of fedora30, I had to add

unset XDG_DATA_DIRS

Otherwise the gtk2/3 backends would not launch. I also added convenience aliases:

alias libogen='SAL_USE_VCLPLUGIN=gen instdir/program/soffice'
alias libogtk3='SAL_USE_VCLPLUGIN=gtk3 instdir/program/soffice'
alias libokf5='SAL_USE_VCLPLUGIN=kf5 instdir/program/soffice'

For the oldest bibisect repos, I ended up using CentOS 7 as I could not get older Ubuntu or Debian to run LibreOffice (was launched, but window was not painted).

distrobox create --name centos7 --image centos:7 --init-hooks "sudo yum install -y epel-release git java-1.7.0-openjdk.x86_64 java-1.8.0-openjdk.x86_64 libreoffice libpng12" --home $HOME/distroboxhomes/centos7

In the centos7 .bash_profile, in addition to unset XDG_DATA_DIRS I included an alias that allows running the builds from 50max repo:

alias libo50='LD_PRELOAD=/usr/lib64/libcurl.so.4:/usr/lib64/libnss3.so:/usr/lib64/libnssutil3.so SAL_USE_VCLPLUGIN=gen opt/program/soffice'

For more efficient navigation in the command line with Ctrl to jump between word boundaries and deleting words, I created an .inputrc file in the centos7 home with:

# C-backspace
"\C-h": backward-kill-word

# C-delete
"\e[3;5~": kill-word

# Move with C-right, left
"\e[1;5C": forward-word
"\e[1;5D": backward-word

In fedora30 only Ctrl-Backspace binding was missing.

Now I can just run

distrobox enter fedora30

and go about my bibisecting.

For the container manager I use Podman. You can pick what you want by configuring: https://distrobox.privatedns.org/#configure-distrobox

Ilmari



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux