r8931 - in trunk: BOOK BOOK/introduction/welcome BOOK/server/databases bootscripts/blfs/init.d

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Tue Nov 1 22:08:38 PDT 2011


Author: bdubbs
Date: 2011-11-01 23:08:32 -0600 (Tue, 01 Nov 2011)
New Revision: 8931

Modified:
   trunk/BOOK/general.ent
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/BOOK/server/databases/mysql.xml
   trunk/bootscripts/blfs/init.d/mysql
   trunk/bootscripts/blfs/init.d/vsftpd
Log:
Update to mysql-5.5.17.
Update vsftpd boot script.


Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2011-11-01 17:39:25 UTC (rev 8930)
+++ trunk/BOOK/general.ent	2011-11-02 05:08:32 UTC (rev 8931)
@@ -56,7 +56,7 @@
 <!ENTITY lfs-vim-version              "7.3">
 <!-- End LFS versions -->
 
-<!ENTITY blfs-bootscripts-version     "20111028">
+<!ENTITY blfs-bootscripts-version     "20111101">
 <!ENTITY blfs-bootscripts-download    "&downloads-root;/blfs-bootscripts-&blfs-bootscripts-version;.tar.bz2">
 
 <!ENTITY blfs-wiki                    "http://wiki.&lfs-domainname;/blfs/wiki">
@@ -500,7 +500,7 @@
 <!-- Chapter 23 -->
 
 <!ENTITY db-version                   "5.2.36">
-<!ENTITY mysql-version                "5.1.52">
+<!ENTITY mysql-version                "5.5.17">
 <!ENTITY postgresql-version           "9.0.1">
 <!ENTITY sqlite-version               "3.7.8">
 

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml	2011-11-01 17:39:25 UTC (rev 8930)
+++ trunk/BOOK/introduction/welcome/changelog.xml	2011-11-02 05:08:32 UTC (rev 8931)
@@ -45,6 +45,9 @@
       <para>November 1st, 2011</para>
       <itemizedlist>
         <listitem>
+          <para>[bdubbs] - Update to mysql-5.5.17.</para>
+        </listitem>
+        <listitem>
           <para>[bdubbs] - Minor changes to Python sections.</para>
         </listitem>
         <listitem>

Modified: trunk/BOOK/server/databases/mysql.xml
===================================================================
--- trunk/BOOK/server/databases/mysql.xml	2011-11-01 17:39:25 UTC (rev 8930)
+++ trunk/BOOK/server/databases/mysql.xml	2011-11-02 05:08:32 UTC (rev 8931)
@@ -4,14 +4,12 @@
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
 
-  <!-- <!ENTITY mysql-download-http "http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz">
-  <!ENTITY mysql-download-ftp  "ftp://ftp.fu-berlin.de/unix/databases/mysql/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz"> -->
   <!ENTITY mysql-download-http "&sources-anduin-http;/m/mysql-&mysql-version;.tar.gz">
   <!ENTITY mysql-download-ftp  "&sources-anduin-ftp;/m/mysql-&mysql-version;.tar.gz">
-  <!ENTITY mysql-md5sum        "43c11ad3dded693393c4815d24e2b0a5">
-  <!ENTITY mysql-size          "23.8 MB">
-  <!ENTITY mysql-buildsize     "500 MB (additional 200 MB to run the test suite)">
-  <!ENTITY mysql-time          "5.3 SBU (Test suite is an additional 55 minutes, only partially CPU dependent)">
+  <!ENTITY mysql-md5sum        "dcb6a06e68c5e8f30f57b15300730c9c">
+  <!ENTITY mysql-size          "23 MB">
+  <!ENTITY mysql-buildsize     "883 MB (additional 170 MB to run the test suite)">
+  <!ENTITY mysql-time          "3.9 SBU (Test suite is an additional 45 minutes, only partially CPU dependent)">
 ]>
 
 <sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
@@ -68,11 +66,6 @@
     <bridgehead renderas="sect3">Additional Downloads</bridgehead>
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Required Patch:
-          <ulink url="&patch-root;/mysql-&mysql-version;-makefile-1.patch"/>
-        </para>
-       </listitem>
-      <listitem>
         <para>Optional Documentation (see tip below):
           <ulink url="http://dev.mysql.com/doc/"/>
         </para>
@@ -81,17 +74,16 @@
 
     <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
 
+    <bridgehead renderas="sect4">Required</bridgehead>
+    <para role="optional"><xref linkend="cmake"/></para>
+
     <bridgehead renderas="sect4">Recommended</bridgehead>
     <para role="optional"><xref linkend="openssl"/></para>
 
     <bridgehead renderas="sect4">Optional</bridgehead>
-    <para role="optional"><xref linkend="tcpwrappers"/></para>
+    <para role="optional"><xref linkend="tcpwrappers"/>, 
+    <ulink url="http://packages.debian.org/squeeze/libaio-dev">libaio</ulink></para>
 
-    <!-- Removing libedit because it causes more problems than it solves.
-
-    <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
-    (as an alternative to readline)-->
-
     <para condition="html" role="usernotes">User Notes:
     <ulink url="&blfs-wiki;/mysql"/></para>
 
@@ -107,30 +99,43 @@
 useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false -u 40 mysql</userinput></screen>
 
     <note><para>There are a great many options available to
-    <userinput>./configure</userinput>.  Check the output of the
-    <option>--help</option> option for additional customization
-    options.</para></note>
+    <userinput>cmake</userinput>.  Check the output of the `<userinput>cmake .
+    -LH</userinput>` for additional customization options.  See ithe <ulink
+    url="http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html">MySQL
+    Documentation</ulink> for a full listing of all options.</para></note>
 
     <para>Build and install <application>MySQL</application> by
     running the following commands:</para>
 
-<screen><userinput>patch -Np1 -i ../mysql-&mysql-version;-makefile-1.patch &&
-CFLAGS="-O3" \
-CXX=gcc      \
-CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
-./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=/usr &&
+<screen><userinput>cmake .                                     \
+   -DSYSCONFDIR=/etc                           \
+   -DMYSQL_DATADIR=/srv/mysql                  \
+   -DINSTALL_MYSQLDATADIR=/srv/mysql           \
+   -DCMAKE_INSTALL_PREFIX=/usr                 \
+   -DINSTALL_BINDIR=bin                        \
+   -DINSTALL_SBINDIR=sbin                      \
+   -DINSTALL_DOCDIR=share/doc/mysql            \
+   -DINSTALL_DOCREADMEDIR=share/doc/mysql      \
+   -DINSTALL_INCLUDEDIR=include/mysql          \
+   -DINSTALL_INFODIR=share/info                \
+   -DINSTALL_LIBDIR=lib                        \
+   -DINSTALL_MANDIR=share/man                  \
+   -DINSTALL_MYSQLSHAREDIR=share/mysql         \
+   -DINSTALL_MYSQLTESTDIR=share/mysql-test     \
+   -DINSTALL_PLUGINDIR=lib/plugin              \
+   -DINSTALL_SCRIPTDIR=bin                     \
+   -DINSTALL_SHAREDIR=share/mysql              \
+   -DINSTALL_SQLBENCHDIR=share/mysql-bench     \
+   -DINSTALL_SUPPORTFILESDIR=share/mysql/support-files \
+   -DWITH_ZLIB=system                          \
+   -DWITH_SSL=system                           \
+   -DWITH_READLINE=system                      \
+   -DMYSQL_UNIX_ADDR=/var/run/mysql/mysql.sock \
+   -DWITH_ARCHIVE_STORAGE_ENGINE=1             \
+   -DWITH_FEDERATED_STORAGE_ENGINE=1           \
+   -DWITH_BLACKHOLE_STORAGE_ENGINE=1           \
+   -DMYSQL_MAINTAINER_MODE=OFF                 \
+   -DWITH_DEBUG=OFF                            &&
 make</userinput></screen>
 
     <para>To test the results, issue: <command>make test-force 2>&1 | tee
@@ -143,22 +148,19 @@
     <command>mysqld</command> daemon. Otherwise many of the tests will
     fail.</para>
 
+    <note><para>The ssl tests may fail due to expired certifictes.</para></note>
+
     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
 
-<screen role="root"><userinput>make benchdir_root=/tmp \
-          testroot=/tmp install &&
-rm -rf /tmp/mysql-test /tmp/sql-bench &&
-pushd /usr/lib &&
-ln -v -sf mysql/libmysqlclient{,_r}.so* . &&
-popd &&
+<screen role="root"><userinput>SEGMENTS="Client Server IniFiles ManPages"
+SEGMENTS="$SEGMENTS Development Documentation Info Readme"
 
-pushd /usr/share/info &&
-rm -v dir &&
-for FILENAME in *; do
-    install-info $FILENAME dir 2>/dev/null
-done &&
-popd</userinput></screen>
+for segment in $SEGMENTS; do
+   cmake -DCMAKE_INSTALL_COMPONENT=$segment -P cmake_install.cmake
+done
 
+unset SEGMENTS</userinput></screen>
+
     <tip>
       <para>The only documentation shipped in the source tarball are
       <filename>mysql.info</filename> and man pages. You can download various
@@ -166,67 +168,29 @@
       from <ulink url="http://dev.mysql.com/doc/"/>.</para>
     </tip>
 
-  </sect2>
+    <note><para>If you only want to build and install the 
+      <command>mysql</command> client, use:</para>
 
-  <sect2 role="commands">
-    <title>Command Explanations</title>
+      <screen><userinput>cmake . &&
+make mysqlclient libmysql</userinput></screen>
 
-    <para><parameter>CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors 
-    -fno-exceptions -fno-rtti"</parameter>: These optimizations are recommended
-    by the developers.</para>
+      <para>Continue as root:</para>
 
-    <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
-    the <command>mysqld</command> daemon and the
-    <command>mysqlmanager</command> program in an appropriate location.</para>
+      <screen role="root"><userinput>make install</userinput></screen>
+    </note>
 
-    <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
-    forces <application>MySQL</application> to use
-    <filename class='directory'>/srv/mysql</filename> for database files and
-    other variable data.</para>
+  </sect2>
 
-    <para><parameter>--enable-thread-safe-client</parameter>: This
-    switch compiles a thread-safe <application>MySQL</application> client
-    library.</para>
+  <sect2 role="commands">
+    <title>Command Explanations</title>
 
-    <para><parameter>--enable-assembler</parameter>: This switch allows using
-    assembler versions of some string functions.</para>
+    <para><command>cmake -DCMAKE_INSTALL_COMPONENT=$segment ...</command>: This
+    command installs the appropriate portion of the package.  Different
+    segemnts may be added or deleted as desired.  Valid segments are listed
+    with `<command>make list_install_components</command>`.  Note that the
+    'DataFiles' install segment does not honor the -DMYSQL_DATADIR or
+    -DINSTALL_MYSQLDATADIR statements.</para>
 
-    <para><parameter>--enable-local-infile</parameter>: This switch enables
-    the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
-
-    <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
-    This switch puts the unix-domain socket into the
-    <filename class="directory">/var/run/mysql</filename> directory instead of
-    the default <filename class="directory">/tmp</filename>.</para>
-
-    <para><parameter>--without-readline</parameter>: This switch forces the
-    build to use the system copy of <application>readline</application> instead
-    of the bundled copy.</para>
-
-    <para><parameter>--with-extra-charsets=all</parameter>: This switch enables
-    international character sets within the suite.</para>
-
-    <para><parameter>--with-plugins=innobase,myisam</parameter>: This switch enables
-    two useful table types.  Check <command>./configure --help</command> for
-    other table types.</para>
-
-    <para><parameter>--with-ssl=/usr</parameter>: This switch enables encrypted
-    communication between client and server using OpenSSL.</para>
-
-    <para><command>make  benchdir_root=... install</command>: This installs the
-    benchmark and test suites in a non-system location.</para>
-
-    <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
-    command makes the <application>MySQL</application> shared libraries
-    available to other packages at run-time.</para>
-
-    <para><option>--with-libwrap</option>: This switch adds tcpwrappers
-    support to <application>MySQL</application>.</para>
-
-    <para><command>pushd ... popd</command>: This set of commands rebuilds the
-    <filename>/usr/share/info/dir</filename> file as the installation failed
-    to do so.</para>
-
   </sect2>
 
   <sect2 role="configuration">
@@ -256,13 +220,13 @@
       use. Create <filename>/etc/my.cnf</filename> using the following command
       as the <systemitem class="username">root</systemitem> user:</para>
 
-<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
+<screen role="root"><userinput>install -v -m644 /usr/share/mysql/support-files/my-medium.cnf /etc/my.cnf</userinput></screen>
 
       <para>You can now install a database and change the ownership to the
       unprivileged user and group (perform as the <systemitem
       class="username">root</systemitem> user):</para>
 
-<screen role="root"><userinput>mysql_install_db --user=mysql &&
+<screen role="root"><userinput>mysql_install_db --basedir=/usr --datadir=/srv/mysql --user=mysql &&
 chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
 
       <para>Further configuration requires that the

Modified: trunk/bootscripts/blfs/init.d/mysql
===================================================================
--- trunk/bootscripts/blfs/init.d/mysql	2011-11-01 17:39:25 UTC (rev 8930)
+++ trunk/bootscripts/blfs/init.d/mysql	2011-11-02 05:08:32 UTC (rev 8931)
@@ -1,78 +1,86 @@
 #!/bin/sh
-# Begin $rc_base/init.d/mysql
+########################################################################
+# Begin /etc/init.d/mysql
+#
+# Description : Start MysSQL Server
+#
+# Author      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+########################################################################
 
-# Based on sysklogd script from LFS-3.1 and earlier.
-# Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
+### BEGIN INIT INFO
+# Provides:            $svnserve
+# Required-Start:
+# Should-Start:
+# Required-Stop:       $sendsignals
+# Should-Stop:
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts MySQL server.
+# Description:         Starts MySQL server.
+# X-LFS-Provided-By:   LFS
+### END INIT INFO
 
+. /lib/lsb/init-functions
+
 #$LastChangedBy$
 #$Date$
 
-. /etc/sysconfig/rc
-. $rc_functions
-
 PIDFILE=/srv/mysql/`/bin/hostname`.pid
-KILLDELAY=20
 
 case "$1" in
-	start)
-		boot_mesg -n "Starting MySQL daemon..."
-		failure=0
-		if [ -f "$PIDFILE" ]
-		then
-			if /bin/ps p `cat $PIDFILE` | grep mysqld >/dev/null
-			then
-				boot_mesg "mysqld already running!" ${WARNING}
-				echo_warning
-				exit 0
-			else
-				rm -f "$PIDFILE"
-				if [ -f "$PIDFILE" ]
-				then
-					failure=1
-				fi
-			fi
-		fi
-		if [ "$failure" = "1" ]
-		then
-			echo ""
-			echo_failure
-		else
-			echo ""
-			/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
-			evaluate_retval
-		fi
-		;;
+   start)
+      log_info_msg "Starting MySQL daemon..."
 
-	stop)
-		boot_mesg -n "Stopping MySQL daemon..."
-		if [ -e "$PIDFILE" ]
-		then
-			echo ""
-			killproc -p ${PIDFILE} /usr/bin/mysqld_safe
-		else
-			boot_mesg "mysqld not running!" ${WARNING}
-			echo_warning
-			if [ -e "$PIDFILE" ]
-			then
-				rm -f $PIDFILE
-			fi
-		fi
-		;;
+      # Make sure the mysql user can create a socket
+      mkdir -p /run/mysql
+      chown mysql.mysql /run/mysql
 
-	restart)
-		$0 stop
-		sleep 1
-		$0 start
-		;;
+      if [ -f "$PIDFILE" ]; then
+         if /bin/ps --pid `cat $PIDFILE` | grep mysqld >/dev/null; then
+            log_warning_msg "\n   mysqld already running!" 
+            exit 0
+         else
+            rm -f "$PIDFILE"
+            if [ -f "$PIDFILE" ]; then
+               log_failure_msg2
+               exit 1
+            fi
+         fi
+      fi
 
-	status)
-		statusproc /usr/sbin/mysqld
-		;;
+      /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
+      evaluate_retval
+      ;;
 
-	*)
-		echo "Usage: $0 {start|stop|restart|status}"
-		exit 1
-		;;
+   stop)
+      log_info_msg "Stopping MySQL daemon..."
+      killproc -p ${PIDFILE} /usr/sbin/mysqld
+      evaluate_retval
+      ;;
+
+   reload)
+      log_info_msg "Reloading MySQL ..."
+      killproc -p ${PIDFILE} /usr/sbin/mysqld -HUP
+      evaluate_retval
+      ;;
+
+   restart)
+      $0 stop
+      sleep 1
+      $0 start
+      ;;
+
+   status)
+      statusproc /usr/sbin/mysqld
+      ;;
+
+   *)
+      echo "Usage: $0 {start|stop|reload|restart|status}"
+      exit 1
+      ;;
 esac
 
-# End $rc_base/init.d/mysql
+# End /etc/init.d/mysql

Modified: trunk/bootscripts/blfs/init.d/vsftpd
===================================================================
--- trunk/bootscripts/blfs/init.d/vsftpd	2011-11-01 17:39:25 UTC (rev 8930)
+++ trunk/bootscripts/blfs/init.d/vsftpd	2011-11-02 05:08:32 UTC (rev 8931)
@@ -1,29 +1,50 @@
 #!/bin/sh
-# Begin $rc_base/init.d/vsftpd
+########################################################################
+# Begin /etc/init.d/vsftpd
+#
+# Description : Start Very Secure FTP Daemon
+#
+# Author      : Bruce Dubbs - bdubbs at linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+########################################################################
 
-# Based on sysklogd script from LFS-3.1 and earlier.
-# Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
+### BEGIN INIT INFO
+# Provides:            $svnserve
+# Required-Start:      
+# Should-Start:
+# Required-Stop:       $sendsignals
+# Should-Stop:
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts vsftpd server.
+# Description:         Starts Very Secure FTP Daemon (vsftpd).
+# X-LFS-Provided-By:   LFS
+### END INIT INFO
 
+. /lib/lsb/init-functions
+
 #$LastChangedBy$
 #$Date$
 
-. /etc/sysconfig/rc
-. $rc_functions
-
 case "$1" in
 	start)
-		boot_mesg "Starting vsFTPD Server..."
-		loadproc /usr/sbin/vsftpd
+		log_info_msg "Starting vsFTPD Server..."
+		start_daemon /usr/sbin/vsftpd
+      evaluate_retval
 		;;
 
 	stop)
-		boot_mesg "Stopping vsFTPD Server..."
+		log_info_msg "Stopping vsFTPD Server..."
 		killproc /usr/sbin/vsftpd
+      evaluate_retval
 		;;
 
 	reload)
-		boot_mesg "Reloading vsFTPD Server..."
-		reloadproc /usr/sbin/vsftpd
+		log_info_msg "Reloading vsFTPD Server..."
+		killproc /usr/sbin/vsftpd -HUP
+      evaluate_retval
 		;;
 
 	restart)
@@ -42,4 +63,4 @@
 		;;
 esac
 
-# End $rc_base/init.d/vsftpd
+# End /etc/init.d/vsftpd




More information about the blfs-book mailing list