#1 New upstream release 0.4.10
Merged 6 years ago by vondruch. Opened 6 years ago by jaruga.
rpms/ jaruga/rubygem-mysql2 feature/update-to-0.4.10  into  master

file modified
+1
@@ -4,3 +4,4 @@ 

  /mysql2-0.4.0.gem

  /mysql2-0.4.4.gem

  /mysql2-0.4.8.gem

+ /mysql2-0.4.10.gem

@@ -0,0 +1,15 @@ 

+ diff --git a/spec/mysql2/statement_spec.rb b/spec/mysql2/statement_spec.rb

+ index 50b2e99..3db7886 100644

+ --- a/spec/mysql2/statement_spec.rb

+ +++ b/spec/mysql2/statement_spec.rb

+ @@ -731,7 +731,6 @@ RSpec.describe Mysql2::Statement do

+  

+      it 'should return number of rows affected by an insert' do

+        stmt = @client.prepare 'INSERT INTO lastIdTest (blah) VALUES (?)'

+ -      expect(stmt.affected_rows).to eq 0

+        stmt.execute 1

+        expect(stmt.affected_rows).to eq 1

+      end

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,162 @@ 

+ From 235eaa482ce2cfa0dfbe1e4e7123d1a1f6bbf136 Mon Sep 17 00:00:00 2001

+ From: Jun Aruga <junaruga@users.noreply.github.com>

+ Date: Sat, 25 Nov 2017 20:10:10 +0100

+ Subject: [PATCH 1/2] Suppress Fixnum and Bignum warnings on Ruby 2.4. (#907)

+ 

+ ---

+  spec/mysql2/client_spec.rb    |  8 ++++----

+  spec/mysql2/result_spec.rb    | 12 ++++++------

+  spec/mysql2/statement_spec.rb | 12 ++++++------

+  spec/spec_helper.rb           |  4 ++++

+  4 files changed, 20 insertions(+), 16 deletions(-)

+ 

+ diff --git a/spec/mysql2/client_spec.rb b/spec/mysql2/client_spec.rb

+ index dfb92a2..9de040b 100644

+ --- a/spec/mysql2/client_spec.rb

+ +++ b/spec/mysql2/client_spec.rb

+ @@ -572,7 +572,7 @@ RSpec.describe Mysql2::Client do

+        end

+  

+        it "#socket should return a Fixnum (file descriptor from C)" do

+ -        expect(@client.socket).to be_an_instance_of(Fixnum)

+ +        expect(@client.socket).to be_an_instance_of(0.class)

+          expect(@client.socket).not_to eql(0)

+        end

+  

+ @@ -852,7 +852,7 @@ RSpec.describe Mysql2::Client do

+      info = @client.info

+      expect(info).to be_an_instance_of(Hash)

+      expect(info).to have_key(:id)

+ -    expect(info[:id]).to be_an_instance_of(Fixnum)

+ +    expect(info[:id]).to be_an_instance_of(0.class)

+      expect(info).to have_key(:version)

+      expect(info[:version]).to be_an_instance_of(String)

+    end

+ @@ -883,7 +883,7 @@ RSpec.describe Mysql2::Client do

+      server_info = @client.server_info

+      expect(server_info).to be_an_instance_of(Hash)

+      expect(server_info).to have_key(:id)

+ -    expect(server_info[:id]).to be_an_instance_of(Fixnum)

+ +    expect(server_info[:id]).to be_an_instance_of(0.class)

+      expect(server_info).to have_key(:version)

+      expect(server_info[:version]).to be_an_instance_of(String)

+    end

+ @@ -974,7 +974,7 @@ RSpec.describe Mysql2::Client do

+    end

+  

+    it "#thread_id should be a Fixnum" do

+ -    expect(@client.thread_id).to be_an_instance_of(Fixnum)

+ +    expect(@client.thread_id).to be_an_instance_of(0.class)

+    end

+  

+    it "should respond to #ping" do

+ diff --git a/spec/mysql2/result_spec.rb b/spec/mysql2/result_spec.rb

+ index c8e26c5..e8ee8d0 100644

+ --- a/spec/mysql2/result_spec.rb

+ +++ b/spec/mysql2/result_spec.rb

+ @@ -204,7 +204,7 @@ RSpec.describe Mysql2::Result do

+      end

+  

+      it "should return Fixnum for a TINYINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['tiny_int_test'].class)

+ +      expect(num_classes).to include(@test_result['tiny_int_test'].class)

+        expect(@test_result['tiny_int_test']).to eql(1)

+      end

+  

+ @@ -248,27 +248,27 @@ RSpec.describe Mysql2::Result do

+      end

+  

+      it "should return Fixnum for a SMALLINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['small_int_test'].class)

+ +      expect(num_classes).to include(@test_result['small_int_test'].class)

+        expect(@test_result['small_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a MEDIUMINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['medium_int_test'].class)

+ +      expect(num_classes).to include(@test_result['medium_int_test'].class)

+        expect(@test_result['medium_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for an INT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['int_test'].class)

+ +      expect(num_classes).to include(@test_result['int_test'].class)

+        expect(@test_result['int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a BIGINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['big_int_test'].class)

+ +      expect(num_classes).to include(@test_result['big_int_test'].class)

+        expect(@test_result['big_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a YEAR value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['year_test'].class)

+ +      expect(num_classes).to include(@test_result['year_test'].class)

+        expect(@test_result['year_test']).to eql(2009)

+      end

+  

+ diff --git a/spec/mysql2/statement_spec.rb b/spec/mysql2/statement_spec.rb

+ index e0fccad..50b2e99 100644

+ --- a/spec/mysql2/statement_spec.rb

+ +++ b/spec/mysql2/statement_spec.rb

+ @@ -372,7 +372,7 @@ RSpec.describe Mysql2::Statement do

+      end

+  

+      it "should return Fixnum for a TINYINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['tiny_int_test'].class)

+ +      expect(num_classes).to include(@test_result['tiny_int_test'].class)

+        expect(@test_result['tiny_int_test']).to eql(1)

+      end

+  

+ @@ -420,27 +420,27 @@ RSpec.describe Mysql2::Statement do

+      end

+  

+      it "should return Fixnum for a SMALLINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['small_int_test'].class)

+ +      expect(num_classes).to include(@test_result['small_int_test'].class)

+        expect(@test_result['small_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a MEDIUMINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['medium_int_test'].class)

+ +      expect(num_classes).to include(@test_result['medium_int_test'].class)

+        expect(@test_result['medium_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for an INT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['int_test'].class)

+ +      expect(num_classes).to include(@test_result['int_test'].class)

+        expect(@test_result['int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a BIGINT value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['big_int_test'].class)

+ +      expect(num_classes).to include(@test_result['big_int_test'].class)

+        expect(@test_result['big_int_test']).to eql(10)

+      end

+  

+      it "should return Fixnum for a YEAR value" do

+ -      expect([Fixnum, Bignum]).to include(@test_result['year_test'].class)

+ +      expect(num_classes).to include(@test_result['year_test'].class)

+        expect(@test_result['year_test']).to eql(2009)

+      end

+  

+ diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb

+ index 53c098a..045e783 100644

+ --- a/spec/spec_helper.rb

+ +++ b/spec/spec_helper.rb

+ @@ -36,6 +36,10 @@ RSpec.configure do |config|

+      end

+    end

+  

+ +  def num_classes

+ +    0.class == Integer ? [Integer] : [Fixnum, Bignum]

+ +  end

+ +

+    config.before :each do

+      @client = new_client

+    end

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,37 @@ 

+ diff --git a/ext/mysql2/result.c b/ext/mysql2/result.c

+ index ccb49a5..67f75be 100644

+ --- a/ext/mysql2/result.c

+ +++ b/ext/mysql2/result.c

+ @@ -278,12 +278,12 @@ static void rb_mysql_result_alloc_result_buffers(VALUE self, MYSQL_FIELD *fields

+          wrapper->result_buffers[i].buffer_length = sizeof(signed char);

+          break;

+        case MYSQL_TYPE_SHORT:        // short int

+ +      case MYSQL_TYPE_YEAR:         // short int

+          wrapper->result_buffers[i].buffer = xcalloc(1, sizeof(short int));

+          wrapper->result_buffers[i].buffer_length = sizeof(short int);

+          break;

+        case MYSQL_TYPE_INT24:        // int

+        case MYSQL_TYPE_LONG:         // int

+ -      case MYSQL_TYPE_YEAR:         // int

+          wrapper->result_buffers[i].buffer = xcalloc(1, sizeof(int));

+          wrapper->result_buffers[i].buffer_length = sizeof(int);

+          break;

+ @@ -413,6 +413,7 @@ static VALUE rb_mysql_result_fetch_row_stmt(VALUE self, MYSQL_FIELD * fields, co

+            }

+            break;

+          case MYSQL_TYPE_SHORT:        // short int

+ +        case MYSQL_TYPE_YEAR:         // short int

+            if (result_buffer->is_unsigned) {

+              val = UINT2NUM(*((unsigned short int*)result_buffer->buffer));

+            } else  {

+ @@ -421,7 +422,6 @@ static VALUE rb_mysql_result_fetch_row_stmt(VALUE self, MYSQL_FIELD * fields, co

+            break;

+          case MYSQL_TYPE_INT24:        // int

+          case MYSQL_TYPE_LONG:         // int

+ -        case MYSQL_TYPE_YEAR:         // int

+            if (result_buffer->is_unsigned) {

+              val = UINT2NUM(*((unsigned int*)result_buffer->buffer));

+            } else {

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,15 @@ 

+ diff --git a/ext/mysql2/client.c b/ext/mysql2/client.c

+ index 665147a2..482f1877 100644

+ --- a/ext/mysql2/client.c

+ +++ b/ext/mysql2/client.c

+ @@ -872,8 +872,8 @@ static VALUE _mysql_client_options(VALUE self, int opt, VALUE value) {

+        break;

+  

+      case MYSQL_OPT_LOCAL_INFILE:

+ -      intval = (value == Qfalse ? 0 : 1);

+ -      retval = &intval;

+ +      boolval = (value == Qfalse ? 0 : 1);

+ +      retval = &boolval;

+        break;

+  

+      case MYSQL_OPT_RECONNECT:

file modified
+116 -16
@@ -1,21 +1,47 @@ 

+ # build with tests?

+ %bcond_without tests

+ 

  # Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*-

  %global gem_name mysql2

  

  Name: rubygem-%{gem_name}

- Version: 0.4.8

- Release: 3%{?dist}

+ Version: 0.4.10

+ Release: 1%{?dist}

  Summary: A simple, fast Mysql library for Ruby, binding to libmysql

- Group: Development/Languages

  License: MIT

  URL: http://github.com/brianmario/mysql2

  Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

- Requires: mariadb-libs

+ # Fix a client option local_infile not enabled

+ # with mariadb-connector-c 3.0.2 on big endian environment.

+ # Temporary patch until mariadb-connector-c version 3.0.3 released.

+ # https://github.com/brianmario/mysql2/pull/914

+ # https://github.com/MariaDB/mariadb-connector-c/commit/434b67e

+ Patch0: rubygem-mysql2-0.4.10-mariadb-connector-c-3.0.2-fix-wrong-local-infile-on-big-endian.patch

+ # Fix YEAR type wrong value on big endian environment.

+ # https://github.com/brianmario/mysql2/pull/921

+ Patch1: rubygem-mysql2-0.4.10-fix-wrong-type-year-value-on-big-endian.patch

+ # Suppress Fixnum and Bignum warnings on Ruby 2.4.

+ # https://github.com/brianmario/mysql2/commit/0e4fcc3

+ Patch2: rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.patch

+ # Skip test to prepare statement and no query on MariaDB 10.2.

+ # https://github.com/brianmario/mysql2/commit/a2fadb6

+ Patch3: rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch

+ 

+ # Required in lib/mysql2.rb

+ Requires: rubygem(bigdecimal)

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby-devel

- BuildRequires: rubygem(rspec)

- BuildRequires: mariadb-devel

+ BuildRequires: mariadb-connector-c-devel

+ %if %{with tests}

  BuildRequires: mariadb-server

+ BuildRequires: rubygem(rspec)

+ # Used in mysql_install_db

+ BuildRequires: %{_bindir}/hostname

+ BuildRequires: rubygem(bigdecimal)

+ # Used in spec/em/em_spec.rb

+ BuildRequires: rubygem(eventmachine)

+ %endif

  

  %description

  The Mysql2 gem is meant to serve the extremely common use-case of
@@ -26,7 +52,6 @@ 

  

  %package doc

  Summary: Documentation for %{name}

- Group: Documentation

  Requires: %{name} = %{version}-%{release}

  BuildArch: noarch

  
@@ -38,6 +63,9 @@ 

  

  %setup -q -D -T -n  %{gem_name}-%{version}

  

+ %patch0 -p1

+ %patch1 -p1

+ 

  gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec

  

  %build
@@ -61,16 +89,84 @@ 

  rm -rf %{buildroot}%{gem_instdir}/ext

  

  

- # Remove some droppings

- rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml}

- rm -rf %{buildroot}%{gem_instdir}/spec

- 

+ %if %{with tests}

  %check

- # We can't run the tests because they require a mysql instance. That's

- # a bit much to require for builds. The following invocation is documentation

- #systemctl start mysqld.service

- #rspec -I%%{buildroot}%%{gem_extdir_mri}/lib/ spec

- 

+ pushd .%{gem_instdir}

+ 

+ TOP_DIR=$(pwd)

+ # Use testing port because the standard mysqld port 3306 is occupied.

+ MYSQL_TEST_PORT="13306"

+ MYSQL_TEST_USER=$(id -un)

+ MYSQL_TEST_DATA_DIR="${TOP_DIR}/data"

+ MYSQL_TEST_SOCKET="${TOP_DIR}/mysql.sock"

+ MYSQL_TEST_LOG="${TOP_DIR}/mysql.log"

+ MYSQL_TEST_PID_FILE="${TOP_DIR}/mysql.pid"

+ 

+ mkdir "${MYSQL_TEST_DATA_DIR}"

+ mysql_install_db \

+   --datadir="${MYSQL_TEST_DATA_DIR}" \

+   --log-error="${MYSQL_TEST_LOG}"

+ 

+ %{_libexecdir}/mysqld \

+   --datadir="${MYSQL_TEST_DATA_DIR}" \

+   --log-error="${MYSQL_TEST_LOG}" \

+   --socket="${MYSQL_TEST_SOCKET}" \

+   --pid-file="${MYSQL_TEST_PID_FILE}" \

+   --port="${MYSQL_TEST_PORT}" \

+   --ssl &

+ 

+ for i in $(seq 10); do

+   sleep 1

+   if grep -q 'ready for connections.' "${MYSQL_TEST_LOG}"; then

+     break

+   fi

+   echo "Waiting connections... ${i}"

+ done

+ 

+ # See https://github.com/brianmario/mysql2/blob/master/.travis_setup.sh

+ mysql -u root \

+   -e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \

+   -S "${MYSQL_TEST_SOCKET}" \

+   -P "${MYSQL_TEST_PORT}"

+ 

+ # See https://github.com/brianmario/mysql2/blob/master/tasks/rspec.rake

+ cat <<EOF > spec/configuration.yml

+ root:

+   host: localhost

+   username: root

+   password:

+   database: test

+   port: ${MYSQL_TEST_PORT}

+   socket: ${MYSQL_TEST_SOCKET}

+ 

+ user:

+   host: localhost

+   username: ${MYSQL_TEST_USER}

+   password:

+   database: mysql2_test

+   port: ${MYSQL_TEST_PORT}

+   socket: ${MYSQL_TEST_SOCKET}

+ EOF

+ 

+ cat "%{PATCH2}" | patch -p1

+ cat "%{PATCH3}" | patch -p1

+ 

+ # Comment out an issue (maybe test specified issue) for coredump or

+ # SystemStackError: stack level too deep.

+ sed -i '/^    it "returns error messages and sql state in Encoding.default_internal if set" do$/,/^    end$/ s/^/#/' \

+   spec/mysql2/error_spec.rb

+ 

+ # This test would require changes in host configuration.

+ sed -i '/^  it "should be able to connect via SSL options" do$/,/^  end$/ s/^/#/' \

+   spec/mysql2/client_spec.rb

+ 

+ rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec

+ popd

+ 

+ # Clean up

+ kill "$(cat "${MYSQL_TEST_PID_FILE}")"

+ 

+ %endif

  

  %files

  %dir %{gem_instdir}
@@ -86,9 +182,13 @@ 

  %doc %{gem_instdir}/README.md

  %doc %{gem_instdir}/CHANGELOG.md

  %{gem_instdir}/examples

+ %{gem_instdir}/spec

  

  

  %changelog

+ * Thu Nov 23 2017 Jun Aruga <jaruga@redhat.com> - 0.4.10-1

+ - New upstream release 0.4.10

+ 

  * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.8-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (mysql2-0.4.8.gem) = f40ba8fdc49365eb6c7e903d20e518c5548e11878ffa00f254f4d5b2b5590fa1b042eb37b6395841326b0ec49cfd94df0565a90312a591c511079e0f57367496

+ SHA512 (mysql2-0.4.10.gem) = 1f9c8eb1b120cfc940b3aa26b2dff54735ccdf54fd6e6745e347179d29803b4a4d1f3b80a86f92dd534089f625ffcd6055458f27aaefebe58f8332890a842b43

Updated to latest version 0.4.10.

  • I added unit test as last time the unit test was disabled.
    I could find issues related to required PRM packages because of that.
    Adding the unit test is better to maintain.
  • Removed "Group: Documentation"
    Group tag should not be used any more.
    Ref: https://fedoraproject.org/w/index.php?title=Packaging:Guidelines&diff=487247&oldid=487238
  • mariadb-libs does not exist on rawhide (f28) any more. [1]
    Instead of that, mariadb-connector-c exists there. I changed mariadb-libs to mariadb-connector-c
  • I added conditional macro tests. As a default, the unit test is enabled.
    But we can disable the unit tests like this.
    mock -r fedora-rawhide-x86_64 --without tests *.src.rpm
    The reason is because I am creating modularity for this PRM package. And I do not want to include build dependencies such as rspec right now.
  • I commented out one test case in spec/mysql2/error_spec.rb.
    This test becomes SystemStackError: stack level too deep. (Recursive logic?) on mock build.
    Upstream is fine. When I tested this case with simple logic [2], that was ok.
    Right now I commented out this case.
    I added document format (-f d) for the rspec output (rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec), because the it was useful to find this issue that was sometimes freezing.

I checked below things too.

  • Dependency check: ok
  • rubygem-riddle
  • License check: ok
  • rpmlint check: ok
  • Install check: ok
  • IRB (Run at mock environment) check: ok

Scratch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=23424557
Right now there are errors on ppc64 and s390x. I am checking it.

If this pull-request work flow does not work well, I hope you give me the permission for this repo, or merge it by yourself after finishing reviewing.

[1] https://koji.fedoraproject.org/koji/packageinfo?packageID=15262
[2]

#/usr/bin/env ruby

require 'mysql2'

begin
  options = { 
    "host" => "localhost",
    "username" => "root",
    "password" => nil,
    "database" => "test",
    "port" => 13306,
    "socket" => "/builddir/build/BUILD/mysql2-0.4.10/usr/share/gems/gems/mysql2-0.4.10/mysql.sock"
  }
  client = Mysql2::Client.new(options)
  p client
  begin
    Encoding.default_internal = Encoding::UTF_16LE
    client.query("HAHAHA")
  rescue Mysql2::Error => e
    error = e 
    p error.message.encoding
    if error.message.encoding == Encoding.default_internal
      puts "OK"
    end 
  end 
ensure
  client.close
end

rebased onto e053a73

6 years ago

rebased onto a697c81

6 years ago

Right now there are errors on ppc64 and s390x. I am checking it.

Rebased. Scratch build was success on above environment too.

Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=23546810

Though I found the issues I commented the tests out on the RPM spec file happen on big endian environment such as ppc64 s390x, adding unit tests is better situation than previous one. I am working for the issues on the upstream project.

So, I wish this PR might be merged or cherry-picked.

rebased onto 4c9ffd0

6 years ago

Rebased again.
The above issues was fixed in both the upstream and this RPM spec file.
Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=23560424

  • I don't think that R: mariadb-connector-c is required. The package has autogenerated dependency on libmariadb.so.3 and that should be enough [1].

  • Could you please clarify the "We can not test to need to change hosts information." comment? I think you want to say something like "This test would require changes in host configuration."

Otherwise the PR looks good.

I don't think that R: mariadb-connector-c is required. The package has autogenerated dependency on libmariadb.so.3 and that should be enough [1].

OK I will remove it.

Could you please clarify the "We can not test to need to change hosts information." comment? I think you want to say something like "This test would require changes in host configuration."

Yes correct. That requires to change host configuration like /etc/hosts to verify SSL files.

https://github.com/brianmario/mysql2/blob/master/spec/mysql2/client_spec.rb#L138-L145

it "should be able to connect via SSL options" do
...
    expect do
      ssl_client = new_client(
        'host'     => 'mysql2gem.example.com', # must match the certificates
        :sslkey    => '/etc/mysql/client-key.pem',
        :sslcert   => '/etc/mysql/client-cert.pem',
        :sslca     => '/etc/mysql/ca-cert.pem',
        :sslcipher => 'DHE-RSA-AES256-SHA',
        :sslverify => true,
      ) 
...

$ grep -r mysql2gem.example.com spec/
spec/ssl/ca.cnf:emailAddress_default           = mysql2gem@example.com
spec/ssl/cert.cnf:emailAddress_default           = mysql2gem@example.com
spec/ssl/cert.cnf:commonName_default             = mysql2gem.example.com
spec/ssl/gen_certs.sh:emailAddress_default           = mysql2gem@example.com
spec/ssl/gen_certs.sh:commonName_default             = mysql2gem.example.com
spec/mysql2/client_spec.rb:        'host'     => 'mysql2gem.example.com', # must match the certificates

On upstream Travis test, they are adding host information.
mysql2gem.example.com 127.0.0.1 to /etc/hosts by root permission. Maybe.

https://github.com/brianmario/mysql2/blob/master/.travis.yml#L47

        hosts:
            - mysql2gem.example.com

Modified like this. and rebase as 1 commit.

diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec
index 7129506..4447fb5 100644
--- a/rubygem-mysql2.spec
+++ b/rubygem-mysql2.spec
@@ -27,7 +27,6 @@ Patch2: rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.pat
 # https://github.com/brianmario/mysql2/commit/a2fadb6
 Patch3: rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch

-Requires: mariadb-connector-c
 # Required in lib/mysql2.rb
 Requires: rubygem(bigdecimal)
 BuildRequires: ruby(release)
@@ -157,7 +156,7 @@ cat "%{PATCH3}" | patch -p1
 sed -i '/^    it "returns error messages and sql state in Encoding.default_internal if set" do$/,/^    end$/ s/^/#/' \
   spec/mysql2/error_spec.rb

-# We can not test to need to change hosts information.
+# This test would require changes in host configuration.
 sed -i '/^  it "should be able to connect via SSL options" do$/,/^  end$/ s/^/#/' \
   spec/mysql2/client_spec.rb

rebased onto 2030413

6 years ago

LGTM

Could you please upload the sources into look-aside cache and include the updated sources file in PR, so that no additional commits after merge are required? Thx.

rebased onto a0c3c0e

6 years ago

@vondruch ok I updated sources (and .gitignore) as a result of fedpkg import *.src.rpm.
No additional commits are required.

@jaruga Great, thx!

@achernya Since this is broken more then 3 months, I'm going to merge this PR and build the package ...

Pull-Request has been merged by vondruch

6 years ago