Updated MySQL (cmake)
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 29 Jan 2013 22:11:27 +0000 (17:11 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 2 Feb 2013 02:30:55 +0000 (21:30 -0500)
config/dependencies
config/packages-list
stage3/hv-install-1
stage3/packages-update
stage3/pkg/cmake [new file with mode: 0644]
stage3/pkg/mysql

index 3cceb7e..4df6cc6 100644 (file)
@@ -166,3 +166,6 @@ ${WEBKIT}: ${GPERF} ${GSTREAMER} ${ICU} ${LIBXSLT} ${LIBSOUP} ${MESALIB} \
 ${VALA}: ${GLIB}
 
 ${MIDORI}: ${WEBKIT} ${VALA} ${LIBNOTIFY} ${LIBRSVG}
+
+${CMAKE}: ${LIBARCHIVE}
+${MYSQL}: ${CMAKE}
index 2f652f2..4edf987 100644 (file)
@@ -42,6 +42,7 @@ CKERMIT="ckermit-8.0.211"
 CHORDPACK="chordpack-0.8.2"
 CLAMAV="clamav-0.97.5"
 CLOOG="cloog-0.16.3"
+CMAKE="cmake-2.8.10"
 COLORDIFF="colordiff-1.0.10"
 COREUTILS="coreutils-8.16"
 CPIO="cpio-2.11"
@@ -191,6 +192,7 @@ LFS_BOOTSCRIPTS="lfs-bootscripts-20070813"
 LIBA52="a52dec-0.7.4"
 LIBART="libart_lgpl-2.3.21"
 BOOST="boost_1_51_0"
+LIBARCHIVE="libarchive-3.0.4"
 LIBCROCO="libcroco-0.6.6"
 LIBDVDCSS="libdvdcss-1.2.12"
 LIBDVDREAD="libdvdread-4.2.0"
@@ -259,7 +261,7 @@ MPC="mpc-0.9"
 MPFR="mpfr-3.1.0"
 MSMTP="msmtp-1.4.29"
 MUTT="mutt-1.5.21"
-MYSQL="mysql-5.5.27"
+MYSQL="mysql-5.5.28"
 
 NANO="nano-2.2.6"
 NASM="nasm-2.10.04"
index a23118e..143216c 100755 (executable)
@@ -64,9 +64,9 @@ ipkg ${CURL}
 ipkg ${RSYNC}
 ipkg -m noac ${GETDATE}
 
-if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then
-    ipkg ${MYSQL}
-fi
+ipkg -m acnb ${LIBARCHIVE} "--disable-static"
+ipkg -m acnb ${CMAKE}
+ipkg -m acnb ${MYSQL}
 
 # Archiving
 ipkg -m noac ${ZIP}
index dee5563..27ba1cb 100755 (executable)
@@ -50,6 +50,10 @@ fpkg ${IPTABLES} "http://www.netfilter.org/projects/iptables/files"
 fpkg ${CURL} "http://curl.haxx.se/download"
 fpkg -e "tar.gz" ${RSYNC} "http://samba.org/ftp/rsync/src"
 fpkg -m hv ${GETDATE}
+
+fpkg -e "tar.gz" ${LIBARCHIVE} "http://github.com/downloads/libarchive/libarchive"
+fpkg -e "tar.gz" ${CMAKE} "http://www.cmake.org/files/v$(get_pkg_ver2 ${CMAKE})"
+
 fpkg -e "tar.gz" ${MYSQL} \
     "http://anduin.linuxfromscratch.org/sources/BLFS/svn/m"
 fpkg -f "zip$(get_pkg_ver ${ZIP} | sed 's!\.!!g')" -s "infozip" \
diff --git a/stage3/pkg/cmake b/stage3/pkg/cmake
new file mode 100644 (file)
index 0000000..5a8da49
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+hvconfig()
+{
+    cd ${LFS_TMP}/${PACKAGE}
+
+    ./bootstrap --prefix=/usr \
+        --system-libs \
+        --mandir=/share/man
+}
index 9dbf7ad..e1d59bd 100644 (file)
@@ -4,42 +4,65 @@ hvconfig_pre()
 {
     groupadd -f mysql
     hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql
+}
+
+hvconfig()
+{
+    cd ${LFS_TMP}/${PACKAGE}
+
+    mkdir build
+    cd build
 
-    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"
+    cmake -DCMAKE_INSTALL_PREFIX=/usr                   \
+        -DINSTALL_DOCDIR=share/doc/mysql              \
+        -DINSTALL_DOCREADMEDIR=share/doc/mysql        \
+        -DINSTALL_INCLUDEDIR=include/mysql            \
+        -DINSTALL_INFODIR=share/info                  \
+        -DINSTALL_MANDIR=share/man                    \
+        -DINSTALL_MYSQLDATADIR=/srv/mysql             \
+        -DINSTALL_MYSQLSHAREDIR=share/mysql           \
+        -DINSTALL_MYSQLTESTDIR=share/mysql/test       \
+        -DINSTALL_PLUGINDIR=lib/mysql                 \
+        -DINSTALL_SBINDIR=sbin                        \
+        -DINSTALL_SCRIPTDIR=bin                       \
+        -DINSTALL_SQLBENCHDIR=share/mysql/bench       \
+        -DINSTALL_SUPPORTFILESDIR=share/mysql/support \
+        -DMYSQL_DATADIR=/srv/mysql                    \
+        -DMYSQL_UNIX_ADDR=/var/run/mysql/mysql.sock   \
+        -DSYSCONFDIR=/etc                             \
+        -DWITH_PARTITION_STORAGE_ENGINE=OFF           \
+        -DWITH_PERFSCHEMA_STORAGE_ENGINE=OFF          \
+        -DWITH_READLINE=system                        \
+        -DWITH_SSL=system                             \
+        ..
 }
 
 hvbuild()
 {
     make
-    make benchdir_root=/tmp/mysql-bench install
+
+    SEGMENTS="Client Server IniFiles ManPages SharedLibraries"
+    SEGMENTS="$SEGMENTS Development Documentation Info Readme"
+
+    for segment in $SEGMENTS; do
+        cmake -DCMAKE_INSTALL_COMPONENT=$segment -P cmake_install.cmake
+    done
+
+    unset SEGMENTS
 }
 
 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/support/my-medium.cnf /etc/my.cnf
 
-    # 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
+    # Ensure binary logs are disabled:
+    sed -i 's/^log-bin/#log-bin/' /etc/my.cnf
 
-    mysql_install_db --user=mysql
+    mysql_install_db --basedir=/usr --datadir=/srv/mysql --user=mysql
     chgrp mysql /srv/mysql{,/test,/mysql}
 
-    install -v -m750 -o mysql -g mysql -d /var/run/mysql
+    install -v -m755 -o mysql -g mysql -d /var/run/mysql
 
     # Further configuration requires that the MySQL server be running
     # (see cis-postinstall)