[debian-mysql] Requesting change in priorities

Robie Basak robie.basak at canonical.com
Fri Aug 8 16:39:54 UTC 2014


Here's a snapshot of my work in progress. This diff both re-enables the
library packages, and also includes changes not needed for Debian
(apport hook and fixing the #DEBHELPER# thing early so the Upstart bits
work correctly). I have yet to fully test this. I will separate these
out in a proper submission.

Next, I will move over mysql-common, and the definitions of the
non-versioned package names for server and client (mysql-server,
mysql-client, and the -core packages). And then finally drop these from
5.5, and then test and upload for both.

I've also just uploaded this to ppa:racb/experimental if that's easier
to consume.

Finally, I've stuck the dep8 test failure in
http://paste.ubuntu.com/7990067/ (its 250K so I didn't include it here).
It looks to me that this is a test environment issue, rather than
problems with the tests themselves.

Robie

diff --git a/debian/changelog b/debian/changelog
index 58c3642..ece2a26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+mysql-5.6 (5.6.19-1~exp1ubuntu1~dev1) utopic; urgency=medium
+
+  * Cherry-pick relevant parts of Ubuntu delta from mysql-5.5:
+    - d/mysql-server-5.5.postrm: restoring postrm debhelper token to get
+      proper behaviors from dh_installinit and dh_apparmor.
+    - Add Apport hook (ported forward).
+  * Re-enable libmysqld-pic, libmysqld-dev, libmysqlclient18 and
+    libmysqlclient-dev (renamed accordingly) to replace binary packages
+    provided by src:mysql-5.5.
+
+ -- Robie Basak <robie.basak at ubuntu.com>  Tue, 05 Aug 2014 12:28:36 +0100
+
 mysql-5.6 (5.6.19-1~exp1) experimental; urgency=low
 
   [ Bjoern Boschman ]
diff --git a/debian/control b/debian/control
index 6b5fe9b..bb2d3ea 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
 Source: mysql-5.6
 Section: database
 Priority: optional
-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
 Uploaders:
  Norbert Tretkowski <norbert at tretkowski.de>,
  Clint Byrum <clint at ubuntu.com>,
@@ -29,6 +30,61 @@ Vcs-Git: git://git.debian.org/git/pkg-mysql/mysql-5.6.git
 Vcs-Browser: http://git.debian.org/?p=pkg-mysql/mysql-5.6.git
 XS-Testsuite: autopkgtest
 
+Package: libmysqlclient18
+Section: libs
+Architecture: any
+Depends: mysql-common (>= 5.5), ${misc:Depends}, ${shlibs:Depends}
+Pre-Depends: multiarch-support, ${misc:Pre-Depends}
+Recommends: mysql-common-5.6
+Multi-Arch: same
+Description: MySQL database client library
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the client library.
+
+Package: libmysqld-pic
+Architecture: any
+Section: libdevel
+Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends}
+Description: PIC version of MySQL embedded server development files
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the -fPIC version of the embedded server library.
+
+Package: libmysqld-dev
+Architecture: any
+Section: libdevel
+Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends}
+Description: MySQL embedded database development files
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the embedded server library and header files.
+
+Package: libmysqlclient-dev
+Architecture: any
+Section: libdevel
+Depends:
+ libmysqlclient18 (= ${binary:Version}),
+ zlib1g-dev,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: MySQL database development files
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes development libraries and header files.
+
 Package: mysql-common-5.6
 Architecture: all
 Depends: mysql-common, ${misc:Depends}, ${shlibs:Depends}
diff --git a/debian/libmysqlclient-dev.README.Maintainer b/debian/libmysqlclient-dev.README.Maintainer
new file mode 100644
index 0000000..f24cdcd
--- /dev/null
+++ b/debian/libmysqlclient-dev.README.Maintainer
@@ -0,0 +1,4 @@
+The examples directory includes files that might be needed by some
+developers:
+- header files not installed by default
+- the example file udf_example.c
diff --git a/debian/libmysqlclient-dev.dirs b/debian/libmysqlclient-dev.dirs
new file mode 100644
index 0000000..f6ad287
--- /dev/null
+++ b/debian/libmysqlclient-dev.dirs
@@ -0,0 +1,2 @@
+usr/include/
+usr/lib/
diff --git a/debian/libmysqlclient-dev.examples b/debian/libmysqlclient-dev.examples
new file mode 100644
index 0000000..80a749f
--- /dev/null
+++ b/debian/libmysqlclient-dev.examples
@@ -0,0 +1 @@
+sql/udf_example.cc
diff --git a/debian/libmysqlclient-dev.install b/debian/libmysqlclient-dev.install
new file mode 100644
index 0000000..3fae026
--- /dev/null
+++ b/debian/libmysqlclient-dev.install
@@ -0,0 +1,4 @@
+usr/bin/mysql_config
+usr/include/mysql/*
+usr/lib/*/libmysqlclient.a
+usr/share/aclocal/mysql.m4
diff --git a/debian/libmysqlclient-dev.manpages b/debian/libmysqlclient-dev.manpages
new file mode 100644
index 0000000..3aac7f4
--- /dev/null
+++ b/debian/libmysqlclient-dev.manpages
@@ -0,0 +1 @@
+debian/tmp/usr/share/man/man1/mysql_config.1
diff --git a/debian/libmysqlclient18.1-dev.README.Maintainer b/debian/libmysqlclient18.1-dev.README.Maintainer
deleted file mode 100644
index f24cdcd..0000000
--- a/debian/libmysqlclient18.1-dev.README.Maintainer
+++ /dev/null
@@ -1,4 +0,0 @@
-The examples directory includes files that might be needed by some
-developers:
-- header files not installed by default
-- the example file udf_example.c
diff --git a/debian/libmysqlclient18.1-dev.dirs b/debian/libmysqlclient18.1-dev.dirs
deleted file mode 100644
index f6ad287..0000000
--- a/debian/libmysqlclient18.1-dev.dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/include/
-usr/lib/
diff --git a/debian/libmysqlclient18.1-dev.examples b/debian/libmysqlclient18.1-dev.examples
deleted file mode 100644
index 80a749f..0000000
--- a/debian/libmysqlclient18.1-dev.examples
+++ /dev/null
@@ -1 +0,0 @@
-sql/udf_example.cc
diff --git a/debian/libmysqlclient18.1-dev.install b/debian/libmysqlclient18.1-dev.install
deleted file mode 100644
index 3fae026..0000000
--- a/debian/libmysqlclient18.1-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/bin/mysql_config
-usr/include/mysql/*
-usr/lib/*/libmysqlclient.a
-usr/share/aclocal/mysql.m4
diff --git a/debian/libmysqlclient18.1-dev.manpages b/debian/libmysqlclient18.1-dev.manpages
deleted file mode 100644
index 3aac7f4..0000000
--- a/debian/libmysqlclient18.1-dev.manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr/share/man/man1/mysql_config.1
diff --git a/debian/libmysqlclient18.1.dirs b/debian/libmysqlclient18.1.dirs
deleted file mode 100644
index 2964de6..0000000
--- a/debian/libmysqlclient18.1.dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/
diff --git a/debian/libmysqlclient18.1.install b/debian/libmysqlclient18.1.install
deleted file mode 100644
index e1fa46c..0000000
--- a/debian/libmysqlclient18.1.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libmysqlclient.so.18.1*
diff --git a/debian/libmysqlclient18.1.lintian-overrides b/debian/libmysqlclient18.1.lintian-overrides
deleted file mode 100644
index 5ffbc28..0000000
--- a/debian/libmysqlclient18.1.lintian-overrides
+++ /dev/null
@@ -1,7 +0,0 @@
-# I take this issue seriously but as per bug #590905
-# it will need playing with in experimental. - periapt
-libmysqlclient18.1: no-symbols-control-file usr/lib/i386-linux-gnu/libmysqlclient.so.18.1.0
-# Now that MySQL 5.6 client library package is name 18.1
-# so will have no other option but to overlook both errors
-libmysqlclient18.1: package-name-doesnt-match-sonames libmysqlclient18
-libmysqlclient18.1: ldconfig-symlink-referencing-wrong-file usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 -> libmysqlclient.so.18.1 instead of libmysqlclient.so.18.1.0
diff --git a/debian/libmysqlclient18.dirs b/debian/libmysqlclient18.dirs
new file mode 100644
index 0000000..2964de6
--- /dev/null
+++ b/debian/libmysqlclient18.dirs
@@ -0,0 +1 @@
+usr/lib/
diff --git a/debian/libmysqlclient18.install b/debian/libmysqlclient18.install
new file mode 100644
index 0000000..769f1d3
--- /dev/null
+++ b/debian/libmysqlclient18.install
@@ -0,0 +1 @@
+usr/lib/*/libmysqlclient.so.18*
diff --git a/debian/libmysqlclient18.lintian-overrides b/debian/libmysqlclient18.lintian-overrides
new file mode 100644
index 0000000..5ffbc28
--- /dev/null
+++ b/debian/libmysqlclient18.lintian-overrides
@@ -0,0 +1,7 @@
+# I take this issue seriously but as per bug #590905
+# it will need playing with in experimental. - periapt
+libmysqlclient18.1: no-symbols-control-file usr/lib/i386-linux-gnu/libmysqlclient.so.18.1.0
+# Now that MySQL 5.6 client library package is name 18.1
+# so will have no other option but to overlook both errors
+libmysqlclient18.1: package-name-doesnt-match-sonames libmysqlclient18
+libmysqlclient18.1: ldconfig-symlink-referencing-wrong-file usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 -> libmysqlclient.so.18.1 instead of libmysqlclient.so.18.1.0
diff --git a/debian/libmysqld-5.6-dev.install b/debian/libmysqld-5.6-dev.install
deleted file mode 100644
index 11b84fb..0000000
--- a/debian/libmysqld-5.6-dev.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/*/libmysqld.a
-usr/lib/*/libmysqlservices.a
diff --git a/debian/libmysqld-5.6-pic.README.Debian b/debian/libmysqld-5.6-pic.README.Debian
deleted file mode 100644
index 4ec22b7..0000000
--- a/debian/libmysqld-5.6-pic.README.Debian
+++ /dev/null
@@ -1,5 +0,0 @@
-This package was requested in http://bugs.debian.org/508406 because it
-is needed by programs want to include the embedded MySQL into their
-shared libraries.
-
-In order to get the full compile flags, use /bin/mysql_config_pic
diff --git a/debian/libmysqld-5.6-pic.install b/debian/libmysqld-5.6-pic.install
deleted file mode 100644
index 7ff38b3..0000000
--- a/debian/libmysqld-5.6-pic.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin/mysql_config_pic
-usr/lib/mysql/libmysqld_pic.a
diff --git a/debian/libmysqld-5.6-pic.manpages b/debian/libmysqld-5.6-pic.manpages
deleted file mode 100644
index 3e2e2b2..0000000
--- a/debian/libmysqld-5.6-pic.manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr/share/man/man1/mysql_config_pic.1
diff --git a/debian/libmysqld-dev.install b/debian/libmysqld-dev.install
new file mode 100644
index 0000000..11b84fb
--- /dev/null
+++ b/debian/libmysqld-dev.install
@@ -0,0 +1,2 @@
+usr/lib/*/libmysqld.a
+usr/lib/*/libmysqlservices.a
diff --git a/debian/libmysqld-pic.README.Debian b/debian/libmysqld-pic.README.Debian
new file mode 100644
index 0000000..4ec22b7
--- /dev/null
+++ b/debian/libmysqld-pic.README.Debian
@@ -0,0 +1,5 @@
+This package was requested in http://bugs.debian.org/508406 because it
+is needed by programs want to include the embedded MySQL into their
+shared libraries.
+
+In order to get the full compile flags, use /bin/mysql_config_pic
diff --git a/debian/libmysqld-pic.install b/debian/libmysqld-pic.install
new file mode 100644
index 0000000..7ff38b3
--- /dev/null
+++ b/debian/libmysqld-pic.install
@@ -0,0 +1,2 @@
+usr/bin/mysql_config_pic
+usr/lib/mysql/libmysqld_pic.a
diff --git a/debian/libmysqld-pic.manpages b/debian/libmysqld-pic.manpages
new file mode 100644
index 0000000..3e2e2b2
--- /dev/null
+++ b/debian/libmysqld-pic.manpages
@@ -0,0 +1 @@
+debian/tmp/usr/share/man/man1/mysql_config_pic.1
diff --git a/debian/mysql-server-5.6.postrm b/debian/mysql-server-5.6.postrm
index df30cde..4c9699e 100644
--- a/debian/mysql-server-5.6.postrm
+++ b/debian/mysql-server-5.6.postrm
@@ -80,6 +80,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.6 is installed
+#DEBHELPER#
 
 exit 0
diff --git a/debian/mysql-server-5.6.py b/debian/mysql-server-5.6.py
new file mode 100644
index 0000000..07f4f05
--- /dev/null
+++ b/debian/mysql-server-5.6.py
@@ -0,0 +1,52 @@
+'''apport package hook for mysql-5.5
+
+(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 *
+
+def _add_my_conf_files(report, filename):
+    key = 'MySQLConf' + path_to_key(filename)
+    report[key] = ""
+    for line in read_file(filename).split('\n'):
+        try:
+            if 'password' in line.split('=')[0]:
+                line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0])
+            report[key] += line + '\n'
+        except IndexError:
+            continue
+
+def add_info(report):
+    attach_conffiles(report, 'mysql-server-5.5', conffiles=None)
+    key = 'Logs' + path_to_key('/var/log/daemon.log')
+    report[key] = ""
+    for line in read_file('/var/log/daemon.log').split('\n'):
+        try:
+            if 'mysqld' in 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'] = str(os.listdir('/var/lib/mysql'))
+    except OSError:
+        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]))
diff --git a/debian/rules b/debian/rules
index 71efe19..cabcd23 100755
--- a/debian/rules
+++ b/debian/rules
@@ -179,6 +179,8 @@ auto_install-stamp:
 	# install AppArmor profile
 	install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
 	chmod 0755 $(TMP)/usr/share/mysql-test/std_data/checkDBI_DBD-mysql.pl
+	# install Apport hook
+	install -D -m 644 debian/mysql-server-5.6.py $(TMP)/usr/share/apport/package-hooks/source_mysql-5.6.py
 	# chmod 0644 $(TMP)/usr/share/mysql/*.ini
 	chmod 0644 $(TMP)/usr/share/mysql-test/[rt]/*
 	chmod 0644 $(TMP)/usr/share/mysql-test/collections/default.weekly
diff --git a/debian/tests/control b/debian/tests/control
index 43c5651..030f3b0 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,3 @@
-Tests: upstream
-Depends: mysql-testsuite-5.6
+Tests: smoke
+Depends: mysql-server-5.6
+Restrictions: allow-stderr needs-root breaks-testbed
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100644
index 0000000..34dec4b
--- /dev/null
+++ b/debian/tests/smoke
@@ -0,0 +1,59 @@
+#!/bin/sh
+set -ex
+
+# dep8 smoke test for mysql-server
+# Author: Robie Basak <robie.basak at canonical.com>
+#
+# This test should be declared in debian/tests/control with a dependency
+# on the package that provides a configured MySQL server (eg.
+# mysql-server-5.6).
+#
+# This test should be declared in debian/tests/control with the
+# following restrictions:
+#
+# needs-root (needed to reset the root mysql password)
+# breaks-testbed (because it resets the root mysql password)
+# allow-stderr
+#
+# This test:
+#
+# 1) Configures packaged mysql server root password with maintainer
+# scripts.
+#
+# 2) Creates a test database and test user as the root user.
+#
+# 3) Creates a test table and checks it appears to operate normally
+# using the test user and test database.
+
+debconf-set-selections <<EOT
+mysql-server-5.6 mysql-server/root_password password rootpassword
+mysql-server-5.6 mysql-server/root_password_again password rootpassword
+EOT
+
+DEBIAN_FRONTEND=noninteractive dpkg-reconfigure mysql-server-5.6
+
+mysql --user=root --password=rootpassword <<EOT
+CREATE DATABASE testdatabase;
+CREATE USER 'testuser'@'localhost' identified by 'testpassword';
+GRANT ALL ON testdatabase.* TO 'testuser'@'localhost';
+EOT
+
+mysql --user=testuser --password=testpassword testdatabase <<EOT
+CREATE TABLE foo (bar INTEGER);
+INSERT INTO foo (bar) VALUES (41);
+EOT
+
+result=`echo 'SELECT bar+1 FROM foo;'|mysql --batch --skip-column-names --user=testuser --password=testpassword testdatabase`
+if [ "$result" != "42" ]; then
+	echo "Unexpected result" >&2
+	exit 1
+fi
+
+mysql --user=testuser --password=testpassword testdatabase <<EOT
+DROP TABLE foo;
+EOT
+
+mysql --user=root --password=rootpassword <<EOT
+DROP DATABASE testdatabase;
+DROP USER 'testuser'@'localhost';
+EOT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20140808/d4a142c2/attachment-0001.sig>


More information about the pkg-mysql-maint mailing list