mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 15:38:25 +00:00
add patch for MariaDB 5.5.40
This commit is contained in:
parent
a23f944c2e
commit
ef6a59f5ad
13
bench/cli.py
13
bench/cli.py
@ -326,6 +326,18 @@ config.add_command(config_dns_multitenant)
|
||||
config.add_command(config_serve_default_site)
|
||||
config.add_command(config_http_timeout)
|
||||
|
||||
|
||||
@click.group()
|
||||
def patch():
|
||||
pass
|
||||
|
||||
@click.command('mariadb-config')
|
||||
def _patch_mariadb_config():
|
||||
"patch MariaDB 5.5.40"
|
||||
exec_cmd(os.path.join(os.path.dirname(__file__), 'patches', 'fix-mariadb.sh'))
|
||||
|
||||
patch.add_command(_patch_mariadb_config)
|
||||
|
||||
#Bench commands
|
||||
|
||||
bench.add_command(init)
|
||||
@ -345,3 +357,4 @@ bench.add_command(_backup_all_sites)
|
||||
bench.add_command(_backup_site)
|
||||
bench.add_command(_prime_wheel_cache)
|
||||
bench.add_command(_release)
|
||||
bench.add_command(patch)
|
||||
|
11
bench/patches/fix-mariadb.sh
Executable file
11
bench/patches/fix-mariadb.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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/ci/my_config.h.patch &> /dev/null
|
||||
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
|
||||
fi
|
22
bench/patches/my_config.h.patch
Normal file
22
bench/patches/my_config.h.patch
Normal file
@ -0,0 +1,22 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user