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