summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mysql-workbench-5.2.41-nodocs.patch67
-rw-r--r--mysql-workbench.spec23
-rwxr-xr-xstripdocs.sh33
3 files changed, 117 insertions, 6 deletions
diff --git a/mysql-workbench-5.2.41-nodocs.patch b/mysql-workbench-5.2.41-nodocs.patch
new file mode 100644
index 0000000..ce1db8e
--- /dev/null
+++ b/mysql-workbench-5.2.41-nodocs.patch
@@ -0,0 +1,67 @@
+diff -up mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am.nodocs mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am
+--- mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am.nodocs 2012-08-11 17:57:08.216320706 +0200
++++ mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am 2012-08-11 18:01:21.206082661 +0200
+@@ -2,11 +2,5 @@
+ pylibdir=$(libdir)/@PACKAGE@/modules
+
+ pylib_DATA=\
+- mysqldoclib.py\
+ wb_doclib_grt.py
+
+-docdatadir=$(datadir)/mysql-workbench/modules/data/DocLibrary
+-docdata_DATA=\
+-res/DocLibrary/mysqldoclib.sqlite\
+-res/DocLibrary/mysqldoclib_webui.sqlite
+-
+diff -up mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py
+--- mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs 2012-08-11 17:56:09.271140967 +0200
++++ mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py 2012-08-11 17:56:18.259168247 +0200
+@@ -91,47 +91,7 @@ server_port = None
+ def openDocLib():
+ global docLibTab
+ global server_port
+- if docLibTab:
+- if docLibTab is True: # this will be True if an external browser is used
+- Utilities.open_url("http://localhost:%i"%server_port)
+- return 1
+- App.get().select_view("wb.doclib")
+- return 1
+-
+- app = App.get()
+-
+- try:
+- import mysqldoclib
+- except ImportError:
+- Utilities.show_error("Cannot Open Documentation Library",
+- '''pysqlite2 is not installed, please install python-sqlite2 or pysqlite2 to be able to use this feature.
+-Try running "easy_install pysqlite" with superuser privileges in the command line shell or, if using
+-Ubuntu, enable the Universe repository and install the python-pysqlite2 package from there.''',
+- "OK", "", "")
+- return 0
+-
+- if server_port is None:
+- ready_event = Event()
+-
+- #datadir = "./modules/data/DocLibrary/"
+- datadir = os.path.join(app.get_resource_path(""), "modules/data/DocLibrary")
+-
+- thread.start_new_thread(run_server, (datadir, ready_event))
+-
+- # wait up to 1s for the doclib server to start
+- ready_event.wait(1)
+-
+- if platform.system() == "Linux":
+- docLibTab = True
+- Utilities.open_url("http://localhost:%i"%server_port)
+- return 1
+- docLibTab = DocLibTab(server_port)
+- docLibTab.set_identifier("wb.doclib")
+-
+- app.dock_view(docLibTab, "maintab")
+- app.set_view_title(docLibTab, "Doc Library (loading)")
+-
+- app.set_status_text("Opening Doc Library...")
+
++ Utilities.open_url("http://dev.mysql.com/doc/index-gui.html")
+ return 1
+
diff --git a/mysql-workbench.spec b/mysql-workbench.spec
index 3c1960a..4cf5f2c 100644
--- a/mysql-workbench.spec
+++ b/mysql-workbench.spec
@@ -11,15 +11,18 @@
Summary: A MySQL visual database modeling, administration and querying tool
Name: mysql-workbench
Version: 5.2.41
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Applications/Databases
License: GPLv2 with exceptions
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}-%{tarversion}.tar.gz
+
+# The upstream tarball includes non-free documentation that we cannot ship.
+# To remove the non-free documentation, run this script after downloading
+# the tarball into the current directory:
+# ./stripdocs.sh $VERSION
+Source0: %{name}-nodocs-%{version}.tar.xz
+Source1: stripdocs.sh
# don't build extension, use system one
# !!! This patch use versioned soname (libmysqlcppconn.so.6) !!!
@@ -31,6 +34,9 @@ Patch4: %{name}-5.2.41-antlr.patch
# http://bugs.mysql.com/63705
Patch5: %{name}-5.2.41-glib.patch
+# don't use bundled documentation, redirect to online doc
+Patch9: %{name}-5.2.41-nodocs.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pcre-devel >= 3.9
BuildRequires: libglade2-devel >= 2.0.0
@@ -81,7 +87,7 @@ Requires: mysql-utilities
# requires mysql client pkg (for mysqldump and mysql cmdline client)
Requires: mysql%{?_isa}
Requires: gnome-keyring%{?_isa}
-# For migration wizard (2.1.18 expected, but not yet available)
+# For migration wizard (2.1.18 prefered, but not yet available)
# see https://bugzilla.redhat.com/847440
Requires: pyodbc%{?_isa}
%if 0%{?cppconnver:1}
@@ -133,6 +139,7 @@ rm -rf ext/antlr-runtime
%endif
%patch5 -p1 -b .glib
+%patch9 -p1 -b .nodocs
touch -r COPYING .timestamp4rpm
sed -i -e 's/\r//g' COPYING
@@ -222,6 +229,10 @@ fi
%changelog
+* Sat Aug 11 2012 Remi Collet <remi@fedoraproject.org> 5.2.41-2
+- remove bundled documentation, redirect to online
+ This documentation is NOT distributed under a GPL license
+
* Sun Aug 05 2012 Remi Collet <remi@fedoraproject.org> 5.2.41-1
- update to 5.2.41 Community (OSS) Edition (GPL)
http://dev.mysql.com/doc/workbench/en/wb-news-5-2-41.html
diff --git a/stripdocs.sh b/stripdocs.sh
new file mode 100755
index 0000000..d37a850
--- /dev/null
+++ b/stripdocs.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+if [ "$1" = "" ]; then
+ echo usage $0 version
+ exit 1
+fi
+
+if [ ! -f mysql-workbench-gpl-$1-src.tar.gz ]; then
+ echo please download mysql-workbench-gpl-$1-src.tar.gz
+ echo from http://www.mysql.com/downloads/workbench/
+ exit 1
+fi
+
+tdir=`mktemp -d tmpXXXXXX`
+pushd $tdir
+
+echo -n "unpacking..."
+tar xzf ../mysql-workbench-gpl-$1-src.tar.gz && echo " done"
+rm -rf mysql-workbench-gpl-$1-src/plugins/wb.doclib/res/DocLibrary
+echo -n "packing..."
+tar cJf ../mysql-workbench-nodocs-$1.tar.xz mysql-workbench-gpl-$1-src && echo " done"
+
+echo -n "diffing..."
+tar tzf ../mysql-workbench-gpl-$1-src.tar.gz | sort >before
+echo -n "..."
+tar tJf ../mysql-workbench-nodocs-$1.tar.xz | sort >after
+
+diff before after
+
+popd
+echo "cleaning..."
+rm -rf $tdir
+