# HG changeset patch # User Michael Schloh von Bennewitz # Date 1348259935 -7200 # Node ID 31b10e374497cea8eb8a79538b54cc5e91782bf6 # Parent 86fbe197f71af7e0a3f7243e5ea511a5fa8776fb Correct permission set, database initialization, dependency, doc path, and port 5.1 configuration keyword to 5.5. diff -r 86fbe197f71a -r 31b10e374497 mysql/my.cnf --- a/mysql/my.cnf Mon Sep 17 19:49:40 2012 +0200 +++ b/mysql/my.cnf Fri Sep 21 22:38:55 2012 +0200 @@ -27,7 +27,7 @@ max_heap_table_size = 16777216 max_sort_length = 1024 max_user_connections = 1000 -record_buffer = 131072 +read_buffer_size = 131072 sort_buffer = 4M key_buffer = 1M tmp_table_size = 32M diff -r 86fbe197f71a -r 31b10e374497 mysql/mysql.spec --- a/mysql/mysql.spec Mon Sep 17 19:49:40 2012 +0200 +++ b/mysql/mysql.spec Fri Sep 21 22:38:55 2012 +0200 @@ -71,7 +71,7 @@ Patch0: mysql.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, perl, make, gcc, gcc::with_cxx = yes +BuildPreReq: OpenPKG, openpkg >= 20100101, perl, make, cmake, gcc, gcc::with_cxx = yes PreReq: OpenPKG, openpkg >= 20100101, perl BuildPreReq: zlib, readline, ncurses PreReq: zlib, readline, ncurses @@ -283,7 +283,7 @@ # mitigate complex buildconf %{l_shtool} install -c -m 644 \ - INSTALL-SOURCE $RPM_BUILD_ROOT%{l_prefix}/share/mysql/doc/ + ../INSTALL-SOURCE $RPM_BUILD_ROOT%{l_prefix}/share/mysql/doc/ # make sure the database directory exists %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/mysql @@ -324,12 +324,14 @@ # determine the package files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %if "%{with_server}" == "yes" + %{l_files_std} \ '%config %attr(644,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/mysql/my.cnf' \ '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/mysql/my.pwd' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql' \ - '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql/tmp' \ + '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql/tmp' +%else + %{l_files_std} %endif - %{l_files_std} %files -f objbld/files @@ -348,9 +350,11 @@ %if "%{with_server}" == "yes" if [ $1 -eq 1 ]; then # after install, create initial database - $RPM_INSTALL_PREFIX/bin/mysql_install_db \ - --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf >/dev/null 2>&1 - chown -R %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/mysql/* + cd $RPM_INSTALL_PREFIX && $RPM_INSTALL_PREFIX/bin/mysql_install_db \ + --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql/my.cnf \ + --ldata=$RPM_INSTALL_PREFIX/var/mysql \ + --user=%{l_rusr} >/dev/null 2>&1 + chgrp %{l_rgrp} $RPM_INSTALL_PREFIX/var/mysql/mysql ( echo "An initial MySQL DB was created. The owner of the database" echo "is the DB user 'root'. Its initial password is empty." echo "After starting MySQL with..." @@ -362,6 +366,10 @@ echo " \$ $RPM_INSTALL_PREFIX/bin/mysqladmin \\ " echo " -u root password ''" echo "" + echo "...or alternatively, even better secure the database with:" + echo "" + echo " \$ $RPM_INSTALL_PREFIX/bin/mysql_secure_installation" + echo "" echo "Additionally, because the MySQL package includes automated" echo "maintenance procedures that require administrator access to" echo "the database, you must maintain a (plain text) copy of the"