X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fpkg%2Fmysql;h=9dbf7ad140748f58e4a8e09295ca97d53aa9ce1f;hb=0fc5131983e80de7e1e6abf98c8430736f4c9c16;hp=08d9f884da601a56aad5283f8a54f63d98555fc6;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage3/pkg/mysql b/stage3/pkg/mysql index 08d9f88..9dbf7ad 100644 --- a/stage3/pkg/mysql +++ b/stage3/pkg/mysql @@ -1,60 +1,58 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -groupadd -f mysql -hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql - -cd ${LFS_TMP}/${1} -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/sbin \ - --localstatedir=/srv/mysql \ - --enable-thread-safe-client \ - --enable-assembler \ - --enable-local-infile \ - --with-unix-socket-path=/var/run/mysql/mysql.sock \ - --without-debug \ - --without-readline \ - --with-plugins=innobase,myisam \ - --with-extra-charsets=all \ - --with-ssl -make -make benchdir_root=/tmp/mysql-bench install -rm -rf /tmp/mysql -cd /usr/lib -ln -v -sf mysql/libmysqlclient{,_r}.so* . - -# Copying default configuration file. -install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf -sed -i -e s/^skip-federated/#skip-federated/ /etc/my.cnf - -mysql_install_db --user=mysql -chgrp mysql /srv/mysql{,/test,/mysql} - -install -m750 -o mysql -g mysql -d /var/run/mysql - -# Further configuration requires that the MySQL server be running (see cis-postinstall) - -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 mysql 45 45 - -# Addition to /etc/ld.so.conf -string_add "/usr/lib/mysql" /etc/ld.so.conf - -ldconfig - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + groupadd -f mysql + hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --libexecdir=/usr/sbin \ + --localstatedir=/srv/mysql \ + --enable-thread-safe-client \ + --enable-assembler \ + --enable-local-infile \ + --with-unix-socket-path=/var/run/mysql/mysql.sock \ + --without-debug \ + --without-readline \ + --with-plugins=innobase,myisam \ + --with-extra-charsets=all \ + --with-ssl" +} + +hvbuild() +{ + make + make benchdir_root=/tmp/mysql-bench install +} + +hvbuild_post() +{ + rm -rf /tmp/mysql + cd /usr/lib + ln -v -sf mysql/libmysqlclient{,_r}.so* . + + # Copying default configuration file. + install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf + sed -i -e s/^skip-federated/#skip-federated/ /etc/my.cnf + + mysql_install_db --user=mysql + chgrp mysql /srv/mysql{,/test,/mysql} + + install -v -m750 -o mysql -g mysql -d /var/run/mysql + + # Further configuration requires that the MySQL server be running + # (see cis-postinstall) + + # Bootscript + install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d + + # script-name start stop + bootscript_add_rc3 mysql 45 45 + + # Addition to /etc/ld.so.conf + string_add "/usr/lib/mysql" /etc/ld.so.conf + + # Install Hv configuration script + install -v -m644 ${SCRDIR}/misc/hv-config-mysql /usr/local/bin +}