tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mysql-workbench: 8.0.21 -> 8.0.30
Maxim Ianoglo
3 years ago
06b42827
4f293b20
+57
-38
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
mysql-workbench
default.nix
hardcode-paths.patch
+14
-11
pkgs/applications/misc/mysql-workbench/default.nix
···
9
, gtkmm3
10
, pcre
11
, swig
12
-
, antlr4_8
13
, sudo
14
, mysql
15
, libxml2
···
23
, libzip
24
, libsecret
25
, libssh
26
-
, python2
27
, jre
28
, boost
29
, libsigcxx
···
42
}:
43
44
let
45
-
inherit (python2.pkgs) paramiko pycairo pyodbc;
46
in stdenv.mkDerivation rec {
47
pname = "mysql-workbench";
48
-
version = "8.0.21";
49
50
src = fetchurl {
51
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
52
-
sha256 = "0rqgr1dcbf6yp60hninbw5dnwykx5ngbyhhx0sbhgv0m0cq5a44h";
53
};
54
55
patches = [
···
66
nohup = "${coreutils}/bin/nohup";
67
rm = "${coreutils}/bin/rm";
68
rmdir = "${coreutils}/bin/rmdir";
0
69
sudo = "${sudo}/bin/sudo";
70
})
71
···
77
})
78
];
79
80
-
# have it look for 4.7.2 instead of 4.7.1
0
81
preConfigure = ''
82
substituteInPlace CMakeLists.txt \
83
-
--replace "antlr-4.7.1-complete.jar" "antlr-4.8-complete.jar"
0
84
'';
85
86
nativeBuildInputs = [
···
96
gtk3
97
gtkmm3
98
libX11
99
-
antlr4_8.runtime.cpp
100
-
python2
101
mysql
102
libxml2
103
libmysqlconnectorcpp
···
141
cmakeFlags = [
142
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
143
"-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
144
-
"-DWITH_ANTLR_JAR=${antlr4_8.jarLocation}"
145
# mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
146
# Newer versions of connector still provide the legacy library when enabled
147
# but the headers are in a different location.
0
148
"-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
149
];
150
···
154
155
preFixup = ''
156
gappsWrapperArgs+=(
157
-
--prefix PATH : "${python2}/bin"
158
--prefix PROJSO : "${proj}/lib/libproj.so"
159
--set PYTHONPATH $PYTHONPATH
160
)
···
9
, gtkmm3
10
, pcre
11
, swig
12
+
, antlr4_9
13
, sudo
14
, mysql
15
, libxml2
···
23
, libzip
24
, libsecret
25
, libssh
26
+
, python3
27
, jre
28
, boost
29
, libsigcxx
···
42
}:
43
44
let
45
+
inherit (python3.pkgs) paramiko pycairo pyodbc;
46
in stdenv.mkDerivation rec {
47
pname = "mysql-workbench";
48
+
version = "8.0.30";
49
50
src = fetchurl {
51
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
52
+
sha256 = "d094b391760948f42a3b879e8473040ae9bb26991eced482eb982a52c8ff8185";
53
};
54
55
patches = [
···
66
nohup = "${coreutils}/bin/nohup";
67
rm = "${coreutils}/bin/rm";
68
rmdir = "${coreutils}/bin/rmdir";
69
+
stat = "${coreutils}/bin/stat";
70
sudo = "${sudo}/bin/sudo";
71
})
72
···
78
})
79
];
80
81
+
# 1. have it look for 4.9.3 instead of 4.9.1
82
+
# 2. for some reason CMakeCache.txt is part of source code
83
preConfigure = ''
84
substituteInPlace CMakeLists.txt \
85
+
--replace "antlr-4.9.1-complete.jar" "antlr-4.9.3-complete.jar"
86
+
rm -f build/CMakeCache.txt
87
'';
88
89
nativeBuildInputs = [
···
99
gtk3
100
gtkmm3
101
libX11
102
+
antlr4_9.runtime.cpp
103
+
python3
104
mysql
105
libxml2
106
libmysqlconnectorcpp
···
144
cmakeFlags = [
145
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
146
"-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
0
147
# mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
148
# Newer versions of connector still provide the legacy library when enabled
149
# but the headers are in a different location.
150
+
"-DWITH_ANTLR_JAR=${antlr4_9.jarLocation}"
151
"-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
152
];
153
···
157
158
preFixup = ''
159
gappsWrapperArgs+=(
160
+
--prefix PATH : "${python3}/bin"
161
--prefix PROJSO : "${proj}/lib/libproj.so"
162
--set PYTHONPATH $PYTHONPATH
163
)
+43
-27
pkgs/applications/misc/mysql-workbench/hardcode-paths.patch
···
1
-
--- a/frontend/linux/workbench/mysql-workbench.in
2
-
+++ b/frontend/linux/workbench/mysql-workbench.in
3
-
@@ -99,8 +99,8 @@
0
4
if test "$WB_DEBUG" != ""; then
5
$WB_DEBUG $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
6
else
···
11
else
12
$MWB_BINARIES_DIR/mysql-workbench-bin "$@"
13
fi
14
-
--- a/plugins/migration/frontend/migration_bulk_copy_data.py
15
-
+++ b/plugins/migration/frontend/migration_bulk_copy_data.py
0
16
@@ -110,7 +110,7 @@
17
return 'sh'
18
···
34
@@ -417,7 +417,7 @@
35
36
with open(script_path, 'w+') as f:
37
-
os.chmod(script_path, 0700)
38
- f.write('#!/bin/bash\n\n')
39
+ f.write('#!/usr/bin/env bash\n\n')
40
f.write('MYPATH=`pwd`\n')
···
43
@@ -521,7 +521,7 @@
44
45
with open(script_path, 'w+') as f:
46
-
os.chmod(script_path, 0700)
47
- f.write('#!/bin/bash\n\n')
48
+ f.write('#!/usr/bin/env bash\n\n')
49
f.write('MYPATH=`pwd`\n')
50
51
f.write("arg_source_password=\"<put source password here>\"\n")
52
-
--- a/plugins/wb.admin/backend/wb_server_control.py
53
-
+++ b/plugins/wb.admin/backend/wb_server_control.py
0
54
@@ -39,7 +39,7 @@
55
56
UnixVariant = {
···
60
}
61
}
62
63
-
--- a/plugins/wb.admin/backend/wb_server_management.py
64
-
+++ b/plugins/wb.admin/backend/wb_server_management.py
0
65
@@ -40,7 +40,7 @@
66
67
def reset_sudo_prefix():
···
89
90
return command
91
92
-
@@ -896,9 +896,9 @@
0
0
0
0
0
0
0
0
0
0
0
0
93
if as_user == Users.CURRENT:
94
raise PermissionDeniedError("Cannot set owner of directory %s" % path)
95
else:
···
101
102
res = self.process_ops.exec_cmd(command,
103
as_user = as_user,
104
-
@@ -927,7 +927,7 @@
105
@useAbsPath("path")
106
def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
107
-
output = StringIO.StringIO()
108
- res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
109
+ res = self.process_ops.exec_cmd('@rmdir@ ' + quote_path(path),
110
as_user = as_user,
111
user_password = user_password,
112
output_handler = output.write,
113
-
@@ -940,7 +940,7 @@
114
@useAbsPath("path")
115
def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
116
-
output = StringIO.StringIO()
117
- res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
118
+ res = self.process_ops.exec_cmd('@rm@ -R ' + quote_path(path),
119
as_user = as_user,
120
user_password = user_password,
121
output_handler = output.write,
122
-
@@ -953,7 +953,7 @@
123
@useAbsPath("path")
124
def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
125
-
output = StringIO.StringIO()
126
- res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
127
+ res = self.process_ops.exec_cmd("@rm@ " + quote_path(path),
128
as_user = as_user,
129
user_password = user_password,
130
output_handler = output.write,
131
-
@@ -1001,7 +1001,7 @@
132
def _copy_file(self, source, dest, as_user = Users.CURRENT, user_password = None):
133
-
output = StringIO.StringIO()
134
135
- res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
136
+ res = self.process_ops.exec_cmd("LC_ALL=C @cp@ " + quote_path(source) + " " + quote_path(dest),
137
as_user = as_user,
138
user_password = user_password,
139
output_handler = output.write,
140
-
@@ -1077,9 +1077,9 @@
141
# for ls -l, the output format changes depending on stdout being a terminal or not
142
# since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
143
# the good news is that if the line is there, then it will always start with total, regardless of the locale
···
147
- command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
148
+ command = 'LC_ALL=C @ls@ -1 -p %s' % quote_path(path)
149
150
-
output = StringIO.StringIO()
151
res = self.process_ops.exec_cmd(command,
152
-
@@ -2160,9 +2160,9 @@
153
def get_range(self, start, end):
154
-
f = StringIO.StringIO()
155
if not self._need_sudo:
156
- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
157
+ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
···
161
162
if ret != 0:
163
raise RuntimeError("Could not get data from file %s" % self.path)
164
-
@@ -2170,9 +2170,9 @@
165
166
def read_task(self, offset, file):
167
if not self._need_sudo:
···
173
# this will signal the reader end that there's no more data
174
file.close()
175
176
-
@@ -2198,9 +2198,9 @@
177
self._pos = offset
178
-
f = StringIO.StringIO()
179
if not self._need_sudo:
180
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
181
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
···
1
+
diff -u -r a/frontend/linux/workbench/mysql-workbench.in b/frontend/linux/workbench/mysql-workbench.in
2
+
--- a/frontend/linux/workbench/mysql-workbench.in 2022-03-25 09:06:06.000000000 +0200
3
+
+++ b/frontend/linux/workbench/mysql-workbench.in 2022-06-17 00:22:51.290117109 +0300
4
+
@@ -100,8 +100,8 @@
5
if test "$WB_DEBUG" != ""; then
6
$WB_DEBUG $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
7
else
···
12
else
13
$MWB_BINARIES_DIR/mysql-workbench-bin "$@"
14
fi
15
+
diff -u -r a/plugins/migration/frontend/migration_bulk_copy_data.py b/plugins/migration/frontend/migration_bulk_copy_data.py
16
+
--- a/plugins/migration/frontend/migration_bulk_copy_data.py 2022-03-25 09:06:06.000000000 +0200
17
+
+++ b/plugins/migration/frontend/migration_bulk_copy_data.py 2022-06-17 00:13:29.430055453 +0300
18
@@ -110,7 +110,7 @@
19
return 'sh'
20
···
36
@@ -417,7 +417,7 @@
37
38
with open(script_path, 'w+') as f:
39
+
os.chmod(script_path, 0o700)
40
- f.write('#!/bin/bash\n\n')
41
+ f.write('#!/usr/bin/env bash\n\n')
42
f.write('MYPATH=`pwd`\n')
···
45
@@ -521,7 +521,7 @@
46
47
with open(script_path, 'w+') as f:
48
+
os.chmod(script_path, 0o700)
49
- f.write('#!/bin/bash\n\n')
50
+ f.write('#!/usr/bin/env bash\n\n')
51
f.write('MYPATH=`pwd`\n')
52
53
f.write("arg_source_password=\"<put source password here>\"\n")
54
+
diff -u -r a/plugins/wb.admin/backend/wb_server_control.py b/plugins/wb.admin/backend/wb_server_control.py
55
+
--- a/plugins/wb.admin/backend/wb_server_control.py 2022-03-25 09:06:06.000000000 +0200
56
+
+++ b/plugins/wb.admin/backend/wb_server_control.py 2022-06-17 00:14:26.937905324 +0300
57
@@ -39,7 +39,7 @@
58
59
UnixVariant = {
···
63
}
64
}
65
66
+
diff -u -r a/plugins/wb.admin/backend/wb_server_management.py b/plugins/wb.admin/backend/wb_server_management.py
67
+
--- a/plugins/wb.admin/backend/wb_server_management.py 2022-03-25 09:06:06.000000000 +0200
68
+
+++ b/plugins/wb.admin/backend/wb_server_management.py 2022-06-17 00:18:58.034028354 +0300
69
@@ -40,7 +40,7 @@
70
71
def reset_sudo_prefix():
···
93
94
return command
95
96
+
@@ -878,9 +878,9 @@
97
+
@useAbsPath("path")
98
+
def get_file_owner(self, path, as_user = Users.CURRENT, user_password = None):
99
+
if self.target_os == wbaOS.linux:
100
+
- command = 'LC_ALL=C stat -c %U '
101
+
+ command = 'LC_ALL=C @stat@ -c %U '
102
+
else:
103
+
- command = 'LC_ALL=C /usr/bin/stat -f "%Su" '
104
+
+ command = 'LC_ALL=C @stat@ -f "%Su" '
105
+
106
+
output = io.StringIO()
107
+
command = command + quote_path(path)
108
+
@@ -904,9 +904,9 @@
109
if as_user == Users.CURRENT:
110
raise PermissionDeniedError("Cannot set owner of directory %s" % path)
111
else:
···
117
118
res = self.process_ops.exec_cmd(command,
119
as_user = as_user,
120
+
@@ -935,7 +935,7 @@
121
@useAbsPath("path")
122
def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
123
+
output = io.StringIO()
124
- res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
125
+ res = self.process_ops.exec_cmd('@rmdir@ ' + quote_path(path),
126
as_user = as_user,
127
user_password = user_password,
128
output_handler = output.write,
129
+
@@ -948,7 +948,7 @@
130
@useAbsPath("path")
131
def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
132
+
output = io.StringIO()
133
- res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
134
+ res = self.process_ops.exec_cmd('@rm@ -R ' + quote_path(path),
135
as_user = as_user,
136
user_password = user_password,
137
output_handler = output.write,
138
+
@@ -961,7 +961,7 @@
139
@useAbsPath("path")
140
def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
141
+
output = io.StringIO()
142
- res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
143
+ res = self.process_ops.exec_cmd("@rm@ " + quote_path(path),
144
as_user = as_user,
145
user_password = user_password,
146
output_handler = output.write,
147
+
@@ -1009,7 +1009,7 @@
148
def _copy_file(self, source, dest, as_user = Users.CURRENT, user_password = None):
149
+
output = io.StringIO()
150
151
- res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
152
+ res = self.process_ops.exec_cmd("LC_ALL=C @cp@ " + quote_path(source) + " " + quote_path(dest),
153
as_user = as_user,
154
user_password = user_password,
155
output_handler = output.write,
156
+
@@ -1085,9 +1085,9 @@
157
# for ls -l, the output format changes depending on stdout being a terminal or not
158
# since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
159
# the good news is that if the line is there, then it will always start with total, regardless of the locale
···
163
- command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
164
+ command = 'LC_ALL=C @ls@ -1 -p %s' % quote_path(path)
165
166
+
output = io.StringIO()
167
res = self.process_ops.exec_cmd(command,
168
+
@@ -2163,9 +2163,9 @@
169
def get_range(self, start, end):
170
+
f = io.StringIO()
171
if not self._need_sudo:
172
- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
173
+ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
···
177
178
if ret != 0:
179
raise RuntimeError("Could not get data from file %s" % self.path)
180
+
@@ -2173,9 +2173,9 @@
181
182
def read_task(self, offset, file):
183
if not self._need_sudo:
···
189
# this will signal the reader end that there's no more data
190
file.close()
191
192
+
@@ -2202,9 +2202,9 @@
193
self._pos = offset
194
+
f = io.StringIO()
195
if not self._need_sudo:
196
- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
197
+ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)