Compare commits

...

No commits in common. "c8s" and "c10s" have entirely different histories.
c8s ... c10s

12 changed files with 351 additions and 61 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -1,6 +1,6 @@
--- !Policy
product_versions:
- rhel-8
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,33 +0,0 @@
--- mariadb-connector-odbc-3.0.6-ga-src/ma_odbc.h 2018-07-31 13:39:02.000000000 +0200
+++ mariadb-connector-odbc-3.0.6-ga-src/ma_odbc.h_patched 2018-08-01 16:10:09.962798000 +0200
@@ -29,7 +29,7 @@
#include <stdlib.h>
-#include <mysql.h>
+#include <mysql/mysql.h>
#include <ma_legacy_helpers.h>
@@ -37,7 +37,7 @@
#include <sqlext.h>
#include <odbcinst.h>
-#include <errmsg.h>
+#include <mysql/errmsg.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
--- mariadb-connector-odbc-3.1.10-ga-src/ma_conv_charset.h.old 2020-10-26 11:37:51.314034870 +0100
+++ mariadb-connector-odbc-3.1.10-ga-src/ma_conv_charset.h 2020-10-26 11:38:05.860205545 +0100
@@ -23,7 +23,7 @@
#ifndef _MA_CONV_CHARSET_H_
#define _MA_CONV_CHARSET_H_
-#include "mariadb_ctype.h"
+#include <mysql/mariadb_ctype.h>
size_t MADB_ConvertString(const char *from __attribute__((unused)),
size_t *from_len __attribute__((unused)),

View File

@ -1,19 +1,19 @@
# For deep debugging we need to build binaries with extra debug info
%bcond_with debug
Name: mariadb-connector-odbc
Version: 3.1.12
Version: 3.2.4
Release: 1%{?with_debug:.debug}%{?dist}
Summary: The MariaDB Native Client library (ODBC driver)
License: LGPLv2+
Source: https://downloads.mariadb.org/f/connector-odbc-%{version}/%{name}-%{version}-src.tar.gz
License: LGPL-2.1-or-later
Source: https://archive.mariadb.org/connector-odbc-%{version}/%{name}-%{version}-src.tar.gz
Url: https://mariadb.org/en/
# Online documentation can be found at: https://mariadb.com/kb/en/library/mariadb-connector-odbc/
BuildRequires: cmake unixODBC-devel gcc-c++
BuildRequires: mariadb-connector-c-devel >= 3.0.6
Patch1: libraries_include_path.patch
BuildRequires: mariadb-connector-c-devel >= 3.4.3
%description
MariaDB Connector/ODBC is a standardized, LGPL licensed database driver using
@ -21,35 +21,43 @@ the industry standard Open Database Connectivity (ODBC) API. It supports ODBC
Standard 3.5, can be used as a drop-in replacement for MySQL Connector/ODBC,
and it supports both Unicode and ANSI modes.
%prep
%setup -q -n %{name}-%{version}-src
%patch1 -p1
%build
%{set_build_flags}
# Override all optimization flags when making a debug build
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS
%cmake -DMARIADB_LINK_DYNAMIC="%{_libdir}/libmariadb.so" \
-DBUILD_SHARED_LIBS="ON" \
%cmake \
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
-DCMAKE_INSTALL_PREFIX="%{_usr}" \
-DINCLUDE_INSTALL_DIR="%{_includedir}" \
-DMARIADB_LINK_DYNAMIC="%{_libdir}/libmariadb.so" \
\
-DINSTALL_LAYOUT=RPM \
-DINSTALL_LIBDIR="%{_lib}" \
-DSHARE_INSTALL_PREFIX="%{_datadir}" \
-DSYSCONF_INSTALL_DIR="%{_sysconfdir}" \
-DINSTALL_LIB_SUFFIX="%{_lib}" \
-DINSTALL_DOCDIR="%{_defaultdocdir}/%{name}" \
-DINSTALL_LICENSEDIR="%{_defaultlicensedir}/%{name}" \
.
#cmake -LAH
cmake -L .
# Override all optimization flags when making a debug build
%if %{with debug}
CFLAGS="$CFLAGS -O0 -g"; export CFLAGS
CXXFLAGS="$CXXFLAGS -O0 -g"; export CXXFLAGS
FFLAGS="$FFLAGS -O0 -g"; export FFLAGS
FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
%endif
#cmake -B %_vpath_builddir -LAH
%cmake_build
%install
%make_install
%cmake_install
%files
%license COPYING
@ -58,16 +66,100 @@ cmake -L .
# This is unixODBC plugin. It resides directly in %%{_libdir} to be consistent with the rest of unixODBC plugins. Since it is plugin, it doesn´t need to be versioned.
%{_libdir}/libmaodbc.so
# Example configuration file for UnixODBC
%{_pkgdocdir}/maodbc.ini
# Pkgconfig
%{_libdir}/pkgconfig/libmaodbc.pc
%changelog
* Sat Nov 16 2024 Michal Schorm <mschorm@redhat.com> - 3.2.4-1
- Rebase to 3.2.4
* Thu Nov 14 2024 Michal Schorm <mschorm@redhat.com> - 3.2.3-1
- Rebase to 3.2.3
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-2
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Aug 22 2024 Michal Schorm <mschorm@redhat.com> - 3.2.2-1
- Rebase to 3.2.2 GA
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.2.1-1.rc.3
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-1.rc.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-1.rc.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 07 2024 Michal Schorm <mschorm@redhat.com> - 3.2.1-1.rc
- Rebase to 3.2.1 RC
* Sun Jan 07 2024 Michal Schorm <mschorm@redhat.com> - 3.1.20-2
- Fix minimal required version of mariadb-connector-c as per:
https://mariadb.com/kb/en/mariadb-connector-odbc-3-1-20-release-notes/
* Sun Jan 07 2024 Michal Schorm <mschorm@redhat.com> - 3.1.20-1
- Rebase to 3.1.20
* Wed Jul 26 2023 Michal Schorm <mschorm@redhat.com> - 3.1.19-1
- Rebase to 3.1.19
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Apr 19 2023 Michal Schorm <mschorm@redhat.com> - 3.1.18-1
- Rebase to 3.1.18
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.15-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Feb 18 2022 Michal Schorm <mschorm@redhat.com> - 3.1.15-1
- Rebase to 3.1.15
* Fri Feb 18 2022 Michal Schorm <mschorm@redhat.com> - 3.1.14-1
- Rebase to 3.1.14
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 09 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1
- Rebase to 3.1.13
* Thu Apr 22 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1
- Rebase to 3.1.12
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 14 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.11-1
- Rebase to 3.1.11
- Add updates for paths in libraries_include_path.patch
- Patch add_docs_license_dir_option upstreamed
* Thu Aug 06 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-4
- Force the CMake change regarding the in-source builds also to F31 and F32
- %%cmake macro covers the %%{set_build_flags}, so they are not needed
That also means, the debug build changes to the build flags must be done AFTER the
%%cmake macro was used.
- %%cmake macro also covers several other options which redudndant specification I removed in this commit
- Default to %%cmake commands instead of %%make commands
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 02 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
- Rebase to 3.1.9
@ -76,12 +168,18 @@ cmake -L .
* Thu Apr 09 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-1
- Rebase to 3.1.7
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 23 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.6-1
- Rebase to 3.1.6
* Fri Nov 15 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.5-1
- Rebase to 3.1.5
* Tue Nov 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-2
- Rebuild on top of new mariadb-connector-c
* Mon Nov 04 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-1
- Rebase to 3.1.4
@ -92,6 +190,9 @@ cmake -L .
- Rebase to 3.1.2
- Patch2 upstreamed
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jul 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.1-4
- Use macro for setting the compiler flags
@ -99,19 +200,25 @@ cmake -L .
- Added debug build switch
- Added patch2: configurable doc and license dirs paths
* Wed Jun 05 2019 Michal Schorm <mschorm@redhat.com> - 3.1.1-2
- Patch solution found
* Tue Jun 04 2019 Michal Schorm <mschorm@redhat.com> - 3.1.1-1
- Rebase to 3.1.1
* Tue Jun 04 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-1
- Rebase to 3.0.9
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 23 2019 Björn Esser <besser82@fedoraproject.org> - 3.0.8-2
- Append curdir to CMake invokation. (#1668512)
* Sun Jan 06 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1
- Rebase to 3.0.8
* Mon Dec 10 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
* Tue Nov 20 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
- Rebase to 3.0.7
* Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1

10
plans/tier1-internal.fmf Normal file
View File

@ -0,0 +1,10 @@
summary: Internal Tier1 tests plan
discover:
how: fmf
filter: 'tier: 1'
url: https://pkgs.devel.redhat.com/git/tests/mariadb-connector-odbc
execute:
how: tmt
adjust:
enabled: false
when: distro == centos-stream or distro == fedora

View File

@ -1 +1 @@
SHA512 (mariadb-connector-odbc-3.1.12-src.tar.gz) = 9723555c598c3ec77c41a617d9960c8d0fb9ee9d0b70e44b44f55f8842a5966b50ed6c04e8a80d252330b2cd96bdac4e0403100141e827c23af72ed58f747ffb
SHA512 (mariadb-connector-odbc-3.2.4-src.tar.gz) = e7c2219b500d12ff376c9080f43c059b0ac7d88c0cf95701703e778b341903de5328470985346f1f42a51ef79d258d3b547de0b0f74c8d4141de2e92ad6e9d18

View File

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of mariadb-connection
# Description: Tries to connect to MariaDB via unixODBC package
# Author: Michal Schorm <mschorm@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=mariadb_connection
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michal Schorm <mschorm@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Tries to connect to MariaDB via unixODBC and isql packages" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: mariadb-connector-odbc" >> $(METADATA)
@echo "Requires: mariadb-connector-odbc" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of mariadb_connection
Description: Tries to connect to MariaDB via unixODBC package
Author: Michal Schorm <mschorm@redhat.com>

View File

@ -0,0 +1,3 @@
[mariadb-connector-odbc]
Driver=MariaDB
SERVER=localhost

View File

@ -0,0 +1,101 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of mariadb_connection
# Description: Tries to connect to MariaDB via unixODBC package
# Author: Michal Schorm <mschorm@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# TEST DESCRIPTION:
# Prepare MariaDB database for connection
# Configure the MariaDB connector for ODBC
# Test that the we are able to log-in via ODBC as a specific DB user using password
#
# DOCUMENTATION:
# https://mariadb.com/kb/en/about-mariadb-connector-odbc/
#
# VERSION DIFERENCES:
# * Since MariaDB 10.4, new type of default authentication (unix_socket) is in place
# That means we have to create a DB user and a password in order to be able to acces the DB
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="mariadb-connector-odbc"
rlJournalStart
rlPhaseStartSetup
# Check if all needed packages are installed
rlAssertRpm $PACKAGE
rlAssertRpm unixODBC
rlAssertRpm mariadb
rlAssertRpm mariadb-server
# Check the default unixODBC configuration
# There should already be an entry for MariaDB connector for ODBC
rlAssertExists "/etc/odbcinst.ini"
rlAssertGrep "MariaDB" "/etc/odbcinst.ini"
# Start MariaDB
rlRun "systemctl start mariadb" 0
rlPhaseEnd
rlPhaseStartTest
# Insert the second part of the ODBC configuration
# with SOCKET defined
rlRun "cp -f socket_odbc.ini /etc/odbc.ini"
rlAssertExists "/etc/odbc.ini"
rlAssertGrep "MariaDB" "/etc/odbc.ini"
rlAssertGrep "SOCKET" "/etc/odbc.ini"
rlRun " echo \"SHOW DATABASES\" | isql -v mariadb-connector-odbc " 0
rlRun " echo \"SELECT USER(),CURRENT_USER()\" | isql -v mariadb-connector-odbc " 0
rlPhaseEnd
rlPhaseStartTest
# Insert the second part of the ODBC configuration
# without SOCKET defined
rlRun "cp -f odbc.ini /etc/"
rlAssertExists "/etc/odbc.ini"
rlAssertGrep "MariaDB" "/etc/odbc.ini"
rlAssertNotGrep "SOCKET" "/etc/odbc.ini"
rlRun " echo \"SHOW DATABASES\" | isql -v mariadb-connector-odbc " 1
rlRun " echo \"SELECT USER(),CURRENT_USER()\" | isql -v mariadb-connector-odbc " 1
rlPhaseEnd
rlPhaseStartTest
# Create a new DB user and password for this test
rlRun "echo \"CREATE USER 'odbc_connector_user'@'localhost' IDENTIFIED BY 'odbc_connector_password'\" | mysql " 0
# Save the credentials to a variable; we will append it to every isql command
rlRun "CREDENTIALS=\"odbc_connector_user odbc_connector_password\"" 0
rlRun " echo \"SHOW DATABASES\" | isql -v mariadb-connector-odbc $CREDENTIALS " 0
rlRun " echo \"SELECT USER(),CURRENT_USER()\" | isql -v mariadb-connector-odbc $CREDENTIALS " 0
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,4 @@
[mariadb-connector-odbc]
Driver=MariaDB
SERVER=localhost
SOCKET=/var/lib/mysql/mysql.sock

31
tests/tests.yml Normal file
View File

@ -0,0 +1,31 @@
---
# --------------------------------------------------
# This is an experiment with Fedora CI
#
# Refer to:
# https://fedoraproject.org/wiki/CI/Tests
#
# TL;DR you have to, as root:
# 1) # dnf install ansible python2-dnf libselinux-python standard-test-roles
# 2) install the packages to be tested
# 3) # ansible-playbook tests.yml
#
# Warning !!
# DO NOT run it on a machine that SHOULD NOT be destroyed.
#
# --------------------------------------------------
# Tests that run in classic context
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- mariadb_connection
required_packages:
- mariadb
- mariadb-server
- mariadb-connector-odbc
- unixODBC