import UBI rubygem-mysql2-0.5.3-12.el9
This commit is contained in:
parent
1e311a14a5
commit
b95fa4eaae
28
SOURCES/rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
Normal file
28
SOURCES/rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 06512d47dc1491bf5686b2bd89a8555de9f2acc9 Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Thu, 22 Dec 2022 16:14:39 +0100
|
||||
Subject: [PATCH] Use the SSL pem files in the Git repository.
|
||||
|
||||
---
|
||||
spec/mysql2/client_spec.rb | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/spec/mysql2/client_spec.rb b/spec/mysql2/client_spec.rb
|
||||
index 5861882..3f5cda8 100644
|
||||
--- a/spec/mysql2/client_spec.rb
|
||||
+++ b/spec/mysql2/client_spec.rb
|
||||
@@ -137,9 +137,9 @@ RSpec.describe Mysql2::Client do
|
||||
ssl_client = nil
|
||||
option_overrides = {
|
||||
'host' => 'mysql2gem.example.com', # must match the certificates
|
||||
- :sslkey => '/etc/mysql/client-key.pem',
|
||||
- :sslcert => '/etc/mysql/client-cert.pem',
|
||||
- :sslca => '/etc/mysql/ca-cert.pem',
|
||||
+ :sslkey => 'spec/ssl/client-key.pem',
|
||||
+ :sslcert => 'spec/ssl/client-cert.pem',
|
||||
+ :sslca => 'spec/ssl/ca-cert.pem',
|
||||
:sslcipher => 'DHE-RSA-AES256-SHA',
|
||||
:sslverify => true,
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
@ -1,12 +1,18 @@
|
||||
# build with tests?
|
||||
# Disable tests for 32bit arch, mariadb-server
|
||||
# needed for majority of the tests is not built for ix86
|
||||
# https://gitlab.com/redhat/centos-stream/rpms/mariadb/-/blob/e7c71299403146a661255e2d50a74d789d083429/mariadb.spec#L2
|
||||
%ifarch %{ix86}
|
||||
%bcond_with tests
|
||||
%else
|
||||
%bcond_without tests
|
||||
%endif
|
||||
|
||||
# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*-
|
||||
%global gem_name mysql2
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.5.3
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
||||
License: MIT
|
||||
URL: https://github.com/brianmario/mysql2
|
||||
@ -14,6 +20,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# git clone --no-checkout https://github.com/brianmario/mysql2.git
|
||||
# cd mysql2 && git archive -v -o mysql2-0.5.3-tests.txz 0.5.3 spec/
|
||||
Source1: %{gem_name}-%{version}-tests.txz
|
||||
# Use the SSL pem files in the upstream repositry for the SSL tests.
|
||||
# https://github.com/brianmario/mysql2/pull/1293
|
||||
Patch0: rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
|
||||
# Fix test assertion for mariadb-connector-c
|
||||
# https://github.com/brianmario/mysql2/commit/cca57b97ad6d1b1b985376be110b89d2b487dea6
|
||||
Patch2: rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch
|
||||
@ -31,6 +40,8 @@ BuildRequires: rubygem(rspec)
|
||||
# Used in mysql_install_db
|
||||
BuildRequires: %{_bindir}/hostname
|
||||
BuildRequires: rubygem(bigdecimal)
|
||||
# Used in spec/ssl/gen_certs.sh
|
||||
BuildRequires: %{_bindir}/openssl
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -52,6 +63,7 @@ Documentation for %{name}
|
||||
%setup -q -n %{gem_name}-%{version} -b 1
|
||||
|
||||
pushd %{_builddir}/spec
|
||||
%patch0 -p2
|
||||
%patch2 -p2
|
||||
popd
|
||||
|
||||
@ -83,6 +95,24 @@ pushd .%{gem_instdir}
|
||||
ln -s %{_builddir}/spec spec
|
||||
|
||||
TOP_DIR=$(pwd)
|
||||
|
||||
# Regenerate the SSL certification files from the localhost, as we cannot set
|
||||
# the host mysql2gem.example.com required for the SSL tests.
|
||||
# https://github.com/brianmario/mysql2/pull/1296
|
||||
sed -i '/host/ s/mysql2gem\.example\.com/localhost/' spec/mysql2/client_spec.rb
|
||||
sed -i '/commonName_default/ s/mysql2gem\.example\.com/localhost/' spec/ssl/gen_certs.sh
|
||||
pushd spec/ssl
|
||||
bash gen_certs.sh
|
||||
popd
|
||||
|
||||
# See https://github.com/brianmario/mysql2/blob/master/ci/ssl.sh
|
||||
echo "
|
||||
[mysqld]
|
||||
ssl-ca=${TOP_DIR}/spec/ssl/ca-cert.pem
|
||||
ssl-cert=${TOP_DIR}/spec/ssl/server-cert.pem
|
||||
ssl-key=${TOP_DIR}/spec/ssl/server-key.pem
|
||||
" > ~/.my.cnf
|
||||
|
||||
# Use testing port because the standard mysqld port 3306 is occupied.
|
||||
# Assign a random port to consider a case of multi builds in parallel in a host.
|
||||
# https://src.fedoraproject.org/rpms/rubygem-pg/pull-request/3
|
||||
@ -184,6 +214,10 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 14 2025 Jarek Prokop <jprokop@redhat.com> - 0.5.3-12
|
||||
- Fix the broken SSL tests with MariaDB 10.5.18.
|
||||
Resolves: RHEL-80220
|
||||
|
||||
* Thu Feb 17 2022 Pavel Valena <pvalena@redhat.com> - 0.5.3-11
|
||||
- Fix test assertion for mariadb-connector-c
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user