summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpMyAdmin-dev.spec23
-rw-r--r--phpMyAdmin-pr11481.patch42
2 files changed, 59 insertions, 6 deletions
diff --git a/phpMyAdmin-dev.spec b/phpMyAdmin-dev.spec
index f47fe87..24c2fc1 100644
--- a/phpMyAdmin-dev.spec
+++ b/phpMyAdmin-dev.spec
@@ -9,7 +9,7 @@
#
# Please, preserve the changelog entries
#
-#global prever rc1
+%global prever rc1
%{!?_pkgdocdir: %global _pkgdocdir %{_datadir}/doc/%{name}-%{version}}
%if 0%{?fedora} >= 21
# nginx 1.6 with nginx-filesystem
@@ -22,19 +22,22 @@
%endif
Name: phpMyAdmin
-Version: 4.4.14.1
-Release: 1%{?dist}
+Version: 4.5.0
+Release: 0.1.%{prever}%{?dist}
Summary: Web based MySQL browser written in php
Group: Applications/Internet
# MIT (js/jquery/, js/canvg/, js/codemirror/), GPLv2+ (the rest)
License: GPLv2+ and MIT
URL: https://www.phpmyadmin.net/
-Source0: https://files.phpmyadmin.net/%{name}/%{version}/%{name}-%{version}-all-languages.tar.xz
-Source1: https://files.phpmyadmin.net/%{name}/%{version}/%{name}-%{version}-all-languages.tar.xz.asc
+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
Source2: phpMyAdmin.htaccess
Source3: phpMyAdmin.nginx
+# See https://github.com/phpmyadmin/phpmyadmin/pull/11481
+Patch0: %{name}-pr11481.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: unzip
@@ -74,6 +77,7 @@ Requires: php-php-gettext
Requires: php-tcpdf
Requires: php-tcpdf-dejavu-sans-fonts
Requires: php-composer(phpseclib/phpseclib) >= 2.0.0
+Requires: php-composer(udan11/sql-parser)
# optional and ignored php-gmp (as bcmath is enough)
Provides: phpmyadmin = %{version}-%{release}
@@ -92,6 +96,8 @@ is available in 50 languages
%prep
%setup -qn phpMyAdmin-%{version}%{?prever:-%prever}-all-languages
+%patch0 -p1
+
# Fix links on home page to match allowed domains
# see https://github.com/phpmyadmin/phpmyadmin/pull/1291
sed -e 's/www.phpmyadmin.net/www.phpMyAdmin.net/' \
@@ -107,11 +113,12 @@ sed -e "/'extension'/s@'mysql'@'mysqli'@" \
# 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 "/'CONFIG_DIR'/s@''@'%{_sysconfdir}/%{name}/'@" \
-e "/'SETUP_CONFIG_FILE'/s@./config/config.inc.php@%{_localstatedir}/lib/%{name}/config/config.inc.php@" \
-e "/'GETTEXT_INC'/s@./libraries/php-gettext/gettext.inc@%{_datadir}/php/gettext/gettext.inc@" \
-e "/'TCPDF_INC'/s@./libraries/tcpdf/tcpdf.php@%{_datadir}/php/tcpdf/tcpdf.php@" \
-e "/'PHPSECLIB_INC_DIR'/s@./libraries/phpseclib@%{_datadir}/php/phpseclib@" \
+ -e "/'SQL_PARSER_AUTOLOAD'/s@./libraries/sql-parser@%{_datadir}/php/SqlParser@" \
%if 0%{?_licensedir:1}
-e '/LICENSE_FILE/s:%_defaultdocdir:%_defaultlicensedir:' \
%endif
@@ -127,6 +134,7 @@ rm doc/html/.buildinfo
rm -r libraries/php-gettext
rm -r libraries/tcpdf
rm -r libraries/phpseclib
+rm -r libraries/sql-parser
# Remove sources of JavaScript librairies
rm -r js/jquery/src
@@ -214,6 +222,9 @@ sed -i -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$RANDOM$RANDOM$RANDOM$RAN
%changelog
+* Mon Sep 14 2015 Remi Collet <remi@remirepo.net> 4.5.0-0.1.rc1
+- update to 4.5.0-rc1
+
* Wed Sep 9 2015 Remi Collet <remi@remirepo.net> 4.4.14.1-1
- update to 4.4.14.1 (2015-09-08, security)
- fix PMASA-2015-4
diff --git a/phpMyAdmin-pr11481.patch b/phpMyAdmin-pr11481.patch
new file mode 100644
index 0000000..84efea4
--- /dev/null
+++ b/phpMyAdmin-pr11481.patch
@@ -0,0 +1,42 @@
+From c3af684194f25e3f15c3f5576828bcce3ac32ae5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Mon, 14 Sep 2015 16:13:05 +0200
+Subject: [PATCH] allow to use system udan11/sql-parser
+
+Signed-off-by: Remi Collet <remi@fedoraproject.org>
+---
+ libraries/common.inc.php | 2 +-
+ libraries/vendor_config.php | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libraries/common.inc.php b/libraries/common.inc.php
+index 83ff2cc..ea15788 100644
+--- a/libraries/common.inc.php
++++ b/libraries/common.inc.php
+@@ -1069,7 +1069,7 @@
+ /**
+ * Initializes the SQL parsing library.
+ */
+- include_once './libraries/sql-parser/autoload.php';
++ include_once SQL_PARSER_AUTOLOAD;
+
+ // Loads closest context to this version.
+ SqlParser\Context::loadClosest(
+diff --git a/libraries/vendor_config.php b/libraries/vendor_config.php
+index b9c25c6..7087150 100644
+--- a/libraries/vendor_config.php
++++ b/libraries/vendor_config.php
+@@ -85,8 +85,12 @@
+ define('PHPSECLIB_INC_DIR', './libraries/phpseclib/');
+
+ /**
++ * Path to the udan11/sql-parser. Useful when you want to use system version.
++ */
++define('SQL_PARSER_AUTOLOAD', './libraries/sql-parser/autoload.php');
++
++/**
+ * Avoid referring to nonexistent files (causes warnings when open_basedir
+ * is used)
+ */
+ define('K_PATH_IMAGES', '');
+-