From effaeeb72e76b3fdee4ad4c9fb7fe9b6809b3fba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 26 Aug 2013 12:20:43 +0000 Subject: [PATCH 01/26] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From e29980bac6d9b27ec0e9eb2257c6130a527b816d Mon Sep 17 00:00:00 2001 From: Alexander Chernyakhovsky Date: Wed, 11 Sep 2013 20:34:39 -0400 Subject: [PATCH 02/26] Import rubygem-0.3.13 --- .gitignore | 1 + rubygem-mysql2.spec | 92 +++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 94 insertions(+) create mode 100644 rubygem-mysql2.spec diff --git a/.gitignore b/.gitignore index e69de29..4e183c7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/mysql2-0.3.13.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec new file mode 100644 index 0000000..2f7b323 --- /dev/null +++ b/rubygem-mysql2.spec @@ -0,0 +1,92 @@ +# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*- +%global gem_name mysql2 + +Name: rubygem-%{gem_name} +Version: 0.3.13 +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: ruby(release) +Requires: ruby(rubygems) +Requires: mariadb-libs +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby-devel +BuildRequires: rubygem(rspec) +BuildRequires: mariadb-devel +BuildRequires: mariadb-server +Provides: rubygem(%{gem_name}) = %{version} + +%description +The Mysql2 gem is meant to serve the extremely common use-case of +connecting, querying and iterating on results. Some database libraries +out there serve as direct 1:1 mappings of the already complex C API\'s +available. This one is not. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +%build +# Create the gem as gem install only works on a gem file +gem build %{gem_name}.gemspec + +# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir +# by default, so that we can move it into the buildroot in %%install +%gem_install + + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2 +mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2 + +# Remove some droppings +rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml} +rm -rf %{buildroot}%{gem_instdir}/spec + +%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 + + +%files +%dir %{gem_instdir} +%{gem_libdir} +%exclude %{gem_instdir}/ext +%{gem_extdir_mri} +%exclude %{gem_cache} +%{gem_spec} +%exclude %{gem_instdir}/support +%doc %{gem_instdir}/MIT-LICENSE + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/README.md +%{gem_instdir}/examples + + +%changelog +* Wed Sep 11 2013 Alexander Chernyakhovsky - 0.3.13-1 +- Initial package diff --git a/sources b/sources index e69de29..3af5722 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ee8dfc03421a1db9f6147d2efde7ced8 mysql2-0.3.13.gem From 5b61ea253e7b6165da03dabe80f84b2545aa7d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 11 Feb 2014 09:02:42 +0100 Subject: [PATCH 03/26] Update rubygem-mysql2 to 0.3.15-1 --- .gitignore | 1 + rubygem-mysql2.spec | 71 +++++++++++++++++++++++++-------------------- sources | 2 +- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 4e183c7..6c6ef6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mysql2-0.3.13.gem +/mysql2-0.3.15.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 2f7b323..6e18624 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -1,8 +1,7 @@ -# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*- %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.3.13 +Version: 0.3.15 Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages @@ -10,22 +9,29 @@ License: MIT URL: http://github.com/brianmario/mysql2 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(release) -Requires: ruby(rubygems) -Requires: mariadb-libs +Requires: ruby(rubygems) +Requires: mysql BuildRequires: ruby(release) -BuildRequires: rubygems-devel -BuildRequires: ruby-devel -BuildRequires: rubygem(rspec) -BuildRequires: mariadb-devel -BuildRequires: mariadb-server +BuildRequires: rubygems-devel +BuildRequires: ruby ruby-devel +BuildRequires: mysql mysql-devel Provides: rubygem(%{gem_name}) = %{version} %description -The Mysql2 gem is meant to serve the extremely common use-case of -connecting, querying and iterating on results. Some database libraries -out there serve as direct 1:1 mappings of the already complex C API\'s -available. This one is not. +The Mysql2 gem is meant to serve the extremely common use-case of connecting, +querying and iterating on results. Some database libraries out there serve as +direct 1:1 mappings of the already complex C API's available. This one is not. +It also forces the use of UTF-8 [or binary] for the connection [and all strings +in 1.9, unless Encoding.default_internal is set then it'll convert from UTF-8 +to that encoding] and uses encoding-aware MySQL API calls where it can. + +The API consists of two classes: + +Mysql2::Client - your connection to the database + +Mysql2::Result - returned from issuing a #query on the connection. It includes +Enumerable. %package doc Summary: Documentation for %{name} @@ -34,7 +40,7 @@ Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc -Documentation for %{name} +Documentation for %{name}. %prep gem unpack %{SOURCE0} @@ -47,28 +53,20 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec -# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir +# %%gem_install compiles any C extensions and installs the gem into ./%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install - %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2 -mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2 +mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2/ -# Remove some droppings -rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml} -rm -rf %{buildroot}%{gem_instdir}/spec - -%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 +# Remove the binary extension sources and build leftovers. +rm -rf %{buildroot}%{geminstdir}/ext %files @@ -78,15 +76,24 @@ rm -rf %{buildroot}%{gem_instdir}/spec %{gem_extdir_mri} %exclude %{gem_cache} %{gem_spec} -%exclude %{gem_instdir}/support +%{gem_instdir}/support/ +%doc %{gem_instdir}/README.md %doc %{gem_instdir}/MIT-LICENSE + %files doc %doc %{gem_docdir} -%doc %{gem_instdir}/README.md -%{gem_instdir}/examples - +%{gem_instdir}/spec/ +%{gem_instdir}/examples/ %changelog -* Wed Sep 11 2013 Alexander Chernyakhovsky - 0.3.13-1 -- Initial package +* Tue Feb 11 2014 Miroslav Suchý 0.3.15-1 +- rebase to mysql2-0.3.15 + +* Mon Jul 29 2013 Miroslav Suchý 0.3.13-3 +- fix files section +- move extension + +* Fri Jul 26 2013 Miroslav Suchý 0.3.13-2 +- initial package + diff --git a/sources b/sources index 3af5722..84b2874 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee8dfc03421a1db9f6147d2efde7ced8 mysql2-0.3.13.gem +c317fc0dc8e2b409f13fe045fa665dd7 mysql2-0.3.15.gem From 32e89fa99837269975c08ee91e8c67f05f4e3ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 11 Feb 2014 11:06:20 +0100 Subject: [PATCH 04/26] Revert "Update rubygem-mysql2 to 0.3.15-1" This reverts commit 5b61ea253e7b6165da03dabe80f84b2545aa7d6a. --- .gitignore | 1 - rubygem-mysql2.spec | 71 ++++++++++++++++++++------------------------- sources | 2 +- 3 files changed, 33 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index 6c6ef6d..4e183c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /mysql2-0.3.13.gem -/mysql2-0.3.15.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 6e18624..2f7b323 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -1,7 +1,8 @@ +# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*- %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.3.15 +Version: 0.3.13 Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages @@ -9,29 +10,22 @@ License: MIT URL: http://github.com/brianmario/mysql2 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: ruby(release) -Requires: ruby(rubygems) -Requires: mysql +Requires: ruby(rubygems) +Requires: mariadb-libs BuildRequires: ruby(release) -BuildRequires: rubygems-devel -BuildRequires: ruby ruby-devel -BuildRequires: mysql mysql-devel +BuildRequires: rubygems-devel +BuildRequires: ruby-devel +BuildRequires: rubygem(rspec) +BuildRequires: mariadb-devel +BuildRequires: mariadb-server Provides: rubygem(%{gem_name}) = %{version} %description -The Mysql2 gem is meant to serve the extremely common use-case of connecting, -querying and iterating on results. Some database libraries out there serve as -direct 1:1 mappings of the already complex C API's available. This one is not. +The Mysql2 gem is meant to serve the extremely common use-case of +connecting, querying and iterating on results. Some database libraries +out there serve as direct 1:1 mappings of the already complex C API\'s +available. This one is not. -It also forces the use of UTF-8 [or binary] for the connection [and all strings -in 1.9, unless Encoding.default_internal is set then it'll convert from UTF-8 -to that encoding] and uses encoding-aware MySQL API calls where it can. - -The API consists of two classes: - -Mysql2::Client - your connection to the database - -Mysql2::Result - returned from issuing a #query on the connection. It includes -Enumerable. %package doc Summary: Documentation for %{name} @@ -40,7 +34,7 @@ Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc -Documentation for %{name}. +Documentation for %{name} %prep gem unpack %{SOURCE0} @@ -53,20 +47,28 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec -# %%gem_install compiles any C extensions and installs the gem into ./%gem_dir +# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install + %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2 -mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2/ +mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2 -# Remove the binary extension sources and build leftovers. -rm -rf %{buildroot}%{geminstdir}/ext +# Remove some droppings +rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml} +rm -rf %{buildroot}%{gem_instdir}/spec + +%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 %files @@ -76,24 +78,15 @@ rm -rf %{buildroot}%{geminstdir}/ext %{gem_extdir_mri} %exclude %{gem_cache} %{gem_spec} -%{gem_instdir}/support/ -%doc %{gem_instdir}/README.md +%exclude %{gem_instdir}/support %doc %{gem_instdir}/MIT-LICENSE - %files doc %doc %{gem_docdir} -%{gem_instdir}/spec/ -%{gem_instdir}/examples/ +%doc %{gem_instdir}/README.md +%{gem_instdir}/examples + %changelog -* Tue Feb 11 2014 Miroslav Suchý 0.3.15-1 -- rebase to mysql2-0.3.15 - -* Mon Jul 29 2013 Miroslav Suchý 0.3.13-3 -- fix files section -- move extension - -* Fri Jul 26 2013 Miroslav Suchý 0.3.13-2 -- initial package - +* Wed Sep 11 2013 Alexander Chernyakhovsky - 0.3.13-1 +- Initial package diff --git a/sources b/sources index 84b2874..3af5722 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c317fc0dc8e2b409f13fe045fa665dd7 mysql2-0.3.15.gem +ee8dfc03421a1db9f6147d2efde7ced8 mysql2-0.3.13.gem From 3761ec59a9404c9d180143138baf08411ff33b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 11 Feb 2014 11:10:17 +0100 Subject: [PATCH 05/26] rebase to mysql2-0.3.15 -- second take --- .gitignore | 1 + rubygem-mysql2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4e183c7..6c6ef6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mysql2-0.3.13.gem +/mysql2-0.3.15.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 2f7b323..3f6cf70 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -2,8 +2,8 @@ %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.3.13 -Release: 1%{?dist} +Version: 0.3.15 +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,5 +88,8 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Tue Feb 11 2014 Miroslav Suchý 0.3.15-2 +- rebase to mysql2-0.3.15 + * Wed Sep 11 2013 Alexander Chernyakhovsky - 0.3.13-1 - Initial package diff --git a/sources b/sources index 3af5722..84b2874 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee8dfc03421a1db9f6147d2efde7ced8 mysql2-0.3.13.gem +c317fc0dc8e2b409f13fe045fa665dd7 mysql2-0.3.15.gem From 528b514ae19cc4b5c264bc7d67e440e5702878d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 15 Apr 2014 09:40:22 +0200 Subject: [PATCH 06/26] Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 --- rubygem-mysql2.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 3f6cf70..936fa0b 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,14 +3,12 @@ Name: rubygem-%{gem_name} Version: 0.3.15 -Release: 2%{?dist} +Release: 3%{?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: ruby(release) -Requires: ruby(rubygems) Requires: mariadb-libs BuildRequires: ruby(release) BuildRequires: rubygems-devel @@ -18,7 +16,6 @@ BuildRequires: ruby-devel BuildRequires: rubygem(rspec) BuildRequires: mariadb-devel BuildRequires: mariadb-server -Provides: rubygem(%{gem_name}) = %{version} %description The Mysql2 gem is meant to serve the extremely common use-case of @@ -57,8 +54,12 @@ mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ -mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2 -mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2 +mkdir -p %{buildroot}%{gem_extdir_mri} +cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ + +# Prevent dangling symlink in -debuginfo. +rm -rf %{buildroot}%{gem_instdir}/ext + # Remove some droppings rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml} @@ -74,7 +75,6 @@ rm -rf %{buildroot}%{gem_instdir}/spec %files %dir %{gem_instdir} %{gem_libdir} -%exclude %{gem_instdir}/ext %{gem_extdir_mri} %exclude %{gem_cache} %{gem_spec} @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Tue Apr 15 2014 Vít Ondruch - 0.3.15-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 + * Tue Feb 11 2014 Miroslav Suchý 0.3.15-2 - rebase to mysql2-0.3.15 From 958626ff1cc21a127a01177ef1e8638dae0a4f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 26 May 2014 13:00:45 +0200 Subject: [PATCH 07/26] rebase to mysql2-0.3.16 --- rubygem-mysql2.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 936fa0b..a756a90 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -2,8 +2,8 @@ %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.3.15 -Release: 3%{?dist} +Version: 0.3.16 +Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Mon May 26 2014 Miroslav Suchý 0.3.16-1 +- rebase to mysql2-0.3.16 + * Tue Apr 15 2014 Vít Ondruch - 0.3.15-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 From 7df83b5e4c8dc6d40a87be41dabe85cf7c3b0744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 26 May 2014 13:09:40 +0200 Subject: [PATCH 08/26] rebase to mysql2-0.3.16 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6c6ef6d..56551a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /mysql2-0.3.13.gem /mysql2-0.3.15.gem +/mysql2-0.3.16.gem diff --git a/sources b/sources index 84b2874..07e98bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c317fc0dc8e2b409f13fe045fa665dd7 mysql2-0.3.15.gem +49ed8d9f8a2ce296eb47a507f3711d42 mysql2-0.3.16.gem From 1065dfdf9b286f606f35f823421c184b84dcc0cc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 23:44:49 -0500 Subject: [PATCH 09/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index a756a90..6e98dc0 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.3.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 0.3.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Mon May 26 2014 Miroslav Suchý 0.3.16-1 - rebase to mysql2-0.3.16 From 388b6440bfd0c92fed8aac53c359d236676a69af Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 00:49:09 +0000 Subject: [PATCH 10/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 6e98dc0..a825795 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.3.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 0.3.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 0.3.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 1e8e28bb748a1809fd3b338ddb717ffc3227b932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 16 Jan 2015 13:27:55 +0100 Subject: [PATCH 11/26] Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2 --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index a825795..7d78f2c 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.3.16 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Fri Jan 16 2015 Vít Ondruch - 0.3.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2 + * Mon Aug 18 2014 Fedora Release Engineering - 0.3.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 2b0c6f03bc41284edc8bca50a29773e9960d84a0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 23:29:59 +0000 Subject: [PATCH 12/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 7d78f2c..44933c1 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.3.16 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -88,6 +88,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 0.3.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Fri Jan 16 2015 Vít Ondruch - 0.3.16-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2 From 90a2da4853639d817d7393220a358a1494b8120a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 8 Sep 2015 15:06:06 +0200 Subject: [PATCH 13/26] rebase to mysql2-0.4.0 --- .gitignore | 1 + rubygem-mysql2.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 56551a1..63f5321 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /mysql2-0.3.13.gem /mysql2-0.3.15.gem /mysql2-0.3.16.gem +/mysql2-0.4.0.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 44933c1..36bd6d9 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -2,8 +2,8 @@ %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.3.16 -Release: 5%{?dist} +Version: 0.4.0 +Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -79,15 +79,19 @@ rm -rf %{buildroot}%{gem_instdir}/spec %exclude %{gem_cache} %{gem_spec} %exclude %{gem_instdir}/support -%doc %{gem_instdir}/MIT-LICENSE +%license %{gem_instdir}/LICENSE %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md +%doc %{gem_instdir}/CHANGELOG.md %{gem_instdir}/examples %changelog +* Tue Sep 8 2015 Miroslav Suchý 0.4.0-1 +- rebase to mysql2-0.4.0 + * Thu Jun 18 2015 Fedora Release Engineering - 0.3.16-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 07e98bd..5011baa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -49ed8d9f8a2ce296eb47a507f3711d42 mysql2-0.3.16.gem +c0e8cd8a524438cb74b0937819fa772e mysql2-0.4.0.gem From ba89098f202e5987b83b1804fb492022ffdab6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 11 Jan 2016 15:52:35 +0100 Subject: [PATCH 14/26] Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 36bd6d9..28759f5 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Mon Jan 11 2016 Vít Ondruch - 0.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 + * Tue Sep 8 2015 Miroslav Suchý 0.4.0-1 - rebase to mysql2-0.4.0 From 6d7c294947fa1dc9ea0f1a592f1d7ad7dfb767dd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 23:00:28 +0000 Subject: [PATCH 15/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 28759f5..72bbbd2 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 0.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Jan 11 2016 Vít Ondruch - 0.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 From d6feaa2572c6914155e4a8ec8e73395e1fb50b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 9 Jun 2016 10:08:38 +0200 Subject: [PATCH 16/26] rebase to 0.4.4 --- .gitignore | 1 + rubygem-mysql2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 63f5321..5fe84ca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /mysql2-0.3.15.gem /mysql2-0.3.16.gem /mysql2-0.4.0.gem +/mysql2-0.4.4.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 72bbbd2..f41c458 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -2,8 +2,8 @@ %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.4.0 -Release: 3%{?dist} +Version: 0.4.4 +Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Jun 09 2016 Miroslav Suchý - 0.4.4-1 +- New upstream release 0.4.4 + * Thu Feb 04 2016 Fedora Release Engineering - 0.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 5011baa..205b695 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0e8cd8a524438cb74b0937819fa772e mysql2-0.4.0.gem +6663933bb99ba23958e9e7be7a6846fc mysql2-0.4.4.gem From 3ea769687403790b96ab535b3db1db1a53c68984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 11 Jan 2017 12:08:38 +0100 Subject: [PATCH 17/26] Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index f41c458..1c4cda4 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Wed Jan 11 2017 Vít Ondruch - 0.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 + * Thu Jun 09 2016 Miroslav Suchý - 0.4.4-1 - New upstream release 0.4.4 From a2cff3e4e2d6f9dd65d2a4843ca443a5d4f295e5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 12:31:01 +0000 Subject: [PATCH 18/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 1c4cda4..05e2347 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 0.4.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Jan 11 2017 Vít Ondruch - 0.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 From c57c46e5af94e22187383d58615f74c3c0c899f2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 13 Jul 2017 18:56:47 -0700 Subject: [PATCH 19/26] New upstream release 0.4.8 (builds against MariaDB 10.2) --- .gitignore | 1 + rubygem-mysql2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5fe84ca..8a16f82 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /mysql2-0.3.16.gem /mysql2-0.4.0.gem /mysql2-0.4.4.gem +/mysql2-0.4.8.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 05e2347..39fa127 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -2,8 +2,8 @@ %global gem_name mysql2 Name: rubygem-%{gem_name} -Version: 0.4.4 -Release: 3%{?dist} +Version: 0.4.8 +Release: 1%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Jul 13 2017 Adam Williamson - 0.4.8-1 +- New upstream release 0.4.8 (builds against MariaDB 10.2) + * Sat Feb 11 2017 Fedora Release Engineering - 0.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 205b695..e2cd020 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6663933bb99ba23958e9e7be7a6846fc mysql2-0.4.4.gem +SHA512 (mysql2-0.4.8.gem) = f40ba8fdc49365eb6c7e903d20e518c5548e11878ffa00f254f4d5b2b5590fa1b042eb37b6395841326b0ec49cfd94df0565a90312a591c511079e0f57367496 From e78d9ba8de3745dc0aa17867ecb6f06513c7912c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 17:28:13 +0000 Subject: [PATCH 20/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 39fa127..6ed008d 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 0.4.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jul 13 2017 Adam Williamson - 0.4.8-1 - New upstream release 0.4.8 (builds against MariaDB 10.2) From e3ca4e6b57100b6d32aa5558744505d5d5fbd7a8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:56:54 +0000 Subject: [PATCH 21/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 6ed008d..9b923d7 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Version: 0.4.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql Group: Development/Languages License: MIT @@ -89,6 +89,9 @@ rm -rf %{buildroot}%{gem_instdir}/spec %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 0.4.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 0.4.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From a0c3c0e88bb5d4c5e1551313de3e0a1150ad5653 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Thu, 23 Nov 2017 19:07:08 +0100 Subject: [PATCH 22/26] New upstream release 0.4.10 Added unit test environment. --- .gitignore | 1 + ...nt-and-no-query-test-on-MariaDB-10.2.patch | 15 ++ ...ixnum-and-Bignum-warnings-on-Ruby2.4.patch | 162 ++++++++++++++++++ ...-wrong-type-year-value-on-big-endian.patch | 37 ++++ ...fix-wrong-local-infile-on-big-endian.patch | 15 ++ rubygem-mysql2.spec | 130 ++++++++++++-- sources | 2 +- 7 files changed, 346 insertions(+), 16 deletions(-) create mode 100644 rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch create mode 100644 rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.patch create mode 100644 rubygem-mysql2-0.4.10-fix-wrong-type-year-value-on-big-endian.patch create mode 100644 rubygem-mysql2-0.4.10-mariadb-connector-c-3.0.2-fix-wrong-local-infile-on-big-endian.patch diff --git a/.gitignore b/.gitignore index 8a16f82..4f2a6e1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /mysql2-0.4.0.gem /mysql2-0.4.4.gem /mysql2-0.4.8.gem +/mysql2-0.4.10.gem diff --git a/rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch b/rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch new file mode 100644 index 0000000..5801b25 --- /dev/null +++ b/rubygem-mysql2-0.4.10-Skip-statement-and-no-query-test-on-MariaDB-10.2.patch @@ -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 + diff --git a/rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.patch b/rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.patch new file mode 100644 index 0000000..b11c720 --- /dev/null +++ b/rubygem-mysql2-0.4.10-Suppress-Fixnum-and-Bignum-warnings-on-Ruby2.4.patch @@ -0,0 +1,162 @@ +From 235eaa482ce2cfa0dfbe1e4e7123d1a1f6bbf136 Mon Sep 17 00:00:00 2001 +From: Jun Aruga +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 + diff --git a/rubygem-mysql2-0.4.10-fix-wrong-type-year-value-on-big-endian.patch b/rubygem-mysql2-0.4.10-fix-wrong-type-year-value-on-big-endian.patch new file mode 100644 index 0000000..2a8bd34 --- /dev/null +++ b/rubygem-mysql2-0.4.10-fix-wrong-type-year-value-on-big-endian.patch @@ -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 + diff --git a/rubygem-mysql2-0.4.10-mariadb-connector-c-3.0.2-fix-wrong-local-infile-on-big-endian.patch b/rubygem-mysql2-0.4.10-mariadb-connector-c-3.0.2-fix-wrong-local-infile-on-big-endian.patch new file mode 100644 index 0000000..ab82224 --- /dev/null +++ b/rubygem-mysql2-0.4.10-mariadb-connector-c-3.0.2-fix-wrong-local-infile-on-big-endian.patch @@ -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: diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 9b923d7..4447fb5 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -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 @@ available. This one is not. %package doc Summary: Documentation for %{name} -Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch @@ -38,6 +63,9 @@ gem unpack %{SOURCE0} %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 @@ cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ 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 < 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 @@ rm -rf %{buildroot}%{gem_instdir}/spec %doc %{gem_instdir}/README.md %doc %{gem_instdir}/CHANGELOG.md %{gem_instdir}/examples +%{gem_instdir}/spec %changelog +* Thu Nov 23 2017 Jun Aruga - 0.4.10-1 +- New upstream release 0.4.10 + * Thu Aug 03 2017 Fedora Release Engineering - 0.4.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index e2cd020..1dca6e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mysql2-0.4.8.gem) = f40ba8fdc49365eb6c7e903d20e518c5548e11878ffa00f254f4d5b2b5590fa1b042eb37b6395841326b0ec49cfd94df0565a90312a591c511079e0f57367496 +SHA512 (mysql2-0.4.10.gem) = 1f9c8eb1b120cfc940b3aa26b2dff54735ccdf54fd6e6745e347179d29803b4a4d1f3b80a86f92dd534089f625ffcd6055458f27aaefebe58f8332890a842b43 From 892a21848e19ef5bdf1b5c7956151c5055d6e765 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 5 Jan 2018 00:47:56 +0900 Subject: [PATCH 23/26] F-28: rebuild for ruby25 --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 4447fb5..450eceb 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -6,7 +6,7 @@ Name: rubygem-%{gem_name} Version: 0.4.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql License: MIT URL: http://github.com/brianmario/mysql2 @@ -186,6 +186,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")" %changelog +* Thu Jan 04 2018 Mamoru TASAKA - 0.4.10-2 +- F-28: rebuild for ruby25 + * Thu Nov 23 2017 Jun Aruga - 0.4.10-1 - New upstream release 0.4.10 From 4b439e990363f34450d1bcc8c8d33ccccbbcb8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 20 Jan 2018 23:08:05 +0100 Subject: [PATCH 24/26] Rebuilt for switch to libxcrypt --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 450eceb..2468822 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -6,7 +6,7 @@ Name: rubygem-%{gem_name} Version: 0.4.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql License: MIT URL: http://github.com/brianmario/mysql2 @@ -186,6 +186,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")" %changelog +* Sat Jan 20 2018 Björn Esser - 0.4.10-3 +- Rebuilt for switch to libxcrypt + * Thu Jan 04 2018 Mamoru TASAKA - 0.4.10-2 - F-28: rebuild for ruby25 From 26cfa81b514e2970ed8784294c13db6e6c8d51ba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 14:24:29 +0000 Subject: [PATCH 25/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rubygem-mysql2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 2468822..1fa86a7 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -6,7 +6,7 @@ Name: rubygem-%{gem_name} Version: 0.4.10 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql License: MIT URL: http://github.com/brianmario/mysql2 @@ -186,6 +186,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")" %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 0.4.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 20 2018 Björn Esser - 0.4.10-3 - Rebuilt for switch to libxcrypt From 03514e2b336899490b02b6b0dfcf402b367a114d Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Fri, 9 Mar 2018 15:24:05 +0100 Subject: [PATCH 26/26] Merge Fedora master. --- rubygem-mysql2.spec | 4 +++- sources | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 1fa86a7..3417450 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -40,7 +40,9 @@ BuildRequires: rubygem(rspec) BuildRequires: %{_bindir}/hostname BuildRequires: rubygem(bigdecimal) # Used in spec/em/em_spec.rb -BuildRequires: rubygem(eventmachine) +# Comment out to prevent a build error by conflicting requests. +# Nothing provides libruby.so.2.4()(64bit) needed by rubygem-eventmachine. +#BuildRequires: rubygem(eventmachine) %endif %description diff --git a/sources b/sources index 1dca6e3..61984de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mysql2-0.4.10.gem) = 1f9c8eb1b120cfc940b3aa26b2dff54735ccdf54fd6e6745e347179d29803b4a4d1f3b80a86f92dd534089f625ffcd6055458f27aaefebe58f8332890a842b43 +5c8260a0daa0350b5fecbb4ed3c2b4ec mysql2-0.4.10.gem