summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--XML_Util-pr8.patch26
-rw-r--r--php-pear.spec11
2 files changed, 35 insertions, 2 deletions
diff --git a/XML_Util-pr8.patch b/XML_Util-pr8.patch
new file mode 100644
index 0000000..2a41893
--- /dev/null
+++ b/XML_Util-pr8.patch
@@ -0,0 +1,26 @@
+From 59e2d9738dd25cd751b810e5431b96e836864152 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 22 Feb 2017 11:39:37 +0100
+Subject: [PATCH] Fix #21184, collapseEmptyTags breaks XML_Serializer
+
+---
+ XML/Util.php | 2 +-
+ package.xml | 1 +
+ tests/Bug21184Tests.php | 18 ++++++++++++++++++
+ 3 files changed, 20 insertions(+), 1 deletion(-)
+ create mode 100644 tests/Bug21184Tests.php
+
+diff --git a/XML/Util.php b/XML/Util.php
+index af8211b..0bb7e5e 100644
+--- a/XML/Util.php
++++ b/XML/Util.php
+@@ -483,7 +483,7 @@ public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
+ '${4}' . // attributes
+ ' />'
+ ;
+- return preg_replace($preg1, $preg2, $xml);
++ return (preg_replace($preg1, $preg2, $xml)?:$xml);
+ break;
+ case XML_UTIL_COLLAPSE_XHTML_ONLY:
+ return preg_replace(
+
diff --git a/php-pear.spec b/php-pear.spec
index af9efd8..75c3126 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -40,7 +40,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.1
-Release: 10%{?dist}
+Release: 11%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -64,6 +64,8 @@ Source25: http://pear.php.net/get/PEAR_Manpages-%{manpages}.tgz
# https://github.com/pear/pear-core/pull/51
Patch0: pear-proxy.patch
+# https://github.com/pear/XML_Util/pull/8
+Patch1: XML_Util-pr8.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -162,7 +164,7 @@ done
cp %{SOURCE1} .
# apply patches on used PEAR during install
-# Patch0 applied on installation tree
+# Patches applied on installation tree
sed -e 's/@SCL@/%{?scl:%{scl}_}/' \
-e 's:@VARDIR@:%{_localstatedir}:' \
@@ -246,6 +248,7 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd $RPM_BUILD_ROOT%{peardir}
patch --no-backup --fuzz 0 -p1 < %{PATCH0}
+patch --no-backup --fuzz 0 -p1 < %{PATCH1}
popd
# Why this file here ?
@@ -429,6 +432,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Feb 22 2017 Remi Collet <remi@fedoraproject.org> 1:1.10.1-11
+- add patch to fix XML_Serializer with XML_Util 1.4.1
+ from https://github.com/pear/XML_Util/pull/8
+
* Wed Feb 8 2017 Remi Collet <remi@fedoraproject.org> 1:1.10.1-10
- update XML_Util to 1.4.1