summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-08-17 16:27:06 +0200
committerKent Fredric <kentnl@gentoo.org>2019-08-29 21:40:44 +1200
commit945eb72e9fd616d936f29d8d77f03c077a787ad4 (patch)
tree57b27ef95348fb141f4692fecaf3d59c7ab754c1
parentprofiles: package.use.stable.mask DBD-mysql USE=mariadb (diff)
downloadgentoo-945eb72e9fd616d936f29d8d77f03c077a787ad4.tar.gz
gentoo-945eb72e9fd616d936f29d8d77f03c077a787ad4.tar.bz2
gentoo-945eb72e9fd616d936f29d8d77f03c077a787ad4.zip
dev-perl/DBD-mysql: bump to v4.050
Closes: https://bugs.gentoo.org/661480 Closes: https://github.com/gentoo/gentoo/pull/12731 Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> Signed-off-by: Kent Fredric <kentnl@gentoo.org>
-rw-r--r--dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild70
-rw-r--r--dev-perl/DBD-mysql/Manifest1
-rw-r--r--dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-float-type-conversion.patch48
-rw-r--r--dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-for-MariaDB-10.3.13-with-zerofil.patch36
4 files changed, 155 insertions, 0 deletions
diff --git a/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild b/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
new file mode 100644
index 000000000000..4f268c86e07d
--- /dev/null
+++ b/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=DVEEDEN
+DIST_VERSION=4.050
+inherit eutils perl-module
+
+DESCRIPTION="MySQL driver for the Perl5 Database Interface (DBI)"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="mariadb +mysql test +ssl"
+REQUIRED_USE="^^ ( mysql mariadb )"
+
+RDEPEND=">=dev-perl/DBI-1.609.0
+ >=dev-perl/Devel-CheckLib-1.109.0
+ mysql? ( dev-db/mysql-connector-c:= )
+ mariadb? ( dev-db/mariadb-connector-c:=[ssl(+)?] )
+"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker
+ virtual/perl-Data-Dumper
+ test? (
+ dev-perl/Test-Deep
+ >=virtual/perl-Test-Simple-0.900.0
+ virtual/perl-Time-HiRes
+ )
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-${DIST_VERSION}-no-dot-inc.patch"
+ "${FILESDIR}/${PN}-${DIST_VERSION}-fix-float-type-conversion.patch"
+ "${FILESDIR}/${PN}-${DIST_VERSION}-fix-for-MariaDB-10.3.13-with-zerofil.patch"
+)
+
+src_configure() {
+ local impl
+ impl=$(usex mariadb mariadb mysql)
+ if use test; then
+ myconf="${myconf} --testdb=test \
+ --testhost=localhost \
+ --testuser=test \
+ --testpassword=test"
+ fi
+ myconf="${myconf} --$(usex ssl ssl nossl) --mysql_config=${EPREFIX%/}/usr/bin/${impl}_config"
+ perl-module_src_configure
+}
+
+# Parallel testing is broken as 2 tests create the same table
+# and mysql isn't acid compliant and can't limit visibility of tables
+# to a transaction...
+DIST_TEST="do"
+
+src_test() {
+ einfo
+ einfo "If tests fail, you have to configure your MySQL instance to create"
+ einfo "and grant some privileges to the test user."
+ einfo "You can run the following commands at the MySQL prompt: "
+ einfo "> CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';"
+ einfo "> CREATE DATABASE test;"
+ einfo "> GRANT ALL PRIVILEGES ON test.* TO 'test'@'localhost';"
+ einfo
+ sleep 5
+ perl_rm_files t/pod.t t/manifest.t
+ # Don't be a hero and try to do EXTENDED_TESTING=1 unless you can figure
+ # out why 60leaks.t fails
+ perl-module_src_test
+}
diff --git a/dev-perl/DBD-mysql/Manifest b/dev-perl/DBD-mysql/Manifest
index 6765b78c1b24..8d20e4393055 100644
--- a/dev-perl/DBD-mysql/Manifest
+++ b/dev-perl/DBD-mysql/Manifest
@@ -3,3 +3,4 @@ DIST DBD-mysql-4.037.tar.gz 146639 BLAKE2B fbecca7302cd6ea0386116a1824a7696f87f6
DIST DBD-mysql-4.041.tar.gz 150508 BLAKE2B 900ccc4ad9bc5bfb236c66774a6c9529beed3568c3f3626afcbb572fa530a2488ee8e05b1dabd169a775f28d634321dd3e86923e2829e019943a9f3054b1e887 SHA512 8663c58f1dec273869ef5d3ee663d80cb36fa87b1956318fff07a4a801aaecc395510a8f31b7a51b823f7e9d6a73ebf13894c1b7f7b27fdc3f3956e6aba34777
DIST DBD-mysql-4.042.tar.gz 160028 BLAKE2B ef2f9d6508a473c34275ae9d7233863698ab502d837975f08593d2d1ca9761081ffb84bafc5a02c572e2a6b4d54dd7c8312e476e0719733166f8edc030a016de SHA512 fe3c9e1e325f7056da783e0ea33f9a7810f25f3d9cd2c9a4bf4037b20a2148f2291b2f90d44730e63c7902b45e26993a7f9fcf1b3bf8d1bc5d3fca99893a019e
DIST DBD-mysql-4.044.tar.gz 155006 BLAKE2B 2934224010bb09aaff9a334b25038a4c7d1eb5552f6ad2b73f44aa7e2d8cb3684644773a89f35363c156cf40867a28943320e1b8b7ef4b9d4b8ac0f6b2417b38 SHA512 e3dd9482e8f78c19dc91baba07e39e266f113ce5a014cfe6c5989c96ed0f85723a17ba6a6e00b65a1ed3c62362400bd3779eb63ed282f73587b4757da249af02
+DIST DBD-mysql-4.050.tar.gz 161579 BLAKE2B fb17e151db730fd6955d3e4424dd495a9fcf5f3f4e2b6b79d9fdc86bc42c3314b68771f1d3c393fd80ea14aeda626a5c5d21f5b921d487350ffd79802edab1f6 SHA512 910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879
diff --git a/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-float-type-conversion.patch b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-float-type-conversion.patch
new file mode 100644
index 000000000000..cda1cabdc24d
--- /dev/null
+++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-float-type-conversion.patch
@@ -0,0 +1,48 @@
+From: Pali <pali@cpan.org>
+Date: Fri, 24 Feb 2017 19:51:36 +0100
+Subject: [PATCH] Fix type conversions
+ Calling SvNV() for magical scalar is not enough for float type conversion.
+ It caused problem for Amavis in tainted mode -- all float values were zero.
+ On the other hand SvIV() and SvUV() seems to work fine. To be sure that
+ correct value of float is in scalar use sv_setnv() with explicit NV float
+ value. Similar code is changed also for integers IV/UV.
+ .
+ This patch should fix reported Amavis bug:
+ https://github.com/perl5-dbi/DBD-mysql/issues/78
+ .
+ See also reported perl bug about SvNV():
+ https://rt.perl.org/Public/Bug/Display.html?id=130801
+Bugs: https://github.com/perl5-dbi/DBD-mysql/issues/78
+Bugs-Debian: https://bugs.debian.org/856064
+Last-Update: 2019-01-09
+Reviewed-By: Xavier Guimard <x.guimard@free.fr>,
+ gregor herrmann <gregoa@debian.org>
+
+--- a/dbdimp.c
++++ b/dbdimp.c
+@@ -4447,8 +4447,7 @@
+ if (!(fields[i].flags & ZEROFILL_FLAG))
+ {
+ /* Coerce to double and set scalar as NV */
+- (void) SvNV(sv);
+- SvNOK_only(sv);
++ sv_setnv(sv, SvNV(sv));
+ }
+ break;
+
+@@ -4459,13 +4458,11 @@
+ /* Coerce to integer and set scalar as UV resp. IV */
+ if (fields[i].flags & UNSIGNED_FLAG)
+ {
+- (void) SvUV(sv);
+- SvIOK_only_UV(sv);
++ sv_setuv(sv, SvUV(sv));
+ }
+ else
+ {
+- (void) SvIV(sv);
+- SvIOK_only(sv);
++ sv_setiv(sv, SvIV(sv));
+ }
+ }
+ break;
diff --git a/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-for-MariaDB-10.3.13-with-zerofil.patch b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-for-MariaDB-10.3.13-with-zerofil.patch
new file mode 100644
index 000000000000..f3d5e5bf4cbc
--- /dev/null
+++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-for-MariaDB-10.3.13-with-zerofil.patch
@@ -0,0 +1,36 @@
+From 8b5ba5f9c8d239328ecbc862aba203d44819e2f5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@myname.nl>
+Date: Tue, 5 Mar 2019 16:24:17 +0100
+Subject: [PATCH] Fix for MariaDB 10.3.13 with zerofil
+
+Issue: #304
+
+Bug: https://github.com/perl5-dbi/DBD-mysql/issues/304
+Bug-Debian: https://bugs.debian.org/923541
+
+---
+ dbdimp.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/dbdimp.c b/dbdimp.c
+index a9c37cf..82c96d2 100644
+--- a/dbdimp.c
++++ b/dbdimp.c
+@@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
+ break;
+
+ default:
+-#if MYSQL_VERSION_ID > 100300
++#if (MYSQL_VERSION_ID > 100300) && (MYSQL_VERSION_ID < 100313)
+ // https://jira.mariadb.org/browse/MDEV-18143
+ buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 2;
++#elif MYSQL_VERSION_ID > 100312
++ // https://jira.mariadb.org/browse/MDEV-18823
++ buffer->buffer_length= fields[i].max_length ? fields[i].max_length + 1 : 2;
++ buffer->buffer_length= fields[i].length > fields[i].max_length ? fields[i].length + 1 : 2;
+ #else
+ buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;
+ #endif
+--
+2.20.1
+