Debian
Languages | עִברִית |
---|
Contents
- 1 About Debian Releases and Release Names
- 2 About Debian Repositories
- 3 About Debian's GnuCash packages
- 4 Installing Debian's GnuCash packages
- 5 Online Banking
- 6 Old Build Instructions (Ubuntu Gutsy and below, Debian sarge and below)
- 7 Enabling debugging symbols
- 8 Alternatively build a different version of Gnucash directly from source
About Debian Releases and Release Names
Debian does not follow a fixed release schedule. The releases started with version 1.1 (named "Buzz") in 1996. All the release names refer to characters in the Toy Story movies.
Debian packages and releases undergo rigid procedural and quality checks:
- The current stable release contains packages that have withstood several checks and at least a certain length of time in the testing trunk.
- The testing trunk becomes the next named release after its contents are frozen into a release. Packages get into the current testing trunk from Debian's unstable trunk (which is also called sid after the Toy Story character who regularly destroyed toys).
- Newly-released packages get accepted into sid by approved Debian maintainers.
- Additional procedures address packages having security issues or that are not actively maintained.
- Backports
- Backports are packages taken from the next Debian release (called "testing"), adjusted and recompiled for usage on Debian stable. To use the official backports for Debian-Bullseye, add the following line into your sources.list:
deb http://deb.debian.org/debian bullseye-backports main
- Current stable
- Debian 11 "Bullseye," the "stable" release since August 2021, shipped with Gnucash version 4.4 (without backports on 2023-02-14).
- Current testing
- bookworm comes with Gnucash 4.13.
Wikipedia has a handy chart showing Debian's past, current and future releases.
About Debian Repositories
The name of the GnuCash package in Debian and Ubuntu is gnucash. You can find up-to-date development information about the package using the Debian Package Tracker.
The tracker will contain links to whichever package versions are frozen into the three most recent Debian releases, plus the version in testing, and the version in unstable as of that moment. For example, in June 2021,
- Debian testing (bookworm) has GnuCash 4.13 (the version in sid) (2023-02-14)
- Debian 11 (bullseye) has GnuCash 4.4 (until the next version in sid progresses to bookworm)
- Debian 10 (buster) contains GnuCash 3.4 (will not change, but you can use Backports to get 4.4)
- Debian 9 (stretch) contains GnuCash 2.6.15 (will not change)
- Debian 8 (jessie) contains GnuCash 2.6.4 (will not change)
(The most recent GnuCash version should normally be in Debian testing, but in October 2018 the sole volunteer maintaining the Debian GnuCash package indicated needing help. If you might assist with the packaging, including helping "triage" bugs, use the information on the tracker page for details.)
About Debian's GnuCash packages
Debian splits the GnuCash installation into 4 packages:
- gnucash
- gnucash-common
- python3-gnucash
- gnucash-docs
(The python-gnucash package includes bindings to link GnuCash to python. The gnucash-docs package contains the documentation in multiple languages and gets built separately from a separate source package.)
In addition, to activate the (optional) ability to store GnuCash data in a database, you will need to install the two packages:
- libdbi1
- libdbi-dev
Plus you will need to install the libdbd package for whichever supported database(s) you want to use (choose one or all):
- libdbd-sqlite3
- libdbd-mysql
- libdbd-pgsql
Although all the database backends are still considered experimental in GnuCash 3.x, the SQLite3 database backend is the best tested and supported.
Installing Debian's GnuCash packages
The easiest way to install GnuCash from a terminal:sudo apt install gnucash
Unless you override the defaults, apt will automatically install gnucash-common gnucash-docs and python-gnucash packages, too.
To explicitly install ALL optional packages (described above), the command would besudo apt install gnucash gnucash-common gnucash-docs python-gnucash libdbi1 libdbi-dev libdbd-sqlite3 libdbd-mysql libdbd-pgsql
Using the Debian Archive
GnuCash individual packages can be downloaded from http://ftp.us.debian.org/debian/pool/main/g/gnucash/ which is an archive used by old distributions of Debian but usually also includes fairly recent versions of GnuCash.
See http://ftp.us.debian.org/debian/README.html.
About GetDeb
In this wiki and archived discussions you may see references to "GetDeb," which once held unofficial backported Debian packages of popular applications including GnuCash. The site was maintained by a small group of private volunteers. Sometime before 2018 the site became stale and ultimately disappeared. In 2019 someone bought the domain and seems to be using it as a news site.
Online Banking
For online banking, GnuCash uses the AqBanking library.
- Debian testing (bookworm)
- has AqBanking 6.2.10.
- Debian Lenny
- and Ubuntu 8.10 Intrepid now have gnucash packages with online banking enabled. So for Debian Lenny and Ubuntu Intrepid, the gnucash package included in the distribution can be installed.
- Note
- In Debian the gwenhywfar library is split into a number of packages see https://packages.debian.org/testing/source/libgwenhywfar.
- AqBanking < 3.0
- From a licensing incompatibility Debian and Ubuntu were unable to enable online banking in their gnucash packages. But starting with Gnucash version 2.2.6 and AqBanking version 3.0 this incompatibility has been resolved.
Old Build Instructions (Ubuntu Gutsy and below, Debian sarge and below)
These instructions apply to version 2.0.1-2 of Debian's gnucash package, running on Debian 4.0 ("etch"). They also apply to Ubuntu Edgy gnucash version 2.0.1-3ubuntu3, but please consult the Ubuntu page for Ubuntu specific instructions. As time marches on, and the package is updated, the specific details of these instructions will become outdated, so be prepared to search for newer packages (e.g., libaqbanking17-dev instead of libaqbanking-16.dev) or use higher version numbers (e.g., 2.0.2 instead of 2.0.1) as necessary.
Additionally you need to recompile libaqbanking.
Downloading prerequisites
To begin with, install the packages that are required to build any Debian package, the packages that are required to build the gnucash package, the package for the AqBanking development library and a couple of other packages that we will make use of in the instructions below:sudo aptitude install build-essential devscripts fakeroot libaqbanking16-dev aqbanking16-qt-wizard
sudo aptitude build-dep gnucash libaqbanking
If libaqbanking16-dev can not be found, try asking apt to install libaqbanking-dev. Apt should then tell you which package you really need. Or try searching for libaqbanking on packages.debian.org or packages.ubuntu.com to find the correct version. Try [1] or [2].
Make a directory to work in and download and extract the gnucash source code:mkdir gnucash
cd gnucash
apt-get source gnucash libaqbanking
GnuCash
Configuring
The source code for gnucash will now be extracted to a directory named gnucash-2.x.x. Now, we enable HBCI support. To do this, edit the debian/rules file:cd gnucash-2.*
editor debian/rules
env LDFLAGS="-L/usr/X11R6/lib" GUILE=/usr/bin/guile-1.6 CFLAGS="$(CFLAGS)" ./configure
--disable-static --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --libexecdir=/usr/lib --libdir=/usr/lib/gnucash --enable-ofx
--disable-error-on-warning --enable-hbci || cat config.log
Note: --enable-mt940 is no longer required as of 2.2.0; it is included in --enable-hbci. For pre-2.2.0 builds, add --enable-mt940 after --enable-hbci if that functionality is needed.
Optional, but strongly recommended: make a note of the changes you have made in the package's changelog. The devscripts package contains a utility to automate the process:debchange --nmu 'Enable HBCI support'
This enables a few nice behaviors for your package.
- When you wonder in six months time, "what changes did I make to that package?", you can check by examining the /usr/share/doc/gnucash/changelog.Debian.gz file.
- The version of the package you are building will be slightly higher than the version of the packages in the Debian or Ubuntu archive. This will prevent apt from overwriting the new package with the old package from the archives. If a new version of gnucash is packaged by the Debian or Ubuntu package maintainers, it will be installed over the package we are building here. (You would then have to repeat these instructions.)
If this is not the desired result, you can apply a hold to the gnucash package. See below for more information.
Building
Now we are ready to build the package:dpkg-buildpackage -b -us -uc -rfakeroot
This is where you make a cup of tea (or, if you have a slow computer, go and watch the Lord of the Rings trilogy). If you want to verify that you did everything correctly, the command will output a bunch of "checking for ..." lines right at the beginning. Look for the lines
checking whether to use OFX... yes -- failure is fatal checking for libofx version >= 0.7.0... found 0.8.0 checking for libofx/libofx.h... yes checking for libofx... yes configure: WARNING: MT940 importing support is enabled but is totally experimental! checking for aqbanking >= "1.3.0"... yes checking HBCI_CFLAGS... checking HBCI_LIBS... -laqbanking checking for aqbanking >= "1.0.0"... yes checking HBCI_CFLAGS... checking HBCI_LIBS... -laqbanking
Also, at the end of all the checking, configure will output a summary report. Notice the ofx, hbci, and mt940 in the Optional Components line.
Options detected/selected ------------------------- gnucash version ...... : 2.0.1 Build for host ....... : i686-pc-linux-gnu Optional components....: ofx hbci mt940
Completing the install
cd ..
sudo dpkg --install gnucash_*.deb gnucash-common_*.deb
rm -r gnucash-2.0.1
echo "gnucash hold" | sudo dpkg --set-selections
More information about this can be found at debian-administration.org and The APT Howto
libaqbanking
Configuring
The source code for libaqbanking will now be extracted to a directory named libaqbanking-2.x.x. Now, we enable aqofxconnect support. To do this, we reverse these changes.
Specifically:
- edit the debian/rules file:
cd libaqbanking-2.* editor debian/rules
- And add aqofxconnect to the list of backends, i.e. from:
DEB_CONFIGURE_EXTRA_FLAGS := --disable-static --with-backends="aqhbci aqdtaus aqgeldkarte" --with-frontends="cbanking g2banking qbanking kbanking"
- to:
DEB_CONFIGURE_EXTRA_FLAGS := --disable-static --with-backends="aqhbci aqdtaus aqgeldkarte aqofxconnect" --with-frontends="cbanking g2banking qbanking kbanking"
- Create the file debian/libaqbanking-ofx0.install:
editor debian/libaqbanking-ofx0.install
- And put this text in it:
usr/lib/aqbanking/plugins/16/imexporters/ofx.* usr/lib/aqbanking/plugins/16/providers/aqofxconnect.* usr/lib/aqbanking/plugins/16/frontends/qbanking/cfgmodules/aqofxconnect.* usr/lib/libaqofxconnect.so.*
-
edit debian/control
- And add this (notice the single space at the start of some lines):
Package: libaqbanking-ofx0 Provides: libaqbanking-backend Enhances: libaqbanking0c2a Section: libs Architecture: any Depends: ${shlibs:Depends} Conflicts: libaqofxconnect4 Description: library for OFX online banking AqBanking provides a middle layer between the applications and online banking libraries implementing various file formats and protocols. Plugins supporting OFX, DTAUS, and HBCI are available. For the latter, AqHBCI is required. . This package provides support for Open Financial Exchange (OFX) in AqBanking. OFX is a specification for the electronic exchange of financial data between financial institutions, business and consumers via the Internet. . Homepage: http://www.aquamaniac.de/aqbanking/
-
debchange --nmu 'Enable aqofxconnect'
Building
dpkg-buildpackage -b -us -uc -rfakeroot
Look for aqofxconnect:
Summary ---------------------------------------------------- AqBanking version : 2.2.3.0-stable Supported backends : aqhbci aqdtaus aqgeldkarte aqofxconnect Supported frontends: cbanking g2banking qbanking kbanking
Installing
cd ..
sudo dpkg --install libaqbanking-ofx0_*.deb
rm -r libaqbanking-2.*
echo "libaqbanking-ofx0 hold" | sudo dpkg --set-selections
Enabling debugging symbols
The procedure is similar to the one above:aptitude install build-essential fakeroot devscripts
aptitude build-dep gnucash
mkdir gnucash
cd gnucash
apt-get source gnucash
cd gnucash-2.0.1
editor debian/rules
Now add the --enable-debug option to the arguments of the configure script.
debchange --nmu 'Enable debugging'
DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -b -us -uc -rfakeroot
cd ..
dpkg --install gnucash_*.deb gnucash-common_*.deb
Alternatively build a different version of Gnucash directly from source
GnuCash Versions >= 3.0
Gnucash from version 3.0 no longer uses autotools for configuring the build and uses CMake instead. Until Debian specific instructions are provided consider adapting the build instructions for Ubuntu distributions Building#Ubuntu
GnuCash Versions <= 2.6.21
This may be useful if you want to use a later version than the ones in Debian's repositories. Rather than building a Debian package I just used the instructions provided by Gnucash for any flavour of Linux. These notes are no more than confirmation that those instructions work. I don't know enough about building packages - integrating a build within a package would presumably be a better longer term solution but the following gets the job done. I performed this install of Gnucash 2.2.4 into Debian Etch - this was my first foray into compiling and it wasn't difficult.sudo aptitude purge gnucash
sudo aptitude update
sudo aptitude install build-essential
sudo aptitude build-dep gnucash
(someone else may know if any of these are not essential for this task, but they are sufficient)
download source and docs from Gnucash web site (in my case to my desktop) https://sourceforge.net/projects/gnucash/
move them to a new gnucash-source directory (obviously change "russell" to your own login name):cd ~
mkdir gnucash-source
mv /home/russell/Desktop/gnucash* /home/russell/gnucash-source
tar -xf gnucash-source/gnucash-2.2.4.tar.bz2
tar -xf gnucash-source/gnucash-docs-2.2.0.tar.gz
Installation instructions are in /home/russell/gnucash-source/gnucash-2.2.4/INSTALL which you may wish to read.
Now move into the directory you are going to compile from:cd ~/gnucash-2.2.4
./configure --prefix=/opt/gnucash-2.2.4
./configure
make
make check
# may not be necessary to do make check, but do it anyway in case it indicates a problem
sudo make install
cd ~/gnucash-docs-2.2.0
./configure
# if you want to use the --prefix make sure you use the same directory as above i.e.
# ./configure --prefix=/opt/gnucash-2.2.4)
make
sudo make install
If you need to find the binary it should be in /opt/gnucash-2.2.4/bin or /usr/local/bin depending on whether or not you used the --prefix with ./configure.
When running Gnucash for the first time you will have to go through the setup - I chose default values
- Optional Cleanup
- First you might want to archive the downloaded source if you want to be able to reinstall it later
mv /home/russell/gnucash-source /whereever/.
cd ~/gnucash-2.2.4
make clean
make distclean
cd ~/gnucash-docs-2.2.0
make clean
make distclean