[Pkg-mysql-commits] [mariadb-5.5] 01/02: 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 19:20:57 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 8d747c5fc21068dba99bdac4a93693fb7e883e49
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 | 22 +++++++++++-----------
3 files changed, 14 insertions(+), 12 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..ebfc3c0 100644
--- a/debian/mariadb-server-5.5.py
+++ b/debian/mariadb-server-5.5.py
@@ -4,6 +4,7 @@
Author: Mathias Gug <mathias.gug at canonical.com>
'''
+from __future__ import print_function, unicode_literals
import os, os.path
from apport.hookutils import *
@@ -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