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 --- 5b67d2189cd930ceb4e72da737dbd267b781daf9.patch | 28 +++++ composer.json | 67 ++++++---- phpMyAdmin-certs.patch | 8 +- phpMyAdmin.spec | 164 +++++++++++++------------ 4 files changed, 160 insertions(+), 107 deletions(-) create mode 100644 5b67d2189cd930ceb4e72da737dbd267b781daf9.patch diff --git a/5b67d2189cd930ceb4e72da737dbd267b781daf9.patch b/5b67d2189cd930ceb4e72da737dbd267b781daf9.patch new file mode 100644 index 0000000..44a8747 --- /dev/null +++ b/5b67d2189cd930ceb4e72da737dbd267b781daf9.patch @@ -0,0 +1,28 @@ +From 5b67d2189cd930ceb4e72da737dbd267b781daf9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= +Date: Wed, 10 Jul 2019 17:00:43 -0300 +Subject: [PATCH] Fix wrong path when getting documentation link +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes #15381 + +Signed-off-by: MaurĂ­cio Meneghini Fauth +--- + libraries/classes/Util.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php +index b488c26fbad..fa115dd6429 100644 +--- a/libraries/classes/Util.php ++++ b/libraries/classes/Util.php +@@ -460,7 +460,7 @@ public static function getDocuLink($page, $anchor = '') + * provide consistent URL for testsuite + */ + if (! defined('TESTSUITE') && @file_exists(ROOT_PATH . 'doc/html/index.html')) { +- return ROOT_PATH . 'doc/html/' . $url; ++ return 'doc/html/' . $url; + } + + return Core::linkURL('https://docs.phpmyadmin.net/en/latest/' . $url); diff --git a/composer.json b/composer.json index 4489c40..dc1edc4 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "phpmyadmin/phpmyadmin", "type": "project", - "description": "MySQL web administration tool", + "description": "A web interface for MySQL and MariaDB", "keywords": ["phpmyadmin","mysql","web"], "homepage": "https://www.phpmyadmin.net/", "support": { @@ -22,8 +22,7 @@ "non-feature-branches": ["RELEASE_.*"], "autoload": { "psr-4": { - "PhpMyAdmin\\": "libraries/classes", - "PhpMyAdmin\\Setup\\": "setup/lib" + "PhpMyAdmin\\": "libraries/classes" } }, "autoload-dev": { @@ -39,29 +38,32 @@ } ], "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" + "twig/twig": "^2.4", + "williamdes/mariadb-mysql-kbs": "^1.2" }, "conflict": { "phpseclib/phpseclib": "2.0.8", "tecnickcom/tcpdf": "<6.2", - "pragmarx/google2fa": "<3.0.1", - "bacon/bacon-qr-code": "<1.0", + "pragmarx/google2fa-qrcode": "<1.0.1", "samyoul/u2f-php-server": "<1.1" }, "suggest": { @@ -74,24 +76,37 @@ "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" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^5.7", "codacy/coverage": "^1.3.0", - "phpunit/phpunit-selenium": "~1.2 || ^3.0", - "squizlabs/php_codesniffer": "^3.0", - "tecnickcom/tcpdf": "^6.2", - "pragmarx/google2fa": "^3.0", - "bacon/bacon-qr-code": "^1.0", + "facebook/webdriver": "^1.7.1", + "phpmyadmin/coding-standard": "^1.0", + "phpstan/phpstan": "^0.11.5", + "phpunit/phpunit": "^7.5 || ^8.0", + "pragmarx/google2fa-qrcode": "^1.0.1", "samyoul/u2f-php-server": "^1.1", - "phpmyadmin/coding-standard": "^0.3" + "squizlabs/php_codesniffer": "^3.0", + "tecnickcom/tcpdf": "^6.2" }, "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.0.x-dev" } + }, + "scripts": { + "phpcbf": "phpcbf", + "phpcs": "phpcs", + "phpstan": "phpstan analyse", + "phpunit": "phpunit", + "test": [ + "@phpcs", + "@phpstan", + "@phpunit" + ] + }, + "config":{ + "sort-packages": true } } diff --git a/phpMyAdmin-certs.patch b/phpMyAdmin-certs.patch index 709f9d9..9601ab9 100644 --- a/phpMyAdmin-certs.patch +++ b/phpMyAdmin-certs.patch @@ -1,11 +1,11 @@ diff -up ./libraries/classes/Utils/HttpRequest.php.rpm ./libraries/classes/Utils/HttpRequest.php ---- ./libraries/classes/Utils/HttpRequest.php.rpm 2018-03-01 15:05:29.388126314 +0100 -+++ ./libraries/classes/Utils/HttpRequest.php 2018-03-01 15:06:51.922563502 +0100 -@@ -139,12 +139,12 @@ class HttpRequest +--- ./libraries/classes/Utils/HttpRequest.php.rpm 2019-09-12 15:57:49.955739598 +0200 ++++ ./libraries/classes/Utils/HttpRequest.php 2019-09-12 15:58:00.262698588 +0200 +@@ -141,12 +141,12 @@ class HttpRequest * * See https://letsencrypt.org/certificates/ */ -- $certsDir = dirname(__file__) . '/../../certs/'; +- $certsDir = ROOT_PATH . 'libraries/certs/'; + $certsDir = '/etc/pki/tls/'; /* See code below for logic */ if ($ssl == CURLOPT_CAPATH) { 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