Compare commits

...

No commits in common. "c8s-stream-4.046" and "c9s" have entirely different histories.

13 changed files with 308 additions and 93 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

37
.gitignore vendored
View File

@ -1 +1,36 @@
SOURCES/DBD-mysql-4.046.tar.gz
DBD-mysql-4.016.tar.gz
DBD-mysql-4.017.tar.gz
/DBD-mysql-4.018.tar.gz
/DBD-mysql-4.019.tar.gz
/DBD-mysql-4.020.tar.gz
/DBD-mysql-4.021.tar.gz
/DBD-mysql-4.022.tar.gz
/DBD-mysql-4.023.tar.gz
/DBD-mysql-4.024.tar.gz
/DBD-mysql-4.025.tar.gz
/DBD-mysql-4.026.tar.gz
/DBD-mysql-4.027.tar.gz
/DBD-mysql-4.028.tar.gz
/DBD-mysql-4.029.tar.gz
/DBD-mysql-4.031.tar.gz
/DBD-mysql-4.032.tar.gz
/DBD-mysql-4.033.tar.gz
/DBD-mysql-4.034.tar.gz
/DBD-mysql-4.035.tar.gz
/DBD-mysql-4.036.tar.gz
/DBD-mysql-4.037.tar.gz
/DBD-mysql-4.038.tar.gz
/DBD-mysql-4.039.tar.gz
/DBD-mysql-4.040.tar.gz
/DBD-mysql-4.041.tar.gz
/DBD-mysql-4.042.tar.gz
/DBD-mysql-4.043.tar.gz
/DBD-mysql-4.044.tar.gz
/DBD-mysql-4.045.tar.gz
/DBD-mysql-4.046.tar.gz
/DBD-mysql-4.047.tar.gz
/DBD-mysql-4.048.tar.gz
/DBD-mysql-4.049.tar.gz
/DBD-mysql-4.050.tar.gz
/DBD-mysql-4.052.tar.gz
/DBD-mysql-4.053.tar.gz

View File

@ -1 +0,0 @@
cf9dad5cee866fb2d48ce11ce9814f4af993736d SOURCES/DBD-mysql-4.046.tar.gz

View File

@ -0,0 +1,34 @@
From fc754728272e776b48b3a432ada9954335b783b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 13 Mar 2020 13:41:17 +0100
Subject: [PATCH] Remove a useless shebang from DBD::mysql
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Shebang has only a meaning for an executable script. DBD::mysql Perl
module is not an executable script that someone would run as an
standalone program. Morover, the file would have to have set an
executable bit. It seems the erroneous shebang was added by a mistake
when removing an Emacs configuration line.
This patch removes the shebang.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
lib/DBD/mysql.pm | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/DBD/mysql.pm b/lib/DBD/mysql.pm
index 2277fbe..5c90f3e 100644
--- a/lib/DBD/mysql.pm
+++ b/lib/DBD/mysql.pm
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
require 5.008_001; # just as DBI
--
2.21.1

View File

@ -1,71 +0,0 @@
From 051748825e77172677d9e3b319b870c3c0a70a38 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Fri, 14 Jul 2017 14:13:50 +0200
Subject: [PATCH] Fix build failures for MariaDB 10.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
<mariadb_version.h> does not exist in mariadb-5.5.26. Do not include
it explicitly. Instead rely on including <mysql.h> that transitively
includes <mariadb_version.h> or <mysql_version.h>. This makes this
patch more portable.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
dbdimp.c | 7 +++++++
mysql.xs | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
# Fixed in 4.045
#diff --git a/dbdimp.c b/dbdimp.c
#index 71251da..97fa9c4 100644
#--- a/dbdimp.c
#+++ b/dbdimp.c
#@@ -2104,6 +2104,9 @@ MYSQL *mysql_dr_connect(
#
# if (result)
# {
#+#if MYSQL_VERSION_ID >= 50013
#+ my_bool reconnect= 1;
#+#endif
# #if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
# /* connection succeeded. */
# /* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs
#@@ -2122,7 +2125,11 @@ MYSQL *mysql_dr_connect(
# we turn off Mysql's auto reconnect and handle re-connecting ourselves
# so that we can keep track of when this happens.
# */
#+#if MYSQL_VERSION_ID >= 50013
#+ mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect);
#+#else
# result->reconnect=0;
#+#endif
# }
# else {
# /*
diff --git a/mysql.xs b/mysql.xs
index 60cf9c6..750c763 100644
--- a/mysql.xs
+++ b/mysql.xs
@@ -787,7 +787,7 @@ dbd_mysql_get_info(dbh, sql_info_type)
D_imp_dbh(dbh);
IV type = 0;
SV* retsv=NULL;
-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
+#if MYSQL_VERSION_ID >= 50709
/* MariaDB 10 is not MySQL source level compatible so this only applies to MySQL*/
IV buffer_len;
#endif
@@ -819,7 +819,7 @@ dbd_mysql_get_info(dbh, sql_info_type)
retsv = newSVpvn("`", 1);
break;
case SQL_MAXIMUM_STATEMENT_LENGTH:
-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
+#if MYSQL_VERSION_ID >= 50709
/* MariaDB 10 is not MySQL source level compatible so this
only applies to MySQL*/
/* mysql_get_option() was added in mysql 5.7.3 */
--
2.13.6

19
gating.yaml Normal file
View File

@ -0,0 +1,19 @@
# Fedora
--- !Policy
id: fedora_policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_testing
- bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
# RHEL
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,28 +1,33 @@
# mysql is not available on ix86
ExcludeArch: %{ix86}
Name: perl-DBD-MySQL
Version: 4.046
Release: 3%{?dist}
Version: 4.053
Release: 1%{?dist}
Summary: A MySQL interface for Perl
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/DBD-mysql/
Source0: http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-%{version}.tar.gz
# Fix for new version of MariaDB 10.2
Patch0: DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch
URL: https://metacpan.org/release/DBD-mysql
Source0: https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-%{version}.tar.gz
Source1: test-setup.t
Source2: test-clean.t
Source3: testrules.yml
Source4: test-env.sh
# Remove a useless shebang, bug #1813195,
# <https://github.com/perl5-dbi/DBD-mysql/pull/321>
Patch0: DBD-mysql-4.050-Remove-a-useless-shebang-from-DBD-mysql.patch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: mariadb-connector-c
BuildRequires: mariadb-connector-c-devel
BuildRequires: make
BuildRequires: mysql-devel
BuildRequires: openssl-devel
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(DBI) >= 1.609
BuildRequires: perl(DBI::DBD)
BuildRequires: perl(DynaLoader)
BuildRequires: perl(Devel::CheckLib) >= 1.09
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Copy)
@ -33,6 +38,24 @@ BuildRequires: perl(strict)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
BuildRequires: zlib-devel
# Run-time
BuildRequires: perl(Carp)
BuildRequires: perl(DBI) >= 1.609
BuildRequires: perl(DBI::Const::GetInfoType)
BuildRequires: perl(DynaLoader)
# Tests
BuildRequires: mysql
BuildRequires: mysql-server
BuildRequires: perl(B)
BuildRequires: perl(bigint)
# Required to process t/testrules.yml
BuildRequires: perl(CPAN::Meta::YAML)
BuildRequires: perl(Encode)
BuildRequires: perl(lib)
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(vars)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Provides: perl-DBD-mysql = %{version}-%{release}
@ -46,23 +69,35 @@ management system.
%prep
%setup -q -n DBD-mysql-%{version}
%patch0 -p1
%patch -P0 -p1
# Correct file permissions
find . -type f | xargs chmod -x
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} t/
cp %{SOURCE4} .
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1
make %{?_smp_mflags}
. %{SOURCE4}
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" \
NO_PACKLIST=1 NO_PERLLOCAL=1 \
--testdb=$DBD_MYSQL_TESTDB \
--testuser=$DBD_MYSQL_TESTUSER \
--testpassword=$DBD_MYSQL_TESTPASSWORD \
--testhost=$DBD_MYSQL_TESTHOST \
--testsocket=$DBD_MYSQL_TESTSOCKET
%{make_build}
%install
make pure_install DESTDIR=%{buildroot}
%{make_install}
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}/*
%check
# Full test coverage requires a live MySQL database
#make test
# Set MySQL and DBD::mysql test environment
. %{SOURCE4}
unset RELEASE_TESTING
make test %{?with_perl_DBD_MySQL_enables_leak_test:EXTENDED_TESTING=1}
%files
%license LICENSE
@ -73,8 +108,66 @@ find %{buildroot} -type f -name '*.bs' -empty -delete
%{_mandir}/man3/*.3*
%changelog
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4.046-3
- Rebuild with enable hardening (bug #1636329)
* Thu Mar 13 2025 Jitka Plesnikova <jplesnik@redhat.com> - 4.053-1
- Resolves: RHEL-53861, RHEL-77083
- Update check for SSL connection
- Enable testing
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.050-13
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 4.050-12
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.050-11
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.050-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.050-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 4.050-8
- Perl 5.32 rebuild
* Fri Mar 13 2020 Petr Pisar <ppisar@redhat.com> - 4.050-7
- Remove a useless shebang (bug #1813195)
* Tue Feb 04 2020 Tom Stellard <tstellar@redhat.com> - 4.050-6
- Use make_build/make_install macros
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.050-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.050-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4.050-3
- Perl 5.30 rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.050-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jan 10 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4.050-1
- 4.050 bump
* Mon Nov 19 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4.049-1
- 4.049 bump
* Mon Sep 17 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4.048-1
- 4.048 bump
* Mon Sep 10 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4.047-1
- 4.047 bump
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.046-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4.046-3
- Perl 5.28 rebuild
* Mon Feb 19 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4.046-2
- Add build-require gcc

12
plans/internal.fmf Normal file
View File

@ -0,0 +1,12 @@
summary: Private (RHEL) beakerlib tests
enabled: false
adjust:
- when: distro == rhel
enabled: true
because: private tests are accesible only within rhel pipline
discover:
- name: rhel
how: fmf
url: https://pkgs.devel.redhat.com/git/tests/perl-DBD-MySQL
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (DBD-mysql-4.053.tar.gz) = 066d9b4e748b52b2427b78babb5176a92fd3285695710139e4c9529e7e9dff19dc12aef2d8f616fa4a9065867bc5bcc517f8f29f84190956b4c2e06defae62b6

16
test-clean.t Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/perl
use strict;
use warnings;
use File::Path;
use Test::More tests => 2;
my $MYSQL_DIR = $ENV{'MYSQL_DIR'};
my $MYSQL_UNIX_PORT = $ENV{'MYSQL_UNIX_PORT'};
my $MYSQL_PIDFILE = $ENV{'MYSQL_PIDFILE'};
ok(system("/usr/bin/mysqladmin --user=root --socket=$MYSQL_UNIX_PORT shutdown 2>&1 || [ ! -s \"$MYSQL_PIDFILE\" ] || /bin/kill `cat \"$MYSQL_PIDFILE\"`") == 0);
my $removed_count = rmtree($MYSQL_DIR, 1, 1);
ok($removed_count > 0);

14
test-env.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/bash
# MariaDB setup
export MYSQL_DIR=$PWD/t/testdb
export MYSQL_UNIX_PORT=$MYSQL_DIR/mysql.sock
export MYSQL_PIDFILE=$MYSQL_DIR/mysql.pid
# DBD::mysql test setup
export DBD_MYSQL_TESTDB=test
export DBD_MYSQL_TESTHOST=localhost
export DBD_MYSQL_TESTSOCKET=$MYSQL_UNIX_PORT
export DBD_MYSQL_TESTUSER=testuserdbd
export DBD_MYSQL_TESTPASSWORD=testpasswordDBD

51
test-setup.t Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 7;
# MySQL setup
my $MYSQL_DIR = $ENV{'MYSQL_DIR'};
my $MYSQL_UNIX_PORT = $ENV{'MYSQL_UNIX_PORT'};
my $MYSQL_PIDFILE = $ENV{'MYSQL_PIDFILE'};
# DBD::MariaDB test setup
my $DBD_MYSQL_TESTDB = $ENV{'DBD_MYSQL_TESTDB'};
my $DBD_MYSQL_TESTHOST = $ENV{'DBD_MYSQL_TESTHOST'};
my $DBD_MYSQL_TESTSOCKET = $ENV{'DBD_MYSQL_TESTSOCKET'};
my $DBD_MYSQL_TESTUSER = $ENV{'DBD_MYSQL_TESTUSER'};
my $DBD_MYSQL_TESTPASSWORD = $ENV{'DBD_MYSQL_TESTPASSWORD'};
my $MYSQLD = '/usr/sbin/mysqld';
# Initialize MySQL data directory
system("$MYSQLD --no-defaults --initialize-insecure --user=mysql --datadir=$MYSQL_DIR >/dev/null 2>&1");
is($?, 0);
# Starting the server
my $cmd = "$MYSQLD --no-defaults --socket=$MYSQL_UNIX_PORT --datadir=$MYSQL_DIR --pid-file=$MYSQL_PIDFILE --explicit_defaults_for_timestamp --skip-networking >/dev/null 2>&1 &";
system($cmd);
is($?, 0);
my $attempts = 0;
while (system("/usr/bin/mysqladmin --socket=$MYSQL_UNIX_PORT ping >/dev/null 2>&1") != 0) {
sleep 3;
$attempts++;
if ($attempts > 10) {
fail("skipping test, mysql server could not be contacted after 30 seconds\n");
}
}
ok(1);
# Create database
system("mysql -u root --skip-password --execute \"CREATE DATABASE IF NOT EXISTS $DBD_MYSQL_TESTDB CHARACTER SET='utf8mb4';\" 2>&1");
is($?, 0);
# The test user has to have the proper privileges that these tests require
system("mysql -u root --skip-password --execute \"CREATE USER '$DBD_MYSQL_TESTUSER'\@'localhost' IDENTIFIED BY '$DBD_MYSQL_TESTPASSWORD'; \" 2>&1");
is($?, 0);
system("mysql -u root --skip-password --execute \"GRANT ALL PRIVILEGES ON $DBD_MYSQL_TESTDB.* TO '$DBD_MYSQL_TESTUSER'\@'localhost';\" 2>&1");
is($?, 0);
system("/usr/bin/mysqladmin --user=$DBD_MYSQL_TESTUSER --password=$DBD_MYSQL_TESTPASSWORD --socket=$DBD_MYSQL_TESTSOCKET ping >/dev/null 2>&1");
is($?, 0);

11
testrules.yml Normal file
View File

@ -0,0 +1,11 @@
seq:
- seq: t/test-setup.t
- seq: t/00base.t
- seq: t/05dbcreate.t
- seq: t/10connect.t
- seq: t/87async.t
- seq: t/rt75353-innodb-lock-timeout.t
- seq: t/rt85919-fetch-lost-connection.t
- par:
- par: **
- seq: t/test-clean.t