summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-02-28 11:30:30 +0100
committerRemi Collet <fedora@famillecollet.com>2015-02-28 11:30:30 +0100
commit05fb878370295b0f382c0d12665198cc9faeaaaa (patch)
tree1d0cb21c36f8091f1f76fb461f8e46274676603f
parent35a16cef9a8d4350ffa83c3b3a0ecd91cded8ab4 (diff)
php54-php: fix fedora 22 build with recent systemd
-rw-r--r--php-5.4.38-systemd.patch80
-rw-r--r--php.spec9
2 files changed, 88 insertions, 1 deletions
diff --git a/php-5.4.38-systemd.patch b/php-5.4.38-systemd.patch
new file mode 100644
index 0000000..4e8ff0f
--- /dev/null
+++ b/php-5.4.38-systemd.patch
@@ -0,0 +1,80 @@
+From 7b6031567251ad47132de23f47eb57951fd9b563 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Sat, 19 Jul 2014 18:40:20 +0200
+Subject: [PATCH] Fixed bug #67635 php links to systemd libraries without using
+ pkg-config
+
+Patch from pacho at gentoo dot org
+
+Rely on pkg-config for systemd >= 209
+Failback on old check
+---
+ sapi/fpm/config.m4 | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
+index bd6d649..e1c740d 100644
+--- a/sapi/fpm/config.m4
++++ b/sapi/fpm/config.m4
+@@ -567,14 +567,26 @@ if test "$PHP_FPM" != "no"; then
+ [ --with-fpm-systemd Activate systemd integration], no, no)
+
+ if test "$PHP_FPM_SYSTEMD" != "no" ; then
+- AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
+- AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
++ if test -z "$PKG_CONFIG"; then
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ fi
++ unset SYSTEMD_LIBS
++ unset SYSTEMD_INCS
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then
++ SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd`
++ SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd`
++ HAVE_SD_DAEMON_H="yes"
++ else
++ AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
++ AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
++ fi
+ if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
+ AC_MSG_ERROR([Your system does not support systemd.])
+ else
+ AC_DEFINE(HAVE_SYSTEMD, 1, [FPM use systemd integration])
+ PHP_FPM_SD_FILES="fpm/fpm_systemd.c"
+- PHP_ADD_LIBRARY(systemd-daemon)
++ PHP_EVAL_LIBLINE($SYSTEMD_LIBS)
++ PHP_EVAL_INCLINE($SYSTEMD_INCS)
+ php_fpm_systemd=notify
+ fi
+ else
+--
+2.1.4
+
+From 144a08395408506fa700c71e74c360160da3bd99 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Sat, 19 Jul 2014 18:42:40 +0200
+Subject: [PATCH] improve previous, add message during configure
+
+---
+ sapi/fpm/config.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
+index e1c740d..96b0edf 100644
+--- a/sapi/fpm/config.m4
++++ b/sapi/fpm/config.m4
+@@ -573,9 +573,12 @@ if test "$PHP_FPM" != "no"; then
+ unset SYSTEMD_LIBS
+ unset SYSTEMD_INCS
+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then
++ AC_MSG_CHECKING([for libsystemd])
+ SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd`
+ SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd`
++ SYSTEMD_VERS=`$PKG_CONFIG --modversion libsystemd`
+ HAVE_SD_DAEMON_H="yes"
++ AC_MSG_RESULT([version $SYSTEMD_VERS])
+ else
+ AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
+ AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
+--
+2.1.4
+
diff --git a/php.spec b/php.spec
index b80084c..c08d03d 100644
--- a/php.spec
+++ b/php.spec
@@ -109,7 +109,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: 5.4.38
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -161,6 +161,8 @@ Patch91: php-5.3.7-oci8conf.patch
# Upstream fixes (100+)
# Backported from 5.5.18 for https://bugs.php.net/65641
Patch100: php-5.4.33-bug65641.patch
+# Backported from 5.5.16 for https://bugs.php.net/67635
+Patch101: php-5.4.38-systemd.patch
# Security fixes (200+)
@@ -789,6 +791,7 @@ support for using the enchant library to PHP.
# upstream patches
%patch100 -p1 -b .bug65641
+%patch101 -p1 -b .bug65635
# security patches
@@ -1587,6 +1590,10 @@ fi
%changelog
+* Sat Feb 28 2015 Remi Collet <remi@fedoraproject.org> 5.4.38-2
+- fix fedora 22 build with recent systemd
+ add patch fix from https://bugs.php.net/67635
+
* Wed Feb 18 2015 Remi Collet <remi@fedoraproject.org> 5.4.38-1
- Update to 5.4.38
http://www.php.net/releases/5_4_38.php