2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

Merge pull request #76 from frappe/fix-maridb-patch

Fix maridb patch
This commit is contained in:
Pratik Vyas 2014-11-19 12:06:44 +05:30
commit ae1992f625
5 changed files with 1 additions and 44 deletions

View File

@ -380,12 +380,6 @@ config.add_command(config_http_timeout)
def patch(): def patch():
pass 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') @click.command('fix-perms')
def _fix_perms(): def _fix_perms():
if os.path.exists("config/supervisor.conf"): if os.path.exists("config/supervisor.conf"):
@ -419,7 +413,6 @@ def _fix_perms():
exec_cmd("supervisorctl reload") exec_cmd("supervisorctl reload")
patch.add_command(_patch_mariadb_config)
patch.add_command(_fix_perms) patch.add_command(_fix_perms)
#Bench commands #Bench commands

View File

@ -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

View File

@ -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 <sys/stat.h>) 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 <features.h> - so, practically,
- before including any system headers).
-
- __GLIBC__ is defined in <features.h>
-*/
-#ifdef __GLIBC__
-#error <my_config.h> MUST be included first!
-#endif
-
#endif

View File

@ -66,6 +66,7 @@ def exec_cmd(cmd, cwd='.'):
def setup_env(bench='.'): def setup_env(bench='.'):
exec_cmd('virtualenv -q {} -p {}'.format('env', sys.executable), cwd=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 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='.'): def setup_procfile(bench='.'):
with open(os.path.join(bench, 'Procfile'), 'w') as f: with open(os.path.join(bench, 'Procfile'), 'w') as f:

View File

@ -310,8 +310,6 @@ install_bench() {
exit 1 exit 1
fi fi
run_cmd sudo $PIP install -e /home/$FRAPPE_USER/bench-repo run_cmd sudo $PIP install -e /home/$FRAPPE_USER/bench-repo
# temp MariaDB fix
sudo bench patch mariadb-config
} }
setup_bench() { setup_bench() {