Unverified Commit db3f2b35 authored by Thiago Kenji Okada's avatar Thiago Kenji Okada Committed by GitHub
Browse files

Merge pull request #191174 from dotNox/mysql-workbench

mysql-workbench: 8.0.21 -> 8.0.30
parents fa9edd9d 06b42827
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
, gtkmm3
, pcre
, swig
, antlr4_8
, antlr4_9
, sudo
, mysql
, libxml2
@@ -23,7 +23,7 @@
, libzip
, libsecret
, libssh
, python2
, python3
, jre
, boost
, libsigcxx
@@ -43,14 +43,14 @@
}:

let
  inherit (python2.pkgs) paramiko pycairo pyodbc;
  inherit (python3.pkgs) paramiko pycairo pyodbc;
in stdenv.mkDerivation rec {
  pname = "mysql-workbench";
  version = "8.0.21";
  version = "8.0.30";

  src = fetchurl {
    url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
    sha256 = "0rqgr1dcbf6yp60hninbw5dnwykx5ngbyhhx0sbhgv0m0cq5a44h";
    sha256 = "d094b391760948f42a3b879e8473040ae9bb26991eced482eb982a52c8ff8185";
  };

  patches = [
@@ -67,6 +67,7 @@ in stdenv.mkDerivation rec {
      nohup = "${coreutils}/bin/nohup";
      rm = "${coreutils}/bin/rm";
      rmdir = "${coreutils}/bin/rmdir";
      stat = "${coreutils}/bin/stat";
      sudo = "${sudo}/bin/sudo";
    })

@@ -78,10 +79,12 @@ in stdenv.mkDerivation rec {
    })
  ];

  # have it look for 4.7.2 instead of 4.7.1
  # 1. have it look for 4.9.3 instead of 4.9.1
  # 2. for some reason CMakeCache.txt is part of source code
  preConfigure = ''
    substituteInPlace CMakeLists.txt \
      --replace "antlr-4.7.1-complete.jar" "antlr-4.8-complete.jar"
      --replace "antlr-4.9.1-complete.jar" "antlr-4.9.3-complete.jar"
    rm -f build/CMakeCache.txt
  '';

  nativeBuildInputs = [
@@ -97,8 +100,8 @@ in stdenv.mkDerivation rec {
    gtk3
    gtkmm3
    libX11
    antlr4_8.runtime.cpp
    python2
    antlr4_9.runtime.cpp
    python3
    mysql
    libxml2
    libmysqlconnectorcpp
@@ -143,10 +146,10 @@ in stdenv.mkDerivation rec {
  cmakeFlags = [
    "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
    "-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
    "-DWITH_ANTLR_JAR=${antlr4_8.jarLocation}"
    # mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
    # Newer versions of connector still provide the legacy library when enabled
    # but the headers are in a different location.
    "-DWITH_ANTLR_JAR=${antlr4_9.jarLocation}"
    "-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
  ];

@@ -156,7 +159,7 @@ in stdenv.mkDerivation rec {

  preFixup = ''
    gappsWrapperArgs+=(
      --prefix PATH : "${python2}/bin"
      --prefix PATH : "${python3}/bin"
      --prefix PROJSO : "${proj}/lib/libproj.so"
      --set PYTHONPATH $PYTHONPATH
    )
+43 −27
Original line number Diff line number Diff line
--- a/frontend/linux/workbench/mysql-workbench.in
+++ b/frontend/linux/workbench/mysql-workbench.in
@@ -99,8 +99,8 @@
diff -u -r a/frontend/linux/workbench/mysql-workbench.in b/frontend/linux/workbench/mysql-workbench.in
--- a/frontend/linux/workbench/mysql-workbench.in	2022-03-25 09:06:06.000000000 +0200
+++ b/frontend/linux/workbench/mysql-workbench.in	2022-06-17 00:22:51.290117109 +0300
@@ -100,8 +100,8 @@
 if test "$WB_DEBUG" != ""; then
   $WB_DEBUG $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
 else
@@ -11,8 +12,9 @@
   else
   $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
   fi
--- a/plugins/migration/frontend/migration_bulk_copy_data.py
+++ b/plugins/migration/frontend/migration_bulk_copy_data.py
diff -u -r a/plugins/migration/frontend/migration_bulk_copy_data.py b/plugins/migration/frontend/migration_bulk_copy_data.py
--- a/plugins/migration/frontend/migration_bulk_copy_data.py	2022-03-25 09:06:06.000000000 +0200
+++ b/plugins/migration/frontend/migration_bulk_copy_data.py	2022-06-17 00:13:29.430055453 +0300
@@ -110,7 +110,7 @@
         return 'sh'
 
@@ -34,7 +36,7 @@
@@ -417,7 +417,7 @@
     
         with open(script_path, 'w+') as f:
             os.chmod(script_path, 0700)
             os.chmod(script_path, 0o700)
-            f.write('#!/bin/bash\n\n')
+            f.write('#!/usr/bin/env bash\n\n')
             f.write('MYPATH=`pwd`\n')
@@ -43,14 +45,15 @@
@@ -521,7 +521,7 @@
     
         with open(script_path, 'w+') as f:
             os.chmod(script_path, 0700)
             os.chmod(script_path, 0o700)
-            f.write('#!/bin/bash\n\n')
+            f.write('#!/usr/bin/env bash\n\n')
             f.write('MYPATH=`pwd`\n')
             
             f.write("arg_source_password=\"<put source password here>\"\n")
--- a/plugins/wb.admin/backend/wb_server_control.py
+++ b/plugins/wb.admin/backend/wb_server_control.py
diff -u -r a/plugins/wb.admin/backend/wb_server_control.py b/plugins/wb.admin/backend/wb_server_control.py
--- a/plugins/wb.admin/backend/wb_server_control.py	2022-03-25 09:06:06.000000000 +0200
+++ b/plugins/wb.admin/backend/wb_server_control.py	2022-06-17 00:14:26.937905324 +0300
@@ -39,7 +39,7 @@
 
 UnixVariant = {
@@ -60,8 +63,9 @@
     }
 }
 
--- a/plugins/wb.admin/backend/wb_server_management.py
+++ b/plugins/wb.admin/backend/wb_server_management.py
diff -u -r a/plugins/wb.admin/backend/wb_server_management.py b/plugins/wb.admin/backend/wb_server_management.py
--- a/plugins/wb.admin/backend/wb_server_management.py	2022-03-25 09:06:06.000000000 +0200
+++ b/plugins/wb.admin/backend/wb_server_management.py	2022-06-17 00:18:58.034028354 +0300
@@ -40,7 +40,7 @@
 
 def reset_sudo_prefix():
@@ -89,7 +93,19 @@
 
     return command
 
@@ -896,9 +896,9 @@
@@ -878,9 +878,9 @@
     @useAbsPath("path")
     def get_file_owner(self, path, as_user = Users.CURRENT, user_password = None):
         if self.target_os == wbaOS.linux:
-          command = 'LC_ALL=C stat -c %U '
+          command = 'LC_ALL=C @stat@ -c %U '
         else:
-          command = 'LC_ALL=C /usr/bin/stat -f "%Su" '
+          command = 'LC_ALL=C @stat@ -f "%Su" '
       
         output = io.StringIO()
         command = command + quote_path(path)
@@ -904,9 +904,9 @@
             if as_user == Users.CURRENT:
                 raise PermissionDeniedError("Cannot set owner of directory %s" % path)        
             else:
@@ -101,43 +117,43 @@
             
         res = self.process_ops.exec_cmd(command,
                                         as_user   = as_user,
@@ -927,7 +927,7 @@
@@ -935,7 +935,7 @@
     @useAbsPath("path")
     def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
         output = StringIO.StringIO()
         output = io.StringIO()
-        res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
+        res = self.process_ops.exec_cmd('@rmdir@ ' + quote_path(path),
                                         as_user   = as_user,
                                         user_password = user_password,
                                         output_handler = output.write,
@@ -940,7 +940,7 @@
@@ -948,7 +948,7 @@
     @useAbsPath("path")
     def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
         output = StringIO.StringIO()
         output = io.StringIO()
-        res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
+        res = self.process_ops.exec_cmd('@rm@ -R ' + quote_path(path),
                                         as_user   = as_user,
                                         user_password = user_password,
                                         output_handler = output.write,
@@ -953,7 +953,7 @@
@@ -961,7 +961,7 @@
     @useAbsPath("path")
     def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
         output = StringIO.StringIO()
         output = io.StringIO()
-        res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
+        res = self.process_ops.exec_cmd("@rm@ " + quote_path(path),
                                         as_user   = as_user,
                                         user_password = user_password,
                                         output_handler = output.write,
@@ -1001,7 +1001,7 @@
@@ -1009,7 +1009,7 @@
     def _copy_file(self, source, dest, as_user = Users.CURRENT, user_password = None):
         output = StringIO.StringIO()
         output = io.StringIO()
         
-        res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
+        res = self.process_ops.exec_cmd("LC_ALL=C @cp@ " + quote_path(source) + " " + quote_path(dest),
                       as_user   = as_user,
                       user_password = user_password,
                       output_handler = output.write,
@@ -1077,9 +1077,9 @@
@@ -1085,9 +1085,9 @@
             # for ls -l, the output format changes depending on stdout being a terminal or not
             # since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
             # the good news is that if the line is there, then it will always start with total, regardless of the locale
@@ -147,11 +163,11 @@
-            command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
+            command = 'LC_ALL=C @ls@ -1 -p %s' % quote_path(path)
             
         output = StringIO.StringIO()
         output = io.StringIO()
         res = self.process_ops.exec_cmd(command,
@@ -2160,9 +2160,9 @@
@@ -2163,9 +2163,9 @@
     def get_range(self, start, end):
         f = StringIO.StringIO()
         f = io.StringIO()
         if not self._need_sudo:
-            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)
+            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,7 +177,7 @@
 
         if ret != 0:
             raise RuntimeError("Could not get data from file %s" % self.path)
@@ -2170,9 +2170,9 @@
@@ -2173,9 +2173,9 @@
 
     def read_task(self, offset, file):
         if not self._need_sudo:
@@ -173,9 +189,9 @@
         # this will signal the reader end that there's no more data
         file.close()
 
@@ -2198,9 +2198,9 @@
@@ -2202,9 +2202,9 @@
         self._pos = offset
         f = StringIO.StringIO()
         f = io.StringIO()
         if not self._need_sudo:
-            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)
+            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)