[Pkg-giraffe-maintainers] Bug#911360: FTBFS every time default PHP version is changed

Ondřej Surý ondrej at debian.org
Fri Oct 19 06:58:21 BST 2018


Package: src:kopanocore
Version: 8.6.5-1
Severity: serious

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

your package contains code that requires specifying PHP version
in debian/rules.  This is not necessary and in fact it's harmful
because kopanocore FTBFS every time default PHP version is changed.

This prevents binNMUs on your package and currently kopanocore
cannot be built without changing the source.  The patch is very
simple and attached.

I would also suggest to use dh-exec instead of hand crafted d/rules
macro to replace DEB_HOST_MULTIARCH, but that's of course ultimately
your decision.

Cheers,
Ondrej

- -- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_DK.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEw2Gx4wKVQ+vGJel9g3Kkd++uWcIFAlvJcn1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEMz
NjFCMUUzMDI5NTQzRUJDNjI1RTk3RDgzNzJBNDc3RUZBRTU5QzIACgkQg3Kkd++u
WcIRMw/9HiSQOmd/ey0ALmXdTr5nqw2Gzw7s5P/m5ECiN9gixw6snICTupf/d7K8
upe155sLk8iAoZxZ1y9uNDAbae0xH4lT9a85wyspwsOQTm0siDG7VLBqLWCZ3ZCy
0Cp9AGwlHYyi4+GVca/vDypegy9A2mIOwC762u66Lcwdz12WHNahxSo/RnO/1h0J
3Wr9oXmJ2iI5ZDQeJAX7tm/Z+iVKcvcInF+46C3zjlg3Y800Re8LkRaXzBJo7ip0
4wnLOlQQqAxnQvwz+89IrflpdMmvGLesvGPFkL9qjK5IqoSs9fdqkOS+lxNnfZgH
mlN0NRIF+B6kzBQe8alovDD7ZHcFkj7hC7GzYuAzeV5y/nKoBIpJecwrHxCFNJK2
9HPO7ITI0vdkxQKiu+UiSaPCNdDZ2mzd0iqnUyZKX5oTv1AqEi6Mu/BGdyUonu4u
qdXse2aZ2yHYlODwK4q+o5zpPXl/iqXzdcnpNKD09pDIUQkT8cf9FD9JIOndOkqL
WlS0X6LYubvEkHy0RBHlXaBtWD3SQ79/AbpYHAs6UtMeYuUFqHusoEaWtbqiUPk1
jQeeKoMfseEsJEnBJXKV9v+7DRsLFOXwfT8d8B7RSjY5pSmZKGk/xFj5AFBpATSS
HvvSGbyMwuKJmYPipvm8n0PMxee+1jMdEXjy4fLsTaJGlvQhICw=
=wwqz
-----END PGP SIGNATURE-----
-------------- next part --------------
>From c959c5017d7751471d88d9217cac641c4fd8c447 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej at debian.org>
Date: Fri, 19 Oct 2018 05:39:21 +0000
Subject: [PATCH 1/2] Use default Debian PHP version instead of manually
 specifying a version

---
 debian/rules | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index f88a846..7899b90 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,8 +15,7 @@ include /usr/share/dpkg/pkg-info.mk
 DEB_BUILD_DIR=debian/build
 
 INSTDIR=$(CURDIR)/debian/tmp
-PHP_VERSION=7.2
-PHP_API_DATE=$(shell php-config$(PHPVERSION) --phpapi)
+PHP_API_DATE=$(shell php-config --phpapi)
 PREPROCESS_FILES := $(wildcard debian/*.in)
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -33,7 +32,7 @@ DEB_CONFIGURE_EXTRA_ARGS :=      \
     --sysconfdir=/etc \
     --mandir=\$${prefix}/share/man \
     --infodir=\$${prefix}/share/info \
-    --with-php-config=/usr/bin/php-config$(PHPVERSION) \
+    --with-php-config=/usr/bin/php-config \
     --with-quotatemplate-prefix=/etc/kopano/quotamail \
     --with-userscript-prefix=/etc/kopano/userscripts \
     --disable-static \
@@ -46,7 +45,6 @@ DEB_CONFIGURE_EXTRA_ARGS :=      \
 
 $(PREPROCESS_FILES:.in=): %: %.in
 	sed -e 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g' \
-	-e 's,/@PHP_VERSION@,$(PHP_VERSION:%=/%),g' \
 	-e 's,/@PHP_API_DATE@,$(PHP_API_DATE:%=/%),g' $< > $@
 
 %:
-- 
2.19.1

-------------- next part --------------
>From 6f6401bf8a25123a2808a81ca36c21eba4bb4742 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej at debian.org>
Date: Fri, 19 Oct 2018 05:52:10 +0000
Subject: [PATCH 2/2] Just use wildcard to remove the need to modify
 php-mapi.php

---
 debian/php-mapi.php    | 3 +++
 debian/php-mapi.php.in | 3 ---
 debian/rules           | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)
 create mode 100644 debian/php-mapi.php
 delete mode 100644 debian/php-mapi.php.in

diff --git a/debian/php-mapi.php b/debian/php-mapi.php
new file mode 100644
index 0000000..4f441d6
--- /dev/null
+++ b/debian/php-mapi.php
@@ -0,0 +1,3 @@
+# PHP modul installation for php-mapi
+mod debian/tmp/etc/php/*/cli/conf.d/mapi.ini
+mod debian/tmp/usr/lib/php/*/mapi.so
diff --git a/debian/php-mapi.php.in b/debian/php-mapi.php.in
deleted file mode 100644
index 7a9fb7d..0000000
--- a/debian/php-mapi.php.in
+++ /dev/null
@@ -1,3 +0,0 @@
-# PHP modul installation for php-mapi
-mod debian/tmp/etc/php/@PHP_VERSION@/cli/conf.d/mapi.ini
-mod debian/tmp/usr/lib/php/@PHP_API_DATE@/mapi.so
diff --git a/debian/rules b/debian/rules
index 7899b90..f41ab09 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,8 +44,7 @@ DEB_CONFIGURE_EXTRA_ARGS :=      \
 
 
 $(PREPROCESS_FILES:.in=): %: %.in
-	sed -e 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g' \
-	-e 's,/@PHP_API_DATE@,$(PHP_API_DATE:%=/%),g' $< > $@
+	sed -e 's,/@DEB_HOST_MULTIARCH@,$(DEB_HOST_MULTIARCH:%=/%),g'
 
 %:
 	dh $@ --builddirectory=$(DEB_BUILD_DIR) --with systemd,autoreconf,php
-- 
2.19.1



More information about the Pkg-giraffe-maintainers mailing list