diff --git a/.travis.yml b/.travis.yml index 344637ad5e..c3132c70e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ install: - sudo apt-get update - sudo apt-get purge -y mysql-common - sudo apt-get install mariadb-server mariadb-common libmariadbclient-dev + - ./ci/fix-mariadb.sh + - wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb - sudo dpkg -i wkhtmltox-0.12.1_linux-precise-amd64.deb - CFLAGS=-O0 pip install git+https://github.com/frappe/frappe.git@v5.0 diff --git a/ci/fix-mariadb.sh b/ci/fix-mariadb.sh new file mode 100755 index 0000000000..886ec5e0d0 --- /dev/null +++ b/ci/fix-mariadb.sh @@ -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 diff --git a/ci/my_config.h.patch b/ci/my_config.h.patch new file mode 100644 index 0000000000..5247b5b39b --- /dev/null +++ b/ci/my_config.h.patch @@ -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 ) 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 +