[Pkg-mysql-commits] [mariadb-5.5] 01/01: Import improvements in the mysql-5.6 Debian git repository up and until commit 0af5a830

Otto Kekäläinen ottok-guest at moszumanska.debian.org
Sun Sep 14 18:52:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

ottok-guest pushed a commit to branch master
in repository mariadb-5.5.

commit 8dd0fea7d285f1f8261a4f29937bfe0a9628695c
Author: Otto Kekäläinen <otto.kekalainen at seravo.fi>
Date:   Tue Sep 2 21:12:12 2014 +0300

    Import improvements in the mysql-5.6 Debian git repository up and until commit 0af5a830
---
 debian/mariadb-server-5.5.postinst |  2 ++
 debian/mariadb-server-5.5.postrm   |  2 +-
 debian/mariadb-server-5.5.py       | 26 +++++++++++++-------------
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/debian/mariadb-server-5.5.postinst b/debian/mariadb-server-5.5.postinst
index b73c35c..b9f1b98 100644
--- a/debian/mariadb-server-5.5.postinst
+++ b/debian/mariadb-server-5.5.postinst
@@ -171,7 +171,9 @@ EOF
     else
 	pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
         if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
+        umask 066
         cat /dev/null > $dc
+        umask 022
         echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
         echo "[client]"                                                    >>$dc
         echo "host     = localhost"                                        >>$dc
diff --git a/debian/mariadb-server-5.5.postrm b/debian/mariadb-server-5.5.postrm
index e01eb17..d7044bb 100644
--- a/debian/mariadb-server-5.5.postrm
+++ b/debian/mariadb-server-5.5.postrm
@@ -78,6 +78,6 @@ if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
 fi
 # (normally) End automatically added section
 
-# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.1 is installed
+#DEBHELPER#
 
 exit 0
diff --git a/debian/mariadb-server-5.5.py b/debian/mariadb-server-5.5.py
index a1372a3..3888c05 100644
--- a/debian/mariadb-server-5.5.py
+++ b/debian/mariadb-server-5.5.py
@@ -1,9 +1,10 @@
-'''apport package hook for mariadb-5.5
+'''apport package hook for mysql-5.6
 
 (c) 2009 Canonical Ltd.
 Author: Mathias Gug <mathias.gug at canonical.com>
 '''
 
+from __future__ import print_function, unicode_literals
 import os, os.path
 
 from apport.hookutils import *
@@ -20,7 +21,7 @@ def _add_my_conf_files(report, filename):
             continue
 
 def add_info(report):
-    attach_conffiles(report, 'mariadb-server-5.5', conffiles=None)
+    attach_conffiles(report, 'mysql-server-5.6', conffiles=None)
     key = 'Logs' + path_to_key('/var/log/daemon.log')
     report[key] = ""
     for line in read_file('/var/log/daemon.log').split('\n'):
@@ -29,24 +30,23 @@ def add_info(report):
                 report[key] += line + '\n'
         except IndexError:
             continue
-    key = 'Logs' + path_to_key('/var/log/kern.log')
-    report[key] = ""
-    for line in read_file('/var/log/kern.log').split('\n'):
-        try:
-            if '/usr/sbin/mysqld' in string.join(line.split()[4:]):
-                report[key] += line + '\n'
-        except IndexError:
-            continue
+    if os.path.exists('/var/log/mysql/error.log'):
+        key = 'Logs' + path_to_key('/var/log/mysql/error.log')
+        report[key] = ""
+        for line in read_file('/var/log/mysql/error.log').split('\n'):
+            report[key] += line + '\n'
+    attach_mac_events(report, '/usr/sbin/mysqld')
+    attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld')
     _add_my_conf_files(report, '/etc/mysql/my.cnf')
     for f in os.listdir('/etc/mysql/conf.d'):
         _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f))
     try:
-        report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql'))
+        report['MySQLVarLibDirListing'] = str(os.listdir('/var/lib/mysql'))
     except OSError:
-        report['MySQLVarLibDirListing'] = unicode(False)
+        report['MySQLVarLibDirListing'] = str(False)
 
 if __name__ == '__main__':
     report = {}
     add_info(report)
     for key in report:
-        print '%s: %s' % (key, report[key].split('\n', 1)[0])
+        print('%s: %s' % (key, report[key].split('\n', 1)[0]))

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-mysql/mariadb-5.5.git



More information about the Pkg-mysql-commits mailing list