From ed66452e66b052e10b6056d2aa4ffca58f30efb2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 12 Sep 2019 16:49:00 +0200 Subject: - update to 5.0.0alpha1 - raise dependency on PHP 7.1.3 - raise dependency on phpmyadmin/sql-parser 5.0 - raise dependency on twig 2.1 - add dependency on pragmarx/google2fa-qrcode - drop dependency on pragmarx/google2fa and bacon/bacon-qr-code - drop dependency on psr/container --- phpMyAdmin.spec | 164 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 87 insertions(+), 77 deletions(-) (limited to 'phpMyAdmin.spec') diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index 9661e4b..3bf6e34 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -20,13 +20,13 @@ %global with_httpd 0 %endif -%global upstream_version 4.9.0.1 -#global upstream_prever rc1 +%global upstream_version 5.0.0 +%global upstream_prever alpha1 Name: phpMyAdmin Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist} -Summary: Web based MySQL browser written in php +Release: 1%{?dist} +Summary: A web interface for MySQL and MariaDB # MIT (js/jquery/, js/jqplot, js/codemirror/, js/tracekit/) # BSD (js/openlayers/) @@ -40,6 +40,8 @@ Source3: phpMyAdmin.nginx # Redirect to system certificates Patch0: phpMyAdmin-certs.patch +# Upstream patches +Patch1: https://github.com/phpmyadmin/phpmyadmin/commit/5b67d2189cd930ceb4e72da737dbd267b781daf9.patch BuildArch: noarch @@ -54,59 +56,60 @@ Requires: php(httpd) Suggests: httpd %endif # From composer.json, "require": { -# "php": ">=5.5.0", +# "php": "^7.1.3", +# "ext-hash": "*", +# "ext-iconv": "*", +# "ext-json": "*", # "ext-mysqli": "*", -# "ext-xml": "*", # "ext-pcre": "*", -# "ext-json": "*", -# "ext-ctype": "*", -# "ext-hash": "*", -# "phpmyadmin/sql-parser": "^4.3.2", +# "ext-xml": "*", +# "google/recaptcha": "^1.1", # "phpmyadmin/motranslator": "^4.0", # "phpmyadmin/shapefile": "^2.0", +# "phpmyadmin/sql-parser": "^5.0", # "phpseclib/phpseclib": "^2.0", -# "google/recaptcha": "^1.1", -# "psr/container": "^1.0", -# "twig/twig": "^1.34", +# "symfony/config": "^4.2.8", +# "symfony/dependency-injection": "^4.2.8", +# "symfony/expression-language": "^4.2", +# "symfony/polyfill-ctype": "^1.8", +# "symfony/polyfill-mbstring": "^1.3", +# "symfony/yaml": "^4.2.8", # "twig/extensions": "~1.5.1", -# "symfony/expression-language": "^3.2 || ^2.8", -# "symfony/polyfill-mbstring": "^1.3" -# "conflict": { -# "phpseclib/phpseclib": "2.0.8", -# "tecnickcom/tcpdf": "<6.2", -# "pragmarx/google2fa": "<3.0.1", -# "bacon/bacon-qr-code": "<1.0", -# "samyoul/u2f-php-server": "<1.1" -Requires: php(language) >= 5.5 +# "twig/twig": "^2.4", +# "williamdes/mariadb-mysql-kbs": "^1.2" +Requires: php(language) >= 7.1.3 +Requires: php-hash +Requires: php-iconv +Requires: php-json Requires: php-mysqli -Requires: php-xml Requires: php-pcre -Requires: php-json -Requires: php-ctype -Requires: php-hash +Requires: php-xml %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(phpmyadmin/sql-parser) >= 4.3.2 with php-composer(phpmyadmin/sql-parser) < 5) -Requires: (php-composer(phpmyadmin/motranslator) >= 4.0 with php-composer(phpmyadmin/motranslator) < 5) -Requires: (php-composer(phpmyadmin/shapefile) >= 2.0 with php-composer(phpmyadmin/shapefile) < 3) -Requires: (php-composer(phpseclib/phpseclib) >= 2.0.9 with php-composer(phpseclib/phpseclib) < 3) -Requires: (php-composer(google/recaptcha) >= 1.1 with php-composer(google/recaptcha) < 2) -Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) -Requires: (php-composer(twig/twig) >= 1.34 with php-composer(twig/twig) < 2) -Requires: (php-composer(twig/extensions) >= 1.5.1 with php-composer(twig/extensions) < 2) -Requires: (php-composer(symfony/expression-language) >= 2.8 with php-composer(symfony/expression-language) < 4) -Requires: (php-composer(symfony/polyfill-mbstring) >= 1.3 with php-composer(symfony/polyfill-mbstring) < 2) +Requires: (php-composer(google/recaptcha) >= 1.1 with php-composer(google/recaptcha) < 2) +Requires: (php-composer(phpmyadmin/motranslator) >= 4.0 with php-composer(phpmyadmin/motranslator) < 5) +Requires: (php-composer(phpmyadmin/shapefile) >= 2.0 with php-composer(phpmyadmin/shapefile) < 3) +Requires: (php-composer(phpmyadmin/sql-parser) >= 5.0 with php-composer(phpmyadmin/sql-parser) < 6) +Requires: (php-composer(phpseclib/phpseclib) >= 2.0.9 with php-composer(phpseclib/phpseclib) < 3) +Requires: (php-composer(symfony/config) >= 4.2.8 with php-composer(symfony/config) < 5) +Requires: (php-composer(symfony/dependency-injection) >= 4.2.8 with php-composer(symfony/dependency-injection) < 5) +Requires: (php-composer(symfony/expression-language) >= 4.2.8 with php-composer(symfony/expression-language) < 5) +Requires: (php-composer(symfony/polyfill-mbstring) >= 1.8 with php-composer(symfony/polyfill-mbstring) < 2) +Requires: (php-composer(symfony/yaml) >= 4.2.8 with php-composer(symfony/yaml) < 5) +Requires: (php-composer(twig/twig) >= 2.4 with php-composer(twig/twig) < 3) +Requires: (php-composer(twig/extensions) >= 1.5.1 with php-composer(twig/extensions) < 2) %else -Requires: php-phpmyadmin-sql-parser >= 4.3.2 -Requires: php-phpmyadmin-motranslator >= 4.0 -Requires: php-phpmyadmin-shapefile >= 2.0 -Requires: php-phpseclib >= 2.0.9 -Requires: php-google-recaptcha >= 1.1 -Requires: php-psr-container >= 1.0 -Requires: php-twig >= 1.34 -Requires: php-twig-extensions >= 1.5.1 -Requires: php-symfony-expression-language < 4 -# 1.7.0-2 with polyfill-mbstring -Requires: php-symfony-polyfill >= 1.7.0-2 +Requires: php-google-recaptcha >= 1.1 +Requires: php-phpmyadmin-motranslator >= 4.0 +Requires: php-phpmyadmin-shapefile >= 2.0 +Requires: php-phpmyadmin-sql-parser5 +Requires: php-phpseclib >= 2.0.9 +Requires: php-symfony4-config >= 4.2.8 +Requires: php-symfony4-dependency-injection >= 4.2.8 +Requires: php-symfony4-expression-language >= 4.2.8 +Requires: php-symfony-polyfill >= 1.8.0 +Requires: php-symfony4-yaml >= 4.2.8 +Requires: php-twig2 >= 2.4 +Requires: php-twig-extensions >= 1.5.1 %endif # Autoloader Requires: php-composer(fedora/autoloader) @@ -120,9 +123,14 @@ Requires: php-composer(fedora/autoloader) # "ext-gd2": "For image transformations", # "ext-mbstring": "For best performance", # "tecnickcom/tcpdf": "For PDF support", -# "pragmarx/google2fa": "For 2FA authentication", -# "bacon/bacon-qr-code": "For 2FA authentication", +# "pragmarx/google2fa-qrcode": "For 2FA authentication", # "samyoul/u2f-php-server": "For FIDO U2F authentication" +# "conflict": { +# "phpseclib/phpseclib": "2.0.8", +# "tecnickcom/tcpdf": "<6.2", +# "pragmarx/google2fa-qrcode": "<1.0.1", +# "samyoul/u2f-php-server": "<1.1" +Requires: php-ctype Requires: php-openssl Requires: php-curl Requires: php-zlib @@ -132,23 +140,20 @@ Requires: php-gd Requires: php-mbstring %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Recommends: php-opcache -Recommends: php-composer(tecnickcom/tcpdf) >= 6.2 -Recommends: php-composer(pragmarx/google2fa) >= 3.0.1 -Recommends: php-composer(bacon/bacon-qr-code) >= 1.0 -Recommends: php-composer(samyoul/u2f-php-server) >= 1.1 -Recommends: php-tcpdf-dejavu-sans-fonts >= 6.2 +Recommends: php-composer(tecnickcom/tcpdf) >= 6.2 +Recommends: php-composer(pragmarx/google2fa-qrcode) >= 1.0.1 +Recommends: php-composer(samyoul/u2f-php-server) >= 1.1 +Recommends: php-tcpdf-dejavu-sans-fonts >= 6.2 %else -Requires: php-tcpdf >= 6.2 -Requires: php-pragmarx-google2fa >= 3.0.1 -Requires: php-bacon-qr-code >= 1.0 -Requires: php-samyoul-u2f-php-server >= 1.1 -Requires: php-tcpdf-dejavu-sans-fonts >= 6.2 +Requires: php-tcpdf >= 6.2 +Requires: php-pragmarx-google2fa-qrcode >= 1.0.1 +Requires: php-samyoul-u2f-php-server >= 1.1 +Requires: php-tcpdf-dejavu-sans-fonts >= 6.2 %endif # From phpcompatinfo reports for 4.8.0 # notice: recode is optional (iconv or mbstring are preferred / used first) Requires: php-date Requires: php-filter -Requires: php-iconv Requires: php-libxml Requires: php-session Requires: php-simplexml @@ -183,24 +188,23 @@ is available in 50 languages %prep %setup -qn phpMyAdmin-%{upstream_version}%{?upstream_prever:-%upstream_prever}-all-languages %patch0 -p1 +%patch1 -p1 # Minimal configuration file -sed -e "/'extension'/s@'mysql'@'mysqli'@" \ - -e "/'blowfish_secret'/s@''@'MUSTBECHANGEDONINSTALL'@" \ +sed -e "/'blowfish_secret'/s@''@'MUSTBECHANGEDONINSTALL'@" \ -e "/'UploadDir'/s@''@'%{_localstatedir}/lib/%{name}/upload'@" \ -e "/'SaveDir'/s@''@'%{_localstatedir}/lib/%{name}/save'@" \ config.sample.inc.php >CONFIG # Setup vendor config file -sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@%{_pkgdocdir}/ChangeLog@" \ - -e "/'LICENSE_FILE'/s@./LICENSE@%{_pkgdocdir}/LICENSE@" \ - -e "/'CONFIG_DIR'/s@''@'%{_sysconfdir}/%{name}/'@" \ - -e "/'SETUP_CONFIG_FILE'/s@./config/config.inc.php@%{_localstatedir}/lib/%{name}/config/config.inc.php@" \ +sed -e "/'CHANGELOG_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \ + -e "/'LICENSE_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \ + -e "/'CONFIG_DIR'/s@ROOT_PATH@'%{_sysconfdir}/%{name}/'@" \ %if 0%{?_licensedir:1} -e '/LICENSE_FILE/s:%_defaultdocdir:%_defaultlicensedir:' \ %endif -e '/AUTOLOAD_FILE/s@./vendor@%{_datadir}/%{name}/vendor@' \ - -e '/TEMP_DIR/s@./tmp@%{_localstatedir}/lib/%{name}/temp@' \ + -e "/TEMP_DIR/s@ROOT.*tmp/'@'%{_localstatedir}/lib/%{name}/temp'@" \ -i libraries/vendor_config.php # For debug @@ -214,26 +218,23 @@ cat << 'EOF' | tee vendor/autoload.php require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('PhpMyAdmin\\', dirname(__DIR__) . '/libraries/classes'); -\Fedora\Autoloader\Autoload::addPsr4('PhpMyAdmin\\Setup\\', dirname(__DIR__) . '/setup/lib'); \Fedora\Autoloader\Dependencies::required([ - '%{_datadir}/php/PhpMyAdmin/SqlParser/autoload.php', + '%{_datadir}/php/PhpMyAdmin/SqlParser5/autoload.php', '%{_datadir}/php/PhpMyAdmin/MoTranslator/autoload.php', '%{_datadir}/php/PhpMyAdmin/ShapeFile/autoload.php', '%{_datadir}/php/phpseclib/autoload.php', '%{_datadir}/php/ReCaptcha/autoload.php', - '%{_datadir}/php/Psr/Container/autoload.php', - '%{_datadir}/php/Twig/autoload.php', + '%{_datadir}/php/Twig2/autoload.php', '%{_datadir}/php/Twig/Extensions/autoload.php', - [ - '%{_datadir}/php/Symfony3/Component/ExpressionLanguage/autoload.php', - '%{_datadir}/php/Symfony/Component/ExpressionLanguage/autoload.php', - ], + '%{_datadir}/php/Symfony4/Component/Config/autoload.php', + '%{_datadir}/php/Symfony4/Component/DependencyInjection/autoload.php', + '%{_datadir}/php/Symfony4/Component/ExpressionLanguage/autoload.php', + '%{_datadir}/php/Symfony4/Component/Yaml/autoload.php', '%{_datadir}/php/Symfony/Polyfill/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ '%{_datadir}/php/tcpdf/autoload.php', - '%{_datadir}/php/PragmaRX/Google2FA/autoload.php', - '%{_datadir}/php/BaconQrCode/autoload.php', + '%{_datadir}/php/Google2FAQRCode/Google2FA/autoload.php', '%{_datadir}/php/Samyoul/U2F/U2FServer/autoload.php', ]); EOF @@ -317,6 +318,15 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$SECRET/" \ %changelog +* Thu Sep 12 2019 Remi Collet - 5.0.0~alpha1-1 +- update to 5.0.0alpha1 +- raise dependency on PHP 7.1.3 +- raise dependency on phpmyadmin/sql-parser 5.0 +- raise dependency on twig 2.1 +- add dependency on pragmarx/google2fa-qrcode +- drop dependency on pragmarx/google2fa and bacon/bacon-qr-code +- drop dependency on psr/container + * Mon Sep 2 2019 Remi Collet - 4.9.0.1-2 - make optional depencencies mandatory on EL <= 7 see https://superuser.com/questions/1472237 -- cgit