Compare commits
No commits in common. "c9s" and "c8s" have entirely different histories.
@ -1,6 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||
|
||||
@ -1,16 +1,9 @@
|
||||
# For deep debugging we need to build binaries with extra debug info
|
||||
%bcond_with debug
|
||||
|
||||
# Disable CMake in-source builds
|
||||
# This is a fix for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
|
||||
# So the beaviour will be the same also in F31 nad F32
|
||||
%undefine __cmake_in_source_build
|
||||
|
||||
|
||||
|
||||
Name: mariadb-connector-odbc
|
||||
Version: 3.1.12
|
||||
Release: 3%{?with_debug:.debug}%{?dist}
|
||||
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
|
||||
@ -28,44 +21,35 @@ 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
|
||||
|
||||
%cmake . \
|
||||
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
|
||||
-DMARIADB_LINK_DYNAMIC="%{_libdir}/libmariadb.so" \
|
||||
\
|
||||
-DINSTALL_LAYOUT=RPM \
|
||||
-DINSTALL_LIBDIR="%{_lib}" \
|
||||
-DINSTALL_LIB_SUFFIX="%{_lib}" \
|
||||
-DINSTALL_DOCDIR="%{_defaultdocdir}/%{name}" \
|
||||
-DINSTALL_LICENSEDIR="%{_defaultlicensedir}/%{name}" \
|
||||
%{set_build_flags}
|
||||
|
||||
# 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
|
||||
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
|
||||
CXXFLAGS="$CFLAGS"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
%cmake -DMARIADB_LINK_DYNAMIC="%{_libdir}/libmariadb.so" \
|
||||
-DBUILD_SHARED_LIBS="ON" \
|
||||
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
|
||||
-DCMAKE_INSTALL_PREFIX="%{_usr}" \
|
||||
-DINCLUDE_INSTALL_DIR="%{_includedir}" \
|
||||
-DINSTALL_LIBDIR="%{_lib}" \
|
||||
-DSHARE_INSTALL_PREFIX="%{_datadir}" \
|
||||
-DSYSCONF_INSTALL_DIR="%{_sysconfdir}" \
|
||||
-DINSTALL_DOCDIR="%{_defaultdocdir}/%{name}" \
|
||||
-DINSTALL_LICENSEDIR="%{_defaultlicensedir}/%{name}" \
|
||||
.
|
||||
|
||||
#cmake -LAH
|
||||
cmake -L .
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
|
||||
%make_install
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
@ -77,41 +61,13 @@ FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.12-3
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.12-2
|
||||
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||
Related: rhbz#1971065
|
||||
|
||||
* Thu Apr 22 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1
|
||||
- Rebase to 3.1.12
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.11-3
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* 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
|
||||
|
||||
* 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
|
||||
- Patch add_docs_license_dir_option upstreamed
|
||||
|
||||
* Thu Jul 02 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
|
||||
- Rebase to 3.1.9
|
||||
@ -120,18 +76,12 @@ FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
|
||||
* 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
|
||||
|
||||
@ -142,9 +92,6 @@ FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
|
||||
- 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
|
||||
|
||||
@ -152,25 +99,19 @@ FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
|
||||
- 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
|
||||
|
||||
* Tue Nov 20 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
|
||||
* Mon Dec 10 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
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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)
|
||||
@ -1,3 +0,0 @@
|
||||
PURPOSE of mariadb_connection
|
||||
Description: Tries to connect to MariaDB via unixODBC package
|
||||
Author: Michal Schorm <mschorm@redhat.com>
|
||||
@ -1,3 +0,0 @@
|
||||
[mariadb-connector-odbc]
|
||||
Driver=MariaDB
|
||||
SERVER=localhost
|
||||
@ -1,86 +0,0 @@
|
||||
#!/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/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# 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 unix ODBC configuration
|
||||
rlAssertExists "/etc/odbcinst.ini"
|
||||
rlAssertGrep "MariaDB" "/etc/odbcinst.ini"
|
||||
|
||||
rlRun "cp -f odbc.ini /etc/"
|
||||
rlAssertExists "/etc/odbc.ini"
|
||||
rlAssertGrep "MariaDB" "/etc/odbc.ini"
|
||||
|
||||
# Start MariaDB
|
||||
rlRun "systemctl start mariadb" 0
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun " echo 'show databases' | isql -v mariadb-connector-odbc -b > /tmp/test_query_output" 0
|
||||
rlAssertGrep "Database" "/tmp/test_query_output"
|
||||
rlAssertGrep "information_schema" "/tmp/test_query_output"
|
||||
rlAssertGrep "mysql" "/tmp/test_query_output"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun " echo 'create database ci_test_database' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'show databases' | isql -v mariadb-connector-odbc -b > /tmp/test_query_output" 0
|
||||
rlAssertGrep "ci_test_database" "/tmp/test_query_output"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun " echo 'create table ci_test_database.ci_test_table (root int, pow int)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (0, 1)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (1, 1)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (2, 4)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (3, 9)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (4, 16)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'insert into ci_test_database.ci_test_table values (5, 25)' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " echo 'select * from ci_test_database.ci_test_table where root>2' | isql -v mariadb-connector-odbc -b > /tmp/test_query_output" 0
|
||||
rlAssertNotGrep "0" "/tmp/test_query_output"
|
||||
rlAssertGrep "9" "/tmp/test_query_output"
|
||||
rlAssertGrep "16" "/tmp/test_query_output"
|
||||
rlAssertGrep "25" "/tmp/test_query_output"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun " echo 'drop database ci_test_database' | isql -v mariadb-connector-odbc -b " 0
|
||||
rlRun " rm -f /tmp/test_query_output" 0
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
@ -1,31 +0,0 @@
|
||||
---
|
||||
|
||||
# --------------------------------------------------
|
||||
# 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
|
||||
Loading…
Reference in New Issue
Block a user