[Borgbackup] for package / platform maintainers: about 1.2.0a5

Thomas Waldmann tw at waldmann-edv.de
Thu Mar 21 17:42:36 EDT 2019


If you maintain a borgbackup package for some (linux, bsd, ...)
distribution or you are interested in porting to new platforms (Haiku,
anyone?), I have some notes for you and you can test it with 1.2.0a5.

pkg-config support
==================

I did a big refactoring of the setup*.py code, introducing pkg-config
support (via the pkgconfig python package, which must be installed
before invoking setup.py) and also simplifying the code a lot.

Some notes how borg 1.2.0a5 finds headers/libraries or falls back to
bundled code are there:

https://github.com/borgbackup/borg/blob/1.2.0a5/setup.py#L27

required libraries
==================

As the easiest way to find libs is just having the lib support
pkg-config, it would be good if you all could push for better pkg-config
support for the libs borg requires:

- openssl (and compatible libs) - for example, it seems that freebsd 12
has no pkg-config support for openssl, this is why I needed to point to
is via BORG_OPENSSL_PREFIX=/usr .

- libb2 (blake2 hash / mac) - until very recently, this lib had no
pkg-config support, but Ronny Pfannschmidt added it (thanks!). After
this, there was a new release 0.98.1 with these changes, so borg could
find libb2 now IF >=0.98.1 is installed. Earlier libb2 versions also had
a serious bug for some AMD cpus. so you really want to make sure you
have >= 0.98.1.

- liblz4 and libzstd: just check if they are recent enough (they also
should have pkg-config support).

- pkgconfig python package: there recently was some work to improve it
and I hope there will be a release of that soon (e.g. it had troubles to
parse the openssl version number, which I fixed). Keep an eye on it,
make sure you have the latest and greatest release.

advantages
==========

In general, by supporting pkg-config for the libs, you can help to have
a clean separation and keep 3rd party code in separately maintainable
packages (instead of borg falling back to bundled code).

Some distributions which have libs and headers at unusual places also
will be supported without an issue, IF there is appropriate pkg-config
support.

One day, if everybody has these libs, we maybe could even remove the
bundled code again.


-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393


More information about the Borgbackup mailing list