Import from AlmaLinux stable repository
This commit is contained in:
parent
1010d1e265
commit
acdd839b2b
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
SOURCES/mysql2-0.5.3-tests.txz
|
SOURCES/mysql2-0.5.5-tests.txz
|
||||||
SOURCES/mysql2-0.5.3.gem
|
SOURCES/mysql2-0.5.5.gem
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
efae18a40b17065bff7f04732e8165d64393531c SOURCES/mysql2-0.5.3-tests.txz
|
e1f5106dda376545c654f64f0ea7b8609f03a220 SOURCES/mysql2-0.5.5-tests.txz
|
||||||
75e6935c4d9a2b1c047d9e9b69c4c6d4c7e0faef SOURCES/mysql2-0.5.3.gem
|
40bb98b39e2d8f3521c6a4350a66a3c0ac9e2dd9 SOURCES/mysql2-0.5.5.gem
|
||||||
|
29
SOURCES/rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
Normal file
29
SOURCES/rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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
|
||||||
|
@@ -154,9 +154,9 @@ RSpec.describe Mysql2::Client do # rubocop:disable Metrics/BlockLength
|
||||||
|
let(:option_overrides) do
|
||||||
|
{
|
||||||
|
'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
|
||||||
|
|
@ -5,15 +5,18 @@
|
|||||||
%global gem_name mysql2
|
%global gem_name mysql2
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.5.3
|
Version: 0.5.5
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/brianmario/mysql2
|
URL: https://github.com/brianmario/mysql2
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
# git clone --no-checkout https://github.com/brianmario/mysql2.git
|
# 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/
|
# cd mysql2 && git archive -v -o mysql2-0.5.5-tests.txz 0.5.5 spec/
|
||||||
Source1: %{gem_name}-%{version}-tests.txz
|
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
|
||||||
|
|
||||||
# Required in lib/mysql2.rb
|
# Required in lib/mysql2.rb
|
||||||
Requires: rubygem(bigdecimal)
|
Requires: rubygem(bigdecimal)
|
||||||
@ -32,6 +35,8 @@ BuildRequires: rubygem(bigdecimal)
|
|||||||
# Comment out to prevent a build error by conflicting requests.
|
# Comment out to prevent a build error by conflicting requests.
|
||||||
# Nothing provides libruby.so.2.4()(64bit) needed by rubygem-eventmachine.
|
# Nothing provides libruby.so.2.4()(64bit) needed by rubygem-eventmachine.
|
||||||
#BuildRequires: rubygem(eventmachine)
|
#BuildRequires: rubygem(eventmachine)
|
||||||
|
# Used in spec/ssl/gen_certs.sh
|
||||||
|
BuildRequires: %{_bindir}/openssl
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -52,13 +57,12 @@ Documentation for %{name}
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -b 1
|
%setup -q -n %{gem_name}-%{version} -b 1
|
||||||
|
|
||||||
|
pushd %{_builddir}/spec
|
||||||
|
%patch -P 0 -p2
|
||||||
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Create the gem as gem install only works on a gem file
|
|
||||||
gem build ../%{gem_name}-%{version}.gemspec
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
|
||||||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
|
||||||
# by default, so that we can move it into the buildroot in %%install
|
|
||||||
%gem_install
|
%gem_install
|
||||||
|
|
||||||
|
|
||||||
@ -67,8 +71,9 @@ mkdir -p %{buildroot}%{gem_dir}
|
|||||||
cp -pa .%{gem_dir}/* \
|
cp -pa .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{gem_extdir_mri}
|
mkdir -p %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
||||||
cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
|
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
||||||
|
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
||||||
|
|
||||||
# Prevent dangling symlink in -debuginfo.
|
# Prevent dangling symlink in -debuginfo.
|
||||||
rm -rf %{buildroot}%{gem_instdir}/ext
|
rm -rf %{buildroot}%{gem_instdir}/ext
|
||||||
@ -81,6 +86,24 @@ pushd .%{gem_instdir}
|
|||||||
ln -s %{_builddir}/spec spec
|
ln -s %{_builddir}/spec spec
|
||||||
|
|
||||||
TOP_DIR=$(pwd)
|
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.
|
# 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.
|
# 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
|
# https://src.fedoraproject.org/rpms/rubygem-pg/pull-request/3
|
||||||
@ -104,15 +127,22 @@ mysql_install_db \
|
|||||||
--port="${MYSQL_TEST_PORT}" \
|
--port="${MYSQL_TEST_PORT}" \
|
||||||
--ssl &
|
--ssl &
|
||||||
|
|
||||||
|
conn_found=false
|
||||||
for i in $(seq 10); do
|
for i in $(seq 10); do
|
||||||
|
echo "Waiting for the DB server to accept connections... ${i}"
|
||||||
sleep 1
|
sleep 1
|
||||||
if grep -q 'ready for connections.' "${MYSQL_TEST_LOG}"; then
|
if grep -q 'ready for connections' "${MYSQL_TEST_LOG}"; then
|
||||||
|
conn_found=true
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Waiting connections... ${i}"
|
|
||||||
done
|
done
|
||||||
|
if ! "${conn_found}"; then
|
||||||
|
echo "ERROR: Failed to connect the DB server."
|
||||||
|
cat "${MYSQL_TEST_LOG}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# See https://github.com/brianmario/mysql2/blob/master/.travis_setup.sh
|
# See https://github.com/brianmario/mysql2/blob/master/ci/setup.sh
|
||||||
mysql -u root \
|
mysql -u root \
|
||||||
-e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \
|
-e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \
|
||||||
-S "${MYSQL_TEST_SOCKET}" \
|
-S "${MYSQL_TEST_SOCKET}" \
|
||||||
@ -137,17 +167,6 @@ user:
|
|||||||
socket: ${MYSQL_TEST_SOCKET}
|
socket: ${MYSQL_TEST_SOCKET}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# This test would require changes in host configuration.
|
|
||||||
sed -i '/^ it "should be able to connect via SSL options" do$/,/^ end$/ s/^/#/' \
|
|
||||||
spec/mysql2/client_spec.rb
|
|
||||||
|
|
||||||
# performance_schema.session_account_connect_attrs is unexpectedly empty.
|
|
||||||
# https://github.com/brianmario/mysql2/issues/965
|
|
||||||
sed -i '/^ it "should set default program_name in connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
||||||
spec/mysql2/client_spec.rb
|
|
||||||
sed -i '/^ it "should set custom connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
||||||
spec/mysql2/client_spec.rb
|
|
||||||
|
|
||||||
rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec
|
rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -172,6 +191,17 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 19 2024 Jarek Prokop <jprokop@redhat.com> - 0.5.5-1
|
||||||
|
- Upgrade to mysql2 0.5.5.
|
||||||
|
Related: RHEL-17090
|
||||||
|
|
||||||
|
* Fri Apr 22 2022 Jarek Prokop <jprokop@redhat.com> 0.5.3-2
|
||||||
|
- Update by merging Fedora rawhide branch (commit: 81e2cc9)
|
||||||
|
- Fix Mysql2::Result test for Ruby 3.1.
|
||||||
|
- Remove gem_make.out and mkmf.log files from the binary RPM package.
|
||||||
|
- Fix test assertion for mariadb-connector-c.
|
||||||
|
Related: rhbz#2063772
|
||||||
|
|
||||||
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
||||||
- New upstream release 0.5.3 by merging Fedora master branch (commit: 674d475)
|
- New upstream release 0.5.3 by merging Fedora master branch (commit: 674d475)
|
||||||
Resolves: rhbz#1817135
|
Resolves: rhbz#1817135
|
||||||
|
Loading…
Reference in New Issue
Block a user