<commit_before>#!/bin/bash
###########################################################################
# a2o Essential Puppet Modules                                            #
#-------------------------------------------------------------------------#
# Copyright (c) 2012 <NAME>                                       #
#-------------------------------------------------------------------------#
# This source file is subject to version 2.0 of the Apache License,       #
# that is bundled with this package in the file LICENSE, and is           #
# available through the world-wide-web at the following url:              #
# http://www.apache.org/licenses/LICENSE-2.0                              #
#-------------------------------------------------------------------------#
# Authors: <NAME> <my_name [at] a2o {dot} si>                     #
###########################################################################



### Compile directory
export SRCROOT="<%= compileDir %>" &&
mkdir -p $SRCROOT &&
cd $SRCROOT &&



### Set versions and directories
export PVERSION_MYSQL="<%= softwareVersion %>" &&
export PVERSION_MYSQL_MAJOR=`echo "$PVERSION_MYSQL" | cut -d. -f1,2` &&
export PDESTDIR="<%= destDir %>" &&
export PDESTDIR_OPENSSL="<%= externalDestDir_openssl %>" &&



### MySQL
# CheckURI: http://ftp.arnes.si/mysql/Downloads/
cd $SRCROOT && . /var/src/_functions.sh &&
export PNAME="mysql" &&
export PVERSION="$PVERSION_MYSQL" &&
export PDIR="$PNAME-$PVERSION" &&
export PFILE="$PDIR.tar.gz" &&
export PURI="http://cdn.mysql.com/Downloads/MySQL-$PVERSION_MYSQL_MAJOR/$PFILE" &&

rm -rf $PDIR &&
GetUnpackCd &&

./configure --prefix=$PDESTDIR --with-sysconfdir=/etc/mysql \
  --with-charset=utf8 --with-collation=utf8_general_ci \
  --with-unix-socket-path=/var/mysql/run/mysql.sock \
  --with-mysqld-user=mysql \
  --with-ssl=$PDESTDIR_OPENSSL \
  --with-plugin-heap \
  --with-plugin-innobase \
  --with-plugin-myisam &&
# This is currently not required, see here at the bottom:
# http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html#option_configure_with-plugins
#  --with-plugins=partition,archive,blackhole,csv,federated,heap,innobase,myisam,myisammrg \
make -j 2 &&
make install &&

cd $SRCROOT &&
rm -rf $PDIR


<commit_msg>Mysql: Fixed install script, compiles on multiple platforms now<commit_after>#!/bin/bash
###########################################################################
# a2o Essential Puppet Modules                                            #
#-------------------------------------------------------------------------#
# Copyright (c) 2012 <NAME>                                       #
#-------------------------------------------------------------------------#
# This source file is subject to version 2.0 of the Apache License,       #
# that is bundled with this package in the file LICENSE, and is           #
# available through the world-wide-web at the following url:              #
# http://www.apache.org/licenses/LICENSE-2.0                              #
#-------------------------------------------------------------------------#
# Authors: <NAME> <my_name [at] a2o {dot} si>                     #
###########################################################################



### Compile directory
export SRCROOT="<%= compileDir %>" &&
mkdir -p $SRCROOT &&
cd $SRCROOT &&



### Set versions and directories
export PVERSION_MYSQL="<%= softwareVersion %>" &&
export PVERSION_MYSQL_MAJOR=`echo "$PVERSION_MYSQL" | cut -d. -f1,2` &&
export PDESTDIR="<%= destDir %>" &&
export PDESTDIR_OPENSSL="<%= externalDestDir_openssl %>" &&



### MySQL
# CheckURI: http://ftp.arnes.si/mysql/Downloads/
cd $SRCROOT && . /var/src/_functions.sh &&
export PNAME="mysql" &&
export PVERSION="$PVERSION_MYSQL" &&
export PDIR="$PNAME-$PVERSION" &&
export PFILE="$PDIR.tar.gz" &&
export PURI="http://cdn.mysql.com/Downloads/MySQL-$PVERSION_MYSQL_MAJOR/$PFILE" &&

rm -rf $PDIR &&
GetUnpackCd &&

# Does not compile on Ubuntu without these, bug 38324
export CCFLAGS="-I$PDESTDIR_OPENSSL/include" &&
export CPPFLAGS="-I$PDESTDIR_OPENSSL/include"  &&
export CXXFLAGS="-I$PDESTDIR_OPENSSL/include" &&

./configure --prefix=$PDESTDIR --with-sysconfdir=/etc/mysql \
  --with-charset=utf8 --with-collation=utf8_general_ci \
  --with-unix-socket-path=/var/mysql/run/mysql.sock \
  --with-mysqld-user=mysql \
  --with-ssl=$PDESTDIR_OPENSSL \
  --with-plugin-heap \
  --with-plugin-innobase \
  --with-plugin-myisam &&
# This is currently not required, see here at the bottom:
# http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html#option_configure_with-plugins
#  --with-plugins=partition,archive,blackhole,csv,federated,heap,innobase,myisam,myisammrg \
make -j 2 &&
make install &&

cd $SRCROOT &&
rm -rf $PDIR



{'fraction_non_alphanumeric': 0.28559463986599665, 'fraction_numerical': 0.008165829145728644, 'mean_word_length': 2.2809065934065935, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2890290', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1399, 'n_words': 285}