Creating an Inkscape Flatpak

As seen previously, installing a Flatpak is a relatively simple matter – and with Flatpak bundles even a one-click story. Now, building a Flatpak and the corresponding repository is a slightly different story that I want to tell you with my adventure making a Flatpak for the latest 0.92 version of Inkscape.

I won’t go into detail about the build process itself which is described just alright in the Flatpak developer documentation and a series of blogposts by Flatpak developer Alexander Larsson. Unfortunately, it is not 100% complete and I had to resort to the manpages and existing Flatpak descriptions of other projects to get going.

So first thing you want to do is skip the manual flatpak build process and use the flatpak-builder tool right away. You want to make a package for a real program and not some toy that does not have any external dependencies anyway, right? So that’s what I did: I wrote a org.inkscape.Inkscape.json, listing each and every dependency of Inkscape. Now here is a message to the dear runtime providers: please provide a runtime for applications based on the C++ versions of the GNOME libraries such as gtkmm. I wasted tons of brain matter and CPU cycles hunting down and compiling1 all the correct library versions2. Speaking of depdendency hell: the dependency “resolution” of flatpak-builder is anything but smart. It caches build output but marks it dirty if any of the previously declared modules is changed even if there is no direct dependency between those two modules. Yay!

But besides those issues making the package, pushing the repo to a server and installing the package from a remote is actually a pleasant ride …

2017-02-13/inkscape.png

If I find a cheap location to store the repo and bundle, I will let you know.

Update: You can find the resulting Flatpak bundle on the main inkscape.org website.

  1. Have I told you what a mess Boost is? C++: ✓. Custom build tool: ✓. SourceForge download: ✓.

  2. A salute to our brave package maintainers!


How to install LibreOffice 5.3 from flatpak on Ubuntu 16.04

This is a follow-up to Simos post on how to install LibreOffice but using Flatpak instead of Snap. If you haven’t have the flatpak system installed yet you must install it first from Alex Larsson’s PPA

sudo add-apt-repository ppa:alexlarsson/flatpakrepo
sudo apt update 
sudo apt install flatpak

As per the instructions you can then add the GNOME runtime repository

flatpak remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo

download the Flatpak

wget http://download.documentfoundation.org/libreoffice/flatpak/latest/LibreOffice.flatpak

and install it

flatpak install --bundle LibreOffice.flatpak

That’s it. Localized and runnable straight from whatever launcher you are using:

2017-02-02/libreoffice.png

RTFM

Yeah, I should have read that f’n manual of GNOME’s standard terminal and I would not have to get creative to select a block of text from some program’s output1. Now, I feel embarrassed for not having pressed Ctrl while dragging the mouse all these years.

  1. My go-to solution usually was to pipe the output into a text file and use Vi’s Ctrl+V command.


Upgrade stories

I just finished upgrading this machine from Ubuntu 14.04.5 to 16.04.1. I always have a slight uneasy feeling upgrading a machine remotely but – knock on wood – it has been a pretty straightforward process even though I had a minor boot issue which I did not had when going from 12.04 to 14.04.

Besides the nginx web server and postfix mail server, I run Gogs, Syncthing and my commenting system. To start the latter three I used to use Supervisor but again I had the uneasy feeling that it is too hackish and resource intensive on that small VPS for 24/7 operation1. Now that Ubuntu moved from Upstart to systemd, I converted the Supervisor configurations to systemd .service files which is straightforward because both file formats are pretty similar. I added those to my Ansible playbook and here we go, everything integrates nicely and smoothly.

  1. I have to admit, I did not experience any problems at all though but the Python dependency is just meh.