[Pkg-mysql-commits] r2246 - in mysql-5.6/trunk/debian: . additions patches

Bjoern Boschman jesusch-guest at alioth.debian.org
Mon Nov 4 18:12:47 UTC 2013


Author: jesusch-guest
Date: 2013-11-04 18:12:47 +0000 (Mon, 04 Nov 2013)
New Revision: 2246

Added:
   mysql-5.6/trunk/debian/patches/mysql_install_db.patch
Modified:
   mysql-5.6/trunk/debian/additions/my.cnf
   mysql-5.6/trunk/debian/mysql-server-5.6.postinst
   mysql-5.6/trunk/debian/patches/series
Log:
added more work to get mysql-5.6 installable


Modified: mysql-5.6/trunk/debian/additions/my.cnf
===================================================================
--- mysql-5.6/trunk/debian/additions/my.cnf	2013-11-02 10:00:05 UTC (rev 2245)
+++ mysql-5.6/trunk/debian/additions/my.cnf	2013-11-04 18:12:47 UTC (rev 2246)
@@ -41,6 +41,7 @@
 tmpdir		= /tmp
 lc-messages-dir	= /usr/share/mysql
 skip-external-locking
+explicit_defaults_for_timestamp
 #
 # Instead of skip-networking the default is now to listen only on
 # localhost which is more compatible and is not less secure.
@@ -48,13 +49,12 @@
 #
 # * Fine Tuning
 #
-key_buffer		= 16M
 max_allowed_packet	= 16M
 thread_stack		= 192K
 thread_cache_size       = 8
 # This replaces the startup script and checks MyISAM tables if needed
 # the first time they are touched
-myisam-recover         = BACKUP
+myisam-recover-options  = BACKUP
 #max_connections        = 100
 #table_cache            = 64
 #thread_concurrency     = 10
@@ -89,6 +89,9 @@
 #binlog_do_db		= include_database_name
 #binlog_ignore_db	= include_database_name
 #
+# basic loggin
+log-error		= /var/log/mysql/error.log
+#
 # * InnoDB
 #
 # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.

Modified: mysql-5.6/trunk/debian/mysql-server-5.6.postinst
===================================================================
--- mysql-5.6/trunk/debian/mysql-server-5.6.postinst	2013-11-02 10:00:05 UTC (rev 2245)
+++ mysql-5.6/trunk/debian/mysql-server-5.6.postinst	2013-11-04 18:12:47 UTC (rev 2246)
@@ -67,52 +67,15 @@
     mysql_datadir=/usr/share/mysql
     mysql_statedir=/var/lib/mysql
     mysql_rundir=/var/run/mysqld
-    mysql_logdir=/var/log
+    mysql_logdir=/var/log/mysql
     mysql_cfgdir=/etc/mysql
-    mysql_newlogdir=/var/log/mysql
     mysql_upgradedir=/var/lib/mysql-upgrade
 
-    # first things first, if the following symlink exists, it is a preserved
-    # copy the old data dir from a mysql upgrade that would have otherwise
-    # been replaced by an empty mysql dir.  this should restore it.
-    for dir in DATADIR LOGDIR; do
-        if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
-        savelink="$mysql_upgradedir/$dir.link"
-        if [ -L "$savelink" ]; then
-            # If the targetdir was a symlink before we upgraded it is supposed
-            # to be either still be present or not existing anymore now.
-            if [ -L "$targetdir" ]; then
-                rm "$savelink"
-            elif [ ! -d "$targetdir" ]; then
-                mv "$savelink" "$targetdir"
-            else
-                # this should never even happen, but just in case...
-                mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
-                echo "this is very strange!  see $mysql_tmp/README..." >&2
-                mv "$targetdir" "$mysql_tmp"
-                cat << EOF > "$mysql_tmp/README"
-
-if you're reading this, it's most likely because you had replaced /var/lib/mysql
-with a symlink, then upgraded to a new version of mysql, and then dpkg
-removed your symlink (see #182747 and others).  the mysql packages noticed
-that this happened, and as a workaround have restored it.  however, because
-/var/lib/mysql seems to have been re-created in the meantime, and because
-we don't want to rm -rf something we don't know as much about, we're going
-to leave this unexpected directory here.  if your database looks normal,
-and this is not a symlink to your database, you should be able to blow
-this all away.
-
-EOF
-            fi
-        fi
-	rmdir $mysql_upgradedir 2>/dev/null || true
-    done
-    
     # Ensure the existence and right permissions for the database and
     # log files.
     if [ ! -d "$mysql_statedir"       -a ! -L "$mysql_statedir"       ]; then mkdir "$mysql_statedir"; fi
     if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi
-    if [ ! -d "$mysql_newlogdir"      -a ! -L "$mysql_newlogdir"      ]; then mkdir "$mysql_newlogdir"; fi
+    if [ ! -d "$mysql_logdir"         -a ! -L "$mysql_logdir"         ]; then mkdir "$mysql_logdir"; fi
     # When creating an ext3 jounal on an already mounted filesystem like e.g.
     # /var/lib/mysql, you get a .journal file that is not modifyable by chown.
     # The mysql_datadir must not be writable by the mysql user under any
@@ -123,12 +86,10 @@
     chmod 700 $mysql_statedir $mysql_statedir/mysql
     if [ ! -d "$mysql_rundir" ]; then mkdir "$mysql_rundir"; fi
     chown -R mysql $mysql_rundir
-    chown -R mysql:adm $mysql_newlogdir;	chmod 2750 $mysql_newlogdir;
-    for i in log err; do
-      touch             $mysql_logdir/mysql.$i
-      chown mysql:adm   $mysql_logdir/mysql.$i
-      chmod 0640        $mysql_logdir/mysql.$i
-    done
+    touch $mysql_logdir/error.log
+    chown -R mysql:adm $mysql_logdir
+    chmod 0750 $mysql_logdir
+    chmod 0640 $mysql_logdir/error.log
     set -e
 
     # This is important to avoid dataloss when there is a removed

Added: mysql-5.6/trunk/debian/patches/mysql_install_db.patch
===================================================================
--- mysql-5.6/trunk/debian/patches/mysql_install_db.patch	                        (rev 0)
+++ mysql-5.6/trunk/debian/patches/mysql_install_db.patch	2013-11-04 18:12:47 UTC (rev 2246)
@@ -0,0 +1,63 @@
+--- a/scripts/mysql_install_db.pl.in
++++ b/scripts/mysql_install_db.pl.in
+@@ -430,33 +430,41 @@
+ 
+ $config_file= "$basedir/my.cnf";
+ 
++my $failed_write_cfg= 0;
+ my $cfg_template= find_in_basedir($opt,"file","my-default.cnf",
+ 				  "share","share/mysql","support-files");
+--e $cfg_template or cannot_find_file("my-default.cnf");
+ 
+-$copy_cfg_file= $config_file;
+-my $failed_write_cfg= 0;
+-if (-e $copy_cfg_file)
++if (-e $cfg_template)
+ {
+-  $copy_cfg_file =~ s/my.cnf/my-new.cnf/;
+-  # Too early to print warning here, the user may not notice
+-}
+-open (TEMPL, $cfg_template) or error($opt, "Could not open config template $cfg_template");
+-if (open (CFG, "> $copy_cfg_file"))
+-{
+-  while (<TEMPL>)
+-  {
+-    # Remove lines beginning with # *** which are template comments
+-    print CFG $_ unless /^# \*\*\*/;
+-  }
+-  close CFG;
++# or cannot_find_file("my-default.cnf");
++
++    $copy_cfg_file= $config_file;
++    if (-e $copy_cfg_file)
++    {
++      $copy_cfg_file =~ s/my.cnf/my-new.cnf/;
++      # Too early to print warning here, the user may not notice
++    }
++    open (TEMPL, $cfg_template) or error($opt, "Could not open config template $cfg_template");
++    if (open (CFG, "> $copy_cfg_file"))
++    {
++      while (<TEMPL>)
++      {
++        # Remove lines beginning with # *** which are template comments
++        print CFG $_ unless /^# \*\*\*/;
++      }
++      close CFG;
++    }
++    else
++    {
++      warning($opt,"Could not write to config file $copy_cfg_file: $!");
++      $failed_write_cfg= 1;
++    }
++    close TEMPL;
+ }
+ else
+ {
+-  warning($opt,"Could not write to config file $copy_cfg_file: $!");
+-  $failed_write_cfg= 1;
++    warning($opt, sprintf("Cannot find file: %s", "my-default.cnf"));
+ }
+-close TEMPL;
+ 
+ # ----------------------------------------------------------------------
+ # Now we can get arguments from the groups [mysqld] and [mysql_install_db]

Modified: mysql-5.6/trunk/debian/patches/series
===================================================================
--- mysql-5.6/trunk/debian/patches/series	2013-11-02 10:00:05 UTC (rev 2245)
+++ mysql-5.6/trunk/debian/patches/series	2013-11-04 18:12:47 UTC (rev 2246)
@@ -1,4 +1,5 @@
 hurd.patch
+mysql_install_db.patch
 #scripts__mysqld_safe.sh__signals.patch
 #disable_tests.patch
 #mysql_va_list.patch




More information about the Pkg-mysql-commits mailing list