From 7ed5b8a8f714009e0fd8844a2d47636d3b25ddeb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 20 Sep 2010 22:43:28 +0200 Subject: first work ob MySQL Workbench 5.2.28 --- mysql-workbench-5.2.26-cppconn.patch | 85 -------------------- mysql-workbench-5.2.28-cppconn.patch | 145 ++++++++++++++++++++++++++++++++++ mysql-workbench-gpl-5.2.28-1fc13.spec | 102 ++++++++++++++++++++++++ mysql-workbench.spec | 16 ++-- 4 files changed, 256 insertions(+), 92 deletions(-) delete mode 100644 mysql-workbench-5.2.26-cppconn.patch create mode 100644 mysql-workbench-5.2.28-cppconn.patch create mode 100644 mysql-workbench-gpl-5.2.28-1fc13.spec diff --git a/mysql-workbench-5.2.26-cppconn.patch b/mysql-workbench-5.2.26-cppconn.patch deleted file mode 100644 index b941d03..0000000 --- a/mysql-workbench-5.2.26-cppconn.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -up mysql-workbench-gpl-5.2.26/configure.in.cppconn mysql-workbench-gpl-5.2.26/configure.in ---- mysql-workbench-gpl-5.2.26/configure.in.cppconn 2010-08-05 15:33:27.000000000 +0200 -+++ mysql-workbench-gpl-5.2.26/configure.in 2010-08-07 08:11:56.906643649 +0200 -@@ -462,8 +462,6 @@ res/mysql.profiles/Makefile - res/sqlidedata/Makefile - ext/Makefile - ext/scintilla/gtk/Makefile --ext/cppconn/Makefile --ext/cppconn/driver/Makefile - backend/Makefile - backend/wbpublic/Makefile - backend/wbprivate/Makefile -diff -up mysql-workbench-gpl-5.2.26/ext/Makefile.am.cppconn mysql-workbench-gpl-5.2.26/ext/Makefile.am ---- mysql-workbench-gpl-5.2.26/ext/Makefile.am.cppconn 2010-08-05 15:33:23.000000000 +0200 -+++ mysql-workbench-gpl-5.2.26/ext/Makefile.am 2010-08-07 08:11:56.907643461 +0200 -@@ -4,4 +4,4 @@ else - ctemplate_dirs=ctemplate - endif - --SUBDIRS=scintilla/gtk cppconn $(ctemplate_dirs) -+SUBDIRS=scintilla/gtk $(ctemplate_dirs) -diff -up mysql-workbench-gpl-5.2.26/ext/Makefile.in.cppconn mysql-workbench-gpl-5.2.26/ext/Makefile.in ---- mysql-workbench-gpl-5.2.26/ext/Makefile.in.cppconn 2010-08-05 15:33:32.000000000 +0200 -+++ mysql-workbench-gpl-5.2.26/ext/Makefile.in 2010-08-07 08:11:56.907643461 +0200 -@@ -53,7 +53,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re - distclean-recursive maintainer-clean-recursive - ETAGS = etags - CTAGS = ctags --DIST_SUBDIRS = scintilla/gtk cppconn ctemplate -+DIST_SUBDIRS = scintilla/gtk ctemplate - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -214,7 +214,7 @@ target_alias = @target_alias@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - @BUILD_CTEMPLATE_FALSE@ctemplate_dirs = ctemplate --SUBDIRS = scintilla/gtk cppconn $(ctemplate_dirs) -+SUBDIRS = scintilla/gtk $(ctemplate_dirs) - all: all-recursive - - .SUFFIXES: -diff -up mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp ---- mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn 2010-08-05 15:33:19.000000000 +0200 -+++ mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp 2010-08-07 08:11:56.907643461 +0200 -@@ -145,6 +145,8 @@ TunnelConnection *DriverManager::getTunn - ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, ConnectionInitSlot connection_init_slot) - { - TunnelConnection* tunnel = NULL; -+ gchar *p = NULL; -+ GModule *gmodule = NULL; - // 0. determine correct driver filename - - db_mgmt_DriverRef drv = connectionProperties->driver(); -@@ -154,21 +156,21 @@ ConnectionWrapper DriverManager::getConn - library = drv->driverLibraryName(); - else - throw SQLException("Invalid connection settings: undefined connection driver"); --#ifdef _WIN32 -- library.append(".dll"); --#elif defined(__APPLE__) -- library.append(".dylib"); --#else -- library.append(".so"); --#endif -+ -+ // Patch : use library in standard path -+ p = g_module_build_path (NULL, library.c_str()); - - // 1. find driver - -- GModule *gmodule= g_module_open((_driver_path + "/" + library).c_str(), G_MODULE_BIND_LOCAL); -+ if (p) { -+ gmodule = g_module_open(std::string(p).append(".5").c_str(), G_MODULE_BIND_LOCAL); -+ g_free(p); -+ } -+ - if (NULL == gmodule) - { - fprintf(stderr, "Error: %s", g_module_error()); -- throw SQLException(std::string("Database driver: Failed to open library '").append(_driver_path + "/" + library).append("'. Check settings.").c_str()); -+ throw SQLException(std::string("Database driver: Failed to open library '").append(library).append("'. Check settings.").c_str()); - } - - Driver *(* get_driver_instance)()= NULL; diff --git a/mysql-workbench-5.2.28-cppconn.patch b/mysql-workbench-5.2.28-cppconn.patch new file mode 100644 index 0000000..65d177f --- /dev/null +++ b/mysql-workbench-5.2.28-cppconn.patch @@ -0,0 +1,145 @@ +diff -up mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp +--- mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn 2010-09-20 19:11:07.100715204 +0200 ++++ mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2010-09-20 19:11:12.633514446 +0200 +@@ -47,7 +47,7 @@ + // this doesn't belong here, but there's no other workaround for having access to mysql_info + // because of that we also need to link wbprivate directly to the connector, making their + // dynamic loading pretty much useless +-#include ++#include + + #include "boost_smart_ptr_helpers.h" + +diff -up mysql-workbench-gpl-5.2.26/configure.in.cppconn mysql-workbench-gpl-5.2.26/configure.in +--- mysql-workbench-gpl-5.2.26/configure.in.cppconn 2010-08-05 15:33:27.000000000 +0200 ++++ mysql-workbench-gpl-5.2.26/configure.in 2010-08-07 08:11:56.906643649 +0200 +@@ -462,8 +462,6 @@ res/mysql.profiles/Makefile + res/sqlidedata/Makefile + ext/Makefile + ext/scintilla/gtk/Makefile +-ext/cppconn/Makefile +-ext/cppconn/driver/Makefile + backend/Makefile + backend/wbpublic/Makefile + backend/wbprivate/Makefile +diff -up mysql-workbench-gpl-5.2.26/ext/Makefile.am.cppconn mysql-workbench-gpl-5.2.26/ext/Makefile.am +--- mysql-workbench-gpl-5.2.26/ext/Makefile.am.cppconn 2010-08-05 15:33:23.000000000 +0200 ++++ mysql-workbench-gpl-5.2.26/ext/Makefile.am 2010-08-07 08:11:56.907643461 +0200 +@@ -4,4 +4,4 @@ else + ctemplate_dirs=ctemplate + endif + +-SUBDIRS=scintilla/gtk cppconn $(ctemplate_dirs) ++SUBDIRS=scintilla/gtk $(ctemplate_dirs) +diff -up mysql-workbench-gpl-5.2.26/ext/Makefile.in.cppconn mysql-workbench-gpl-5.2.26/ext/Makefile.in +--- mysql-workbench-gpl-5.2.26/ext/Makefile.in.cppconn 2010-08-05 15:33:32.000000000 +0200 ++++ mysql-workbench-gpl-5.2.26/ext/Makefile.in 2010-08-07 08:11:56.907643461 +0200 +@@ -53,7 +53,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re + distclean-recursive maintainer-clean-recursive + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = scintilla/gtk cppconn ctemplate ++DIST_SUBDIRS = scintilla/gtk ctemplate + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ +@@ -214,7 +214,7 @@ target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_CTEMPLATE_FALSE@ctemplate_dirs = ctemplate +-SUBDIRS = scintilla/gtk cppconn $(ctemplate_dirs) ++SUBDIRS = scintilla/gtk $(ctemplate_dirs) + all: all-recursive + + .SUFFIXES: +diff -up mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp +--- mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn 2010-08-05 15:33:19.000000000 +0200 ++++ mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp 2010-08-07 08:11:56.907643461 +0200 +@@ -145,6 +145,8 @@ TunnelConnection *DriverManager::getTunn + ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, ConnectionInitSlot connection_init_slot) + { + TunnelConnection* tunnel = NULL; ++ gchar *p = NULL; ++ GModule *gmodule = NULL; + // 0. determine correct driver filename + + db_mgmt_DriverRef drv = connectionProperties->driver(); +@@ -154,21 +156,21 @@ ConnectionWrapper DriverManager::getConn + library = drv->driverLibraryName(); + else + throw SQLException("Invalid connection settings: undefined connection driver"); +-#ifdef _WIN32 +- library.append(".dll"); +-#elif defined(__APPLE__) +- library.append(".dylib"); +-#else +- library.append(".so"); +-#endif ++ ++ // Patch : use library in standard path ++ p = g_module_build_path (NULL, library.c_str()); + + // 1. find driver + +- GModule *gmodule= g_module_open((_driver_path + "/" + library).c_str(), G_MODULE_BIND_LOCAL); ++ if (p) { ++ gmodule = g_module_open(std::string(p).append(".5").c_str(), G_MODULE_BIND_LOCAL); ++ g_free(p); ++ } ++ + if (NULL == gmodule) + { + fprintf(stderr, "Error: %s", g_module_error()); +- throw SQLException(std::string("Database driver: Failed to open library '").append(_driver_path + "/" + library).append("'. Check settings.").c_str()); ++ throw SQLException(std::string("Database driver: Failed to open library '").append(library).append("'. Check settings.").c_str()); + } + + Driver *(* get_driver_instance)()= NULL; +diff -up mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.am.cppconn mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.am +--- mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.am.cppconn 2010-09-20 22:02:44.930765082 +0200 ++++ mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.am 2010-09-20 22:03:42.489372852 +0200 +@@ -48,13 +48,11 @@ mysql_workbench_bin_LDADD=\ + $(top_srcdir)/library/base/src/libwbbase.la\ + $(top_srcdir)/library/grt/src/libgrt.la\ + $(top_srcdir)/library/dbc/libcdbc.la\ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ + $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\ + $(top_srcdir)/library/canvas/src/libmdcanvas.la\ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ + @CTEMPLATE_LIBS@\ + @GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\ +- -lX11 ++ -lmysqlcppconn -lX11 + + #precompiled.h.gch: precompiled.h + # $(CXXCOMPILE) precompiled.h -o precompiled.h.gch +diff -up mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.in.cppconn mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.in +--- mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.in.cppconn 2010-09-20 22:02:34.683084613 +0200 ++++ mysql-workbench-gpl-5.2.28-src/frontend/linux/workbench/Makefile.in 2010-09-20 22:03:30.266939988 +0200 +@@ -71,10 +71,8 @@ mysql_workbench_bin_DEPENDENCIES = \ + $(top_srcdir)/library/base/src/libwbbase.la \ + $(top_srcdir)/library/grt/src/libgrt.la \ + $(top_srcdir)/library/dbc/libcdbc.la \ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la \ + $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la \ +- $(top_srcdir)/library/canvas/src/libmdcanvas.la \ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la ++ $(top_srcdir)/library/canvas/src/libmdcanvas.la + binSCRIPT_INSTALL = $(INSTALL_SCRIPT) + SCRIPTS = $(bin_SCRIPTS) + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +@@ -305,13 +303,11 @@ mysql_workbench_bin_LDADD = \ + $(top_srcdir)/library/base/src/libwbbase.la\ + $(top_srcdir)/library/grt/src/libgrt.la\ + $(top_srcdir)/library/dbc/libcdbc.la\ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ + $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\ + $(top_srcdir)/library/canvas/src/libmdcanvas.la\ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ + @CTEMPLATE_LIBS@\ + @GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\ +- -lX11 ++ -lmysqlcppconn -lX11 + + mysql_workbench_bin_SOURCES = \ + main.cpp\ diff --git a/mysql-workbench-gpl-5.2.28-1fc13.spec b/mysql-workbench-gpl-5.2.28-1fc13.spec new file mode 100644 index 0000000..d3b6ea3 --- /dev/null +++ b/mysql-workbench-gpl-5.2.28-1fc13.spec @@ -0,0 +1,102 @@ +%if !%{defined version} +%define version 5.2.28 +%endif +%define release 1 +%define edition gpl + +Summary: A MySQL visual database modeling, administration and querying tool. +Name: mysql-workbench-%{edition} +Version: %{version} +Release: %{release}%{targos} +Group: Applications/Databases +Vendor: Oracle Corporation +License: GPL +URL: http://wb.mysql.com +Source: %{name}-%{version}-src.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: pcre-devel >= 3.9 +BuildRequires: libglade2-devel >= 2.0.0 +BuildRequires: lua-devel >= 5.1 +BuildRequires: libgnome-devel >= 2 +BuildRequires: automake autoconf libtool +BuildRequires: lua-devel +BuildRequires: libzip-devel libxml2-devel +BuildRequires: libglade2-devel +BuildRequires: readline-devel +BuildRequires: python-devel >= 2.4 +BuildRequires: gnome-keyring-devel +BuildRequires: boost-devel + +%if %_vendor == suse +BuildRequires: libmysqlclient-devel +BuildRequires: Mesa +%else +BuildRequires: mysql-devel >= 5.1 +%if !%{defined centos} +BuildRequires: uuid-devel +%endif +BuildRequires: gtkmm24-devel +BuildRequires: mesa-libGL-devel +%endif + +%if %_vendor == suse +Requires: python-paramiko python-pexpect +%else +Requires: python-paramiko pexpect +%endif +%if %{defined fc13} +Requires: python-sqlite2 +%endif +# requires mysql client pkg (for mysqldump and mysql cmdline client) +Requires: mysql gnome-keyring + +# our old package name +Obsoletes: mysql-workbench-oss +Conflicts: mysql-workbench-oss +Conflicts: mysql-workbench-com-se + +%description +MySQL Workbench is a modeling tool that allows you to design +and generate MySQL databases graphically. It also has administration +and query development modules where you can manage MySQL server instances +and execute SQL queries. + +%prep +%setup -q -n %{name}-%{version}-src + +%build + +NOCONFIGURE=yes ./autogen.sh +%configure --disable-debug +make + +%install +make install DESTDIR=%{buildroot} + +find %{buildroot}%{_libdir}/mysql-workbench -name \*.a -exec rm {} \; -print +find %{buildroot}%{_libdir}/mysql-workbench -name \*.la -exec rm {} \; -print + +%if %{defined centos} +for l in libpixman-1.so.0 libcairo.so.2 libatkmm-1.6.so.1 libcairomm-1.0.so.1 libgdkmm-2.4.so.1 libglibmm-2.4.so.1 libgtkmm-2.4.so.1 libpangomm-1.4.so.1 libzip.so.1 libsigc-2.0.so.0; do +cp %{_libdir}/$l %{buildroot}/%{_libdir}/mysql-workbench +/usr/sbin/prelink -u %{buildroot}/%{_libdir}/mysql-workbench/$l || true +done +%endif + +%clean +rm -rf %{buildroot} +rm -rf %{_builddir}/%{name}-%{version}-src + +%files +%defattr(0644, root, root, 0755) +%doc COPYING +%attr(0755,root,root) %{_bindir}/mysql-workbench +%attr(0755,root,root) %{_bindir}/mysql-workbench-bin +%dir %{_libdir}/mysql-workbench +%{_libdir}/mysql-workbench/* +%{_datadir}/applications/*.desktop +%dir %{_datadir}/mysql-workbench +%{_datadir}/mysql-workbench/* + +%changelog + diff --git a/mysql-workbench.spec b/mysql-workbench.spec index b7b16cf..7f81a5c 100644 --- a/mysql-workbench.spec +++ b/mysql-workbench.spec @@ -1,11 +1,11 @@ -#global postver b +%global postver -src %global tartype gpl -%global cppconnver 1.1.0-0.1.bzr888 +%global cppconnver 1.1.0-0.3.bzr895 Summary: A MySQL visual database modeling, administration and querying tool Name: mysql-workbench -Version: 5.2.27 -Release: 2%{?dist} +Version: 5.2.28 +Release: 1%{?dist} Group: Applications/Databases License: GPLv2 with exceptions @@ -17,10 +17,9 @@ Source: %{name}-%{tartype}-%{version}%{?postver}.tar.gz # don't build extension, use system one # !!! This patch use versioned soname !!! -Patch1: %{name}-5.2.26-cppconn.patch +Patch1: %{name}-5.2.28-cppconn.patch Patch2: %{name}-5.2.22-python.patch Patch3: %{name}-5.2.27-ctemplate.patch -Patch4: %{name}-5.2.27-dnl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pcre-devel >= 3.9 @@ -62,6 +61,7 @@ Requires: mysql-connector-c++ >= %{cppconnver} Conflicts: mysql-workbench-oss Conflicts: mysql-workbench-ce Conflicts: mysql-workbench-gpl +Conflicts: mysql-workbench-com-se %description @@ -80,7 +80,6 @@ an integrated tools environment for: %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 %patch3 -p1 -b .ctemplate %endif -%patch4 -p1 -b .dnl touch -r COPYING .timestamp4rpm %{__sed} -i -e 's/\r//g' COPYING @@ -148,6 +147,9 @@ update-desktop-database &> /dev/null || : %changelog +* Mon Sep 20 2010 Remi Collet 5.2.28-1 +- update to 5.2.28 Community (OSS) Edition (GPL) + * Sat Sep 18 2010 Remi Collet 5.2.27-2 - remove obsoleted configure options - add patch to completely remove ctemplate from build process -- cgit