nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/frontend/linux/workbench/mysql-workbench.in b/frontend/linux/workbench/mysql-workbench.in
2index cbecde4..ea5d3cc 100755
3--- a/frontend/linux/workbench/mysql-workbench.in
4+++ b/frontend/linux/workbench/mysql-workbench.in
5@@ -100,8 +100,8 @@ fi
6 if test "$WB_DEBUG" != ""; then
7 $WB_DEBUG $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
8 else
9- if type -p catchsegv > /dev/null; then
10- catchsegv $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
11+ if type -p @catchsegv@ > /dev/null; then
12+ @catchsegv@ $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
13 else
14 $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
15 fi
16diff --git a/plugins/migration/frontend/migration_bulk_copy_data.py b/plugins/migration/frontend/migration_bulk_copy_data.py
17index da6aa9f..9f4fe78 100644
18--- a/plugins/migration/frontend/migration_bulk_copy_data.py
19+++ b/plugins/migration/frontend/migration_bulk_copy_data.py
20@@ -111,7 +111,7 @@ class ImportScriptLinux(ImportScript):
21 return 'sh'
22
23 def generate_import_script(self, connection_args, path_to_file, schema_name):
24- output = ['#!/bin/bash']
25+ output = ['#!/usr/bin/env bash']
26 output.append(r'MYPATH=\`pwd\`')
27
28 output.append(r'if [ -f \$MYPATH/%s ] ; then' % self.error_log_name)
29@@ -165,7 +165,7 @@ class ImportScriptDarwin(ImportScript):
30 return 'sh'
31
32 def generate_import_script(self, connection_args, path_to_file, schema_name):
33- output = ['#!/bin/bash']
34+ output = ['#!/usr/bin/env bash']
35 output.append(r'MYPATH=\`pwd\`')
36
37 output.append(r'if [ -f \$MYPATH/%s ] ; then' % self.error_log_name)
38@@ -418,7 +418,7 @@ class DataCopyScriptLinux(DataCopyScript):
39
40 with open(script_path, 'w+') as f:
41 os.chmod(script_path, 0o700)
42- f.write('#!/bin/bash\n\n')
43+ f.write('#!/usr/bin/env bash\n\n')
44 f.write('MYPATH=`pwd`\n')
45
46 f.write("arg_source_password=\"<put source password here>\"\n")
47@@ -522,7 +522,7 @@ class DataCopyScriptDarwin(DataCopyScript):
48
49 with open(script_path, 'w+') as f:
50 os.chmod(script_path, 0o700)
51- f.write('#!/bin/bash\n\n')
52+ f.write('#!/usr/bin/env bash\n\n')
53 f.write('MYPATH=`pwd`\n')
54
55 f.write("arg_source_password=\"<put source password here>\"\n")
56diff --git a/plugins/wb.admin/backend/wb_server_control.py b/plugins/wb.admin/backend/wb_server_control.py
57index 353f461..f7daa9e 100644
58--- a/plugins/wb.admin/backend/wb_server_control.py
59+++ b/plugins/wb.admin/backend/wb_server_control.py
60@@ -40,7 +40,7 @@ import re
61
62 UnixVariant = {
63 "" : {
64- 'sudo_command' : "/usr/bin/sudo -k -S -p EnterPasswordHere ",
65+ 'sudo_command' : "@sudo@ -k -S -p EnterPasswordHere ",
66 }
67 }
68
69diff --git a/plugins/wb.admin/backend/wb_server_management.py b/plugins/wb.admin/backend/wb_server_management.py
70index 40ed515..00da327 100644
71--- a/plugins/wb.admin/backend/wb_server_management.py
72+++ b/plugins/wb.admin/backend/wb_server_management.py
73@@ -41,7 +41,7 @@ default_sudo_prefix = ''
74
75 def reset_sudo_prefix():
76 global default_sudo_prefix
77- default_sudo_prefix = '/usr/bin/sudo -k -S -p EnterPasswordHere'
78+ default_sudo_prefix = '@sudo@ -k -S -p EnterPasswordHere'
79
80 reset_sudo_prefix()
81
82@@ -101,7 +101,7 @@ def wrap_for_sudo(command, sudo_prefix, as_user = Users.ADMIN, to_spawn = False)
83
84 if to_spawn:
85 command += ' &'
86- sudo_prefix += ' /usr/bin/nohup'
87+ sudo_prefix += ' @coreutils@/bin/nohup'
88
89 # If as_user is the CURRENT then there's no need to sudo
90 if as_user != Users.CURRENT:
91@@ -112,7 +112,7 @@ def wrap_for_sudo(command, sudo_prefix, as_user = Users.ADMIN, to_spawn = False)
92 if '/bin/sh' in sudo_prefix or '/bin/bash' in sudo_prefix:
93 command = "LANG=C " + sudo_prefix + " \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
94 else:
95- command = "LANG=C " + sudo_prefix + " /bin/bash -c \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
96+ command = "LANG=C " + sudo_prefix + " @bash@ -c \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
97
98 return command
99
100@@ -879,9 +879,9 @@ class FileOpsLinuxBase(object):
101 @useAbsPath("path")
102 def get_file_owner(self, path, as_user = Users.CURRENT, user_password = None):
103 if self.target_os == wbaOS.linux:
104- command = 'LC_ALL=C stat -c %U '
105+ command = 'LC_ALL=C @coreutils@/bin/stat -c %U '
106 else:
107- command = 'LC_ALL=C /usr/bin/stat -f "%Su" '
108+ command = 'LC_ALL=C @coreutils@/bin/stat -f "%Su" '
109
110 output = io.StringIO()
111 command = command + quote_path(path)
112@@ -905,9 +905,9 @@ class FileOpsLinuxBase(object):
113 if as_user == Users.CURRENT:
114 raise PermissionDeniedError("Cannot set owner of directory %s" % path)
115 else:
116- command = "/bin/mkdir %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
117+ command = "@coreutils@/bin/mkdir %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
118 else:
119- command = "/bin/mkdir %s" % (quote_path(path))
120+ command = "@coreutils@/bin/mkdir %s" % (quote_path(path))
121
122 res = self.process_ops.exec_cmd(command,
123 as_user = as_user,
124@@ -936,7 +936,7 @@ class FileOpsLinuxBase(object):
125 @useAbsPath("path")
126 def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
127 output = io.StringIO()
128- res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
129+ res = self.process_ops.exec_cmd('@coreutils@/bin/rmdir ' + quote_path(path),
130 as_user = as_user,
131 user_password = user_password,
132 output_handler = output.write,
133@@ -949,7 +949,7 @@ class FileOpsLinuxBase(object):
134 @useAbsPath("path")
135 def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
136 output = io.StringIO()
137- res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
138+ res = self.process_ops.exec_cmd('@coreutils@/bin/rm -R ' + quote_path(path),
139 as_user = as_user,
140 user_password = user_password,
141 output_handler = output.write,
142@@ -962,7 +962,7 @@ class FileOpsLinuxBase(object):
143 @useAbsPath("path")
144 def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
145 output = io.StringIO()
146- res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
147+ res = self.process_ops.exec_cmd("@coreutils@/bin/rm " + quote_path(path),
148 as_user = as_user,
149 user_password = user_password,
150 output_handler = output.write,
151@@ -1010,7 +1010,7 @@ class FileOpsLinuxBase(object):
152 def _copy_file(self, source, dest, as_user = Users.CURRENT, user_password = None):
153 output = io.StringIO()
154
155- res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
156+ res = self.process_ops.exec_cmd("LC_ALL=C @coreutils@/bin/cp " + quote_path(source) + " " + quote_path(dest),
157 as_user = as_user,
158 user_password = user_password,
159 output_handler = output.write,
160@@ -1086,9 +1086,9 @@ class FileOpsLinuxBase(object):
161 # for ls -l, the output format changes depending on stdout being a terminal or not
162 # since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
163 # the good news is that if the line is there, then it will always start with total, regardless of the locale
164- command = 'LC_ALL=C /bin/ls -l -p %s' % quote_path(path)
165+ command = 'LC_ALL=C @coreutils@/bin/ls -l -p %s' % quote_path(path)
166 else:
167- command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
168+ command = 'LC_ALL=C @coreutils@/bin/ls -1 -p %s' % quote_path(path)
169
170 output = io.StringIO()
171 res = self.process_ops.exec_cmd(command,
172@@ -2164,9 +2164,9 @@ class SudoTailInputFile(object):
173 def get_range(self, start, end):
174 f = io.StringIO()
175 if not self._need_sudo:
176- 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)
177+ ret = self.server_helper.execute_command("@coreutils@/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)
178 else:
179- 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.ADMIN, user_password=self.get_password, output_handler=f.write)
180+ ret = self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
181
182 if ret != 0:
183 raise RuntimeError("Could not get data from file %s" % self.path)
184@@ -2174,9 +2174,9 @@ class SudoTailInputFile(object):
185
186 def read_task(self, offset, file):
187 if not self._need_sudo:
188- 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=file.write)
189+ self.server_helper.execute_command("@coreutils@/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=file.write)
190 else:
191- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
192+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
193 # this will signal the reader end that there's no more data
194 file.close()
195
196@@ -2203,9 +2203,9 @@ class SudoTailInputFile(object):
197 self._pos = offset
198 f = io.StringIO()
199 if not self._need_sudo:
200- 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)
201+ self.server_helper.execute_command("@coreutils@/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)
202 else:
203- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
204+ self.server_helper.execute_command("@coreutils@/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
205 self.data = f
206 self.data.seek(0)
207 if self.skip_first_newline: