# remirepo/fedora spec file for php-bartlett-php-compatinfo-db # # Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # See https://github.com/llaville/php-compatinfo-db/releases %global gh_commit f71dbe522b3075505cb5221d3f29b8fb3863dd47 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151031 %global gh_owner llaville %global gh_project php-compatinfo-db # Namespace %global ns_vendor Bartlett %global ns_project CompatInfoDb # Composer %global c_vendor bartlett %global c_project php-compatinfo-db %if 0%{?fedora} >= 32 # only enabled with 7.4+ %bcond_without tests %else # disabled as too much issues, e.g. with symfony-polyfill %bcond_with tests %endif %bcond_with im6 %bcond_with im7 %global upstream_version 3.11.0 #global upstream_prever RC1 Name: php-%{c_vendor}-%{c_project} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 1%{?dist} Summary: Reference Database to be used with php-compatinfo library License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz # Fix autoloader and config path # Fix sqlite database path # Fix version and avoir composer/package-versions-deprecated (relying on composer.lock) # Set proxy files as static Patch0: %{name}-3.10-rpm.patch # Backported features affecting test suite # - CURL_SSLVERSION constants # - Phar::OPENSSL_SHA* constants Patch1: %{name}-backports.patch # upstream Patch2: %{name}-upstream.patch BuildArch: noarch BuildRequires: php(language) >= 7.2 BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-pdo BuildRequires: php-phar BuildRequires: php-spl # From composer.json, "require-dev" # "composer/composer": "^2.0", # "psr/log": "^1.0", # "symfony/phpunit-bridge": "^5.1" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) BuildRequires: (php-composer(doctrine/orm) >= 2.7 with php-composer(doctrine/orm) < 4) BuildRequires: (php-composer(symfony/requirements-checker) >= 2.0 with php-composer(symfony/requirements-checker) < 3) # remirepo:5 %else BuildRequires: php-composer-semver3 BuildRequires: php-doctrine-orm >= 2.7 BuildRequires: php-symfony-requirements-checker >= 2.0 %endif BuildRequires: php-symfony4-cache >= 4.4 BuildRequires: php-symfony4-config >= 4.4 BuildRequires: php-symfony4-console >= 4.4 BuildRequires: php-symfony4-dependency-injection >= 4.4 BuildRequires: php-symfony4-event-dispatcher >= 4.4 BuildRequires: php-symfony4-process >= 4.4 BuildRequires: php-symfony4-messenger >= 4.4 BuildRequires: php-symfony4-stopwatch >= 4.4 # For our patch / autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require-dev": { # "phpunit/php-timer": "^2.0" BuildRequires: php-cli %if %{with tests} BuildRequires: phpunit9 %if %{with im6} BuildRequires: php-pecl-imagick-im6 %endif %if %{with im7} BuildRequires: php-pecl-imagick-im7 %endif %endif # From composer.json, "require" # "php": "^7.2|^8.0", # "ext-json": "*", # "ext-pcre": "*", # "ext-pdo": "*", # "ext-phar": "*", # "ext-spl": "*", # "composer/package-versions-deprecated": "^1.8", # "composer/semver": "^1.0|^2.0|^3.0", # "doctrine/orm": "^2.7", # "symfony/cache": "^4.4|^5.0", # "symfony/config": "^4.4|^5.0", # "symfony/console": "^4.4|^5.0", # "symfony/dependency-injection": "^4.4|^5.0", # "symfony/event-dispatcher": "^4.4|^5.0", # "symfony/messenger": "^4.4|^5.0", # "symfony/process": "^4.4|^5.0", # "symfony/requirements-checker": "^2.0", # "symfony/stopwatch": "^4.4|^5.0" Requires: php(language) >= 7.2 Requires: php-json Requires: php-pcre Requires: php-pdo Requires: php-phar Requires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) Requires: (php-composer(doctrine/orm) >= 2.7 with php-composer(doctrine/orm) < 4) Requires: (php-composer(symfony/requirements-checker) >= 2.0 with php-composer(symfony/requirements-checker) < 3) # remirepo:5 %else Requires: php-composer-semver3 >= 3.0 Requires: php-doctrine-orm >= 2.7 Requires: php-symfony-requirements-checker >= 2.0 %endif Requires: php-symfony4-cache >= 4.4 Requires: php-symfony4-config >= 4.4 Requires: php-symfony4-console >= 4.4 Requires: php-symfony4-dependency-injection >= 4.4 Requires: php-symfony4-event-dispatcher >= 4.4 Requires: php-symfony4-messenger >= 4.4 Requires: php-symfony4-process >= 4.4 Requires: php-symfony4-stopwatch >= 4.4 # Required by autoloader Requires: php-composer(fedora/autoloader) Provides: php-composer(%{c_vendor}/%{c_project}) = %{version} # Extracted from bartlett/php-compatinfo 4 Conflicts: php-bartlett-PHP-CompatInfo < 5 %description %{summary}. %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm %patch2 -p1 -b .up %patch1 -p1 -b .backports : relocate mv config src/config mkdir src/proxies cat << 'EOF' | tee src/autoload.php ")) { fputs(STDERR, "Current: " . PHP_VERSION . " > Known: $max\n\n"); echo "/LATEST_PHP_" . PHP_MAJOR_VERSION . "_" . PHP_MINOR_VERSION . "/s/" . PHP_MAJOR_VERSION . "\." .PHP_MINOR_VERSION . "\.[0-9]*/" . PHP_VERSION . "/"; } else { fputs(STDERR, "Current: " . PHP_VERSION . " = Known: $max\n\n"); } ') if [ -n "$OPT" ]; then sed -e "$OPT" -i src/Domain/Factory/ExtensionVersionProviderInterface.php fi grep " LATEST" src/Domain/Factory/ExtensionVersionProviderInterface.php : Create command using local sources sed -e "s:%{_datadir}/php/%{ns_vendor}/%{ns_project}:$PWD/src:" \ -e 's:../data:data:' \ bin/compatinfo-db >compatinfo-db export DATABASE_URL=sqlite:///${PWD}/compatinfo.sqlite doctrine orm:generate-proxies doctrine orm:schema-tool:create : Generate the references database php -d memory_limit=2G -d date.timezone=Europe/Paris compatinfo-db db:init : For debug - not installed php -d memory_limit=2G -d date.timezone=Europe/Paris compatinfo-db doctor --json > doctor.json : Diag %{_bindir}/php -d date.timezone=Europe/Paris compatinfo-db diagnose %install mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} install -D -p -m 644 compatinfo.sqlite %{buildroot}%{_datadir}/%{name}/compatinfo.sqlite install -D -p -m 755 bin/compatinfo-db %{buildroot}%{_bindir}/%{name} %if %{with tests} %check export DATABASE_URL=sqlite:///%{buildroot}%{_datadir}/%{name}/compatinfo.sqlite mkdir config cat << 'EOF' | tee config/bootstrap.php - 3.11.0-2 - add upstream patch for OpenSSL test suite * Mon Sep 27 2021 Remi Collet - 3.11.0-1 - update to 3.11.0 - open https://github.com/llaville/php-compatinfo-db/issues/88 OPENSSL_SSLV23_PADDING is optional * Wed Sep 1 2021 Remi Collet - 3.10.0-1 - update to 3.10.0 * Mon Aug 2 2021 Remi Collet - 3.9.0-1 - update to 3.9.0 * Tue Jul 6 2021 Remi Collet - 3.8.0-1 - update to 3.8.0 * Mon Jun 28 2021 Remi Collet - 3.7.1-1 - update to 3.7.1 * Fri Jun 25 2021 Remi Collet - 3.7.0-3 - test build with upstream patches for zip and imagick * Thu Jun 24 2021 Remi Collet - 3.7.0-2 - update to 3.7.0 - open https://github.com/llaville/php-compatinfo-db/issues/79 imagick - open https://github.com/llaville/php-compatinfo-db/issues/78 zip - add dependency on symfony/cache for doctrine/cache v2 - add dependency on symfony/process * Fri May 14 2021 Remi Collet - 3.6.0-1 - update to 3.6.0 * Tue May 11 2021 Remi Collet - 3.6.0-0 - test build for upcoming 3.6.0 * Mon May 3 2021 Remi Collet - 3.5.0-1 - update to 3.5.0 - open https://github.com/llaville/php-compatinfo-db/issues/75 test failure - add patch to add CURL_VERSION_ALTSVC in reference * Wed Mar 17 2021 Remi Collet - 3.4.2-2 - use static proxy files to fix multi-users issue https://github.com/llaville/php-compatinfo-db/issues/71 * Mon Mar 15 2021 Remi Collet - 3.4.2-1 - update to 3.4.2 * Sat Mar 13 2021 Remi Collet - 3.4.0-1 - update to 3.4.0 * Thu Mar 11 2021 Remi Collet - 3.3.0-3 - switch back in production mode, and add a proxies directory from https://github.com/llaville/php-compatinfo-db/pull/67 * Thu Mar 11 2021 Remi Collet - 3.3.0-2 - use devel mode to avoid missing proxy files * Wed Mar 10 2021 Remi Collet - 3.3.0-1 - update to 3.3.0 * Wed Feb 10 2021 Remi Collet - 3.2.0-1 - update to 3.2.0 * Wed Jan 20 2021 Remi Collet - 3.1.1-1 - update to 3.1.1 * Thu Jan 14 2021 Remi Collet - 3.1.0-2 - add upstream patch for Symfony 4 * Wed Jan 13 2021 Remi Collet - 3.1.0-1 - update to 3.1.0 - drop dependency on league/tactician - drop dependency on laminas/laminas-diagnostics - add dependency on doctrine/orm - add dependency on symfony/config - add dependency on symfony/dependency-injection - add dependency on symfony/event-dispatcher - add dependency on symfony/messenger - add dependency on symfony/requirements-checker - switch to phpunit9 * Thu Jan 7 2021 Remi Collet - 3.0.2-1 - update to 3.0.2 - open https://github.com/llaville/php-compatinfo-db/issues/64 xmlrpc - open https://github.com/llaville/php-compatinfo-db/issues/63 http - open https://github.com/llaville/php-compatinfo-db/issues/62 oci8 - open https://github.com/llaville/php-compatinfo-db/issues/61 Symfony v4 * Mon Oct 5 2020 Remi Collet - 2.19.0-1 - update to 2.19.0 * Mon Sep 14 2020 Remi Collet - 2.18.0-1 - update to 2.18.0 * Mon Aug 17 2020 Remi Collet - 2.17.0-1 - update to 2.17.0 * Mon Jul 13 2020 Remi Collet - 2.16.0-1 - update to 2.16.0 - switch to composer/semver 3 * Tue Jun 30 2020 Remi Collet - 2.15.0-1 - update to 2.15.0 * Mon May 18 2020 Remi Collet - 2.14.0-1 - update to 2.14.0 * Mon May 11 2020 Remi Collet - 2.13.1-1 - update to 2.13.1 * Mon May 11 2020 Remi Collet - 2.13.0-1 - update to 2.13.0 - raise dependency on Symfony 4.4 - open https://github.com/llaville/php-compatinfo-db/issues/43 outdated yac reference * Sun Mar 22 2020 Remi Collet - 2.12.0-1 - update to 2.12.0 * Fri Mar 20 2020 Remi Collet - 2.11.0-1 - update to 2.11.0 - switch from Zend to Laminas * Mon Jan 27 2020 Remi Collet - 2.10.0-1 - update to 2.10.0 * Wed Jan 22 2020 Remi Collet - 2.9.0-1 - update to 2.9.0 - open https://github.com/llaville/php-compatinfo-db/issues/38 redis - open https://github.com/llaville/php-compatinfo-db/issues/39 svn * Thu Jan 2 2020 Remi Collet - 2.8.0-1 - update to 2.8.0 - open https://github.com/llaville/php-compatinfo-db/issues/34 memcache - open https://github.com/llaville/php-compatinfo-db/issues/35 redis - open https://github.com/llaville/php-compatinfo-db/issues/36 varnish - open https://github.com/llaville/php-compatinfo-db/issues/37 opcache * Tue Dec 3 2019 Remi Collet - 2.7.0-1 - update to 2.7.0 - ignore test results with 7.4, reported as https://github.com/llaville/php-compatinfo-db/issues/32 * Fri Jul 26 2019 Remi Collet - 2.6.0-1 - update to 2.6.0 * Sun Jun 16 2019 Remi Collet - 2.5.0-1 - update to 2.5.0 * Tue Jun 4 2019 Remi Collet - 2.4.0-2 - add upstream patches for sqlite3 and imagick - open https://github.com/llaville/php-compatinfo-db/issues/30 test failure related to sqlite3.defensive - open https://github.com/llaville/php-compatinfo-db/issues/31 test failure for mbstring since PHP 7.3.5 * Mon May 20 2019 Remi Collet - 2.4.0-1 - update to 2.4.0 - open https://github.com/llaville/php-compatinfo-db/issues/29 test failure related to imagick * Thu Apr 11 2019 Remi Collet - 2.3.0-1 - update to 2.3.0 * Mon Mar 11 2019 Remi Collet - 2.2.0-1 - update to 2.2.0 * Mon Feb 25 2019 Remi Collet - 2.1.1-1 - update to 2.1.1 * Mon Jan 21 2019 Remi Collet - 2.0.0-1 - update to 2.0.0 * Thu Jan 3 2019 Remi Collet - 2.0.0~RC1-1 - update to 2.0.0RC1 - bump dependency on PHP 7.1 - add dependency on symfony/console 3 or 4 - add dependency on league/tactician - add dependency on zendframework/zenddiagnostics - add php-bartlett-php-compatinfo-db command * Tue Dec 18 2018 Remi Collet - 1.39.0-1 - update to 1.39.0 * Mon Nov 19 2018 Remi Collet - 1.38.1-1 - update to 1.38.1 (no change) * Tue Nov 13 2018 Remi Collet - 1.38.0-1 - update to 1.38.0 * Fri Oct 12 2018 Remi Collet - 1.37.0-1 - update to 1.37.0 - use symfony3 - ignore test failing because of symfony/polyfill * Sun Oct 7 2018 Remi Collet - 1.36.0-2 - update to 1.36.0 - raise dependency on PHP 5.5 - open https://github.com/llaville/php-compatinfo-db/issues/14 zip - open https://github.com/llaville/php-compatinfo-db/issues/15 http - open https://github.com/llaville/php-compatinfo-db/issues/16 redis - open https://github.com/llaville/php-compatinfo-db/issues/17 uopz - open https://github.com/llaville/php-compatinfo-db/issues/18 varnish * Wed Aug 29 2018 Remi Collet - 1.35.0-2 - update to 1.35.0 * Mon Jul 23 2018 Remi Collet - 1.34.0-1 - update to 1.34.0 * Fri Jul 6 2018 Remi Collet - 1.33.0-1 - update to 1.33.0 * Fri Apr 27 2018 Remi Collet - 1.32.0-1 - update to 1.32.0 * Thu Apr 5 2018 Remi Collet - 1.31.0-1 - update to 1.31.0 * Fri Mar 2 2018 Remi Collet - 1.30.0-1 - Update to 1.30.0 * Fri Feb 2 2018 Remi Collet - 1.29.0-1 - Update to 1.29.0 - use range dependency on F27+ * Tue Jan 9 2018 Remi Collet - 1.28.0-1 - Update to 1.28.0 * Fri Jan 5 2018 Remi Collet - 1.27.0-2 - enable test suite with 7.1 * Fri Jan 5 2018 Remi Collet - 1.27.0-1 - Update to 1.27.0 * Fri Nov 24 2017 Remi Collet - 1.26.0-1 - Update to 1.26.0 * Tue Oct 31 2017 Remi Collet - 1.25.0-1 - Update to 1.25.0 * Tue Oct 3 2017 Remi Collet - 1.24.0-1 - Update to 1.24.0 * Thu Sep 28 2017 Remi Collet - 1.24.0~RC1-1 - Update to 1.24.0RC1 * Mon Jul 17 2017 Remi Collet - 1.23.0-1 - Update to 1.23.0 * Sat Jun 10 2017 Remi Collet - 1.22.0-1 - Update to 1.22.0 * Fri Jun 9 2017 Remi Collet - 1.21.0-1 - Update to 1.21.0 * Fri Apr 14 2017 Remi Collet - 1.20.0-1 - Update to 1.20.0 * Fri Mar 17 2017 Remi Collet - 1.19.0-1 - Update to 1.19.0 - adapt patch fixing DB location * Fri Feb 24 2017 Remi Collet - 1.18.0-1 - update to 1.18.0 * Tue Jan 24 2017 Remi Collet - 1.17.0-1 - update to 1.17.0 * Fri Dec 16 2016 Remi Collet - 1.16.0-1 - update to 1.16.0 * Wed Nov 23 2016 Remi Collet - 1.15.0-1 - update to 1.15.0 - disable test suite with PHP 7.1, not yet supported https://github.com/llaville/php-compatinfo-db/issues/8 * Mon Oct 31 2016 Remi Collet - 1.14.0-2 - switch to fedora/autoloader * Sat Oct 15 2016 Remi Collet - 1.14.0-1 - update to 1.14.0 * Tue Oct 4 2016 Remi Collet - 1.13.0-1 - update to 1.13.0 * Tue Sep 27 2016 Remi Collet - 1.12.0-1 - update to 1.12.0 * Tue Jul 26 2016 Remi Collet - 1.11.0-1 - update to 1.11.0 * Tue Jul 5 2016 Remi Collet - 1.10.0-1 - update to 1.10.0 * Sat May 28 2016 Remi Collet - 1.9.0-1 - update to 1.9.0 * Tue May 3 2016 Remi Collet - 1.8.1-1 - update to 1.8.1 * Tue May 3 2016 Remi Collet - 1.8.0-1 - update to 1.8.0 - fix broken imagick references https://github.com/llaville/php-compatinfo-db/issues/4 * Tue Apr 12 2016 Remi Collet - 1.7.0-1 - update to 1.7.0 * Sat Mar 5 2016 Remi Collet - 1.6.0-1 - update to 1.6.0 - use package version as version in database instead of date * Sat Feb 6 2016 Remi Collet - 1.5.0-1 - update to 1.5.0 * Sat Jan 9 2016 Remi Collet - 1.4.0-1 - update to 1.4.0 * Tue Dec 29 2015 Remi Collet - 1.3.0-1 - update to 1.3.0 * Thu Dec 10 2015 Remi Collet - 1.2.0-2 - fix reference to ensure current version is known as we usually build RC version in rawhide. * Sat Dec 5 2015 Remi Collet - 1.2.0-1 - update to 1.2.0 - add dependency on composer/semver * Wed Nov 4 2015 Remi Collet - 1.0.0-0.1.alpha1 - Initial package