summaryrefslogtreecommitdiffstats
path: root/phpMyAdmin.spec
diff options
context:
space:
mode:
Diffstat (limited to 'phpMyAdmin.spec')
-rw-r--r--phpMyAdmin.spec127
1 files changed, 84 insertions, 43 deletions
diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec
index 23b2261..51b690c 100644
--- a/phpMyAdmin.spec
+++ b/phpMyAdmin.spec
@@ -9,7 +9,6 @@
#
# Please, preserve the changelog entries
#
-#global prever rc1
%{!?_pkgdocdir: %global _pkgdocdir %{_datadir}/doc/%{name}-%{version}}
%if 0%{?fedora} >= 21
# nginx 1.6 with nginx-filesystem
@@ -21,9 +20,12 @@
%global with_httpd 0
%endif
+%global upstream_version 4.8.0
+%global upstream_prever alpha1
+
Name: phpMyAdmin
-Version: 4.7.8
-Release: 1%{?dist}
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
+Release: 2%{?dist}
Summary: Web based MySQL browser written in php
# MIT (js/jquery/, js/jqplot, js/codemirror/, js/tracekit/)
@@ -31,8 +33,8 @@ Summary: Web based MySQL browser written in php
# GPLv2+ (the rest)
License: GPLv2+ and MIT and BSD
URL: https://www.phpmyadmin.net/
-Source0: https://files.phpmyadmin.net/%{name}/%{version}%{?prever:-%prever}/%{name}-%{version}%{?prever:-%prever}-all-languages.tar.xz
-Source1: https://files.phpmyadmin.net/%{name}/%{version}%{?prever:-%prever}/%{name}-%{version}%{?prever:-%prever}-all-languages.tar.xz.asc
+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
Source2: phpMyAdmin.htaccess
Source3: phpMyAdmin.nginx
@@ -53,47 +55,55 @@ Suggests: httpd
%endif
# From composer.json, "require": {
# "php": ">=5.5.0",
-# "ext-mbstring": "*",
# "ext-mysqli": "*",
# "ext-xml": "*",
# "ext-pcre": "*",
# "ext-json": "*",
+# "ext-ctype": "*",
+# "ext-hash": "*",
# "phpmyadmin/sql-parser": "^4.2.3",
# "phpmyadmin/motranslator": "^4.0",
# "phpmyadmin/shapefile": "^2.0",
-# "tecnickcom/tcpdf": "^6.2",
# "phpseclib/phpseclib": "^2.0",
-# "google/recaptcha": "^1.1"
+# "google/recaptcha": "^1.1",
+# "psr/container": "^1.0",
+# "twig/twig": "^1.34",
+# "twig/extensions": "~1.5.1",
+# "symfony/expression-language": "^3.2 || ^2.8",
+# "symfony/polyfill-mbstring": "^1.3"
# "conflict": {
-# "phpseclib/phpseclib": "2.0.8"
+# "phpseclib/phpseclib": "2.0.8",
+# "tecnickcom/tcpdf": "<6.2",
+# "pragmarx/google2fa": "<2.0",
+# "bacon/bacon-qr-code": "<1.0",
+# "samyoul/u2f-php-server": "<1.1"
Requires: php(language) >= 5.5
-Requires: php-mbstring
Requires: php-mysqli
-Requires: php-openssl
Requires: php-xml
Requires: php-pcre
Requires: php-json
-Requires: php-tcpdf-dejavu-sans-fonts
+Requires: php-ctype
+Requires: php-hash
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(phpmyadmin/sql-parser) >= 4.2.3 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(tecnickcom/tcpdf) >= 6.2 with php-composer(tecnickcom/tcpdf) < 7)
-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(phpmyadmin/sql-parser) >= 4.2.3 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)
%else
-Requires: php-composer(phpmyadmin/sql-parser) < 5
-Requires: php-composer(phpmyadmin/sql-parser) >= 4.2.3
-Requires: php-composer(phpmyadmin/motranslator) < 5
-Requires: php-composer(phpmyadmin/motranslator) >= 4.0
-Requires: php-composer(phpmyadmin/shapefile) < 3
-Requires: php-composer(phpmyadmin/shapefile) >= 2.0
-Requires: php-composer(tecnickcom/tcpdf) < 7
-Requires: php-composer(tecnickcom/tcpdf) >= 6.2
-Requires: php-composer(phpseclib/phpseclib) < 3
-Requires: php-composer(phpseclib/phpseclib) >= 2.0.9
-Requires: php-composer(google/recaptcha) < 2
-Requires: php-composer(google/recaptcha) >= 1.1
+Requires: php-phpmyadmin-sql-parser >= 4.2.3
+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
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -105,20 +115,28 @@ Requires: php-composer(fedora/autoloader)
# "ext-bz2": "For bzip2 import and export",
# "ext-zip": "For zip import and export",
# "ext-gd2": "For image transformations",
-# "tecnickcom/tcpdf": "For PDF support"
+# "ext-mbstring": "For best performance",
+# "tecnickcom/tcpdf": "For PDF support",
+# "pragmarx/google2fa": "For 2FA authentication",
+# "bacon/bacon-qr-code": "For 2FA authentication",
+# "samyoul/u2f-php-server": "For FIDO U2F authentication"
Requires: php-openssl
Requires: php-curl
Requires: php-zlib
Requires: php-bz2
Requires: php-zip
Requires: php-gd
-%if 0%{?fedora} >= 21
+# Keep mandatory to avoid polyfill
+Requires: php-mbstring
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Recommends: php-opcache
+Recommends: php-composer(bacon/bacon-qr-code) >= 1.0
+Recommends: php-composer(tecnickcom/tcpdf) >= 6.2
+Recommends: php-tcpdf-dejavu-sans-fonts >= 6.2
%endif
-# From phpcompatinfo reports for 4.7.0
+# From phpcompatinfo reports for 4.8.0
Requires: php-date
Requires: php-filter
-Requires: php-hash
Requires: php-iconv
Requires: php-libxml
Requires: php-recode
@@ -132,7 +150,7 @@ Requires: ca-certificates
# Bundled JS library
Provides: bundled(js-codemirror)
Provides: bundled(js-jqplot) = 1.0.9
-Provides: bundled(js-jquery) = 3.1.1
+Provides: bundled(js-jquery) = 3.2.1
Provides: bundled(js-openlayers)
Provides: bundled(js-tracekit)
@@ -151,7 +169,7 @@ is available in 50 languages
%prep
-%setup -qn phpMyAdmin-%{version}%{?prever:-%prever}-all-languages
+%setup -qn phpMyAdmin-%{upstream_version}%{?upstream_prever:-%upstream_prever}-all-languages
%patch0 -p1
# Minimal configuration file
@@ -169,6 +187,8 @@ sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@%{_pkgdocdir}/ChangeLog@" \
%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@' \
-i libraries/vendor_config.php
# For debug
@@ -181,14 +201,25 @@ cat << 'EOF' | tee vendor/autoload.php
/* Autoloader for phpMyAdmin and its dependencies */
require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('PMA\\', dirname(__DIR__));
+\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/MoTranslator/autoload.php',
'%{_datadir}/php/PhpMyAdmin/ShapeFile/autoload.php',
- '%{_datadir}/php/tcpdf/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/Twig/Extensions/autoload.php',
+ [
+ '%{_datadir}/php/Symfony3/Component/ExpressionLanguage/autoload.php',
+ '%{_datadir}/php/Symfony/Component/ExpressionLanguage/autoload.php',
+ ],
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{_datadir}/php/tcpdf/autoload.php',
+ '%{_datadir}/php/BaconQrCode/autoload.php',
]);
EOF
@@ -218,8 +249,8 @@ rm -rf %{buildroot}/%{_datadir}/%{name}/contrib
rm %{buildroot}/%{_datadir}/%{name}/composer.*
# JS libraries sources
-rm -r %{buildroot}%{_datadir}/%{name}/js/jquery/src
-rm -r %{buildroot}%{_datadir}/%{name}/js/openlayers/src
+#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
@@ -230,10 +261,10 @@ rm -rf %{buildroot}%{_datadir}/%{name}/doc/
mkdir -p %{buildroot}%{_datadir}/%{name}/doc/
ln -s %{_pkgdocdir}/html %{buildroot}%{_datadir}/%{name}/doc/html
-mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/{upload,save,config}
+mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/{upload,save,config,temp}
-mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/js/jquery/MIT-LICENSE.txt LICENSE-jquery
-mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/js/codemirror/LICENSE LICENSE-codemirror
+mv -f %{buildroot}%{_datadir}/%{name}/js/vendor/jquery/MIT-LICENSE.txt LICENSE-jquery
+mv -f %{buildroot}%{_datadir}/%{name}/js/vendor/codemirror/LICENSE LICENSE-codemirror
%pretrans
@@ -267,9 +298,19 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$SECRET/" \
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/upload
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/save
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/config
+%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/temp
%changelog
+* Thu Mar 1 2018 Remi Collet <remi@remirepo.net> 4.8.0~alpha1-2
+- update to 4.8.0-alpha1
+- add dependency on psr/container
+- add dependency on twig/twig
+- add dependency on twig/extensions
+- add dependency on symfony/expression-language
+- add optional dependency on bacon/bacon-qr-code
+- dependency on tecnickcom/tcpdf is now optional
+
* Wed Feb 21 2018 Remi Collet <remi@remirepo.net> 4.7.8-1
- update to 4.7.8 (2018-02-20, security release)
- raise dependency on phpmyadmin/motranslator version 4.0