[mysql-workbench] update to 5.2.33b, fix FTBFS, rebuild for new MySQL
Remi Collet
remi at fedoraproject.org
Wed Mar 23 16:34:52 UTC 2011
commit 8d6252fa3a374b7e562cbd02f95914ed1e11cfd8
Author: remi <fedora at famillecollet.com>
Date: Wed Mar 23 17:34:36 2011 +0100
update to 5.2.33b, fix FTBFS, rebuild for new MySQL
.gitignore | 1 +
mysql-workbench-5.2.27-ctemplate.patch | 34 ---
mysql-workbench-5.2.28-tinyxml.patch | 385 --------------------------------
mysql-workbench-5.2.30-gcc.patch | 95 --------
mysql-workbench-5.2.30-mysql55.patch | 34 ---
mysql-workbench-5.2.32-ctemplate.patch | 15 ++
mysql-workbench-5.2.32-tinyxml.patch | 64 ++++++
mysql-workbench-5.2.33-gcc46.patch | 103 +++++++++
mysql-workbench.spec | 139 ++++++++++--
sources | 2 +-
10 files changed, 298 insertions(+), 574 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f441947..e408461 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/mysql-workbench-gpl-5.2.28-src.tar.gz
/mysql-workbench-gpl-5.2.29-src.tar.gz
/mysql-workbench-gpl-5.2.30-src.tar.gz
+/mysql-workbench-gpl-5.2.33b-src.tar.gz
diff --git a/mysql-workbench-5.2.32-ctemplate.patch b/mysql-workbench-5.2.32-ctemplate.patch
new file mode 100644
index 0000000..1106494
--- /dev/null
+++ b/mysql-workbench-5.2.32-ctemplate.patch
@@ -0,0 +1,15 @@
+diff -up mysql-workbench-gpl-5.2.32-src/ext/Makefile.am.ctemplate mysql-workbench-gpl-5.2.32-src/ext/Makefile.am
+--- mysql-workbench-gpl-5.2.32-src/ext/Makefile.am.ctemplate 2011-03-04 01:54:51.000000000 +0100
++++ mysql-workbench-gpl-5.2.32-src/ext/Makefile.am 2011-03-09 16:15:36.132686915 +0100
+@@ -1,10 +1,5 @@
+
+-if BUILD_CTEMPLATE
+-else
+-ctemplate_dirs=ctemplate
+-endif
+-
+-SUBDIRS=scintilla/gtk cppconn vsqlite++ $(ctemplate_dirs)
++SUBDIRS=scintilla/gtk cppconn vsqlite++
+
+ if BUNDLE_UTILITIES
+ all-am:
diff --git a/mysql-workbench-5.2.32-tinyxml.patch b/mysql-workbench-5.2.32-tinyxml.patch
new file mode 100644
index 0000000..9479f01
--- /dev/null
+++ b/mysql-workbench-5.2.32-tinyxml.patch
@@ -0,0 +1,64 @@
+--- mysql-workbench-gpl-5.2.32-src/library/forms/Makefile.am.tinyxml 2011-03-09 17:29:40.830185016 +0100
++++ mysql-workbench-gpl-5.2.32-src/library/forms/Makefile.am 2011-03-09 17:29:58.392510545 +0100
+@@ -67,7 +67,7 @@
+ gtk/src/lf_menu.cpp\
+ gtk/src/lf_menubar.cpp
+
+-libmforms_la_LIBADD=@GNOME_LIBS@ @GNOME_KEYRING_LIBS@
++libmforms_la_LIBADD=@GNOME_LIBS@ @GNOME_KEYRING_LIBS@ -ltinyxml
+
+ INCLUDES=@GNOME_CFLAGS@ @SIGC_CFLAGS@ @CAIRO_CFLAGS@ @GNOME_KEYRING_CFLAGS@ \
+ -I$(top_srcdir)/library/forms\
+@@ -79,7 +79,6 @@
+ -I$(top_srcdir)/ext/vsqlite\
+ -I$(top_srcdir)/library/\
+ -I$(top_srcdir)/ext\
+--I$(top_srcdir)/ext/tinyxml\
+ -I$(top_srcdir)/ext/scintilla/include
+
+
+--- mysql-workbench-gpl-5.2.32-src/modules/wb.mysql.import/Makefile.am.tinyxml 2011-03-04 01:54:41.000000000 +0100
++++ mysql-workbench-gpl-5.2.32-src/modules/wb.mysql.import/Makefile.am 2011-03-09 17:21:41.863136166 +0100
+@@ -17,7 +17,6 @@
+ -I$(top_srcdir)/library/sql-parser/source/linux\
+ -I$(top_srcdir)/ext/vsqlite\
+ -I$(top_srcdir)/ext/vsqlite++/include\
+- -I$(top_srcdir)/ext/tinyxml\
+ @MYSQL_INCLUDE@ @GRT_CFLAGS@ @GLIB_CFLAGS@ @SIGC_CFLAGS@
+
+
+@@ -26,8 +25,4 @@
+
+ wb_mysql_import_grt_la_SOURCES=\
+ src/wb_mysql_import.cpp\
+- src/wb_mysql_import_dbd4.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxmlparser.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxml.cpp\
+- $(top_srcdir)/ext/tinyxml/tinystr.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxmlerror.cpp
++ src/wb_mysql_import_dbd4.cpp
+--- mysql-workbench-gpl-5.2.32-src/backend/wbprivate/Makefile.am.tinyxml 2011-03-04 01:54:50.000000000 +0100
++++ mysql-workbench-gpl-5.2.32-src/backend/wbprivate/Makefile.am 2011-03-09 17:21:41.860136279 +0100
+@@ -13,8 +13,7 @@
+ -I$(top_srcdir)/ext/cppconn/ -I$(top_srcdir)/library/dbc/src\
+ -I$(top_srcdir)/ext/scintilla/include\
+ -I$(top_srcdir)/ext/vsqlite++/include\
+- -I$(top_srcdir)/ext/vsqlite\
+- -I$(top_srcdir)/ext/tinyxml
++ -I$(top_srcdir)/ext/vsqlite
+
+ libwbprivate_a_SOURCES=\
+ model/canvas_floater.cpp\
+@@ -74,11 +73,7 @@
+ $(top_srcdir)/frontend/common/grt_shell_window.cpp\
+ $(top_srcdir)/frontend/common/grt_code_editor.cpp\
+ $(top_srcdir)/frontend/common/grt_python_debugger.cpp\
+- $(top_srcdir)/frontend/common/plugin_manager_window.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxmlparser.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxml.cpp\
+- $(top_srcdir)/ext/tinyxml/tinystr.cpp\
+- $(top_srcdir)/ext/tinyxml/tinyxmlerror.cpp
++ $(top_srcdir)/frontend/common/plugin_manager_window.cpp
+
+ #BUILT_SOURCES=stdafx.h.gch
+ #stdafx.h.gch: workbench/stdafx.h
diff --git a/mysql-workbench-5.2.33-gcc46.patch b/mysql-workbench-5.2.33-gcc46.patch
new file mode 100644
index 0000000..7db64bf
--- /dev/null
+++ b/mysql-workbench-5.2.33-gcc46.patch
@@ -0,0 +1,103 @@
+diff -up mysql-workbench-gpl-5.2.33-src/backend/wbprivate/workbench/metaclasses.cpp.gcc46 mysql-workbench-gpl-5.2.33-src/backend/wbprivate/workbench/metaclasses.cpp
+--- mysql-workbench-gpl-5.2.33-src/backend/wbprivate/workbench/metaclasses.cpp.gcc46 2011-03-23 17:05:33.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/backend/wbprivate/workbench/metaclasses.cpp 2011-03-23 17:06:02.000000000 +0100
+@@ -23,7 +23,7 @@
+ #include "grts/structs.workbench.model.reporting.h"
+ #include "grts/structs.workbench.physical.h"
+
+-
++namespace wb {
+ void register_all_metaclasses()
+ {
+ register_structs_app_xml();
+@@ -46,3 +46,6 @@ void register_all_metaclasses()
+ register_structs_workbench_model_reporting_xml();
+ register_structs_workbench_physical_xml();
+ }
++// end of namespace wb
++}
++
+diff -up mysql-workbench-gpl-5.2.33-src/frontend/linux/linux_utilities/toolbar_manager.cpp.gcc46 mysql-workbench-gpl-5.2.33-src/frontend/linux/linux_utilities/toolbar_manager.cpp
+--- mysql-workbench-gpl-5.2.33-src/frontend/linux/linux_utilities/toolbar_manager.cpp.gcc46 2011-03-23 16:56:16.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/frontend/linux/linux_utilities/toolbar_manager.cpp 2011-03-23 17:07:36.000000000 +0100
+@@ -31,7 +31,7 @@ static Gtk::ComboBox *create_color_combo
+ }
+
+ Glib::RefPtr<Gtk::ListStore> model= Gtk::ListStore::create(*color_combo_columns);
+- Gtk::ComboBox *combo= new Gtk::ComboBox(model);
++ Gtk::ComboBox *combo= new Gtk::ComboBox((Glib::RefPtr<Gtk::TreeModel> &)model);
+
+ combo->pack_start(color_combo_columns->image);
+
+diff -up mysql-workbench-gpl-5.2.33-src/library/forms/utilities.cpp.gcc46 mysql-workbench-gpl-5.2.33-src/library/forms/utilities.cpp
+--- mysql-workbench-gpl-5.2.33-src/library/forms/utilities.cpp.gcc46 2011-03-23 17:04:17.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/library/forms/utilities.cpp 2011-03-23 17:04:40.000000000 +0100
+@@ -32,10 +32,11 @@
+ #include <math.h>
+ #include "base/log.h"
+ ENABLE_LOG("mforms.utils")
+-
+ using namespace mforms;
+
++namespace mforms {
+ GThread *_mforms_main_thread=0;
++}
+
+ static std::map<std::string, int> remembered_message_answers;
+ static std::string remembered_message_answer_file;
+diff -up mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_lua_help.cpp.gcc46 mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_lua_help.cpp
+--- mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_lua_help.cpp.gcc46 2011-03-17 13:48:45.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_lua_help.cpp 2011-03-23 16:44:22.000000000 +0100
+@@ -1909,6 +1909,8 @@ static MYX_GRT_SHELL_COMMAND_HELP_GROUP
+
+ //============================================================================
+
++namespace grt {
++
+ static void myx_grt_shell_show_command_help_print(grt::GRT *grt, const char *group_name, const char *cmd)
+ {
+ MYX_GRT_SHELL_COMMAND_HELP_GROUP help_group;
+@@ -2097,3 +2099,6 @@ void myx_grt_shell_show_help(grt::GRT *g
+ }
+ }
+
++// End of namspace grt
++}
++
+diff -up mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.cpp.gcc46 mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.cpp
+--- mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.cpp.gcc46 2011-03-17 13:48:41.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.cpp 2011-03-23 16:44:22.000000000 +0100
+@@ -187,7 +187,7 @@ NL
+ };
+
+
+-void grt_shell_show_python_help(grt::GRT *grt, const char *command)
++void grt::grt_shell_show_python_help(grt::GRT *grt, const char *command)
+ {
+ if (!command || !*command)
+ grt->send_output(
+diff -up mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.h.gcc46 mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.h
+--- mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.h.gcc46 2011-03-17 13:48:39.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/library/grt/src/grtpp_shell_python_help.h 2011-03-23 16:44:22.000000000 +0100
+@@ -21,6 +21,8 @@
+ #ifndef __grtpp_shell_python_help_h__
+ #define __grtpp_shell_python_help_h__
+
++namespace grt {
+ void grt_shell_show_python_help(grt::GRT *grt, const char *command);
++}
+
+-#endif /* __grtpp_shell_python_help_h__ */
+\ Pas de fin de ligne à la fin du fichier.
++#endif /* __grtpp_shell_python_help_h__ */
+diff -up mysql-workbench-gpl-5.2.33-src/modules/db.mysql/src/db_mysql_catalog_report.h.gcc46 mysql-workbench-gpl-5.2.33-src/modules/db.mysql/src/db_mysql_catalog_report.h
+--- mysql-workbench-gpl-5.2.33-src/modules/db.mysql/src/db_mysql_catalog_report.h.gcc46 2011-03-23 16:51:30.000000000 +0100
++++ mysql-workbench-gpl-5.2.33-src/modules/db.mysql/src/db_mysql_catalog_report.h 2011-03-23 16:52:33.000000000 +0100
+@@ -10,6 +10,7 @@
+ #include "config.h"
+ #endif
+
++#include <cstddef>
+ #include "ctemplate/template.h"
+
+ #include "grt/common.h"
diff --git a/mysql-workbench.spec b/mysql-workbench.spec
index b45b48b..f6bc1b9 100644
--- a/mysql-workbench.spec
+++ b/mysql-workbench.spec
@@ -1,14 +1,19 @@
-%global postver -src
-%global tartype gpl
-%global cppconnver 1.1.0-0.5.bzr895
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+
+%global mw_version 5.2.33b
+%global tarversion gpl-5.2.33b-src
+%global srcversion gpl-5.2.33-src
+
+# Use system cppconn if a compatible upstream version exists
+#global cppconnver 1.1.0-0.3.bzr895
# "script_templates" (and some others) shouldn't be compiled
%global _python_bytecompile_errors_terminate_build 0
Summary: A MySQL visual database modeling, administration and querying tool
Name: mysql-workbench
-Version: 5.2.30
-Release: 4%{?dist}
+Version: %{mw_version}
+Release: 1%{?dist}
Group: Applications/Databases
License: GPLv2 with exceptions
@@ -16,15 +21,15 @@ URL: http://wb.mysql.com
# Upstream has a mirror redirector for downloads, so the URL is hard to
# represent statically. You can get the tarball by following a link from
# http://dev.mysql.com/downloads/workbench/
-Source: http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLGUITools/%{name}-%{tartype}-%{version}%{?postver}.tar.gz
+Source: http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLGUITools/%{name}-%{tarversion}.tar.gz
# don't build extension, use system one
# !!! This patch use versioned soname (libmysqlcppconn.so.5) !!!
Patch1: %{name}-5.2.28-cppconn.patch
-Patch2: %{name}-5.2.27-ctemplate.patch
-Patch3: %{name}-5.2.28-tinyxml.patch
-Patch4: %{name}-5.2.30-mysql55.patch
-Patch5: %{name}-5.2.30-gcc.patch
+Patch2: %{name}-5.2.32-ctemplate.patch
+Patch3: %{name}-5.2.32-tinyxml.patch
+# http://bugs.mysql.com/60603
+Patch4: %{name}-5.2.33-gcc46.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pcre-devel >= 3.9
@@ -49,17 +54,24 @@ BuildRequires: libuuid-devel
%else
BuildRequires: uuid-devel
%endif
-BuildRequires: gtkmm24-devel
+BuildRequires: gtkmm24-devel >= 2.18
BuildRequires: libGL-devel
BuildRequires: sqlite-devel
+%if 0%{?cppconnver:1}
BuildRequires: mysql-connector-c++-devel >= %{cppconnver}
+%endif
BuildRequires: desktop-file-utils
-BuildRequires: tinyxml-devel
+%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
+BuildRequires: tinyxml-devel >= 2.6.0
+%endif
Requires: python-paramiko pexpect python-sqlite2
+Requires: mysql-utilities
# requires mysql client pkg (for mysqldump and mysql cmdline client)
Requires: mysql gnome-keyring
+%if 0%{?cppconnver:1}
Requires: mysql-connector-c++ >= %{cppconnver}
+%endif
# Official upstream builds (name changes quite often)
Conflicts: mysql-workbench-oss
Conflicts: mysql-workbench-ce
@@ -82,16 +94,46 @@ an integrated tools environment for:
* Database Administration (replacing MySQL Administrator)
+%package -n mysql-utilities
+
+Summary: Scripts for managing and administering MySQL servers
+# Not yet published (else will be package separatly)
+# see ext/mysql-utilities/CHANGES.txt
+Version: 1.0.0
+Release: 0.%{mw_version}%{?dist}
+
+BuildArch: noarch
+BuildRequires: python-devel >= 2.4
+%if 0%{?fedora} >= 14
+BuildRequires: python-sphinx >= 1.0
+%endif
+
+Requires: mysql-connector-python
+
+%description -n mysql-utilities
+MySQL Utilities contain a collection of scripts useful for managing
+and administering MySQL servers.
+
+
%prep
-%setup -q -n %{name}-%{tartype}-%{version}%{?postver}
+%setup -q -n %{name}-%{srcversion}
+%if 0%{?cppconnver:1}
%patch1 -p1 -b .cppconn
+rm -rf ext/cppconn
+%endif
+
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
%patch2 -p1 -b .ctemplate
+rm -rf ext/ctemplate
%endif
+
+%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
%patch3 -p1 -b .tinyxml
-%patch4 -p1 -b .mysql55
-%patch5 -p1 -b .gcc46
+rm -rf library/tinyxml
+%endif
+
+%patch4 -p1 -b .gcc46
touch -r COPYING .timestamp4rpm
%{__sed} -i -e 's/\r//g' COPYING
@@ -102,11 +144,6 @@ rm -rf ext/boost
rm -rf ext/curl
rm -rf ext/libsigc++
rm -rf ext/yassl
-rm -rf ext/cppconn
-%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
-rm -rf ext/ctemplate
-%endif
-rm -rf library/tinyxml
# avoid "No such file" during configure
touch po/POTFILES.in
@@ -114,17 +151,32 @@ touch po/POTFILES.in
%build
NOCONFIGURE=yes ./autogen.sh
-
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive"
-%configure --disable-debug
+%configure --disable-debug --enable-mysql-utilities
make %{?_smp_mflags}
+%if 0%{?fedora} >= 14
+pushd ext/mysql-utilities
+%{__python} setup.py build_man
+popd
+%endif
+
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
+pushd ext/mysql-utilities
+%{__install} --directory %{buildroot}%{_prefix}/man/man1
+%{__python} setup.py install --skip-profile --root %{buildroot}
+
+%if 0%{?fedora} >= 14
+%{__install} --directory %{buildroot}%{_mandir}
+%{__mv} %{buildroot}%{_prefix}/man/man1 %{buildroot}%{_mandir}/man1
+%endif
+popd
+
# clean dev files
echo Cleanup dev file
find %{buildroot}%{_libdir}/%{name} -name \*.a -exec rm {} \; -print
@@ -153,15 +205,52 @@ update-desktop-database &> /dev/null || :
%files
%defattr(-, root, root, -)
-%doc AUTHORS COPYING COPYING.LGPL README samples ChangeLog
-%attr(0755,root,root) %{_bindir}/%{name}
-%attr(0755,root,root) %{_bindir}/%{name}-bin
+# NEWS and ChangeLog are empty or outdated
+%doc AUTHORS COPYING COPYING.LGPL README samples
+%{_bindir}/%{name}
+%{_bindir}/%{name}-bin
%{_datadir}/applications/MySQLWorkbench.desktop
%{_libdir}/%{name}
%{_datadir}/%{name}
+%exclude %{_datadir}/doc/%{name}
+
+
+%files -n mysql-utilities
+%defattr(-, root, root, -)
+%doc ext/mysql-utilities/*.txt
+%{_bindir}/mysqldbcopy
+%{_bindir}/mysqldbexport
+%{_bindir}/mysqldbimport
+%{_bindir}/mysqldiff
+%{_bindir}/mysqldiskusage
+%{_bindir}/mysqlindexcheck
+%{_bindir}/mysqlmetagrep
+%{_bindir}/mysqlprocgrep
+%{_bindir}/mysqlreplicate
+%{_bindir}/mysqlserverclone
+%{_bindir}/mysqluserclone
+%{python_sitelib}/mysql/utilities
+%{python_sitelib}/mysql_utilities*
+%if 0%{?fedora} >= 14
+%{_mandir}/man1/*
+%endif
+# empty file already provided by mysql-connector-python
+%exclude %{python_sitelib}/mysql/__init*
%changelog
+* Wed Mar 23 2011 Remi Collet <Fedora at famillecollet.com> 5.2.33b-1
+- update to 5.2.33b Community (OSS) Edition (GPL)
+ http://dev.mysql.com/doc/workbench/en/wb-news-5-2-33b.html
+ http://wb.mysql.com/?page_id=49
+- use bundled cppconn (which is a fork of svn version...)
+- add mysql-utilities sub-package
+- requires mysql-connector-python
+- use system tinyxml >= 2.6.0 when available
+- update bug for gcc 4.6
+ http://bugs.mysql.com/60603
+- rebuild for new MySQL client library
+
* Sat Feb 12 2011 Remi Collet <Fedora at famillecollet.com> 5.2.30-4
- add patch for gcc 4.6
diff --git a/sources b/sources
index 293616b..3cacd95 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-664bbc3bdb846f3ae696e4d65f3cb70f mysql-workbench-gpl-5.2.30-src.tar.gz
+850e081eeaea87a88c408483817e4b1f mysql-workbench-gpl-5.2.33b-src.tar.gz
More information about the scm-commits
mailing list