diff --git a/bench/cli.py b/bench/cli.py index 9dcb8707..a16d90e5 100644 --- a/bench/cli.py +++ b/bench/cli.py @@ -380,12 +380,6 @@ config.add_command(config_http_timeout) def patch(): pass -@click.command('mariadb-config') -def _patch_mariadb_config(): - "patch MariaDB 5.5.40" - repo_dir = os.path.dirname(__file__) - exec_cmd(os.path.join(repo_dir, 'patches', 'fix-mariadb.sh'), cwd=os.path.join(repo_dir, 'patches')) - @click.command('fix-perms') def _fix_perms(): if os.path.exists("config/supervisor.conf"): @@ -419,7 +413,6 @@ def _fix_perms(): exec_cmd("supervisorctl reload") -patch.add_command(_patch_mariadb_config) patch.add_command(_fix_perms) #Bench commands diff --git a/bench/patches/fix-mariadb.sh b/bench/patches/fix-mariadb.sh deleted file mode 100755 index 47fad4d5..00000000 --- a/bench/patches/fix-mariadb.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e - - -# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837 -includedir=`mysql_config --variable=pkgincludedir` -thiscwd=`pwd` -_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"` -if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then - cd $includedir - sudo patch -p1 < $thiscwd/my_config.h.patch &> /dev/null - sudo touch $includedir-$_THIS_DB_VERSION-fixed.log -fi diff --git a/bench/patches/my_config.h.patch b/bench/patches/my_config.h.patch deleted file mode 100644 index 5247b5b3..00000000 --- a/bench/patches/my_config.h.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -burp a/my_config.h b/my_config.h ---- a/my_config.h 2014-10-09 19:32:46.000000000 -0400 -+++ b/my_config.h 2014-10-09 19:35:12.000000000 -0400 -@@ -641,17 +641,4 @@ - #define SIZEOF_TIME_T 8 - /* #undef TIME_T_UNSIGNED */ - --/* -- stat structure (from ) is conditionally defined -- to have different layout and size depending on the defined macros. -- The correct macro is defined in my_config.h, which means it MUST be -- included first (or at least before - so, practically, -- before including any system headers). -- -- __GLIBC__ is defined in --*/ --#ifdef __GLIBC__ --#error MUST be included first! --#endif -- - #endif - diff --git a/bench/utils.py b/bench/utils.py index e199669f..52d8993a 100644 --- a/bench/utils.py +++ b/bench/utils.py @@ -66,6 +66,7 @@ def exec_cmd(cmd, cwd='.'): def setup_env(bench='.'): exec_cmd('virtualenv -q {} -p {}'.format('env', sys.executable), cwd=bench) exec_cmd('./env/bin/pip -q install wheel', cwd=bench) + exec_cmd('./env/bin/pip -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz', cwd=bench) def setup_procfile(bench='.'): with open(os.path.join(bench, 'Procfile'), 'w') as f: diff --git a/install_scripts/setup_frappe.sh b/install_scripts/setup_frappe.sh index d04981cb..1bf1a217 100644 --- a/install_scripts/setup_frappe.sh +++ b/install_scripts/setup_frappe.sh @@ -310,8 +310,6 @@ install_bench() { exit 1 fi run_cmd sudo $PIP install -e /home/$FRAPPE_USER/bench-repo - # temp MariaDB fix - sudo bench patch mariadb-config } setup_bench() {