diff -Nru ruby-mysql-2.9.1/debian/changelog ruby-mysql-2.9.1/debian/changelog
--- ruby-mysql-2.9.1/debian/changelog 2016-04-05 13:01:27.000000000 +0000
+++ ruby-mysql-2.9.1/debian/changelog 2016-04-06 15:06:04.000000000 +0000
@@ -1,3 +1,12 @@
+ruby-mysql (2.9.1-1ubuntu1) xenial; urgency=medium
+
+ * d/tests/{control,test-suite}: set root password and use it for the test to
+ fix FTBFS, since 5.7 no longer permits empty root passwords by default. Run
+ test as root since we need to for the dpkg-reconfigure, then drop to normal
+ user with normal-user.sh for the test run itself.
+
+ -- Robie Basak <robie.basak@ubuntu.com> Wed, 06 Apr 2016 14:23:31 +0000
+
ruby-mysql (2.9.1-1build6) xenial; urgency=medium
* Rebuild against libmysqlclient20.
diff -Nru ruby-mysql-2.9.1/debian/control ruby-mysql-2.9.1/debian/control
--- ruby-mysql-2.9.1/debian/control 2014-10-06 11:07:09.000000000 +0000
+++ ruby-mysql-2.9.1/debian/control 2016-04-06 14:24:29.000000000 +0000
@@ -1,7 +1,8 @@
Source: ruby-mysql
Section: ruby
Priority: optional
-Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Uploaders: Dmitry Borodaenko <angdraug@debian.org>
Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-test-unit, libmysqlclient-dev
Standards-Version: 3.9.6
diff -Nru ruby-mysql-2.9.1/debian/tests/control ruby-mysql-2.9.1/debian/tests/control
--- ruby-mysql-2.9.1/debian/tests/control 2014-10-06 11:32:29.000000000 +0000
+++ ruby-mysql-2.9.1/debian/tests/control 2016-04-06 14:37:37.000000000 +0000
@@ -1,2 +1,3 @@
Tests: test-suite
-Depends: @, ruby-test-unit, mysql-server
+Depends: @, ruby-test-unit, mysql-server-5.7
+Restrictions: needs-root
diff -Nru ruby-mysql-2.9.1/debian/tests/normal-user.sh ruby-mysql-2.9.1/debian/tests/normal-user.sh
--- ruby-mysql-2.9.1/debian/tests/normal-user.sh 1970-01-01 00:00:00.000000000 +0000
+++ ruby-mysql-2.9.1/debian/tests/normal-user.sh 2016-04-06 14:47:11.000000000 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -ex
+
+# Run $1 as a normal user. This isn't currently quoted properly, but it does
+# run the command in a login shell, which I think is as close as I can get and
+# all I need right now. It also preserves the current working directory so that
+# dep8 test resources can still be located. There was some discussion of this
+# approach at: http://irclogs.ubuntu.com/2014/06/06/%23ubuntu-devel.html#t09:35
+
+# Author: Robie Basak <robie.basak@canonical.com>
+
+adduser --disabled-password --gecos '' testuser
+
+sudo -iu testuser sh <<EOT
+cd "$PWD"
+$@
+EOT
diff -Nru ruby-mysql-2.9.1/debian/tests/test-suite ruby-mysql-2.9.1/debian/tests/test-suite
--- ruby-mysql-2.9.1/debian/tests/test-suite 2014-10-06 11:39:14.000000000 +0000
+++ ruby-mysql-2.9.1/debian/tests/test-suite 2016-04-06 14:53:37.000000000 +0000
@@ -6,6 +6,15 @@
export LANG=C.UTF-8
-mysql -u root -e 'CREATE DATABASE test'
+# Currently the debconf parameter has 5.7, so we hardcode the 5.7 name in the
+# test dependency also.
+debconf-set-selections <<EOT
+mysql-server-5.7 mysql-server/root_password password rootpassword
+mysql-server-5.7 mysql-server/root_password_again password rootpassword
+EOT
-ruby test/test_mysql.rb
+DEBIAN_FRONTEND=noninteractive dpkg-reconfigure mysql-server-5.7
+
+mysql -u root --password=rootpassword -e 'CREATE DATABASE test'
+
+MYSQL_PASS=rootpassword sh debian/tests/normal-user.sh ruby test/test_mysql.rb