Revision a36215af
Added by Ewoud Kohl van Wijngaarden over 8 years ago
dependencies/precise/mysql2/changelog | ||
---|---|---|
ruby-mysql2 (0.3.16-2) unstable; urgency=medium
|
||
|
||
* Add upstream patch avoid_openssl_loop.patch to use /dev/null in the
|
||
invalidate_fd function to avoid infinite loop in OpenSSL (Closes: #770891)
|
||
Before, a dummy socket was used instead of /dev/null, which may not absorb
|
||
all writes and lead to an infinite loop.
|
||
* Add upstream patch correct_mysql_init.patch to correctly initialize the
|
||
MySQL library, to avoid race condition when other threads try to create a
|
||
connection (Closes: #770896)
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 25 Nov 2014 17:52:01 +0100
|
||
|
||
ruby-mysql2 (0.3.16-1) unstable; urgency=medium
|
||
|
||
[ Jérémy Bobbio ]
|
||
* Add git-buildpackage configuration
|
||
|
||
[ Cédric Boutillier ]
|
||
* Imported Upstream version 0.3.16
|
||
* remove deactivate_failing_specs.patch: test 'should run signal handlers
|
||
while waiting for a response' is now passing.
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Sun, 15 Jun 2014 00:37:16 +0200
|
||
|
||
ruby-mysql2 (0.3.15-1) unstable; urgency=low
|
||
|
||
[ Pirate Praveen ]
|
||
* New upstream release.
|
||
* Bump standards version to 3.9.5 (no changes)
|
||
* Bump gem2deb build dep to 0.7.4~
|
||
- drop ruby 1.9.1
|
||
|
||
[ Cédric Boutillier ]
|
||
* Create test MySQL table before the tests
|
||
* Add deactivate_failing_specs.patch, to deactivate a time sensitive test in
|
||
spec/mysql2/client_spec.rb, failing with Ruby 2.1
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 15 Apr 2014 13:22:13 +0200
|
||
|
||
ruby-mysql2 (0.3.14-2) unstable; urgency=medium
|
||
|
||
* Add myself to Uploaders.
|
||
* Do not run eventmachine tests until it is fixed on freebsd.
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Wed, 11 Dec 2013 10:36:13 +0100
|
||
|
||
ruby-mysql2 (0.3.14-1) unstable; urgency=low
|
||
|
||
* Team upload
|
||
* Imported Upstream version 0.3.14
|
||
+ add support for Ruby 2.0 (Closes: #720227)
|
||
* Use canonical URI in Vcs-* fields
|
||
* Copy example configuration in spec/ for use in tests
|
||
* Refresh remove_rpath_compilation_flag.patch
|
||
* Do not try to install inexistant CHANGELOG.md
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 26 Nov 2013 16:16:45 +0100
|
||
|
||
ruby-mysql2 (0.3.11-1) unstable; urgency=low
|
||
|
||
* Initial release (Closes: #691150)
|
||
|
||
-- Michael Franzl <office@michaelfranzl.com> Thu, 01 Nov 2012 12:05:27 +0100
|
dependencies/precise/mysql2/clean | ||
---|---|---|
spec/configuration.yml
|
||
spec/my.cnf
|
dependencies/precise/mysql2/compat | ||
---|---|---|
7
|
dependencies/precise/mysql2/control | ||
---|---|---|
Source: ruby-mysql2
|
||
Section: ruby
|
||
Priority: optional
|
||
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
|
||
Uploaders: Michael Franzl <office@michaelfranzl.com>, Cédric Boutillier <boutil@debian.org>
|
||
Build-Depends: debhelper (>= 7.0.50~), gem2deb, libmysqld-dev, mysql-server, ruby-rspec, rake
|
||
Standards-Version: 3.9.5
|
||
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mysql2.git
|
||
Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-mysql2.git;a=summary
|
||
Homepage: http://github.com/brianmario/mysql2
|
||
XS-Ruby-Versions: all
|
||
|
||
Package: ruby-mysql2
|
||
Architecture: any
|
||
XB-Ruby-Versions: ${ruby:Versions}
|
||
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-eventmachine
|
||
Description: simple, fast MySQL library for Ruby
|
||
This is an API module that allows Ruby programs to interface with MySQL
|
||
databases. Usually, it will be pulled in automatically by packages providing
|
||
Ruby programs which need this capability, you only need to install it directly
|
||
if you intend to write such programs yourself. You may want to prefer the
|
||
ruby-mysql2 package over the ruby-mysql package, since benchmarks have shown
|
||
it to be faster, it is non-blocking and it supports UTF-8 database encoding.
|
dependencies/precise/mysql2/copyright | ||
---|---|---|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||
Upstream-Name: mysql2
|
||
Source: https://github.com/brianmario/mysql2
|
||
|
||
Files: *
|
||
Copyright: 2012 Brian Lopez
|
||
License: Expat
|
||
|
||
Files: debian/*
|
||
Copyright: 2012 Michael Franzl <office@michaelfranzl.com>
|
||
License: Expat
|
||
|
||
License: Expat
|
||
Permission is hereby granted, free of charge, to any person obtaining
|
||
a copy of this software and associated documentation files (the
|
||
"Software"), to deal in the Software without restriction, including
|
||
without limitation the rights to use, copy, modify, merge, publish,
|
||
distribute, sublicense, and/or sell copies of the Software, and to
|
||
permit persons to whom the Software is furnished to do so, subject to
|
||
the following conditions:
|
||
.
|
||
The above copyright notice and this permission notice shall be included
|
||
in all copies or substantial portions of the Software.
|
||
.
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
dependencies/precise/mysql2/gbp.conf | ||
---|---|---|
[DEFAULT]
|
||
pristine-tar = True
|
dependencies/precise/mysql2/patches/avoid_openssl_loop.patch | ||
---|---|---|
Description: Use /dev/null in invalidate_fd to avoid infinite loop in OpenSSL
|
||
Thanks to Andy Bakun / @thwarted for identifying the issue and
|
||
suggesting the /dev/null workaround.
|
||
Author: Aaron Stone <aaron@serendipity.cx>
|
||
Origin: upstream,https://github.com/brianmario/mysql2/commit/fc30a7c056e63517f5f66702016941b3902ec0b6.patch
|
||
Reviewed-by: Cédric Boutillier <boutil@debian.org>
|
||
Last-Update: 2014-08-24
|
||
|
||
--- a/ext/mysql2/client.c
|
||
+++ b/ext/mysql2/client.c
|
||
@@ -167,26 +167,30 @@
|
||
|
||
#ifndef _WIN32
|
||
/*
|
||
- * Redirect clientfd to a dummy socket for mysql_close to
|
||
- * write, shutdown, and close on as a no-op.
|
||
- * We do this hack because we want to call mysql_close to release
|
||
- * memory, but do not want mysql_close to drop connections in the
|
||
- * parent if the socket got shared in fork.
|
||
+ * Redirect clientfd to /dev/null for mysql_close and SSL_close to write,
|
||
+ * shutdown, and close. The hack is needed to prevent shutdown() from breaking
|
||
+ * a socket that may be in use by the parent or other processes after fork.
|
||
+ *
|
||
+ * /dev/null is used to absorb writes; previously a dummy socket was used, but
|
||
+ * it could not abosrb writes and caused openssl to go into an infinite loop.
|
||
+ *
|
||
* Returns Qtrue or Qfalse (success or failure)
|
||
+ *
|
||
+ * Note: if this function is needed on Windows, use "nul" instead of "/dev/null"
|
||
*/
|
||
static VALUE invalidate_fd(int clientfd)
|
||
{
|
||
#ifdef SOCK_CLOEXEC
|
||
/* Atomically set CLOEXEC on the new FD in case another thread forks */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR | O_CLOEXEC);
|
||
if (sockfd < 0) {
|
||
/* Maybe SOCK_CLOEXEC is defined but not available on this kernel */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR);
|
||
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
||
}
|
||
#else
|
||
/* Well we don't have SOCK_CLOEXEC, so just set FD_CLOEXEC quickly */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR);
|
||
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
||
#endif
|
||
|
dependencies/precise/mysql2/patches/correct_mysql_init.patch | ||
---|---|---|
Description: Added call to mysql_library_init during initialization of the gem
|
||
This call must be performed before trying to call mysql_init from
|
||
multiple threads
|
||
Reference: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
|
||
Minimal reproduction of the problem if mysql_library_init is not called
|
||
|
||
require 'mysql2'
|
||
|
||
def connect
|
||
Mysql2::Client.new()
|
||
end
|
||
|
||
threads = [0,1].map {
|
||
Thread.new { connect }
|
||
}
|
||
threads.map(&:join)
|
||
puts "OK!"
|
||
Author: Michael Kruglos <michael@kruglos.com>
|
||
Reviewed-by: Cédric Boutillier <boutil@debian.org>
|
||
Origin: upstream,https://github.com/brianmario/mysql2/commit/de48627ee89b9dfd7d966f3ea747e95a48085792.patch
|
||
Last-Update: 2014-07-30
|
||
|
||
--- a/ext/mysql2/client.c
|
||
+++ b/ext/mysql2/client.c
|
||
@@ -1237,6 +1237,13 @@
|
||
}
|
||
}
|
||
|
||
+ /* Initializing mysql library, so different threads could call Client.new */
|
||
+ /* without race condition in the library */
|
||
+ if (mysql_library_init(0, NULL, NULL) != 0) {
|
||
+ rb_raise(rb_eRuntimeError, "Could not initialize MySQL client library");
|
||
+ return;
|
||
+ }
|
||
+
|
||
#if 0
|
||
mMysql2 = rb_define_module("Mysql2"); Teach RDoc about Mysql2 constant.
|
||
#endif
|
dependencies/precise/mysql2/patches/remove_rpath_compilation_flag.patch | ||
---|---|---|
Description: Remove rpath from compilation flags
|
||
This patch is required to pass the binary-or-shlib-defines-rpath lintian
|
||
test. To fix this problem, any attempt to add rpath to $LDFLAGS
|
||
inside of ext/mysql2/extconf.rb is patched out
|
||
Author: Michael Franzl <office@michaelfranzl.com>
|
||
Last-Update: 2013-11-26
|
||
|
||
--- a/ext/mysql2/extconf.rb
|
||
+++ b/ext/mysql2/extconf.rb
|
||
@@ -98,33 +98,4 @@
|
||
$CFLAGS << gcc_flags
|
||
end
|
||
|
||
-case explicit_rpath = with_config('mysql-rpath')
|
||
-when true
|
||
- abort "-----\nOption --with-mysql-rpath must have an argument\n-----"
|
||
-when false
|
||
- warn "-----\nOption --with-mysql-rpath has been disabled at your request\n-----"
|
||
-when String
|
||
- # The user gave us a value so use it
|
||
- rpath_flags = " -Wl,-rpath,#{explicit_rpath}"
|
||
- warn "-----\nSetting mysql rpath to #{explicit_rpath}\n-----"
|
||
- $LDFLAGS << rpath_flags
|
||
-else
|
||
- if libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2]
|
||
- rpath_flags = " -Wl,-rpath,#{libdir}"
|
||
- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', rpath_flags)
|
||
- # Usually Ruby sets RPATHFLAG the right way for each system, but not on OS X.
|
||
- warn "-----\nSetting rpath to #{libdir}\n-----"
|
||
- $LDFLAGS << rpath_flags
|
||
- else
|
||
- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
|
||
- # If we got here because try_link failed, warn the user
|
||
- warn "-----\nDon't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load\n-----"
|
||
- end
|
||
- # Make sure that LIBPATH gets set if we didn't explicitly set the rpath.
|
||
- warn "-----\nSetting libpath to #{libdir}\n-----"
|
||
- $LIBPATH << libdir unless $LIBPATH.include?(libdir)
|
||
- end
|
||
- end
|
||
-end
|
||
-
|
||
create_makefile('mysql2/mysql2')
|
dependencies/precise/mysql2/patches/remove_rubygems_from_examples.patch | ||
---|---|---|
Description: Remove rubygems from examples
|
||
This patch modifies the examples so that they
|
||
do not use rubygems, and don't modify the LOAD_PATH. The
|
||
library will be installed in a place where ruby can find it,
|
||
and the relative path ../lib is not valid anymore.
|
||
Author: Michael Franzl <office@michaelfranzl.com>
|
||
|
||
--- ruby-mysql2-0.3.11.orig/examples/eventmachine.rb
|
||
+++ ruby-mysql2-0.3.11/examples/eventmachine.rb
|
||
@@ -1,8 +1,6 @@
|
||
# encoding: utf-8
|
||
|
||
-$LOAD_PATH.unshift 'lib'
|
||
|
||
-require 'rubygems'
|
||
require 'eventmachine'
|
||
require 'mysql2/em'
|
||
|
||
--- ruby-mysql2-0.3.11.orig/examples/threaded.rb
|
||
+++ ruby-mysql2-0.3.11/examples/threaded.rb
|
||
@@ -1,6 +1,5 @@
|
||
# encoding: utf-8
|
||
|
||
-$LOAD_PATH.unshift 'lib'
|
||
require 'mysql2'
|
||
require 'timeout'
|
||
|
dependencies/precise/mysql2/patches/series | ||
---|---|---|
remove_rpath_compilation_flag.patch
|
||
remove_rubygems_from_examples.patch
|
||
#deactivate_failing_specs.patch
|
||
avoid_openssl_loop.patch
|
||
correct_mysql_init.patch
|
dependencies/precise/mysql2/ruby-mysql2.docs | ||
---|---|---|
README.md
|
dependencies/precise/mysql2/ruby-mysql2.examples | ||
---|---|---|
examples/*
|
dependencies/precise/mysql2/ruby-tests.rake | ||
---|---|---|
require 'rspec/core/rake_task'
|
||
|
||
RSpec::Core::RakeTask.new(:spec) do |spec|
|
||
spec.pattern = './spec/mysql2/**/*_spec.rb'
|
||
end
|
||
|
||
task :default => :spec
|
dependencies/precise/mysql2/rules | ||
---|---|---|
#!/usr/bin/make -f
|
||
#export DH_VERBOSE=1
|
||
#
|
||
# Uncomment to ignore all test failures (but the tests will run anyway)
|
||
#export DH_RUBY_IGNORE_TESTS=all
|
||
#
|
||
# Uncomment to ignore some test failures (but the tests will run anyway).
|
||
# Valid values:
|
||
#export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
|
||
#
|
||
# If you need to specify the .gemspec (eg there is more than one)
|
||
#export DH_RUBY_GEMSPEC=gem.gemspec
|
||
|
||
%:
|
||
dh $@ --buildsystem=ruby --with ruby
|
||
|
||
# need to start an mysqld instance to run the tests
|
||
override_dh_auto_install:
|
||
cp spec/configuration.yml.example spec/configuration.yml
|
||
cp spec/my.cnf.example spec/my.cnf
|
||
chmod +x debian/start_mysqld_and_auto_install.sh
|
||
debian/start_mysqld_and_auto_install.sh
|
dependencies/precise/mysql2/source/format | ||
---|---|---|
3.0 (quilt)
|
dependencies/precise/mysql2/start_mysqld_and_auto_install.sh | ||
---|---|---|
#!/bin/sh
|
||
#
|
||
# start_mysqld_and_auto_install.sh - starts an instance of mysqld before
|
||
# auto_installing and running do_mysql's test suite. It is inspired by
|
||
# debian/test_mysql.sh from libdbi-drivers source package.
|
||
|
||
|
||
|
||
set -e
|
||
|
||
MYTEMP_DIR=`mktemp -d`
|
||
ME=`whoami`
|
||
|
||
export MYSQL_UNIX_PORT=${MYTEMP_DIR}/mysql.sock
|
||
DO_MYSQL_USER=root
|
||
DO_MYSQL_PASS=
|
||
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}
|
||
/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
|
||
sleep 3
|
||
attempts=$((attempts+1))
|
||
if [ ${attempts} -gt 10 ] ; then
|
||
echo "skipping test, mysql server could not be contacted after 30 seconds"
|
||
exit 0
|
||
fi
|
||
done
|
||
mysql --socket=${MYSQL_UNIX_PORT} --execute "CREATE DATABASE ${DO_MYSQL_DBNAME};"
|
||
mysql --socket=${MYSQL_UNIX_PORT} --execute "GRANT ALL PRIVILEGES ON ${DO_MYSQL_DBNAME}.* TO '${DO_MYSQL_USER}'@'localhost' IDENTIFIED BY '${DO_MYSQL_PASS}';"
|
||
|
||
|
||
dh_auto_install
|
||
|
||
/usr/bin/mysqladmin --socket=${MYSQL_UNIX_PORT} shutdown
|
||
rm -rf ${MYTEMP_DIR}
|
||
|
||
|
dependencies/precise/mysql2/watch | ||
---|---|---|
version=3
|
||
http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/mysql2 .*/mysql2-(.*).tar.gz
|
dependencies/wheezy/mysql2/changelog | ||
---|---|---|
ruby-mysql2 (0.3.16-2) unstable; urgency=medium
|
||
|
||
* Add upstream patch avoid_openssl_loop.patch to use /dev/null in the
|
||
invalidate_fd function to avoid infinite loop in OpenSSL (Closes: #770891)
|
||
Before, a dummy socket was used instead of /dev/null, which may not absorb
|
||
all writes and lead to an infinite loop.
|
||
* Add upstream patch correct_mysql_init.patch to correctly initialize the
|
||
MySQL library, to avoid race condition when other threads try to create a
|
||
connection (Closes: #770896)
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 25 Nov 2014 17:52:01 +0100
|
||
|
||
ruby-mysql2 (0.3.16-1) unstable; urgency=medium
|
||
|
||
[ Jérémy Bobbio ]
|
||
* Add git-buildpackage configuration
|
||
|
||
[ Cédric Boutillier ]
|
||
* Imported Upstream version 0.3.16
|
||
* remove deactivate_failing_specs.patch: test 'should run signal handlers
|
||
while waiting for a response' is now passing.
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Sun, 15 Jun 2014 00:37:16 +0200
|
||
|
||
ruby-mysql2 (0.3.15-1) unstable; urgency=low
|
||
|
||
[ Pirate Praveen ]
|
||
* New upstream release.
|
||
* Bump standards version to 3.9.5 (no changes)
|
||
* Bump gem2deb build dep to 0.7.4~
|
||
- drop ruby 1.9.1
|
||
|
||
[ Cédric Boutillier ]
|
||
* Create test MySQL table before the tests
|
||
* Add deactivate_failing_specs.patch, to deactivate a time sensitive test in
|
||
spec/mysql2/client_spec.rb, failing with Ruby 2.1
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 15 Apr 2014 13:22:13 +0200
|
||
|
||
ruby-mysql2 (0.3.14-2) unstable; urgency=medium
|
||
|
||
* Add myself to Uploaders.
|
||
* Do not run eventmachine tests until it is fixed on freebsd.
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Wed, 11 Dec 2013 10:36:13 +0100
|
||
|
||
ruby-mysql2 (0.3.14-1) unstable; urgency=low
|
||
|
||
* Team upload
|
||
* Imported Upstream version 0.3.14
|
||
+ add support for Ruby 2.0 (Closes: #720227)
|
||
* Use canonical URI in Vcs-* fields
|
||
* Copy example configuration in spec/ for use in tests
|
||
* Refresh remove_rpath_compilation_flag.patch
|
||
* Do not try to install inexistant CHANGELOG.md
|
||
|
||
-- Cédric Boutillier <boutil@debian.org> Tue, 26 Nov 2013 16:16:45 +0100
|
||
|
||
ruby-mysql2 (0.3.11-1) unstable; urgency=low
|
||
|
||
* Initial release (Closes: #691150)
|
||
|
||
-- Michael Franzl <office@michaelfranzl.com> Thu, 01 Nov 2012 12:05:27 +0100
|
dependencies/wheezy/mysql2/clean | ||
---|---|---|
spec/configuration.yml
|
||
spec/my.cnf
|
dependencies/wheezy/mysql2/compat | ||
---|---|---|
7
|
dependencies/wheezy/mysql2/control | ||
---|---|---|
Source: ruby-mysql2
|
||
Section: ruby
|
||
Priority: optional
|
||
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
|
||
Uploaders: Michael Franzl <office@michaelfranzl.com>, Cédric Boutillier <boutil@debian.org>
|
||
Build-Depends: debhelper (>= 7.0.50~), gem2deb, libmysqld-dev, mysql-server, ruby-rspec, rake
|
||
Standards-Version: 3.9.5
|
||
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mysql2.git
|
||
Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-mysql2.git;a=summary
|
||
Homepage: http://github.com/brianmario/mysql2
|
||
XS-Ruby-Versions: all
|
||
|
||
Package: ruby-mysql2
|
||
Architecture: any
|
||
XB-Ruby-Versions: ${ruby:Versions}
|
||
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-eventmachine
|
||
Description: simple, fast MySQL library for Ruby
|
||
This is an API module that allows Ruby programs to interface with MySQL
|
||
databases. Usually, it will be pulled in automatically by packages providing
|
||
Ruby programs which need this capability, you only need to install it directly
|
||
if you intend to write such programs yourself. You may want to prefer the
|
||
ruby-mysql2 package over the ruby-mysql package, since benchmarks have shown
|
||
it to be faster, it is non-blocking and it supports UTF-8 database encoding.
|
dependencies/wheezy/mysql2/copyright | ||
---|---|---|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||
Upstream-Name: mysql2
|
||
Source: https://github.com/brianmario/mysql2
|
||
|
||
Files: *
|
||
Copyright: 2012 Brian Lopez
|
||
License: Expat
|
||
|
||
Files: debian/*
|
||
Copyright: 2012 Michael Franzl <office@michaelfranzl.com>
|
||
License: Expat
|
||
|
||
License: Expat
|
||
Permission is hereby granted, free of charge, to any person obtaining
|
||
a copy of this software and associated documentation files (the
|
||
"Software"), to deal in the Software without restriction, including
|
||
without limitation the rights to use, copy, modify, merge, publish,
|
||
distribute, sublicense, and/or sell copies of the Software, and to
|
||
permit persons to whom the Software is furnished to do so, subject to
|
||
the following conditions:
|
||
.
|
||
The above copyright notice and this permission notice shall be included
|
||
in all copies or substantial portions of the Software.
|
||
.
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
dependencies/wheezy/mysql2/gbp.conf | ||
---|---|---|
[DEFAULT]
|
||
pristine-tar = True
|
dependencies/wheezy/mysql2/patches/avoid_openssl_loop.patch | ||
---|---|---|
Description: Use /dev/null in invalidate_fd to avoid infinite loop in OpenSSL
|
||
Thanks to Andy Bakun / @thwarted for identifying the issue and
|
||
suggesting the /dev/null workaround.
|
||
Author: Aaron Stone <aaron@serendipity.cx>
|
||
Origin: upstream,https://github.com/brianmario/mysql2/commit/fc30a7c056e63517f5f66702016941b3902ec0b6.patch
|
||
Reviewed-by: Cédric Boutillier <boutil@debian.org>
|
||
Last-Update: 2014-08-24
|
||
|
||
--- a/ext/mysql2/client.c
|
||
+++ b/ext/mysql2/client.c
|
||
@@ -167,26 +167,30 @@
|
||
|
||
#ifndef _WIN32
|
||
/*
|
||
- * Redirect clientfd to a dummy socket for mysql_close to
|
||
- * write, shutdown, and close on as a no-op.
|
||
- * We do this hack because we want to call mysql_close to release
|
||
- * memory, but do not want mysql_close to drop connections in the
|
||
- * parent if the socket got shared in fork.
|
||
+ * Redirect clientfd to /dev/null for mysql_close and SSL_close to write,
|
||
+ * shutdown, and close. The hack is needed to prevent shutdown() from breaking
|
||
+ * a socket that may be in use by the parent or other processes after fork.
|
||
+ *
|
||
+ * /dev/null is used to absorb writes; previously a dummy socket was used, but
|
||
+ * it could not abosrb writes and caused openssl to go into an infinite loop.
|
||
+ *
|
||
* Returns Qtrue or Qfalse (success or failure)
|
||
+ *
|
||
+ * Note: if this function is needed on Windows, use "nul" instead of "/dev/null"
|
||
*/
|
||
static VALUE invalidate_fd(int clientfd)
|
||
{
|
||
#ifdef SOCK_CLOEXEC
|
||
/* Atomically set CLOEXEC on the new FD in case another thread forks */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR | O_CLOEXEC);
|
||
if (sockfd < 0) {
|
||
/* Maybe SOCK_CLOEXEC is defined but not available on this kernel */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR);
|
||
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
||
}
|
||
#else
|
||
/* Well we don't have SOCK_CLOEXEC, so just set FD_CLOEXEC quickly */
|
||
- int sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||
+ int sockfd = open("/dev/null", O_RDWR);
|
||
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
||
#endif
|
||
|
dependencies/wheezy/mysql2/patches/correct_mysql_init.patch | ||
---|---|---|
Description: Added call to mysql_library_init during initialization of the gem
|
||
This call must be performed before trying to call mysql_init from
|
||
multiple threads
|
||
Reference: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
|
||
Minimal reproduction of the problem if mysql_library_init is not called
|
||
|
||
require 'mysql2'
|
||
|
||
def connect
|
||
Mysql2::Client.new()
|
||
end
|
||
|
||
threads = [0,1].map {
|
||
Thread.new { connect }
|
||
}
|
||
threads.map(&:join)
|
||
puts "OK!"
|
||
Author: Michael Kruglos <michael@kruglos.com>
|
||
Reviewed-by: Cédric Boutillier <boutil@debian.org>
|
||
Origin: upstream,https://github.com/brianmario/mysql2/commit/de48627ee89b9dfd7d966f3ea747e95a48085792.patch
|
||
Last-Update: 2014-07-30
|
||
|
||
--- a/ext/mysql2/client.c
|
||
+++ b/ext/mysql2/client.c
|
||
@@ -1237,6 +1237,13 @@
|
||
}
|
||
}
|
||
|
||
+ /* Initializing mysql library, so different threads could call Client.new */
|
||
+ /* without race condition in the library */
|
||
+ if (mysql_library_init(0, NULL, NULL) != 0) {
|
||
+ rb_raise(rb_eRuntimeError, "Could not initialize MySQL client library");
|
||
+ return;
|
||
+ }
|
||
+
|
||
#if 0
|
||
mMysql2 = rb_define_module("Mysql2"); Teach RDoc about Mysql2 constant.
|
||
#endif
|
dependencies/wheezy/mysql2/patches/remove_rpath_compilation_flag.patch | ||
---|---|---|
Description: Remove rpath from compilation flags
|
||
This patch is required to pass the binary-or-shlib-defines-rpath lintian
|
||
test. To fix this problem, any attempt to add rpath to $LDFLAGS
|
||
inside of ext/mysql2/extconf.rb is patched out
|
||
Author: Michael Franzl <office@michaelfranzl.com>
|
||
Last-Update: 2013-11-26
|
||
|
||
--- a/ext/mysql2/extconf.rb
|
||
+++ b/ext/mysql2/extconf.rb
|
||
@@ -98,33 +98,4 @@
|
||
$CFLAGS << gcc_flags
|
||
end
|
||
|
||
-case explicit_rpath = with_config('mysql-rpath')
|
||
-when true
|
||
- abort "-----\nOption --with-mysql-rpath must have an argument\n-----"
|
||
-when false
|
||
- warn "-----\nOption --with-mysql-rpath has been disabled at your request\n-----"
|
||
-when String
|
||
- # The user gave us a value so use it
|
||
- rpath_flags = " -Wl,-rpath,#{explicit_rpath}"
|
||
- warn "-----\nSetting mysql rpath to #{explicit_rpath}\n-----"
|
||
- $LDFLAGS << rpath_flags
|
||
-else
|
||
- if libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2]
|
||
- rpath_flags = " -Wl,-rpath,#{libdir}"
|
||
- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', rpath_flags)
|
||
- # Usually Ruby sets RPATHFLAG the right way for each system, but not on OS X.
|
||
- warn "-----\nSetting rpath to #{libdir}\n-----"
|
||
- $LDFLAGS << rpath_flags
|
||
- else
|
||
- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty?
|
||
- # If we got here because try_link failed, warn the user
|
||
- warn "-----\nDon't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load\n-----"
|
||
- end
|
||
- # Make sure that LIBPATH gets set if we didn't explicitly set the rpath.
|
||
- warn "-----\nSetting libpath to #{libdir}\n-----"
|
||
- $LIBPATH << libdir unless $LIBPATH.include?(libdir)
|
||
- end
|
||
- end
|
||
-end
|
||
-
|
||
create_makefile('mysql2/mysql2')
|
dependencies/wheezy/mysql2/patches/remove_rubygems_from_examples.patch | ||
---|---|---|
Description: Remove rubygems from examples
|
||
This patch modifies the examples so that they
|
||
do not use rubygems, and don't modify the LOAD_PATH. The
|
||
library will be installed in a place where ruby can find it,
|
||
and the relative path ../lib is not valid anymore.
|
||
Author: Michael Franzl <office@michaelfranzl.com>
|
||
|
||
--- ruby-mysql2-0.3.11.orig/examples/eventmachine.rb
|
||
+++ ruby-mysql2-0.3.11/examples/eventmachine.rb
|
||
@@ -1,8 +1,6 @@
|
||
# encoding: utf-8
|
||
|
||
-$LOAD_PATH.unshift 'lib'
|
||
|
||
-require 'rubygems'
|
||
require 'eventmachine'
|
||
require 'mysql2/em'
|
||
|
||
--- ruby-mysql2-0.3.11.orig/examples/threaded.rb
|
||
+++ ruby-mysql2-0.3.11/examples/threaded.rb
|
||
@@ -1,6 +1,5 @@
|
||
# encoding: utf-8
|
||
|
||
-$LOAD_PATH.unshift 'lib'
|
||
require 'mysql2'
|
||
require 'timeout'
|
||
|
dependencies/wheezy/mysql2/patches/series | ||
---|---|---|
remove_rpath_compilation_flag.patch
|
||
remove_rubygems_from_examples.patch
|
||
#deactivate_failing_specs.patch
|
||
avoid_openssl_loop.patch
|
||
correct_mysql_init.patch
|
dependencies/wheezy/mysql2/ruby-mysql2.docs | ||
---|---|---|
README.md
|
dependencies/wheezy/mysql2/ruby-mysql2.examples | ||
---|---|---|
examples/*
|
dependencies/wheezy/mysql2/ruby-tests.rake | ||
---|---|---|
require 'rspec/core/rake_task'
|
||
|
||
RSpec::Core::RakeTask.new(:spec) do |spec|
|
||
spec.pattern = './spec/mysql2/**/*_spec.rb'
|
||
end
|
||
|
||
task :default => :spec
|
dependencies/wheezy/mysql2/rules | ||
---|---|---|
#!/usr/bin/make -f
|
||
#export DH_VERBOSE=1
|
||
#
|
||
# Uncomment to ignore all test failures (but the tests will run anyway)
|
||
#export DH_RUBY_IGNORE_TESTS=all
|
||
#
|
||
# Uncomment to ignore some test failures (but the tests will run anyway).
|
||
# Valid values:
|
||
#export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems
|
||
#
|
||
# If you need to specify the .gemspec (eg there is more than one)
|
||
#export DH_RUBY_GEMSPEC=gem.gemspec
|
||
|
||
%:
|
||
dh $@ --buildsystem=ruby --with ruby
|
||
|
||
# need to start an mysqld instance to run the tests
|
||
override_dh_auto_install:
|
||
cp spec/configuration.yml.example spec/configuration.yml
|
||
cp spec/my.cnf.example spec/my.cnf
|
||
chmod +x debian/start_mysqld_and_auto_install.sh
|
||
debian/start_mysqld_and_auto_install.sh
|
dependencies/wheezy/mysql2/source/format | ||
---|---|---|
3.0 (quilt)
|
dependencies/wheezy/mysql2/start_mysqld_and_auto_install.sh | ||
---|---|---|
#!/bin/sh
|
||
#
|
||
# start_mysqld_and_auto_install.sh - starts an instance of mysqld before
|
||
# auto_installing and running do_mysql's test suite. It is inspired by
|
||
# debian/test_mysql.sh from libdbi-drivers source package.
|
||
|
||
|
||
|
||
set -e
|
||
|
||
MYTEMP_DIR=`mktemp -d`
|
||
ME=`whoami`
|
||
|
||
export MYSQL_UNIX_PORT=${MYTEMP_DIR}/mysql.sock
|
||
DO_MYSQL_USER=root
|
||
DO_MYSQL_PASS=
|
||
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}
|
||
/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
|
||
sleep 3
|
||
attempts=$((attempts+1))
|
||
if [ ${attempts} -gt 10 ] ; then
|
||
echo "skipping test, mysql server could not be contacted after 30 seconds"
|
||
exit 0
|
||
fi
|
||
done
|
||
mysql --socket=${MYSQL_UNIX_PORT} --execute "CREATE DATABASE ${DO_MYSQL_DBNAME};"
|
||
mysql --socket=${MYSQL_UNIX_PORT} --execute "GRANT ALL PRIVILEGES ON ${DO_MYSQL_DBNAME}.* TO '${DO_MYSQL_USER}'@'localhost' IDENTIFIED BY '${DO_MYSQL_PASS}';"
|
||
|
||
|
||
dh_auto_install
|
||
|
||
/usr/bin/mysqladmin --socket=${MYSQL_UNIX_PORT} shutdown
|
||
rm -rf ${MYTEMP_DIR}
|
||
|
||
|
dependencies/wheezy/mysql2/watch | ||
---|---|---|
version=3
|
||
http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/mysql2 .*/mysql2-(.*).tar.gz
|
Also available in: Unified diff
Add ruby-mysql2 dependency for smart_proxy_dns_powerdns
This is copied unmodified from Debian wheezy-backports