[php-pear-XML-RSS] fix FTBFS, update tests suite from git
Remi Collet
remi at fedoraproject.org
Mon Jan 16 10:00:59 UTC 2012
commit db2fafec9afbff329e55f349c911d6b920537981
Author: remi <fedora at famillecollet.com>
Date: Mon Jan 16 11:00:30 2012 +0100
fix FTBFS, update tests suite from git
XML_RSS-git.patch | 81 +++++++++++++++++++++++++++++++++++++++++++++++++
php-pear-XML-RSS.spec | 15 +++++----
xml2changelog | 2 +-
3 files changed, 91 insertions(+), 7 deletions(-)
---
diff --git a/XML_RSS-git.patch b/XML_RSS-git.patch
new file mode 100644
index 0000000..2c9c51e
--- /dev/null
+++ b/XML_RSS-git.patch
@@ -0,0 +1,81 @@
+diff -ruN XML_RSS-1.0.2/tests.orig/AllTests.php XML_RSS-1.0.2/tests/AllTests.php
+--- XML_RSS-1.0.2/tests.orig/AllTests.php 1970-01-01 10:14:21.000000000 +0100
++++ XML_RSS-1.0.2/tests/AllTests.php 1970-01-01 01:00:00.000000000 +0100
+@@ -1,32 +0,0 @@
+-<?php
+-if (!defined('PHPUnit_MAIN_METHOD')) {
+- define('PHPUnit_MAIN_METHOD', 'AllTests::main');
+-}
+-
+-require_once 'PHPUnit/Framework.php';
+-require_once 'PHPUnit/TextUI/TestRunner.php';
+-
+-require_once 'XML_RSS_Infrastructure_Test.php';
+-require_once 'XML_RSS_Parsing_Test.php';
+-
+-class AllTests
+-{
+- public static function main()
+- {
+- PHPUnit_TextUI_TestRunner::run(self::suite());
+- }
+-
+- public static function suite()
+- {
+- $suite = new PHPUnit_Framework_TestSuite('XML_RSS Tests');
+- $suite->addTestSuite('XML_RSS_Parsing_Test');
+- $suite->addTestSuite('XML_RSS_Infrastructure_Test');
+-
+- return $suite;
+- }
+-}
+-
+-if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
+- AllTests::main();
+-}
+-// vim:set noet ts=4 sw=4:
+diff -ruN XML_RSS-1.0.2/tests.orig/XML_RSS_Infrastructure_Test.php XML_RSS-1.0.2/tests/XML_RSS_Infrastructure_Test.php
+--- XML_RSS-1.0.2/tests.orig/XML_RSS_Infrastructure_Test.php 1970-01-01 10:14:21.000000000 +0100
++++ XML_RSS-1.0.2/tests/XML_RSS_Infrastructure_Test.php 2012-01-16 10:53:36.000000000 +0100
+@@ -18,7 +18,7 @@
+ define('PHPUnit_MAIN_METHOD', 'XML_RSS_Infrastructure_Test::main');
+ }
+
+-require_once "PHPUnit/Framework.php";
++require_once "PHPUnit/Framework/TestCase.php";
+ require_once "XML/RSS.php";
+
+ /**
+@@ -68,4 +68,4 @@
+ if (PHPUnit_MAIN_METHOD == 'XML_RSS_Infrastructure_Test::main') {
+ XML_RSS_Infrastructure_Test::main();
+ }
+-?>
+\ Pas de fin de ligne à la fin du fichier
++?>
+diff -ruN XML_RSS-1.0.2/tests.orig/XML_RSS_Parsing_Test.php XML_RSS-1.0.2/tests/XML_RSS_Parsing_Test.php
+--- XML_RSS-1.0.2/tests.orig/XML_RSS_Parsing_Test.php 1970-01-01 10:14:21.000000000 +0100
++++ XML_RSS-1.0.2/tests/XML_RSS_Parsing_Test.php 2012-01-16 10:53:40.000000000 +0100
+@@ -18,7 +18,7 @@
+ define('PHPUnit_MAIN_METHOD', 'XML_RSS_Parsing_Test::main');
+ }
+
+-require_once "PHPUnit/Framework.php";
++require_once "PHPUnit/Framework/TestCase.php";
+ require_once "XML/RSS.php";
+
+ /**
+--- XML_RSS-1.0.2/php-pear-XML-RSS.xml.orig 2012-01-16 10:55:24.000000000 +0100
++++ XML_RSS-1.0.2/php-pear-XML-RSS.xml 2012-01-16 10:55:37.000000000 +0100
+@@ -34,9 +34,8 @@
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <file baseinstalldir="/" md5sum="c6d95b1b607097fee78a03b8bbdd383a" name="tests/test.rss" role="test" />
+- <file baseinstalldir="/" md5sum="39ad264a147763ca8917babc57348033" name="tests/AllTests.php" role="test" />
+- <file baseinstalldir="/" md5sum="6b7a5e2c272278bd2836cd3c933e7b4e" name="tests/XML_RSS_Infrastructure_Test.php" role="test" />
+- <file baseinstalldir="/" md5sum="84363e85193f9d20d91a4349cd36718d" name="tests/XML_RSS_Parsing_Test.php" role="test" />
++ <file baseinstalldir="/" name="tests/XML_RSS_Infrastructure_Test.php" role="test" />
++ <file baseinstalldir="/" name="tests/XML_RSS_Parsing_Test.php" role="test" />
+ <file baseinstalldir="/" md5sum="7b46ddcb196560e74f747c578cb47f5c" name="XML/RSS.php" role="php" />
+ </dir>
+ </contents>
diff --git a/php-pear-XML-RSS.spec b/php-pear-XML-RSS.spec
index 70e7ec7..c2372a4 100644
--- a/php-pear-XML-RSS.spec
+++ b/php-pear-XML-RSS.spec
@@ -3,7 +3,7 @@
Name: php-pear-XML-RSS
Version: 1.0.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: RSS parser
Group: Development/Libraries
@@ -12,6 +12,9 @@ URL: http://pear.php.net/package/XML_RSS
Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz
Source2: xml2changelog
+# https://github.com/pear/XML_RSS/commit/528439f58b15aea71f8932e51b96ce63407cfc20
+Patch1: XML_RSS-git.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear >= 1:1.4.9-1.2
@@ -34,14 +37,11 @@ documents.
%setup -qc
%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10
-# 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
+%patch1 -p1 -b .orig
%build
cd %{pear_name}-%{version}
@@ -51,7 +51,7 @@ cd %{pear_name}-%{version}
%install
rm -rf $RPM_BUILD_ROOT
cd %{pear_name}-%{version}
-PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
@@ -94,6 +94,9 @@ fi
%changelog
+* Mon Jan 16 2012 Remi Collet <remi at fedoraproject.org> - 1.0.2-4
+- fix from GIT for test suite
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/xml2changelog b/xml2changelog
index 4c789f4..3a31be6 100644
--- a/xml2changelog
+++ b/xml2changelog
@@ -9,7 +9,7 @@ if (in_array("--debug", $_SERVER['argv'])) print_r($xml);
if ($xml['version'] >= "2"){ // Package.xml V 2.0
$new = "";
if (strlen(trim($xml->notes))>1) { // Ignore too short descr.
- printf("++*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
+ printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
$xml->version->release, $xml->stability->release,
$xml->version->api, $xml->stability->api,
$xml->date, $xml->notes);
More information about the scm-commits
mailing list