[Pkg-giraffe-maintainers] Bug#990322: Backport patch to allow kopanocore to build against PHP 8
Bryce Harrington
bryce at bryceharrington.org
Fri Jun 25 17:27:28 BST 2021
Source: kopanocore
Version: 8.7.0-7.1
Severity: normal
Tags: upstream patch
kopanocore 8.7.0-7.1 will FTBFS when built with PHP 8 or later.
This isn't an issue in debian currently since PHP 7.4 is still the
default. For Ubuntu we've dropped 7.4 and moved to 8.0, and discovered
this failure. Fortunately there is a patch available from upstream to
move to 8.0, however it does not apply cleanly on top of 8.7.0-7.1 due
to some intermediary refactoring in upstream's tree. The original
upstream patch is:
https://github.com/Kopano-dev/kopano-core/commit/9b3bbd27ea63af180ce73a30a218d34b6e6535a4
At least one of the refactoring changes needed to make that apply is:
https://github.com/Kopano-dev/kopano-core/commit/b8d29e9f58440f1d75bddf77df3d25fd6367af20
However, there are some other differences such as changes for APIs not
included in 8.7.0-7.1, etc. So I ended up doing a reimplementation of
the patch:
https://launchpad.net/ubuntu/+source/kopanocore/8.7.0-7.1ubuntu4
Please note one important addition I made to configure.ac to enable the
build:
+ AS_CASE([$PHP_VERSION],
+ [5.*], [with_php=5],
+- [7.*], [with_php=7]
++ [7.*], [with_php=7],
++ [8.*], [with_php=7]
IOW this tricks the Makefile into treating PHP 8 as the same as PHP 7,
which for purposes of the build logic is fine. However, this could
likely be done better (e.g. by merging the php-ext and php7-ext
directories together, as was done in commit b8d29e9f).
Thanks,
Bryce
-- System Information:
Debian Release: bullseye/sid
APT prefers focal-updates
APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.4.0-70-generic (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the Pkg-giraffe-maintainers
mailing list