X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-mysql;h=7256041bc75add8e3968a3b6ba7d13aa9deaa6f0;hb=2f337c932e5c659d31b4860d4414dde540cb74bb;hp=f89ac65bfd11e2a7b30f58c98429c5e089975cd3;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-mysql b/stage3/cis-mysql index f89ac65..7256041 100755 --- a/stage3/cis-mysql +++ b/stage3/cis-mysql @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,16 +8,14 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd mysql && -hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql && +hv_groupadd mysql +hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql -cd ${LFS_TMP}/${1} && -CPPFLAGS="-D_GNU_SOURCE" ./configure \ +cd ${LFS_TMP}/${1} +./configure \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ @@ -23,36 +23,38 @@ CPPFLAGS="-D_GNU_SOURCE" ./configure \ --enable-thread-safe-client \ --enable-assembler \ --enable-local-infile \ - --with-named-thread-libs=-lpthread \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --without-debug \ - --without-bench \ - --without-readline && -make testdir=/usr/lib/mysql/mysql-test && -make testdir=/usr/lib/mysql/mysql-test install && -cd /usr/lib && -ln -sf mysql/libmysqlclient{,_r}.so* . && + --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. -cp /usr/share/mysql/my-medium.cnf /etc/my.cnf && +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} && +mysql_install_db --user=mysql +chgrp mysql /srv/mysql{,/test,/mysql} -install -m750 -o mysql -g mysql -d /var/run/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 ${CUR_DIR}/bootscripts/mysql /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d # script-name start stop -bootscript_add_rc3 mysql 45 45 && +bootscript_add_rc3 mysql 45 45 # Addition to /etc/ld.so.conf -string_add "/usr/lib/mysql" /etc/ld.so.conf && +string_add "/usr/lib/mysql" /etc/ld.so.conf ldconfig -# Return last error exit $?