summaryrefslogtreecommitdiffstats
path: root/phpMyAdmin.spec
diff options
context:
space:
mode:
Diffstat (limited to 'phpMyAdmin.spec')
-rw-r--r--phpMyAdmin.spec198
1 files changed, 47 insertions, 151 deletions
diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec
index c37dcff..14daa98 100644
--- a/phpMyAdmin.spec
+++ b/phpMyAdmin.spec
@@ -12,13 +12,6 @@
#
%{!?_pkgdocdir: %global _pkgdocdir %{_datadir}/doc/%{name}-%{version}}
-# Switch from PHP system libraries to bundled ones
-%if 0%{?fedora}
-%bcond_without syslib
-%else
-%bcond_with syslib
-%endif
-
# remirepo:1
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
# nginx 1.6 with nginx-filesystem
@@ -31,8 +24,8 @@
%global with_httpd 0
%endif
-%global upstream_version 5.1.2
-#global upstream_prever rc2
+%global upstream_version 5.2.0
+%global upstream_prever rc1
Name: phpMyAdmin
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
@@ -42,9 +35,6 @@ Summary: A web interface for MySQL and MariaDB
# MIT (js/jquery/, js/jqplot, js/codemirror/, js/tracekit/)
# BSD (js/openlayers/)
# GPLv2+ (the rest)
-%if %{with syslib}
-License: GPLv2+ and MIT and BSD
-%else
# BSD: bacon/bacon-qr-code, dasprid/enum, google/recaptcha, nikic/fast-route,
# code-lts/u2f-php-server, twig/twig
# MIT: paragonie/constant_time_encoding, phpmyadmin/twig-i18n-extension,
@@ -54,7 +44,6 @@ License: GPLv2+ and MIT and BSD
# LGPLv3: tecnickcom/tcpdf
# MPLv2.0: williamdes/mariadb-mysql-kbs
License: GPLv2+ and MIT and BSD and LGPLv3 and MPLv2.0
-%endif
URL: https://www.phpmyadmin.net/
Source0: https://files.phpmyadmin.net/%{name}/%{upstream_version}%{?upstream_prever:-%upstream_prever}/%{name}-%{upstream_version}%{?upstream_prever:-%upstream_prever}-all-languages.tar.xz
Source1: https://files.phpmyadmin.net/%{name}/%{upstream_version}%{?upstream_prever:-%upstream_prever}/%{name}-%{upstream_version}%{?upstream_prever:-%upstream_prever}-all-languages.tar.xz.asc
@@ -69,14 +58,10 @@ Patch0: phpMyAdmin-certs.patch
BuildArch: noarch
BuildRequires: gnupg2
-%if %{with syslib}
-# ensure dependencies are there
-BuildRequires: php-symfony4-common >= 4.4.9
-%else
# to run phpMyAdmin-bundled.php
+BuildRequires: php(language) >= 7.2.5
BuildRequires: php-cli
BuildRequires: php-json
-%endif
Requires(post): coreutils sed
Requires: webserver
@@ -96,11 +81,12 @@ Requires: php(httpd)
Suggests: httpd
%endif
# From composer.json, "require": {
-# "php": "^7.1.3 || ^8.0",
+# "php": "^7.2.5 || ^8.0",
# "ext-hash": "*",
# "ext-iconv": "*",
# "ext-json": "*",
# "ext-mysqli": "*",
+# "ext-openssl": "*",
# "ext-pcre": "*",
# "ext-xml": "*",
# "google/recaptcha": "^1.1",
@@ -117,118 +103,61 @@ Suggests: httpd
# "symfony/polyfill-mbstring": "^1.17.0",
# "twig/twig": "^2.14.9 || ^3.3.5",
# "williamdes/mariadb-mysql-kbs": "^1.2"
-Requires: php(language) >= 7.1.3
+Requires: php(language) >= 7.2.5
Requires: php-hash
Requires: php-iconv
Requires: php-json
Requires: php-mysqli
+Requires: php-openssl
Requires: php-pcre
Requires: php-xml
-%if %{with syslib}
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(google/recaptcha) >= 1.1 with php-composer(google/recaptcha) < 2)
-Requires: (php-composer(nikic/fast-route) >= 1.3 with php-composer(nikic/fast-route) < 2)
-Requires: (php-composer(phpmyadmin/motranslator) >= 5.0 with php-composer(phpmyadmin/motranslator) < 6)
-Requires: (php-composer(phpmyadmin/shapefile) >= 2.0 with php-composer(phpmyadmin/shapefile) < 3)
-Requires: (php-composer(phpmyadmin/sql-parser) >= 5.5 with php-composer(phpmyadmin/sql-parser) < 6)
-Requires: (php-composer(phpmyadmin/twig-i18n-extension) >= 3.0 with php-composer(phpmyadmin/twig-i18n-extension) < 4)
-Requires: (php-composer(phpseclib/phpseclib) >= 2.0.9 with php-composer(phpseclib/phpseclib) < 3)
-Requires: (php-composer(symfony/config) >= 4.4.9 with php-composer(symfony/config) < 5)
-Requires: (php-composer(symfony/dependency-injection) >= 4.4.9 with php-composer(symfony/dependency-injection) < 5)
-Requires: (php-composer(symfony/expression-language) >= 4.4.9 with php-composer(symfony/expression-language) < 5)
-Requires: (php-composer(symfony/polyfill-mbstring) >= 1.17 with php-composer(symfony/polyfill-mbstring) < 2)
-Requires: (php-composer(twig/twig) >= 2.14.9 with php-composer(twig/twig) < 4)
-Requires: (php-composer(williamdes/mariadb-mysql-kbs) >= 1.2 with php-composer(williamdes/mariadb-mysql-kbs) < 2)
-# remirepo:15
-%else
-Requires: php-google-recaptcha >= 1.1
-Requires: php-nikic-fast-route >= 1.3
-Requires: php-phpmyadmin-motranslator5 >= 5.0
-Requires: php-phpmyadmin-shapefile >= 2.0
-Requires: php-phpmyadmin-sql-parser5 >= 5.5
-Requires: php-phpmyadmin-twig-i18n-extension
-Requires: php-phpseclib >= 2.0.9
-Requires: php-symfony4-config >= 4.4.9
-Requires: php-symfony4-dependency-injection >= 4.4.9
-Requires: php-symfony4-expression-language >= 4.4.9
-Requires: php-symfony-polyfill >= 1.17
-Requires: php-twig2 >= 2.14.9
-Requires: php-williamdes-mariadb-mysql-kbs >= 1.2
-%endif
-# Autoloader
-Requires: php-composer(fedora/autoloader)
-# From composer.json, "suggest": {
-# "ext-openssl": "Cookie encryption",
-# "ext-curl": "Updates checking",
-# "ext-opcache": "Better performance",
-# "ext-zlib": "For gz import and export",
-# "ext-bz2": "For bzip2 import and export",
-# "ext-zip": "For zip import and export",
-# "ext-gd2": "For image transformations",
-# "ext-mbstring": "For best performance",
-# "tecnickcom/tcpdf": "For PDF support",
-# "code-lts/u2f-php-server": "For FIDO U2F authentication",
-# "paragonie/sodium_compat": "For modern encryption support"
-# "conflict": {
-# "phpseclib/phpseclib": "2.0.8",
-# "tecnickcom/tcpdf": "<6.2",
-# "pragmarx/google2fa-qrcode": "<1.0.1"
-# remirepo:1
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Recommends: php-opcache
-Recommends: php-composer(tecnickcom/tcpdf) >= 6.3
-Recommends: php-composer(pragmarx/google2fa-qrcode) >= 1.0.1
-Recommends: php-composer(code-lts/u2f-php-server) >= 1.2
-Recommends: php-tcpdf-dejavu-sans-fonts >= 6.2
-# remirepo:6
-%else
-Requires: php-tcpdf >= 6.4.1
-Requires: php-pragmarx-google2fa-qrcode >= 1.0.1
-Requires: php-code-lts-u2f-php-server >= 1.2
-Requires: php-tcpdf-dejavu-sans-fonts >= 6.2
-%endif
-%else
-Provides: bundled(php-bacon-bacon-qr-code) = 2.0.4
+
Provides: bundled(php-code-lts-u2f-php-server) = v1.2.0
+Provides: bundled(php-composer-ca-bundle) = 1.3.1
Provides: bundled(php-dasprid-enum) = 1.0.3
+Provides: bundled(php-fig-http-message-util) = 1.1.5
Provides: bundled(php-google-recaptcha) = 1.2.4
Provides: bundled(php-nikic-fast-route) = v1.3.0
Provides: bundled(php-paragonie-constant-time-encoding) = v2.5.0
+Provides: bundled(php-paragonie-random-compat) = v9.99.100
+Provides: bundled(php-paragonie-sodium-compat) = v1.17.0
Provides: bundled(php-phpmyadmin-motranslator) = 5.2.0
-Provides: bundled(php-phpmyadmin-shapefile) = 2.1
+Provides: bundled(php-phpmyadmin-shapefile) = 3.0.1
Provides: bundled(php-phpmyadmin-sql-parser) = 5.5.0
-Provides: bundled(php-phpmyadmin-twig-i18n-extension) = v3.0.0
-Provides: bundled(php-phpseclib-phpseclib) = 2.0.35
+Provides: bundled(php-phpmyadmin-twig-i18n-extension) = v4.0.1
Provides: bundled(php-pragmarx-google2fa) = 8.0.0
-Provides: bundled(php-pragmarx-google2fa-qrcode) = v1.0.3
+Provides: bundled(php-pragmarx-google2fa-qrcode) = v2.1.1
Provides: bundled(php-psr-cache) = 1.0.1
-Provides: bundled(php-psr-container) = 1.0.0
+Provides: bundled(php-psr-container) = 1.1.1
+Provides: bundled(php-psr-http-factory) = 1.0.1
+Provides: bundled(php-psr-http-message) = 1.0.1
Provides: bundled(php-psr-log) = 1.1.4
-Provides: bundled(php-symfony-cache) = v4.4.36
-Provides: bundled(php-symfony-cache-contracts) = v1.1.11
-Provides: bundled(php-symfony-config) = v4.4.36
-Provides: bundled(php-symfony-dependency-injection) = v4.4.36
-Provides: bundled(php-symfony-expression-language) = v4.4.34
-Provides: bundled(php-symfony-filesystem) = v4.4.27
+Provides: bundled(php-ralouphie-getallheaders) = 3.0.3
+Provides: bundled(php-slim-psr7) = 1.4
+Provides: bundled(php-symfony-cache) = v5.4.2
+Provides: bundled(php-symfony-cache-contracts) = v2.5.0
+Provides: bundled(php-symfony-config) = v5.4.2
+Provides: bundled(php-symfony-dependency-injection) = v5.4.2
+Provides: bundled(php-symfony-deprecation-contracts) = v2.5.0
+Provides: bundled(php-symfony-expression-language) = v5.4.0
+Provides: bundled(php-symfony-filesystem) = v5.4.0
Provides: bundled(php-symfony-polyfill-ctype) = v1.24.0
Provides: bundled(php-symfony-polyfill-mbstring) = v1.24.0
-Provides: bundled(php-symfony-polyfill-php72) = v1.24.0
Provides: bundled(php-symfony-polyfill-php73) = v1.24.0
Provides: bundled(php-symfony-polyfill-php80) = v1.24.0
Provides: bundled(php-symfony-polyfill-php81) = v1.24.0
-Provides: bundled(php-symfony-service-contracts) = v1.1.11
-Provides: bundled(php-symfony-var-exporter) = v4.4.34
+Provides: bundled(php-symfony-service-contracts) = v2.5.0
+Provides: bundled(php-symfony-var-exporter) = v5.4.2
Provides: bundled(php-tecnickcom-tcpdf) = 6.4.4
-Provides: bundled(php-twig-twig) = v2.14.10
+Provides: bundled(php-twig-twig) = v3.3.7
+Provides: bundled(php-webmozart-assert) = 1.10.0
Provides: bundled(php-williamdes-mariadb-mysql-kbs) = v1.2.13
+
Requires: php-dom
Requires: php-intl
Requires: php-posix
# php-tidy required by tcpdf is not used (fixHTMLCode)
-%endif
Requires: php-ctype
-Requires: php-openssl
Requires: php-curl
Requires: php-zlib
Requires: php-bz2
@@ -277,6 +206,7 @@ is available in 50 languages
%setup -qn phpMyAdmin-%{upstream_version}%{?upstream_prever:-%upstream_prever}-all-languages
%patch0 -p1
+rm -r vendor/composer/ca-bundle/res/
# Minimal configuration file
sed -e "/'blowfish_secret'/s@''@'MUSTBECHANGEDONINSTALL'@" \
@@ -285,57 +215,21 @@ sed -e "/'blowfish_secret'/s@''@'MUSTBECHANGEDONINSTALL'@" \
config.sample.inc.php >CONFIG
# Setup vendor config file
-sed -e "/'CHANGELOG_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \
- -e "/'LICENSE_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \
- -e "/'CONFIG_DIR'/s@ROOT_PATH@'%{_sysconfdir}/%{name}/'@" \
+sed -e "/'changeLogFile'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \
+ -e "/'licenseFile'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \
+ -e "/'configFile'/s@ROOT_PATH@'%{_sysconfdir}/%{name}/'@" \
%if 0%{?_licensedir:1}
- -e '/LICENSE_FILE/s:%_defaultdocdir:%_defaultlicensedir:' \
+ -e '/licenseFile/s:%_defaultdocdir:%_defaultlicensedir:' \
%endif
- -e "/VERSION_SUFFIX/s/''/'-%{release}'/" \
- -e '/AUTOLOAD_FILE/s@./vendor@%{_datadir}/%{name}/vendor@' \
- -e "/TEMP_DIR/s@ROOT.*tmp'@'%{_localstatedir}/lib/%{name}/temp'@" \
- -e "/CACHE_DIR/s@ROOT.*cache'@'%{_localstatedir}/lib/%{name}/cache'@" \
+ -e "/versionSuffix/s/''/'-%{release}'/" \
+ -e "/tempDir/s@ROOT.*tmp'@'%{_localstatedir}/lib/%{name}/temp'@" \
+ -e "/cacheDir/s@ROOT.*cache'@'%{_localstatedir}/lib/%{name}/cache'@" \
-i libraries/vendor_config.php
# For debug
-grep '^define' libraries/vendor_config.php
-
-%if %{with syslib}
-# Generate autoloader
-rm -rf vendor/*
-cat << 'EOF' | tee vendor/autoload.php
-<?php
-/* Autoloader for phpMyAdmin and its dependencies */
-
-require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('PhpMyAdmin\\', dirname(__DIR__) . '/libraries/classes');
-\Fedora\Autoloader\Dependencies::required([
- '%{_datadir}/php/FastRoute/autoload.php',
- '%{_datadir}/php/PhpMyAdmin/MoTranslator5/autoload.php', /* before sqlparser which may allow other version */
- '%{_datadir}/php/PhpMyAdmin/SqlParser5/autoload.php',
- '%{_datadir}/php/PhpMyAdmin/ShapeFile/autoload.php',
- '%{_datadir}/php/phpseclib/autoload.php',
- '%{_datadir}/php/ReCaptcha/autoload.php',
- [
- '%{_datadir}/php/Twig3/autoload.php',
- '%{_datadir}/php/Twig2/autoload.php',
- ],
- '%{_datadir}/php/PhpMyAdmin/Twig/Extensions/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/Symfony/Polyfill/autoload.php',
- '%{_datadir}/php/Williamdes/MariaDBMySQLKBS/autoload.php',
-]);
-\Fedora\Autoloader\Dependencies::optional([
- '%{_datadir}/php/tcpdf/autoload.php',
- '%{_datadir}/php/PragmaRX/Google2FAQRCode/autoload.php',
- '%{_datadir}/php/CodeLts/U2F/U2FServer/autoload.php',
-]);
-EOF
-%else
+grep '=>' libraries/vendor_config.php
+
php %{SOURCE5} vendor/composer/installed.json
-%endif
%build
@@ -370,9 +264,6 @@ mv %{buildroot}%{_datadir}/%{name}/libraries/cache %{buildroot}/%{_localstat
#rm -r %%{buildroot}%%{_datadir}/%{name}/js/jquery/src
#rm -r %%{buildroot}%%{_datadir}/%{name}/js/openlayers/src
-# Bundled certificates
-rm -r %{buildroot}%{_datadir}/%{name}/libraries/certs
-
# documentation
rm -rf %{buildroot}%{_datadir}/%{name}/examples/
rm -rf %{buildroot}%{_datadir}/%{name}/doc/
@@ -420,6 +311,11 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$SECRET/" \
%changelog
+* Mon Jan 24 2022 Remi Collet <remi@remirepo.net> - 5.2.0~rc1-1
+- update to 5.2.0-rc1
+- raise dependency on PHP 7.2.5
+- always use bundled libraries
+
* Sun Jan 23 2022 Remi Collet <remi@remirepo.net> - 5.1.2-1
- update to 5.1.2 (2022-01-22, security and bugfix release)
- raise dependency on phpmyadmin/sql-parser 5.5