Explorar el Código

First cut of rework of MySQL 5.1 packaging which was really broken o create options for all optional plugins, keep naming consistent with MySQL. This breaks backward compatibility of our package but since it was broken it shouldn't hurt anyway. Enforce build of all mandatory plugins just in case they become optional in the future which would break backward compat of the package o fixed SSL, use external OpenSSL instead of internal yaSSL o use of 'set-variable' in my.cnf is deprecated, so dump it o dropped support for Berkeley DB since it will be phased out with the next MySQL 5.1 release anyway o plain update logs aren't supported any longer o some minor cosmetics

Christoph Schug hace 19 años
padre
commit
fcda832d2b
Se han modificado 3 ficheros con 91 adiciones y 90 borrados
  1. 26 30
      mysql51/my.cnf
  2. 65 47
      mysql51/mysql51.spec
  3. 0 13
      mysql51/rc.mysql

+ 26 - 30
mysql51/my.cnf

@@ -23,7 +23,6 @@ port         = 3306
 
 #   log file destinations (must be in sync with settings in rc.conf)
 log          = @l_prefix@/var/mysql/common.log
-log-update   = @l_prefix@/var/mysql/update.log
 #   binary log (use instead of log-update, server-id must be unique for
 #   replication)
 #log-bin      = @l_prefix@/var/mysql/binary.log
@@ -34,45 +33,42 @@ log-update   = @l_prefix@/var/mysql/update.log
 #
 
 #   most important tuning parameters for mysqld
-set-variable = key_buffer_size=64M
-set-variable = table_cache=256
+key_buffer_size=64M
+table_cache=256
 
 #   less important tuning parameters (change if special problems occur)
-set-variable = join_buffer_size=1M
-set-variable = max_connections=1000
-set-variable = max_connect_errors=10
-set-variable = max_delayed_threads=20
-set-variable = max_heap_table_size=16777216
-set-variable = max_sort_length=1024
-set-variable = max_user_connections=1000
-set-variable = record_buffer=131072
-set-variable = sort_buffer=4M
-set-variable = key_buffer=1M
-set-variable = tmp_table_size=32M
+join_buffer_size=1M
+max_connections=1000
+max_connect_errors=10
+max_delayed_threads=20
+max_heap_table_size=16777216
+max_sort_length=1024
+max_user_connections=1000
+record_buffer=131072
+sort_buffer=4M
+key_buffer=1M
+tmp_table_size=32M
 
 #   permanent query caching
-set-variable = query_cache_type=1
+query_cache_type=1
 #   maximum caching size of an individual query
-set-variable = query_cache_limit=1M
+query_cache_limit=1M
 #   maximum query cache size
-set-variable = query_cache_size=32M
+query_cache_size=32M
 
 #   minimum chars for full-text search (FTS) index
 #ft_min_word_len=3
 
-#   Berkeley DB
-set-variable = bdb_cache_size=@l_mysql_bdb_cache_size@
-set-variable = bdb_log_buffer_size=@l_mysql_bdb_log_buffer_size@
-set-variable = bdb_max_lock=@l_mysql_bdb_max_lock@
-
+<with_innobase>
 #   Innobase DB
-#set-variable = innodb_buffer_pool_size=70M
-#set-variable = innodb_additional_mem_pool_size=2M
-#set-variable = innodb_log_files_in_group=3
-#set-variable = innodb_log_file_size=20M
-#set-variable = innodb_log_buffer_size=8M
-#set-variable = innodb_lock_wait_timeout=50
-
+innodb_buffer_pool_size=70M
+innodb_additional_mem_pool_size=2M
+innodb_log_files_in_group=3
+innodb_log_file_size=20M
+innodb_log_buffer_size=8M
+innodb_lock_wait_timeout=50
+
+</with_innobase>
 #
 #   Miscellaneous
 #
@@ -83,7 +79,7 @@ tmpdir=@l_prefix@/var/mysql/tmp
 [mysqld_safe]
 datadir      = @l_prefix@/var/mysql
 socket       = @l_prefix@/var/mysql/mysql.sock
-set-variable = pid_file=@l_prefix@/var/mysql/mysqld.pid
+pid_file     = @l_prefix@/var/mysql/mysqld.pid
 user         = @l_rusr@
 basedir      = @l_prefix@
 

+ 65 - 47
mysql51/mysql51.spec

@@ -39,15 +39,24 @@ Class:        EVAL
 Group:        Database
 License:      GPL
 Version:      %{V_opkg}
-Release:      20060825
+Release:      20061011
 
 #   package options
-%option       with_server    yes
-%option       with_bdb       yes
-%option       with_innodb    no
-%option       with_ssl       no
-%option       with_ndb       no
-%option       with_embedded  no
+%option       with_server      yes
+%option       with_archive     no
+%option       with_blackhole   no
+%option       with_federated   no
+%option       with_innobase    yes
+%option       with_ndbcluster  no
+%option       with_partition   no
+%option       with_ssl         no
+%option       with_embedded    no
+
+#   fixing implicit inter-plugin dependencies and correlations
+%if "%{with_ndbcluster}" == "yes"
+%undefine     with_partition
+%define       with_partition   yes
+%endif
 
 #   list of sources
 Source0:      http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-%{V_major}/mysql-%{V_mysql}.tar.gz
@@ -73,11 +82,12 @@ Provides:     mysql = %{version}-%{release}
 
 %description
     MySQL is a multi-user Relational Database Management System (RDBMS),
-    which is controlled through Structured Query Language (SQL) operating in
-    full multi-threading mode. The main goals of MySQL are speed, robustness
-    and ease of use. MySQL was originally developed because of the need for
-    a SQL server that could handle very big databases with magnitude higher
-    speed than what any database vendor could offer.
+    which is controlled through Structured Query Language (SQL)
+    operating in full multi-threading mode. The main goals of MySQL are
+    speed, robustness and ease of use. MySQL was originally developed
+    because of the need for a SQL server that could handle very big
+    databases with magnitude higher speed than what any database vendor
+    could offer.
 
 %track
     prog mysql51 = {
@@ -108,7 +118,7 @@ Provides:     mysql = %{version}-%{release}
     CFLAGS="%{l_cflags -O}" \
     CXXFLAGS="%{l_cxxflags -O}" \
     CPPFLAGS="%{l_cppflags ncurses}" \
-    LDFLAGS="-L`pwd`/bdb/build_unix -L`pwd`/libmysql %{l_ldflags}" \
+    LDFLAGS="-L`pwd`/libmysql %{l_ldflags}" \
     ./configure \
         --prefix=%{l_prefix} \
         --sysconfdir=%{l_prefix}/etc/mysql \
@@ -120,29 +130,52 @@ Provides:     mysql = %{version}-%{release}
         --with-comment="%{l_openpkg_release}" \
 %if "%{with_server}" != "yes"
         --without-server \
+%else
+        --with-server \
+        --with-plugin-csv \
+        --with-plugin-heap \
+        --with-plugin-myisam \
+        --with-plugin-myisammrg \
+%if "%{with_archive}" == "yes"
+        --with-plugin-archive \
+%else
+        --without-plugin-archive \
 %endif
-%if "%{with_bdb}" == "yes"
-        --with-berkeley-db \
+%if "%{with_blackhole}" == "yes"
+        --with-plugin-blackhole \
+%else
+        --without-plugin-blackhole \
 %endif
-%if "%{with_innodb}" == "no"
-        --without-innodb \
+%if "%{with_federated}" == "yes"
+        --with-plugin-federated \
+%else
+        --without-plugin-federated \
 %endif
-%if "%{with_ssl}" == "yes"
-        --with-openssl \
-        --with-openssl-includes=%{l_prefix}/include \
-        --with-openssl-libs=%{l_prefix}/lib \
+%if "%{with_innobase}" == "yes"
+        --with-plugin-innobase \
+%else
+        --without-plugin-innobase \
 %endif
-%if "%{with_ndb}" == "yes"
-        --with-ndbcluster \
-        --with-ndb-shm \
+%if "%{with_ndbcluster}" == "yes"
+        --with-plugin-ndbcluster \
+%else
+        --without-plugin-ndbcluster \
+%endif
+%if "%{with_partition}" == "yes"
+        --with-plugin-partition \
+%else
+        --without-plugin-partition \
+%endif
+%endif
+        --with-zlib-dir=%{l_prefix} \
+%if "%{with_ssl}" == "yes"
+        --with-ssl=%{l_prefix} \
 %endif
 %if "%{with_embedded}" == "yes"
         --with-embedded-server \
 %endif
         --without-readline \
         --without-libedit \
-        --with-vio \
-        --with-named-z-libs=no \
         --with-low-memory \
         --disable-shared \
         $opt
@@ -178,28 +211,14 @@ Provides:     mysql = %{version}-%{release}
     strip  $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
     strip  $RPM_BUILD_ROOT%{l_prefix}/libexec/mysql/* 2>/dev/null || true
 
-    #   determine default parameters
-%if "%{with_bdb}" == "yes"
-    l_mysql_bdb_cache_size=8M
-    l_mysql_bdb_log_buffer_size=32k
-    l_mysql_bdb_max_lock=10000
-%else
-    l_mysql_bdb_cache_size=0
-    l_mysql_bdb_log_buffer_size=0
-    l_mysql_bdb_max_lock=0
-%endif
-%if "%{with_bdb}" == "yes" || "%{with_innodb}" == "yes"
-    l_mysqld=mysqld
-%else
-    l_mysqld=mysqld-max
-%endif
-
     #   install global configuration
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/mysql
-    %{l_shtool} install -c -m 644 %{l_value -s -a} \
-        -e "s;@l_mysql_bdb_cache_size@;${l_mysql_bdb_cache_size};g" \
-        -e "s;@l_mysql_bdb_log_buffer_size@;${l_mysql_bdb_log_buffer_size};g" \
-        -e "s;@l_mysql_bdb_max_lock@;${l_mysql_bdb_max_lock};g" \
+    %{l_shtool} install%{l_nil} -c -m 644 %{l_value -s -a} \
+%if "%{with_innobase}" == "yes"
+        -e '/<\/\{0,1\}with_innobase>/d' \
+%else
+        -e '/<with_innobase>/,/<\/with_innobase>/d' \
+%endif
         %{SOURCE my.cnf} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/mysql/
     %{l_shtool} install -c -m 600 \
@@ -209,7 +228,6 @@ Provides:     mysql = %{version}-%{release}
     #   install run-command script
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
     %{l_shtool} install -c -m 755 %{l_value -s -a} \
-        -e "s;@l_mysqld@;${l_mysqld};g" \
         %{SOURCE rc.mysql} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
 
     #   make sure the database directory exists

+ 0 - 13
mysql51/rc.mysql

@@ -12,11 +12,6 @@
     mysql_common_numfiles="10"
     mysql_common_minsize="1M"
     mysql_common_complevel="9"
-    mysql_update_prolog="true"
-    mysql_update_epilog="true"
-    mysql_update_numfiles="10"
-    mysql_update_minsize="1M"
-    mysql_update_complevel="9"
     mysql_err_prolog="true"
     mysql_err_epilog="true"
     mysql_err_numfiles="10"
@@ -27,7 +22,6 @@
     mysql_pid_file=@l_prefix@/var/mysql/mysqld.pid
     mysql_err_log=@l_prefix@/var/mysql/mysqld.err
     mysql_common_log=@l_prefix@/var/mysql/common.log
-    mysql_update_log=@l_prefix@/var/mysql/update.log
 
 %status -u @l_rusr@ -o
     mysql_usable="unknown"
@@ -47,7 +41,6 @@
     rcService mysql active yes && exit 0
     cd @l_prefix@
     @l_prefix@/bin/mysqld_safe >/dev/null 2>&1 \
-        --mysqld=@l_mysqld@ \
         --pid-file="$mysql_pid_file" \
         --log-error="$mysql_err_log" &
 
@@ -76,12 +69,6 @@
         -P "${mysql_common_prolog}" \
         -E "${mysql_common_epilog}; echo 1 >$hintfile" \
         ${mysql_common_log}
-    shtool rotate -f \
-        -n ${mysql_update_numfiles} -s ${mysql_update_minsize} -d \
-        -z ${mysql_update_complevel} -m 660 -o @l_rusr@ -g @l_rgrp@ \
-        -P "${mysql_update_prolog}" \
-        -E "${mysql_update_epilog}; echo 1 >$hintfile" \
-        ${mysql_update_log}
     shtool rotate -f \
         -n ${mysql_err_numfiles} -s ${mysql_err_minsize} -d \
         -z ${mysql_err_complevel} -m 660 -o @l_rusr@ -g @l_rgrp@ \