[GNC-dev] Help packaging GnuCash 3.x for Ubuntu Bionic

Tommy Trussell tommy.trussell at gmail.com
Tue Sep 24 16:07:32 EDT 2019

On Tue, Sep 24, 2019 at 1:13 PM Stephen M. Butler <kg7je at arrl.net> wrote:

> On 9/23/19 10:24 PM, Tommy Trussell wrote:
> > I followed Stephen Butler's work on the GnuCash lists and hoped his
> > packaging procedure could produce clean Bionic builds. However it seems
> > Stephen quit building for Bionic quite a few weeks ago.
> Yup.  When I upgraded to Disco.  It's not for lack of trying but my
> feeble efforts have been fruitless so far.
> I tried the Docker approach but ran out of disk space!  I do have
> schroot on my plate but that hasn't born fruit yet.

I, too, tinkered with Docker but I didn't feel like it was getting me where
I wanted to go. I'm sure it can be useful but I don't think it's (yet?) the
primary environment for developing Debian / Ubuntu packages. So I have
uninstalled it for now.

You'll see two primary utilities for creating clean Debian / Ubuntu build
environments: pbuilder and sbuild. (You'll also see mentions of cowbuilder
-- that's a pbuilder wrapper that invokes cowdancer -- a "copy on write"
environment to optimize build performance.) You'll see more web pages about
pbuilder because it has been around longer, but sbuild seems to be what's
now being used in (most? many?) build servers.

I find that once sbuild is set up (including a local package repository) it
seems quite user friendly -- for example I don't have to remember to update
the packages in the chroot -- the system automatically does so whenever I
run a process in them. It's also dead simple to create and remove build
chroot environments, by release name (such as "disco" "buster," etc.). But
it's been awhile now since I played with pbuilder and maybe they've added
that feature too. Both seem to be actively developed.

By the way, a chroot in linux is a special virtualized process that's
isolated from the rest of the system. (If you've ever tinkered with a
Ubuntu installation as it's happening from a liveCD, that process happens
in a chroot environment.) The schroot utilities are handy for poking around
and running processes inside chroot filesystems as if an "ordinary" user.
Again these seem to be pretty refined and I think the same utilities
probably work the same for pbuilder or sbuild chroots, though I haven't
verified that.

What do you need from me to help you build on Bionic?  I'm able to build
> on Disco.  Have you been able to figure out the PPA on Launchpad?

I haven't gotten as far as playing with PPAs; I presume once a package
builds in sbuild it will build in a PPA. I strongly suspect an obscure bug
in the Bionic libraries is the major block, so the steps will be to A) find
a fix or workaround and B) tell the package how to implement the fix or

Unfortunately the Debian packaging process is a bit arcane, especially once
you get something as complex as GnuCash. I feel as though I have learned
only maybe 10% of what I need to know after lots of study.

It sounds like you might want to start by ordering a bigger hard drive, or
reorder things you have to free up space. Apparently the 500GB SSD on my
laptop still has some room left, but I've been pretty brutal about deleting
VMs and chroots when I'm through with them. I also tend to copy things to
my old slow machine for long-term storage.

If you have a multi-core processor and haven't played with VirtualBox, I
recommend it as a great way to keep several complete operating systems
sitting around for occasional or test use. Right now it looks like I have
copies of Ubuntu 19.10, 19.04 (the same as the host OS) a "bare" 18.04, a
regular 18.04, Debian 10, Fedora 30, FreeDOS (for a failed experiment in
upgrading a BIOS) Android x86 (time to delete that one) and a free Windows
VM (that self destructs after 30 days, which is fine by me; I just roll
back to the original install whenever I use it).

I tinkered with the flatpak and snap containers but they have some
significant limitations.

For example in my office I use an old two-core system with only 3GB RAM
available. I have upgraded it to a cheap SSD for the OS and I use a 1TB
rotational drive for data storage (/home). I stay with Ubuntu LTS OS
releases on it partly because it takes me at least a full day to fix things
like the document scanner after an upgrade. A flatpak of GnuCash ran out of
RAM so I couldn't run anything else. Also I keep my office data in a
"shared" user account so I might need to modify it for a flatpak or snap
because the sandboxing prevents access to the data.

SO that's why I am invested in creating a "proper" Ubuntu package for
GnuCash 3.x

More information about the gnucash-devel mailing list