|
|
@ -6,7 +6,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
Version: 0.5.3
|
|
|
|
Version: 0.5.3
|
|
|
|
Release: 2%{?dist}
|
|
|
|
Release: 11%{?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
|
|
|
@ -14,9 +14,9 @@ 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.3-tests.txz 0.5.3 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.
|
|
|
|
# Fix test assertion for mariadb-connector-c
|
|
|
|
# https://github.com/brianmario/mysql2/pull/1293
|
|
|
|
# https://github.com/brianmario/mysql2/commit/cca57b97ad6d1b1b985376be110b89d2b487dea6
|
|
|
|
Patch3: rubygem-mysql2-0.5.4-use-ssl-pem-files-in-repo.patch
|
|
|
|
Patch2: rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch
|
|
|
|
|
|
|
|
|
|
|
|
# Required in lib/mysql2.rb
|
|
|
|
# Required in lib/mysql2.rb
|
|
|
|
Requires: rubygem(bigdecimal)
|
|
|
|
Requires: rubygem(bigdecimal)
|
|
|
@ -31,12 +31,6 @@ BuildRequires: rubygem(rspec)
|
|
|
|
# Used in mysql_install_db
|
|
|
|
# Used in mysql_install_db
|
|
|
|
BuildRequires: %{_bindir}/hostname
|
|
|
|
BuildRequires: %{_bindir}/hostname
|
|
|
|
BuildRequires: rubygem(bigdecimal)
|
|
|
|
BuildRequires: rubygem(bigdecimal)
|
|
|
|
# Used in spec/em/em_spec.rb
|
|
|
|
|
|
|
|
# Comment out to prevent a build error by conflicting requests.
|
|
|
|
|
|
|
|
# Nothing provides libruby.so.2.4()(64bit) needed by rubygem-eventmachine.
|
|
|
|
|
|
|
|
#BuildRequires: rubygem(eventmachine)
|
|
|
|
|
|
|
|
# Used in spec/ssl/gen_certs.sh
|
|
|
|
|
|
|
|
BuildRequires: %{_bindir}/openssl
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
@ -58,7 +52,7 @@ Documentation for %{name}
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
|
|
|
|
|
|
|
|
pushd %{_builddir}/spec
|
|
|
|
pushd %{_builddir}/spec
|
|
|
|
%patch3 -p2
|
|
|
|
%patch2 -p2
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
@ -89,24 +83,6 @@ 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
|
|
|
@ -130,23 +106,16 @@ 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/ci/setup.sh
|
|
|
|
# See https://github.com/brianmario/mysql2/blob/master/.travis_setup.sh
|
|
|
|
mysql -u root \
|
|
|
|
mysql -u $MYSQL_TEST_USER \
|
|
|
|
-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}" \
|
|
|
|
-P "${MYSQL_TEST_PORT}"
|
|
|
|
-P "${MYSQL_TEST_PORT}"
|
|
|
@ -155,7 +124,7 @@ mysql -u root \
|
|
|
|
cat <<EOF > spec/configuration.yml
|
|
|
|
cat <<EOF > spec/configuration.yml
|
|
|
|
root:
|
|
|
|
root:
|
|
|
|
host: localhost
|
|
|
|
host: localhost
|
|
|
|
username: root
|
|
|
|
username: ${MYSQL_TEST_USER}
|
|
|
|
password:
|
|
|
|
password:
|
|
|
|
database: test
|
|
|
|
database: test
|
|
|
|
port: ${MYSQL_TEST_PORT}
|
|
|
|
port: ${MYSQL_TEST_PORT}
|
|
|
@ -170,6 +139,10 @@ 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.
|
|
|
|
# performance_schema.session_account_connect_attrs is unexpectedly empty.
|
|
|
|
# https://github.com/brianmario/mysql2/issues/965
|
|
|
|
# https://github.com/brianmario/mysql2/issues/965
|
|
|
|
sed -i '/^ it "should set default program_name in connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
|
|
sed -i '/^ it "should set default program_name in connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
|
@ -177,6 +150,16 @@ sed -i '/^ it "should set default program_name in connect_attrs" do$/,/^ end$/
|
|
|
|
sed -i '/^ it "should set custom connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
|
|
sed -i '/^ it "should set custom connect_attrs" do$/,/^ end$/ s/^/#/' \
|
|
|
|
spec/mysql2/client_spec.rb
|
|
|
|
spec/mysql2/client_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This test was passing when going through `rescue` branch up to MariaDB 10.4.
|
|
|
|
|
|
|
|
# It fails since MariaDB 10.5.2 instroduced Performance Schema.
|
|
|
|
|
|
|
|
# https://github.com/brianmario/mysql2/issues/1152
|
|
|
|
|
|
|
|
sed -i '/stmt_count/a\\ pending "Does not work with MariaDB"' \
|
|
|
|
|
|
|
|
spec/mysql2/statement_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Since MariaDB 10.5. the return error message contains mangled input.
|
|
|
|
|
|
|
|
# https://github.com/brianmario/mysql2/issues/1152
|
|
|
|
|
|
|
|
sed -i '/expect(bad_err.message).to include/ s/^/#/' spec/mysql2/error_spec.rb
|
|
|
|
|
|
|
|
|
|
|
|
rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec
|
|
|
|
rspec -Ilib:%{buildroot}%{gem_extdir_mri} -f d spec
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
@ -201,20 +184,60 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Fri Mar 08 2024 Jarek Prokop <jprokop@redhat.com> - 0.5.3-2
|
|
|
|
* Thu Feb 17 2022 Pavel Valena <pvalena@redhat.com> - 0.5.3-11
|
|
|
|
- Fix SSL related test failure by backporting Fedora commit <c33b1cf>.
|
|
|
|
- Fix test assertion for mariadb-connector-c
|
|
|
|
Related: RHEL-36189
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.5.3-10
|
|
|
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 16 2021 Pavel Valena <pvalena@redhat.com> - 0.5.3-9
|
|
|
|
|
|
|
|
- Fix FTBFS: remove rubygem-eventmachine dependnecy
|
|
|
|
|
|
|
|
Resolves: rhbz#1982404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.5.3-8
|
|
|
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Feb 11 2021 Vít Ondruch <vondruch@redhat.com> - 0.5.3-7
|
|
|
|
|
|
|
|
- Fix FTBFS due to MariaDB 10.5+ incompatibilies.
|
|
|
|
|
|
|
|
Resolves: rhbz#1914515
|
|
|
|
|
|
|
|
Resolves: rhbz#1923277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-7
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 7 03:21:32 CET 2021 Pavel Valena <pvalena@redhat.com> - 0.5.3-6
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-5
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jul 2 2020 Alex Chernyakhovsky <achernya@mit.edu> - 0.5.3-4
|
|
|
|
|
|
|
|
- Update tests to build and run on F32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-3
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 17 2020 Vít Ondruch <vondruch@redhat.com> - 0.5.3-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Dec 02 2019 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
|
|
|
|
|
|
|
- New upstream release 0.5.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-3
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Dec 12 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.5.3-1
|
|
|
|
* Mon Jan 21 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.2-2
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
- F-30: rebuild against ruby26
|
|
|
|
|
|
|
|
|
|
|
|
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
|
|
|
* Thu Jul 19 2018 Jun Aruga <jaruga@redhat.com> - 0.5.2-1
|
|
|
|
- New upstream release 0.5.3 by merging Fedora master branch (commit: 674d475)
|
|
|
|
- New upstream release 0.5.2
|
|
|
|
Resolves: rhbz#1817135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jun 11 2019 Jun Aruga <jaruga@redhat.com> - 0.5.2-1
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.10-5
|
|
|
|
- New upstream release 0.5.2 by merging Fedora master branch (commit: cc15309)
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
Resolves: rhbz#1672575
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.10-4
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.10-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|