Package: src:ruby-mysql2 Version: 0.5.2-1 Severity: important Tags: sid buster patch
https://ci.debian.net/data/packages/unstable/amd64/r/ruby-mysql2/latest-autopkgtest/log.gz autopkgtest [06:50:44]: test command1: [----------------------- ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby2.5 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH= ruby2.5 -e gem\ \"mysql2\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby2.5 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ mv lib .gem2deb.lib mv ext .gem2deb.ext RUBYLIB=. GEM_PATH= ruby2.5 -S rake -f debian/ruby-tests.rake cp spec/configuration.yml.example spec/configuration.yml cp spec/my.cnf.example spec/my.cnf ./debian/start_mysqld_and_run.sh ruby2.5 -S rspec + mktemp -d + MYTEMP_DIR=/tmp/tmp.TKVPPE4PwJ + whoami + ME=debci + export MYSQL_UNIX_PORT=/tmp/tmp.TKVPPE4PwJ/mysql.sock + DO_MYSQL_USER=root + DO_MYSQL_PASS= + DO_MYSQL_DBNAME=test + DO_MYSQL_DATABASE=/test + mysql_install_db --no-defaults --datadir=/tmp/tmp.TKVPPE4PwJ --force --skip-name-resolve --user=root chown: changing ownership of '/tmp/tmp.TKVPPE4PwJ': Operation not permitted Cannot change ownership of the database directories to the 'root' user. Check that you have the necessary permissions and try again. rake aborted! Command failed with status (1): [./debian/start_mysqld_and_run.sh ruby2.5 -...] /tmp/autopkgtest-lxc.jy3256ab/downtmp/build.RJn/src/debian/ruby-tests.rake:8:in `block in <top (required)>' Tasks: TOP => default (See full trace by running task with --trace) mv .gem2deb.lib lib mv .gem2deb.ext ext autopkgtest [06:50:45]: test command1: -----------------------] autopkgtest [06:50:45]: test command1: - - - - - - - - - - results - - - - - - - - - - command1 FAIL non-zero exit status 1 autopkgtest [06:50:45]: @@@@@@@@@@@@@@@@@@@@ summary command1 FAIL non-zero exit status 1 Ubuntu has a patch for the debian/start_mysqld_and_run.sh script, and passes the autopkg tests (and skipping some further tests).
- d/start_mysqld_and_run.sh: Fixes FTBFS with MySQL 5.7 - Skip randomly failing test The test checks that server resources are freed when a statement is closed, but this doesn't always happen immediately, causing random failures. diff -Nru ruby-mysql2-0.5.2/debian/patches/series ruby-mysql2-0.5.2/debian/patches/series --- ruby-mysql2-0.5.2/debian/patches/series 2019-01-04 19:34:23.000000000 +0000 +++ ruby-mysql2-0.5.2/debian/patches/series 2019-03-04 12:10:47.000000000 +0000 @@ -3,3 +3,4 @@ remove_rpath_compilation_flag.patch skip-problematic-tests.patch trust-library-ABI.patch +skip-randomly-failing-test.patch diff -Nru ruby-mysql2-0.5.2/debian/patches/skip-randomly-failing-test.patch ruby-mysql2-0.5.2/debian/patches/skip-randomly-failing-test.patch --- ruby-mysql2-0.5.2/debian/patches/skip-randomly-failing-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-mysql2-0.5.2/debian/patches/skip-randomly-failing-test.patch 2019-03-04 12:10:47.000000000 +0000 @@ -0,0 +1,21 @@ +Description: Skip randomly failing test + The test tries to verify internal server behavior (garbage collection) + and will randomly fail because the server doesn't always free + up resources immediately. + +Author: Lars Tangvald <lars.tangv...@oracle.com> +Bug: https://github.com/brianmario/mysql2/issues/937 +Forwarded: not-needed +Last-Update: 2018-01-31 + +--- a/spec/mysql2/statement_spec.rb ++++ b/spec/mysql2/statement_spec.rb +@@ -696,7 +696,7 @@ RSpec.describe Mysql2::Statement do + end + + context 'close' do +- it 'should free server resources' do ++ xit 'should free server resources' do + stmt = @client.prepare 'SELECT 1' + GC.disable + expect { stmt.close }.to change(&method(:stmt_count)).by(-1) diff -Nru ruby-mysql2-0.5.2/debian/start_mysqld_and_run.sh ruby-mysql2-0.5.2/debian/start_mysqld_and_run.sh --- ruby-mysql2-0.5.2/debian/start_mysqld_and_run.sh 2019-01-04 19:34:23.000000000 +0000 +++ ruby-mysql2-0.5.2/debian/start_mysqld_and_run.sh 2019-03-04 12:10:47.000000000 +0000 @@ -17,12 +17,8 @@ DO_MYSQL_DBNAME=test DO_MYSQL_DATABASE=/${DO_MYSQL_DBNAME} -mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} --force --skip-name-resolve --user=${DO_MYSQL_USER} -cat >${MYTEMP_DIR}/init.sql <<EOT -UPDATE mysql.user SET plugin = ""; -FLUSH PRIVILEGES; -EOT -/usr/sbin/mysqld --no-defaults --user=${DO_MYSQL_USER} --socket=${MYSQL_UNIX_PORT} --datadir=${MYTEMP_DIR} --skip-networking --init-file=${MYTEMP_DIR}/init.sql & +mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} --insecure --basedir=/usr --user=${DO_MYSQL_USER} +/usr/sbin/mysqld --no-defaults --user=${DO_MYSQL_USER} --socket=${MYSQL_UNIX_PORT} --datadir=${MYTEMP_DIR} --skip-networking & echo -n pinging mysqld. attempts=0 while ! /usr/bin/mysqladmin --socket=${MYSQL_UNIX_PORT} ping ; do @@ -40,4 +36,6 @@ } trap cleanup INT EXIT TERM +mysql --user=${DO_MYSQL_USER} --socket=${MYSQL_UNIX_PORT} --execute "GRANT ALL PRIVILEGES ON ${DO_MYSQL_DBNAME}.* TO '${DO_MYSQL_USER}'@'localhost' IDENTIFIED BY '${DO_MYSQL_PASS}'; CREATE DATABASE test;" + "$@"