diff options
author | Remi Collet <remi@remirepo.net> | 2021-12-10 12:30:38 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-12-10 12:30:38 +0100 |
commit | d621692a542bc9d1c87f208333a36b3167aff06f (patch) | |
tree | 7b1ebcd38cd3d6c6ca61bf35177da4e8537f384b /phpMyAdmin.spec | |
parent | dd78f9c490e05daf47960d1cf7ca481834e2212b (diff) |
add flag to use all PHP bundled libraries instead of system ones
Diffstat (limited to 'phpMyAdmin.spec')
-rw-r--r-- | phpMyAdmin.spec | 93 |
1 files changed, 82 insertions, 11 deletions
diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index b89e7d8..949b007 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -11,6 +11,14 @@ # Please, preserve the changelog entries # %{!?_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 @@ -28,27 +36,46 @@ Name: phpMyAdmin Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist} +Release: 3%{?dist} 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, +# samyoul/u2f-php-server, twig/twig +# MIT: paragonie/constant_time_encoding, phpmyadmin/twig-i18n-extension, +# phpseclib/phpseclib, pragmarx/google2fa, pragmarx/google2fa-qrcode, +# psr/*, symfony/* +# GPLv2+: phpmyadmin/motranslator, phpmyadmin/shapefile, phpmyadmin/sql-parser +# LGPLv3: tecnickcom/tcpdf +# MPL-2.0: williamdes/mariadb-mysql-kbs +License: GPLv2+ and MIT and BSD and LGPLv3 and MPL-2.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 Source2: phpMyAdmin.htaccess Source3: phpMyAdmin.nginx Source4: https://files.phpmyadmin.net/phpmyadmin.keyring +# List name / version / license of bundled libraries +Source5: phpMyAdmin-bundled.php # Redirect to system certificates 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-cli +%endif Requires(post): coreutils sed Requires: webserver @@ -96,6 +123,7 @@ Requires: php-json Requires: php-mysqli 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) @@ -146,14 +174,6 @@ Requires: php-composer(fedora/autoloader) # "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 -Requires: php-bz2 -Requires: php-zip -Requires: php-gd -Requires: php-mbstring # remirepo:1 %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Recommends: php-opcache @@ -168,6 +188,50 @@ 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 +%else +Provides: bundled(php-bacon-bacon-qr-code) = 2.0.3 +Provides: bundled(php-dasprid-enum) = 1.0.3 +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.4.0 +Provides: bundled(php-phpmyadmin-motranslator) = 5.2.0 +Provides: bundled(php-phpmyadmin-shapefile) = 2.1 +Provides: bundled(php-phpmyadmin-sql-parser) = 5.4.2 +Provides: bundled(php-phpmyadmin-twig-i18n-extension) = v3.0.0 +Provides: bundled(php-phpseclib-phpseclib) = 2.0.31 +Provides: bundled(php-pragmarx-google2fa) = 8.0.0 +Provides: bundled(php-pragmarx-google2fa-qrcode) = v1.0.3 +Provides: bundled(php-psr-cache) = 1.0.1 +Provides: bundled(php-psr-container) = 1.0.0 +Provides: bundled(php-psr-log) = 1.1.4 +Provides: bundled(php-samyoul-u2f-php-server) = v1.1.4 +Provides: bundled(php-symfony-cache) = v4.4.25 +Provides: bundled(php-symfony-cache-contracts) = v1.1.10 +Provides: bundled(php-symfony-config) = v4.4.25 +Provides: bundled(php-symfony-dependency-injection) = v4.4.25 +Provides: bundled(php-symfony-expression-language) = v4.4.25 +Provides: bundled(php-symfony-filesystem) = v4.4.25 +Provides: bundled(php-symfony-polyfill-ctype) = v1.23.0 +Provides: bundled(php-symfony-polyfill-mbstring) = v1.23.0 +Provides: bundled(php-symfony-polyfill-php81) = v1.23.0 +Provides: bundled(php-symfony-service-contracts) = v1.1.9 +Provides: bundled(php-symfony-var-exporter) = v4.4.25 +Provides: bundled(php-tecnickcom-tcpdf) = 6.4.1 +Provides: bundled(php-twig-twig) = v2.13.1 +Provides: bundled(php-williamdes-mariadb-mysql-kbs) = 1.2.12 +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 +Requires: php-zip +Requires: php-gd +Requires: php-mbstring # From phpcompatinfo reports for 4.8.0 # notice: recode is optional (iconv or mbstring are preferred / used first) Requires: php-date @@ -233,6 +297,7 @@ sed -e "/'CHANGELOG_FILE'/s@ROOT_PATH@'%{_pkgdocdir}/'@" \ # For debug grep '^define' libraries/vendor_config.php +%if %{with syslib} # Generate autoloader rm -rf vendor/* cat << 'EOF' | tee vendor/autoload.php @@ -265,6 +330,9 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; '%{_datadir}/php/Samyoul/U2F/U2FServer/autoload.php', ]); EOF +%else +php %{SOURCE5} vendor/composer/installed.json +%endif %build @@ -296,8 +364,8 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tmp/ mv %{buildroot}%{_datadir}/%{name}/libraries/cache %{buildroot}/%{_localstatedir}/lib/%{name}/cache # 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 @@ -349,6 +417,9 @@ sed -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$SECRET/" \ %changelog +* Fri Dec 10 2021 Remi Collet <remi@remirepo.net> - 5.1.1-3 +- add flag to use all PHP bundled libraries instead of system ones + * Fri Jun 4 2021 Remi Collet <remi@remirepo.net> - 5.1.1-1 - update to 5.1.1 (2021-06-04, bugfix release) |