Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/DBD-mysql/files/, dev-perl/DBD-mysql/
Date: Thu, 29 Aug 2019 09:41:16
Message-Id: 1567071644.945eb72e9fd616d936f29d8d77f03c077a787ad4.kentnl@gentoo
1 commit: 945eb72e9fd616d936f29d8d77f03c077a787ad4
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 17 14:27:06 2019 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 29 09:40:44 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=945eb72e
7
8 dev-perl/DBD-mysql: bump to v4.050
9
10 Closes: https://bugs.gentoo.org/661480
11 Closes: https://github.com/gentoo/gentoo/pull/12731
12 Package-Manager: Portage-2.3.71, Repoman-2.3.17
13 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
14 Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>
15
16 dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild | 70 ++++++++++++++++++++++
17 dev-perl/DBD-mysql/Manifest | 1 +
18 ...DBD-mysql-4.050-fix-float-type-conversion.patch | 48 +++++++++++++++
19 ....050-fix-for-MariaDB-10.3.13-with-zerofil.patch | 36 +++++++++++
20 4 files changed, 155 insertions(+)
21
22 diff --git a/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild b/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
23 new file mode 100644
24 index 00000000000..4f268c86e07
25 --- /dev/null
26 +++ b/dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
27 @@ -0,0 +1,70 @@
28 +# Copyright 1999-2019 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=6
32 +
33 +DIST_AUTHOR=DVEEDEN
34 +DIST_VERSION=4.050
35 +inherit eutils perl-module
36 +
37 +DESCRIPTION="MySQL driver for the Perl5 Database Interface (DBI)"
38 +
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
41 +
42 +IUSE="mariadb +mysql test +ssl"
43 +REQUIRED_USE="^^ ( mysql mariadb )"
44 +
45 +RDEPEND=">=dev-perl/DBI-1.609.0
46 + >=dev-perl/Devel-CheckLib-1.109.0
47 + mysql? ( dev-db/mysql-connector-c:= )
48 + mariadb? ( dev-db/mariadb-connector-c:=[ssl(+)?] )
49 +"
50 +DEPEND="${RDEPEND}
51 + virtual/perl-ExtUtils-MakeMaker
52 + virtual/perl-Data-Dumper
53 + test? (
54 + dev-perl/Test-Deep
55 + >=virtual/perl-Test-Simple-0.900.0
56 + virtual/perl-Time-HiRes
57 + )
58 +"
59 +PATCHES=(
60 + "${FILESDIR}/${PN}-${DIST_VERSION}-no-dot-inc.patch"
61 + "${FILESDIR}/${PN}-${DIST_VERSION}-fix-float-type-conversion.patch"
62 + "${FILESDIR}/${PN}-${DIST_VERSION}-fix-for-MariaDB-10.3.13-with-zerofil.patch"
63 +)
64 +
65 +src_configure() {
66 + local impl
67 + impl=$(usex mariadb mariadb mysql)
68 + if use test; then
69 + myconf="${myconf} --testdb=test \
70 + --testhost=localhost \
71 + --testuser=test \
72 + --testpassword=test"
73 + fi
74 + myconf="${myconf} --$(usex ssl ssl nossl) --mysql_config=${EPREFIX%/}/usr/bin/${impl}_config"
75 + perl-module_src_configure
76 +}
77 +
78 +# Parallel testing is broken as 2 tests create the same table
79 +# and mysql isn't acid compliant and can't limit visibility of tables
80 +# to a transaction...
81 +DIST_TEST="do"
82 +
83 +src_test() {
84 + einfo
85 + einfo "If tests fail, you have to configure your MySQL instance to create"
86 + einfo "and grant some privileges to the test user."
87 + einfo "You can run the following commands at the MySQL prompt: "
88 + einfo "> CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';"
89 + einfo "> CREATE DATABASE test;"
90 + einfo "> GRANT ALL PRIVILEGES ON test.* TO 'test'@'localhost';"
91 + einfo
92 + sleep 5
93 + perl_rm_files t/pod.t t/manifest.t
94 + # Don't be a hero and try to do EXTENDED_TESTING=1 unless you can figure
95 + # out why 60leaks.t fails
96 + perl-module_src_test
97 +}
98
99 diff --git a/dev-perl/DBD-mysql/Manifest b/dev-perl/DBD-mysql/Manifest
100 index 6765b78c1b2..8d20e439305 100644
101 --- a/dev-perl/DBD-mysql/Manifest
102 +++ b/dev-perl/DBD-mysql/Manifest
103 @@ -3,3 +3,4 @@ DIST DBD-mysql-4.037.tar.gz 146639 BLAKE2B fbecca7302cd6ea0386116a1824a7696f87f6
104 DIST DBD-mysql-4.041.tar.gz 150508 BLAKE2B 900ccc4ad9bc5bfb236c66774a6c9529beed3568c3f3626afcbb572fa530a2488ee8e05b1dabd169a775f28d634321dd3e86923e2829e019943a9f3054b1e887 SHA512 8663c58f1dec273869ef5d3ee663d80cb36fa87b1956318fff07a4a801aaecc395510a8f31b7a51b823f7e9d6a73ebf13894c1b7f7b27fdc3f3956e6aba34777
105 DIST DBD-mysql-4.042.tar.gz 160028 BLAKE2B ef2f9d6508a473c34275ae9d7233863698ab502d837975f08593d2d1ca9761081ffb84bafc5a02c572e2a6b4d54dd7c8312e476e0719733166f8edc030a016de SHA512 fe3c9e1e325f7056da783e0ea33f9a7810f25f3d9cd2c9a4bf4037b20a2148f2291b2f90d44730e63c7902b45e26993a7f9fcf1b3bf8d1bc5d3fca99893a019e
106 DIST DBD-mysql-4.044.tar.gz 155006 BLAKE2B 2934224010bb09aaff9a334b25038a4c7d1eb5552f6ad2b73f44aa7e2d8cb3684644773a89f35363c156cf40867a28943320e1b8b7ef4b9d4b8ac0f6b2417b38 SHA512 e3dd9482e8f78c19dc91baba07e39e266f113ce5a014cfe6c5989c96ed0f85723a17ba6a6e00b65a1ed3c62362400bd3779eb63ed282f73587b4757da249af02
107 +DIST DBD-mysql-4.050.tar.gz 161579 BLAKE2B fb17e151db730fd6955d3e4424dd495a9fcf5f3f4e2b6b79d9fdc86bc42c3314b68771f1d3c393fd80ea14aeda626a5c5d21f5b921d487350ffd79802edab1f6 SHA512 910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879
108
109 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
110 new file mode 100644
111 index 00000000000..cda1cabdc24
112 --- /dev/null
113 +++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-float-type-conversion.patch
114 @@ -0,0 +1,48 @@
115 +From: Pali <pali@××××.org>
116 +Date: Fri, 24 Feb 2017 19:51:36 +0100
117 +Subject: [PATCH] Fix type conversions
118 + Calling SvNV() for magical scalar is not enough for float type conversion.
119 + It caused problem for Amavis in tainted mode -- all float values were zero.
120 + On the other hand SvIV() and SvUV() seems to work fine. To be sure that
121 + correct value of float is in scalar use sv_setnv() with explicit NV float
122 + value. Similar code is changed also for integers IV/UV.
123 + .
124 + This patch should fix reported Amavis bug:
125 + https://github.com/perl5-dbi/DBD-mysql/issues/78
126 + .
127 + See also reported perl bug about SvNV():
128 + https://rt.perl.org/Public/Bug/Display.html?id=130801
129 +Bugs: https://github.com/perl5-dbi/DBD-mysql/issues/78
130 +Bugs-Debian: https://bugs.debian.org/856064
131 +Last-Update: 2019-01-09
132 +Reviewed-By: Xavier Guimard <x.guimard@××××.fr>,
133 + gregor herrmann <gregoa@××××××.org>
134 +
135 +--- a/dbdimp.c
136 ++++ b/dbdimp.c
137 +@@ -4447,8 +4447,7 @@
138 + if (!(fields[i].flags & ZEROFILL_FLAG))
139 + {
140 + /* Coerce to double and set scalar as NV */
141 +- (void) SvNV(sv);
142 +- SvNOK_only(sv);
143 ++ sv_setnv(sv, SvNV(sv));
144 + }
145 + break;
146 +
147 +@@ -4459,13 +4458,11 @@
148 + /* Coerce to integer and set scalar as UV resp. IV */
149 + if (fields[i].flags & UNSIGNED_FLAG)
150 + {
151 +- (void) SvUV(sv);
152 +- SvIOK_only_UV(sv);
153 ++ sv_setuv(sv, SvUV(sv));
154 + }
155 + else
156 + {
157 +- (void) SvIV(sv);
158 +- SvIOK_only(sv);
159 ++ sv_setiv(sv, SvIV(sv));
160 + }
161 + }
162 + break;
163
164 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
165 new file mode 100644
166 index 00000000000..f3d5e5bf4cb
167 --- /dev/null
168 +++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.050-fix-for-MariaDB-10.3.13-with-zerofil.patch
169 @@ -0,0 +1,36 @@
170 +From 8b5ba5f9c8d239328ecbc862aba203d44819e2f5 Mon Sep 17 00:00:00 2001
171 +From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@××××××.nl>
172 +Date: Tue, 5 Mar 2019 16:24:17 +0100
173 +Subject: [PATCH] Fix for MariaDB 10.3.13 with zerofil
174 +
175 +Issue: #304
176 +
177 +Bug: https://github.com/perl5-dbi/DBD-mysql/issues/304
178 +Bug-Debian: https://bugs.debian.org/923541
179 +
180 +---
181 + dbdimp.c | 6 +++++-
182 + 1 file changed, 5 insertions(+), 1 deletion(-)
183 +
184 +diff --git a/dbdimp.c b/dbdimp.c
185 +index a9c37cf..82c96d2 100644
186 +--- a/dbdimp.c
187 ++++ b/dbdimp.c
188 +@@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
189 + break;
190 +
191 + default:
192 +-#if MYSQL_VERSION_ID > 100300
193 ++#if (MYSQL_VERSION_ID > 100300) && (MYSQL_VERSION_ID < 100313)
194 + // https://jira.mariadb.org/browse/MDEV-18143
195 + buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 2;
196 ++#elif MYSQL_VERSION_ID > 100312
197 ++ // https://jira.mariadb.org/browse/MDEV-18823
198 ++ buffer->buffer_length= fields[i].max_length ? fields[i].max_length + 1 : 2;
199 ++ buffer->buffer_length= fields[i].length > fields[i].max_length ? fields[i].length + 1 : 2;
200 + #else
201 + buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;
202 + #endif
203 +--
204 +2.20.1
205 +