Packaging Fractal as DEB 1/?

Nothing happend here for some time, so let’s write something. :)

Because I am crazy I decided trying to package Fractal (Gnomes’s GTK Matrix Client) for Debian as a .deb, because I am not convinced by Flatpacks packages. (Nothing against the sandbox, although flatkill). Why, maybe more another time.

So far I tried to understand git-build-package (“GBP”) and Debian Rust Packaging (“debcargo”), below my preliminary findings. :)

I have cloned the fractal git repo; due to fractal already using GTK4, I have to use an older branch, gnome-3-30, which is still at GTK3. To make GBP happy, I start a new branch upstream/3.30.0 from there.

To generate the initial debian/ files I executed dh_make -p fractal_3.30.0 -e $EMAIL -c gpl3 --createorig. I can use that as a foundation to build on.

We need to trick cargo into pulling packages from debcargo’s repository in the filesystem by adding this to ~/.cargo/config (thanks to diziet):

directory = "/usr/share/cargo/registry"
replace-with = "debian-packages"

Now some gbp buildpackage --git-ignore-new trial-and-error.

First there is a reference to a crate-fork on GitHub that has been deleted by it’s author, and I am still not sure how to work around that.

Anyway, with some shelling around I turn the dependencies from the both submodule’s Cargo.tomls into Debian Rust dependencies. nl to find out the line range the dependencies are in. sed to turn them into package names. sort -u to deduplicate and finally put them into Build-Depends: in debian/control.

The sed command I used:

sed -n 'X,Ys/\([a-z_0-9-]*\) = .*/librust-\1-dev/p' Cargo.toml

I found that mk-build-deps -i can install all the dependencies in the build-depends-section (cf.), otherwise gbp buildpackage complains about missing dependencies.

Unfortunately not all crates that Fractal uses are packaged by Debian yet, so I fool a little bit around with that. By trial-and-error mk-build-deps -i I find all the packages that are either only available in unstable yet or are not packaged at all. (I still need to find out how apt-cache search tells me which suite that package comes from so I don’t have to fallback to

So I try to add them to debcargo packaging, but my envioronment is not yet correctly set up. So for the moment I just opended an issue with the debcargo-Team, informing them about my intentions. debcargo#14: RFP: fractal build deps.

To be continued.

Christoph Schulz

Christoph Schulz

Christoph Schulz
I am Dev. Maybe.

Starting MySQL on-demand on Debian using systemd socket activation

How to make MySQL on Debian start only when a connection to the unix socket at /run/mysqld/mysqld.sock is made. Continue reading

Cannot modify header information

Published on November 08, 2018

Uhm, no.

Published on October 28, 2018