Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

9 changed files with 261 additions and 53 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
SOURCES/mariadb-connector-c-3.1.11-src.tar.gz
/*/
/*.rpm
/*.tar.gz

View File

@ -1 +1 @@
33c124ac6203aa8f936743d91f37f63aa13d8977 SOURCES/mariadb-connector-c-3.1.11-src.tar.gz
5cdba92ad2eb72a81a0ec33003b8f591910d2eb2 mariadb-connector-c-3.2.6-src.tar.gz

6
gating.yaml Normal file
View File

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

View File

@ -0,0 +1,28 @@
# THIS FILE SERVES FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# (same file in python3 package served as a great example)
# Spelling errors
addFilter(r'spelling-error .*en_US.* (libmariadb|cnf|Testsuite|ctest) ')
# Debugsource
addFilter(r'^mariadb-connector-c\d?-debugsource\.[^:]+: (E|W): no-documentation')
# Debuginfo
addFilter(r'^mariadb-connector-c\d?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)')
# Missing documentation from subpackages
addFilter(r'^mariadb-connector-c\d?-(devel|config|test)\.[^:]+: (E|W): no-documentation')
# No manual page for binary
# Upstream issue tracker: https://jira.mariadb.org/browse/CONC-293
addFilter(r'no-manual-page-for-binary (mariadb|mysql)_config$')
# Tests files are expected in /usr/share
addFilter(r'arch-dependent-file-in-usr-share /usr/share/mariadb-connector-c/tests/')
# The provide is not needed
addFilter(r'obsolete-not-provided mariadb-config')

View File

@ -1,27 +1,40 @@
# For deep debugging we need to build binaries with extra debug info
%bcond_with debug
# Enable building and packing of the testsuite
%bcond_without testsuite
# Enable CMake in-source builds
# This is is a workaround for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
# which reverts the CMake behaviour to before F33
# The Change owners offered themselves to help fix the affected packages via ProvenPackager rights.
# I'm generally in favor of this change, however when I tried to adapt it, I encountered a number of issues.
# That's why I disabled it for now.
%global __cmake_in_source_build 1
Name: mariadb-connector-c
Version: 3.1.11
Release: 2%{?with_debug:.debug}%{?dist}
Version: 3.2.6
Release: 1%{?with_debug:.debug}%{?dist}
Summary: The MariaDB Native Client library (C driver)
License: LGPLv2+
Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz
Source2: my.cnf
Source3: client.cnf
Url: http://mariadb.org/
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
%if %{with testsuite}
Patch1: testsuite.patch
%endif
Requires: %{_sysconfdir}/my.cnf
BuildRequires: zlib-devel cmake openssl-devel gcc-c++
BuildRequires: gcc-c++ cmake openssl-devel zlib-devel
# Remote-IO plugin
BuildRequires: libcurl-devel
# auth_gssapi_client plugin
BuildRequires: krb5-devel
Requires: ( mariadb >= 3:10.3.27 if mariadb )
Requires: ( %{name}-config = %{version}-%{release} if %{name}-config )
%description
The MariaDB Native Client library (C driver) is used to connect applications
developed in C/C++ to MariaDB and MySQL databases.
@ -31,17 +44,39 @@ developed in C/C++ to MariaDB and MySQL databases.
%package devel
Summary: Development files for mariadb-connector-c
Requires: %{name} = %{version}-%{release}
Recommends: %{name}-doc = %{version}-%{release}
Requires: openssl-devel zlib-devel
BuildRequires: multilib-rpm-config
Conflicts: mysql-devel
Requires: ( mariadb-devel >= 3:10.3.27 if mariadb-devel )
Conflicts: %{?fedora:community-}mysql-devel
%description devel
Development files for mariadb-connector-c.
Contains everything needed to build against libmariadb.so >=3 client library.
%package doc
Summary: Manual pages documenting API of the libmariadb.so library
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Manual pages documenting API of the libmariadb.so library.
%if %{with testsuite}
%package test
Summary: Testsuite files for mariadb-connector-c
Requires: %{name} = %{version}-%{release}
Requires: cmake
Recommends: mariadb-server
%description test
Testsuite files for mariadb-connector-c.
Contains binaries and a prepared CMake ctest file.
Requires running MariaDB / MySQL server with create database "test".
%endif
%package config
Summary: Configuration files for packages that use /etc/my.cnf as a configuration file
@ -58,27 +93,23 @@ and require this package, so the /etc/my.cnf file is present.
%prep
%setup -q -n %{name}-%{version}-src
%if %{with testsuite}
%patch1 -p1
%endif
# Remove unsused parts
rm -r win zlib win-iconv
rm -r win win-iconv zlib
%build
%{set_build_flags}
# Override all optimization flags when making a debug build
%{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS
# https://jira.mariadb.org/browse/MDEV-13836:
# The server has (used to have for ages) some magic around the port number.
# If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
# If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
# I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
# The INSTALL_* macros have to be specified relative to CMAKE_INSTALL_PREFIX
# so we can't use %%{_datadir} and so forth here.
%cmake . \
@ -88,31 +119,38 @@ export CFLAGS CXXFLAGS
-DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
-DMARIADB_PORT=3306 \
\
-DWITH_EXTERNAL_ZLIB=YES \
-DWITH_EXTERNAL_ZLIB=ON \
-DWITH_SSL=OPENSSL \
-DWITH_MYSQLCOMPAT=ON \
-DPLUGIN_CLIENT_ED25519=DYNAMIC \
\
-DINSTALL_LAYOUT=RPM \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DINSTALL_BINDIR="bin" \
-DINSTALL_LIBDIR="%{_lib}" \
-DINSTALL_INCLUDEDIR="include/mysql" \
-DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
-DINSTALL_PCDIR="%{_lib}/pkgconfig" \
\
-DWITH_UNITTEST=ON
%if %{with testsuite}
-DWITH_UNIT_TESTS=ON
%endif
# 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 %__cmake_builddir -LAH
#cmake -LAH
%make_build
%cmake_build
%install
%make_install
%cmake_install
%multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
@ -137,10 +175,11 @@ install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
# - don't run mytap tests
# - ignore the testsuite result for now. Enable tests now, fix them later.
# Note: there must be a database called 'test' created for the testcases to be run
%if %{with testsuite}
pushd unittest/libmariadb/
ctest || :
%ctest || :
popd
%endif
%files
@ -155,6 +194,12 @@ popd
%files doc
# Library manual pages
%{_mandir}/man3/{mariadb,mysql}_*.3*
%files devel
# Binary which provides compiler info for software compiling against this library
%{_bindir}/mariadb_config
@ -172,7 +217,6 @@ popd
%dir %{_includedir}/mysql
%{_includedir}/mysql/*
%license COPYING.LIB
%files config
@ -182,57 +226,174 @@ popd
%changelog
* Thu Dec 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-2
- Require specific minimal version of the 'mariadb' package, if it is installed
%if %{with testsuite}
%files test
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_libdir}/libcctap.so
%endif
* Tue Nov 10 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
# Opened issues on the upstream tracker:
# https://jira.mariadb.org/browse/CONC-293
# DESCRIPTION: add mysql_config and mariadb_config man page
# IN_PROGRESS: upsteam plans to add it to 3.1 release
# https://jira.mariadb.org/browse/CONC-436
# DESCRIPTION: Make testsuite independent / portable
# NEW: PR submitted, problem explained, waiting on upstream response
# Downstream issues:
# Start running this package testsuite at the build time
# It requires a running MariaDB server
# mariadb-server package pulls in mariadb-connector-c as a dependency
# Need to ensure, that the testsuite is ran against the newly build library, instead of the one from the pulled package
# Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine
%changelog
* Wed Feb 16 2022 Michal Schorm <mschorm@redhat.com> - 3.2.6-1
- Rebase to 3.2.6
- Introduction of a new '*-doc' subpackage
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.13-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.13-2
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1
- Rebase to 3.1.13
* Wed Apr 28 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-3
- Fix package conflicts
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.12-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Feb 24 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
* Wed Nov 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
- Rebase to 3.1.11
* Fri Sep 18 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.10-1
- Rebase to 3.1.10
* Tue Aug 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-5
- Revert the CMake change regarding the in-source builds for now
- %%cmake macro covers the %%{set_build_flags}, so they are not needed
That also means, the debug buildchnages to the build flags must be done AFTER the
%%cmake macro was used.
- %%cmake macro also covers the CMAKE_INSTALL_PREFIX="%%{_prefix}" option
- Default to %%cmake commands instead fo %%make commands
- Update the WITH_UNITTEST macro to the one upstream use now
- Introduce macro to enable / disable testusite (and building of the *-test subpackage)
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-4
- 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-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-2
- Add explicit confict between mariadb-connector-c-devel and community-mysql-devel packages
* Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
- Rebase to 3.1.9
- Overlinking issues fixed by upstream in 3.1.3 release
- Add explicit confict between mariadb-connector-c-devel and mysql-devel packages
* Thu May 14 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.8-1
- Rebase to 3.1.8
* Mon Mar 16 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-2
- Rebase to 3.1.7 latest git
Fix for: https://jira.mariadb.org/browse/CONC-441
* Mon Feb 03 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
* Tue Dec 17 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.6-1
- Rebase to 3.1.6
* Tue Nov 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.5-1
- Rebase to 3.1.5
* Sun Nov 03 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-2
- Fix for #1624533
* Wed Sep 18 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.4-1
- Rebase to 3.1.4
* Wed Sep 11 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-3
- Enable building of the ed25519 client plugin.
It won't be shipped anymore by 'mariadb-server'
* Mon Aug 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-2
- Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot
* Fri Aug 02 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-1
- Rebase to 3.1.3 version
- Patch upstreamed
- Remove glob from library version, as per Fedora Packaging Guidelines
* Fri Jul 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-2
- Use macro to set build flags
* Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1
- Rebase to 3.1.2
- Introducing ED25519 plugin
- Plugindir issues (from 3.0.9 release) fixed by upstream
Resolves: #1691176
- Rebase to 3.1 version
- Disabling the ED25519 plugin
- Plugindir patch upstreamed
- Added debug build switch
* Tue May 21 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-2
- Fix overlinking issues
* Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1
- Rebase to 3.0.10
- Use macro for tarball name
- Use macro to set build flags
- Use macros for make commands
- Remove the scriptlets non relevant for RHEL-8
- Add info for the testsuite execution
- Remove glob from library version
- Remove info about the upstream issues
- Remove scriplet; no longer needed
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-2
* Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-3
- Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires
linking with "-lz", which will fail without the zlib library
- Resolves: #1710471
- Related: #1693966
* Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-2
- Fix plugindir issues
Resolves: #1624533
* Mon Feb 18 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-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 02 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
* Mon Nov 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
- Rebase to 3.0.7
* Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
- Fix parallel installability of x86_64 and i686 devel package
- Resolves: #1637031
* Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
- Rebase to 3.0.6
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-2
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
- Add -config sub-package that delivers system-wide /etc/my.cnf and
/etc/my.cnf.d directory, that other packages should use
This package also obsoletes mariadb-config
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
- Rebase to 3.0.5

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (mariadb-connector-c-3.2.6-src.tar.gz) = e42c9f58e1027d6740db2b923892a615349e5a321de8f8446f01c3d41a282033e5d54a08a174186702acf23f4ffd42d89fe1d776b257407a0bba3884943f9eab

10
testsuite.patch Normal file
View File

@ -0,0 +1,10 @@
--- mariadb-connector-c-3.1.3-src/unittest/libmariadb/CMakeLists.txt 2019-07-25 10:03:48.000000000 -0400
+++ mariadb-connector-c-3.1.3-src/unittest/libmariadb/CMakeLists.txt_patched 2019-08-19 17:02:26.317247605 -0400
@@ -71,3 +71,7 @@ FOREACH(API_TEST ${MANUAL_TESTS})
ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient)
ENDFOREACH()
+
+INSTALL(TARGETS ${API_TESTS} DESTINATION ${SHAREDIR}/mariadb-connector-c/tests COMPONENT Tests)
+INSTALL(FILES ${CC_SOURCE_DIR}/unittest/mytap/libcctap.so PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${INSTALL_LIBDIR} COMPONENT Tests)
+INSTALL(FILES ${CC_SOURCE_DIR}/unittest/libmariadb/CTestTestfile.cmake DESTINATION ${SHAREDIR}/mariadb-connector-c/tests COMPONENT Tests)