[php-pear-Mail-mimeDecode] disable E_STRICT in tests, fix FTBFS

Remi Collet remi at fedoraproject.org
Tue Jul 31 07:22:46 UTC 2012


commit 75fab14b08c4cfcc2a130fd5fe61b11232b66cee
Author: remi <fedora at famillecollet.com>
Date:   Tue Jul 31 09:22:42 2012 +0200

    disable E_STRICT in tests, fix FTBFS

 Mail_mimeDecode-tests.patch   |   38 ++++++++++++++++++++++++++++++++++++++
 php-pear-Mail-mimeDecode.spec |   19 +++++++++----------
 2 files changed, 47 insertions(+), 10 deletions(-)
---
diff --git a/Mail_mimeDecode-tests.patch b/Mail_mimeDecode-tests.patch
new file mode 100644
index 0000000..8ef57b3
--- /dev/null
+++ b/Mail_mimeDecode-tests.patch
@@ -0,0 +1,38 @@
+diff -up Mail_mimeDecode-1.5.5/php-pear-Mail-mimeDecode.xml.orig Mail_mimeDecode-1.5.5/php-pear-Mail-mimeDecode.xml
+--- Mail_mimeDecode-1.5.5/php-pear-Mail-mimeDecode.xml.orig	2012-07-31 09:17:36.000000000 +0200
++++ Mail_mimeDecode-1.5.5/php-pear-Mail-mimeDecode.xml	2012-07-31 09:18:05.000000000 +0200
+@@ -43,8 +43,8 @@ Minor Bug fix release.
+  </notes>
+  <contents>
+   <dir name="/">
+-   <file baseinstalldir="Mail" md5sum="c08b2084476c29f5aefc9b343b306d04" name="tests/parse_header_value.phpt" role="test" />
+-   <file baseinstalldir="Mail" md5sum="21714d33404f032307cf9ee2fd5b9e39" name="tests/semicolon_content_type_bug1724.phpt" role="test" />
++   <file baseinstalldir="Mail" name="tests/parse_header_value.phpt" role="test" />
++   <file baseinstalldir="Mail" name="tests/semicolon_content_type_bug1724.phpt" role="test" />
+    <file baseinstalldir="Mail" md5sum="f6cc855bfe9f21988324da051d3b9d3f" name="mimeDecode.php" role="php" />
+   </dir>
+  </contents>
+diff -up Mail_mimeDecode-1.5.5/tests/parse_header_value.phpt.orig Mail_mimeDecode-1.5.5/tests/parse_header_value.phpt
+--- Mail_mimeDecode-1.5.5/tests/parse_header_value.phpt.orig	2012-07-31 09:15:16.000000000 +0200
++++ Mail_mimeDecode-1.5.5/tests/parse_header_value.phpt	2012-07-31 09:15:51.000000000 +0200
+@@ -3,7 +3,7 @@ Tests for _parseHeaderValue
+ --SKIPIF--
+ --FILE--
+ <?php
+-error_reporting(E_ALL); // suppress E_STRICT errors
++error_reporting(E_ALL & ~E_STRICT); // suppress E_STRICT errors
+ 
+ require_once 'Mail/mime.php';
+ 
+diff -up Mail_mimeDecode-1.5.5/tests/semicolon_content_type_bug1724.phpt.orig Mail_mimeDecode-1.5.5/tests/semicolon_content_type_bug1724.phpt
+--- Mail_mimeDecode-1.5.5/tests/semicolon_content_type_bug1724.phpt.orig	2012-07-31 09:16:55.000000000 +0200
++++ Mail_mimeDecode-1.5.5/tests/semicolon_content_type_bug1724.phpt	2012-07-31 09:16:20.000000000 +0200
+@@ -3,7 +3,7 @@ Bug #1724   Quoted Semicolons in Content
+ --SKIPIF--
+ --FILE--
+ <?php
+-error_reporting(E_ALL); // suppress E_STRICT errors
++error_reporting(E_ALL & ~E_STRICT); // suppress E_STRICT errors
+ 
+ require_once('Mail/mime.php');
+ 
diff --git a/php-pear-Mail-mimeDecode.spec b/php-pear-Mail-mimeDecode.spec
index c3bbc1b..e445937 100644
--- a/php-pear-Mail-mimeDecode.spec
+++ b/php-pear-Mail-mimeDecode.spec
@@ -12,6 +12,8 @@ URL:            http://pear.php.net/package/Mail_mimeDecode
 Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
 Source1:        xml2changelog
 
+Patch0:         %{pear_name}-tests.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  php-pear >= 1:1.6.0
@@ -37,14 +39,12 @@ pear run-tests -p Mail_mimeDecode
 %setup -q -c
 %{_bindir}/php -n %{SOURCE1} package.xml | tee CHANGELOG | head -n 8
 
-# Create a "localized" php.ini to avoid build warning
-cp /etc/php.ini .
-echo "date.timezone=UTC" >>php.ini
-
 cd %{pear_name}-%{version}
 # Package.xml is V2
 mv ../package.xml %{name}.xml
 
+%patch0 -p1 -b .orig
+
 
 # Empty build section, nothing required
 %build
@@ -54,7 +54,7 @@ mv ../package.xml %{name}.xml
 rm -rf %{buildroot} docdir
 
 cd %{pear_name}-%{version}
-PHPRC=../php.ini %{__pear} install \
+%{__pear} install \
    --nodeps \
    --packagingroot %{buildroot} %{name}.xml
 
@@ -69,12 +69,8 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
 %check
 cd %{pear_name}-%{version}
 
-# Sanity check
-lst=$(find %{buildroot}%{pear_xmldir} -exec grep -q %{buildroot} {} \; -print)
-[ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
-
 # Test suite
-PHPRC=../php.ini %{__pear} run-tests \
+%{__pear} run-tests \
    -i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
    tests | tee ../tests.log
 grep "FAILED TESTS" ../tests.log && exit 1
@@ -104,6 +100,9 @@ fi
 
 
 %changelog
+* Tue Jul 31 2012 Remi Collet <remi at fedoraproject.org> - 1.5.5-4
+- disable E_STRICT in tests, fix FTBFS
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.5-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list