The package rpms/php-Faker.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/php-Faker.git/commit/?id=1c22fad1ce8....
Change: -%ifarch ppc64 s390x
Thanks.
Full change: ============
commit 1c22fad1ce8d085c071bc563dbeff4f01da71c7e Author: Remi Collet remi@fedoraproject.org Date: Wed Nov 29 14:13:51 2017 +0100
run full test suite on all arches add patch for 32-bit from https://github.com/fzaninotto/Faker/pull/1348 add patch for big endian from https://github.com/fzaninotto/Faker/pull/1365 fix dependencies
diff --git a/1348.patch b/1348.patch new file mode 100644 index 0000000..635da1b --- /dev/null +++ b/1348.patch @@ -0,0 +1,45 @@ +From cd1d5dd8a603eab9e02e331b61aa60e6cf6f8c78 Mon Sep 17 00:00:00 2001 +From: Remi Collet remi@remirepo.net +Date: Fri, 10 Nov 2017 11:48:37 +0100 +Subject: [PATCH] only test available date range on 32-bit + +--- + test/Faker/Provider/fi_FI/PersonTest.php | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/test/Faker/Provider/fi_FI/PersonTest.php b/test/Faker/Provider/fi_FI/PersonTest.php +index 5aefb8584..b979666e9 100644 +--- a/test/Faker/Provider/fi_FI/PersonTest.php ++++ b/test/Faker/Provider/fi_FI/PersonTest.php +@@ -44,18 +44,25 @@ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthd + + public function testPersonalIdentityNumberGeneratesCompliantNumbers() + { +- for ($i = 0; $i < 10; $i++) { +- $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59'); +- $pin = $this->faker->personalIdentityNumber($birthdate); +- $this->assertRegExp('/^[0-9]{6}+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); ++ if (strtotime('1800-01-01 00:00:00')) { ++ $min="1900"; ++ $max="2099"; ++ for ($i = 0; $i < 10; $i++) { ++ $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59'); ++ $pin = $this->faker->personalIdentityNumber($birthdate, NULL, true); ++ $this->assertRegExp('/^[0-9]{6}+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); ++ } ++ } else { // timestamp limit for 32-bit computer ++ $min="1902"; ++ $max="2037"; + } + for ($i = 0; $i < 10; $i++) { +- $birthdate = $this->faker->dateTimeBetween('1900-01-01 00:00:00', '1999-12-31 23:59:59'); ++ $birthdate = $this->faker->dateTimeBetween("$min-01-01 00:00:00", '1999-12-31 23:59:59'); + $pin = $this->faker->personalIdentityNumber($birthdate); + $this->assertRegExp('/^[0-9]{6}-[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); + } + for ($i = 0; $i < 10; $i++) { +- $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', '2099-12-31 23:59:59'); ++ $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', "$max-12-31 23:59:59"); + $pin = $this->faker->personalIdentityNumber($birthdate); + $this->assertRegExp('/^[0-9]{6}A[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); + } diff --git a/1365.patch b/1365.patch new file mode 100644 index 0000000..cd1f506 --- /dev/null +++ b/1365.patch @@ -0,0 +1,23 @@ +From ce3a0239c47289c8c371a67a8d7acf90ef6be7c4 Mon Sep 17 00:00:00 2001 +From: Remi Collet remi@remirepo.net +Date: Wed, 29 Nov 2017 14:02:19 +0100 +Subject: [PATCH] skip test failing on bigendian + +--- + test/Faker/Provider/UuidTest.php | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test/Faker/Provider/UuidTest.php b/test/Faker/Provider/UuidTest.php +index ebd4ae4c6..5c639cacc 100644 +--- a/test/Faker/Provider/UuidTest.php ++++ b/test/Faker/Provider/UuidTest.php +@@ -16,6 +16,9 @@ public function testUuidReturnsUuid() + + public function testUuidExpectedSeed() + { ++ if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) { ++ $this->markTestSkipped('Big Endian'); ++ } + $faker = new Generator(); + $faker->seed(123); + $this->assertEquals("8e2e0c84-50dd-367c-9e66-f3ab455c78d6", BaseProvider::uuid()); diff --git a/php-Faker.spec b/php-Faker.spec index 10d2f55..b3a7aaa 100644 --- a/php-Faker.spec +++ b/php-Faker.spec @@ -27,7 +27,7 @@
Name: php-%{github_name} Version: %{github_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A PHP library that generates fake data
Group: Development/Libraries @@ -35,6 +35,9 @@ License: MIT URL: https://github.com/%%7Bgithub_owner%7D/%%7Bgithub_name%7D Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+Patch0: https://patch-diff.githubusercontent.com/raw/fzaninotto/Faker/pull/1348.patc... +Patch1: https://patch-diff.githubusercontent.com/raw/fzaninotto/Faker/pull/1365.patc... + BuildArch: noarch # Tests %if %{with_tests} @@ -46,8 +49,9 @@ BuildRequires: php-intl BuildRequires: php-ctype BuildRequires: php-curl BuildRequires: php-date -BuildRequires: php-filter +BuildRequires: php-dom BuildRequires: php-hash +BuildRequires: php-json BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-reflection @@ -61,7 +65,9 @@ Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from version 1.6.0) Requires: php-curl Requires: php-date +Requires: php-dom Requires: php-hash +Requires: php-json Requires: php-mbstring Requires: php-pcre Requires: php-reflection @@ -96,6 +102,8 @@ Optional:
%prep %setup -qn %{github_name}-%{github_commit} +%patch0 -p1 +%patch1 -p1
%if 0%{?el6} # For old PHPUnit @@ -138,22 +146,13 @@ require_once '%{buildroot}%{phpdir}/Faker/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Faker\Test\', dirname(__DIR__).'/test/Faker'); EOF
-%ifarch ppc64 s390x -# see https://github.com/fzaninotto/Faker/issues/1346 -rm -f test/Faker/Provider/UuidTest.php -%endif - ret=0 for cmd in php php56 php70 php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit --verbose || ret=1 fi done -if [ $(php -r 'echo PHP_INT_SIZE;') -lt 8 ]; then - : ignore test suite results https://github.com/fzaninotto/Faker/issues/1347 -else - exit $ret -fi +exit $ret %else : Tests skipped %endif @@ -168,6 +167,14 @@ fi
%changelog +* Tue Nov 28 2017 Remi Collet remi@remirepo.net - 1.7.1-3 +- run full test suite on all arches +- add patch for 32-bit from + https://github.com/fzaninotto/Faker/pull/1348 +- add patch for big endian from + https://github.com/fzaninotto/Faker/pull/1365 +- fix dependencies + * Fri Nov 10 2017 Remi Collet remi@remirepo.net - 1.7.1-2 - fix skip result condition
arch-excludes@lists.fedoraproject.org