From 0d845674dece9cded838f4184eeeaf33fea0a0ae Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Wed, 24 Jan 2018 17:33:33 +1300 Subject: dev-perl/DBD-mysql: Bump to version 4.44.0 - Remove embedded support - https://bugs.gentoo.org/644174 - https://bugs.gentoo.org/598048 - removal from older versions may happen later Upstream: - Fix for CVE-2017-10788 ( https://bugs.gentoo.org/623632 ) - Fix for CVE-2017-10789 ( https://bugs.gentoo.org/623942 ) - Enforce SSL settings for BACKRONYM and Riddle - Fix parsing of mysql_config --libs output in Configure - Return INTs with ZEROFILL as strings - Some fixes for 5.26-dot-in-inc Bug: https://bugs.gentoo.org/598048 Bug: https://bugs.gentoo.org/623632 Bug: https://bugs.gentoo.org/623942 Bug: https://bugs.gentoo.org/644174 Package-Manager: Portage-2.3.18, Repoman-2.3.6 --- dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild | 64 +++++++++ dev-perl/DBD-mysql/Manifest | 1 + .../DBD-mysql-4.044-amvis-type-conversions.patch | 56 ++++++++ .../files/DBD-mysql-4.044-no-dot-inc.patch | 151 +++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild create mode 100644 dev-perl/DBD-mysql/files/DBD-mysql-4.044-amvis-type-conversions.patch create mode 100644 dev-perl/DBD-mysql/files/DBD-mysql-4.044-no-dot-inc.patch (limited to 'dev-perl/DBD-mysql') diff --git a/dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild b/dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild new file mode 100644 index 000000000000..48c3cc910c8b --- /dev/null +++ b/dev-perl/DBD-mysql/DBD-mysql-4.44.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=CAPTTOFU +DIST_VERSION=4.044 +inherit eutils perl-module + +DESCRIPTION="MySQL driver for the Perl5 Database Interface (DBI)" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" + +IUSE="test +ssl" + +RDEPEND=">=dev-perl/DBI-1.609.0 + virtual/libmysqlclient:= +" +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}-amvis-type-conversions.patch" + "${FILESDIR}/${PN}-${DIST_VERSION}-no-dot-inc.patch" + "${FILESDIR}/4.041-mariadb-10.2.patch" +) +src_configure() { + if use test; then + myconf="${myconf} --testdb=test \ + --testhost=localhost \ + --testuser=test \ + --testpassword=test" + fi + myconf="${myconf} --$(usex ssl ssl nossl)" + 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 45096fbca218..6765b78c1b24 100644 --- a/dev-perl/DBD-mysql/Manifest +++ b/dev-perl/DBD-mysql/Manifest @@ -2,3 +2,4 @@ DIST DBD-mysql-4.032.tar.gz 146476 BLAKE2B 3ace983522e273cdb18352d2fa87702222594 DIST DBD-mysql-4.037.tar.gz 146639 BLAKE2B fbecca7302cd6ea0386116a1824a7696f87f681dbfcd88970b1a5eab54639e46471fc07b37bd8c0158b3eca02d05dad159e11027daa5ab46eaa307b530f7c58e SHA512 3bda6ea18d29e32028b7eb93cd06fdbabbadafa66f982556298a68980c42a7b5236872113696e6d2df66a345049d1e63bc90ab358c8631f0cbea187780e514af 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 diff --git a/dev-perl/DBD-mysql/files/DBD-mysql-4.044-amvis-type-conversions.patch b/dev-perl/DBD-mysql/files/DBD-mysql-4.044-amvis-type-conversions.patch new file mode 100644 index 000000000000..9cf9ff91fc8a --- /dev/null +++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.044-amvis-type-conversions.patch @@ -0,0 +1,56 @@ +From eb7eddaa2341b853df045ad4a3690c60fc38c6c8 Mon Sep 17 00:00:00 2001 +From: Pali +Date: Fri, 24 Feb 2017 19:51:36 +0100 +Subject: 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 +--- + dbdimp.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/dbdimp.c b/dbdimp.c +index 9c33994..7fdfba1 100644 +--- a/dbdimp.c ++++ b/dbdimp.c +@@ -4380,8 +4380,7 @@ process: + if (!(fields[i].flags & ZEROFILL_FLAG)) + { + /* Coerce to dobule and set scalar as NV */ +- (void) SvNV(sv); +- SvNOK_only(sv); ++ sv_setnv(sv, SvNV(sv)); + } + break; + +@@ -4392,13 +4391,11 @@ process: + /* 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; +-- +2.15.1 + diff --git a/dev-perl/DBD-mysql/files/DBD-mysql-4.044-no-dot-inc.patch b/dev-perl/DBD-mysql/files/DBD-mysql-4.044-no-dot-inc.patch new file mode 100644 index 000000000000..5e0829384be4 --- /dev/null +++ b/dev-perl/DBD-mysql/files/DBD-mysql-4.044-no-dot-inc.patch @@ -0,0 +1,151 @@ +From 35931a7465f19da53b97cd1bc5369a69aeac2ff6 Mon Sep 17 00:00:00 2001 +From: Pali +Date: Mon, 17 Apr 2017 21:38:58 +0200 +Subject: Fix tests on Perl On 5.25.10 or greater with + -Ddefault_inc_excludes_dot + +Some tests do not include dot in %INC and fails with error: +Can't locate t/lib.pl in @INC + +Fixes: https://rt.cpan.org/Public/Bug/Display.html?id=120709 +--- + t/40server_prepare_crash.t | 3 ++- + t/lib.pl | 5 +++-- + t/rt118977-zerofill.t | 2 +- + t/rt25389-bin-case.t | 3 ++- + t/rt50304-column_info_parentheses.t | 3 ++- + t/rt61849-bind-param-buffer-overflow.t | 3 ++- + t/rt75353-innodb-lock-timeout.t | 3 ++- + t/rt83494-quotes-comments.t | 3 ++- + 8 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/t/40server_prepare_crash.t b/t/40server_prepare_crash.t +index df6e2b3..e2c8c9f 100644 +--- a/t/40server_prepare_crash.t ++++ b/t/40server_prepare_crash.t +@@ -5,7 +5,8 @@ use Test::More; + use DBI; + + use vars qw($test_dsn $test_user $test_password); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + my $dbh = eval { DBI->connect($test_dsn, $test_user, $test_password, { PrintError => 1, RaiseError => 1, AutoCommit => 0, mysql_server_prepare => 1, mysql_server_prepare_disable_fallback => 1 }) }; + plan skip_all => "no database connection" if $@ or not $dbh; +diff --git a/t/lib.pl b/t/lib.pl +index 2221c40..0c756a0 100644 +--- a/t/lib.pl ++++ b/t/lib.pl +@@ -2,6 +2,7 @@ use strict; + use warnings; + + use Test::More; ++use File::Spec (); + use DBI::Const::GetInfoType; + use vars qw($mdriver $dbdriver $childPid $test_dsn $test_user $test_password); + +@@ -31,7 +32,7 @@ if (-f ($file = "t/$dbdriver.dbtest") || + -f ($file = "$dbdriver.dbtest") || + -f ($file = "../tests/$dbdriver.dbtest") || + -f ($file = "tests/$dbdriver.dbtest")) { +- eval { require $file; }; ++ eval { require File::Spec->rel2abs($file); }; + if ($@) { + print STDERR "Cannot execute $file: $@.\n"; + print "1..0\n"; +@@ -45,7 +46,7 @@ if (-f ($file = "t/$mdriver.mtest") || + -f ($file = "$mdriver.mtest") || + -f ($file = "../tests/$mdriver.mtest") || + -f ($file = "tests/$mdriver.mtest")) { +- eval { require $file; }; ++ eval { require File::Spec->rel2abs($file); }; + if ($@) { + print STDERR "Cannot execute $file: $@.\n"; + print "1..0\n"; +diff --git a/t/rt118977-zerofill.t b/t/rt118977-zerofill.t +index 27ba1b7..86edb8e 100644 +--- a/t/rt118977-zerofill.t ++++ b/t/rt118977-zerofill.t +@@ -5,7 +5,7 @@ use Test::More; + use DBI; + + use vars qw($test_dsn $test_user $test_password); +-require "t/lib.pl"; ++require "./t/lib.pl"; + + my $dbh = eval { DBI->connect($test_dsn, $test_user, $test_password, { PrintError => 1, RaiseError => 1 }) }; + plan skip_all => "no database connection" if $@ or not $dbh; +diff --git a/t/rt25389-bin-case.t b/t/rt25389-bin-case.t +index 37bffb9..9d091b3 100644 +--- a/t/rt25389-bin-case.t ++++ b/t/rt25389-bin-case.t +@@ -4,7 +4,8 @@ use warnings; + use DBI; + + use vars qw($test_dsn $test_user $test_password); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + use Test::More; + +diff --git a/t/rt50304-column_info_parentheses.t b/t/rt50304-column_info_parentheses.t +index 5b6d799..8c31bf6 100644 +--- a/t/rt50304-column_info_parentheses.t ++++ b/t/rt50304-column_info_parentheses.t +@@ -4,7 +4,8 @@ use warnings; + use DBI; + + use vars qw($test_dsn $test_user $test_password $state); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + use Test::More; + +diff --git a/t/rt61849-bind-param-buffer-overflow.t b/t/rt61849-bind-param-buffer-overflow.t +index 99a4ccc..494f985 100644 +--- a/t/rt61849-bind-param-buffer-overflow.t ++++ b/t/rt61849-bind-param-buffer-overflow.t +@@ -5,7 +5,8 @@ use Test::More; + use DBI; + + use vars qw($test_dsn $test_user $test_password); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + my $INSECURE_VALUE_FROM_USER = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; + +diff --git a/t/rt75353-innodb-lock-timeout.t b/t/rt75353-innodb-lock-timeout.t +index 69b740e..41d1b8f 100644 +--- a/t/rt75353-innodb-lock-timeout.t ++++ b/t/rt75353-innodb-lock-timeout.t +@@ -5,7 +5,8 @@ use Test::More; + use DBI; + + use vars qw($test_dsn $test_user $test_password); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + my $dbh1 = eval { DBI->connect($test_dsn, $test_user, $test_password, { RaiseError => 1, AutoCommit => 0 }) }; + plan skip_all => "no database connection" if $@ or not $dbh1; +diff --git a/t/rt83494-quotes-comments.t b/t/rt83494-quotes-comments.t +index 9df0d90..c42afe4 100644 +--- a/t/rt83494-quotes-comments.t ++++ b/t/rt83494-quotes-comments.t +@@ -9,7 +9,8 @@ use DBI; + use Test::More; + + use vars qw($test_dsn $test_user $test_password $state); +-require "t/lib.pl"; ++use lib 't', '.'; ++require "lib.pl"; + + my $dbh; + eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password, +-- +2.15.1 + -- cgit v1.2.3-65-gdbad