Blame SPECS/mysql-connector-odbc.spec

f037f8
Summary: ODBC driver for MySQL
f037f8
Name: mysql-connector-odbc
f037f8
Version: 5.2.5
98da24
Release: 7%{?dist}
f037f8
Group: System Environment/Libraries
f037f8
URL: http://dev.mysql.com/downloads/connector/odbc/
f037f8
# exceptions allow library to be linked with most open source SW,
f037f8
# not only GPL code.
f037f8
License: GPLv2 with exceptions
f037f8
f037f8
# Upstream has a mirror redirector for downloads, so the URL is hard to
f037f8
# represent statically.  You can get the tarball by following a link from
f037f8
# http://dev.mysql.com/downloads/connector/odbc/
f037f8
Source0: %{name}-%{version}-src.tar.gz
f037f8
f037f8
# mysql-connector-odbc expects to be able to get at a bunch of utility
f037f8
# functions inside libmysqlclient.  Now that we are restricting what symbols
f037f8
# are exported by libmysqlclient, that doesn't work.  Instead, copy those
f037f8
# functions here.  mysql and mysql-connector-odbc are published under the same
f037f8
# license, so this creates no legal issues.  (Note: we don't worry about
f037f8
# polluting application namespace in mysql-connector-odbc, since it's never
f037f8
# directly statically linked with any application code.)
f037f8
Source1: mysql-mysys.tar.gz
f037f8
f037f8
Patch1: myodbc-add-mysys.patch
f037f8
Patch2: myodbc-shutdown.patch
f037f8
Patch3: myodbc-64bit.patch
f037f8
Patch4: myodbc-maria.patch
f037f8
Patch5: myodbc-movecmpfunc.patch
f037f8
Patch6: myodbc-libname.patch
f037f8
Patch7: myodbc-libdir.patch
f037f8
Patch8: mysql-connector-odbc-buffsize.patch
f037f8
Patch9: mysql-connector-odbc-cleartext.patch
f037f8
Patch10: mysql-connector-odbc-cond.patch
2b15a4
Patch11: mysql-connector-odbc-5.2.5-aarch64.patch
98da24
Patch12: 0001-Memory-leak-in-SQLPrepare-with-queries-that-use-para.patch
f037f8
f037f8
BuildRequires: mysql-devel unixODBC-devel
f037f8
BuildRequires: cmake
f037f8
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
f037f8
f037f8
%description
f037f8
An ODBC (rev 3) driver for MySQL, for use with unixODBC.
f037f8
f037f8
%prep
f037f8
%setup -q -n %{name}-%{version}-src
f037f8
f037f8
tar xfz %{SOURCE1}
f037f8
f037f8
%patch1 -p1
f037f8
%patch2 -p1
f037f8
%patch3 -p1
f037f8
%patch4 -p1
f037f8
%patch5 -p1
f037f8
%patch6 -p1
f037f8
%patch7 -p1
f037f8
%patch8 -p1
f037f8
%patch9 -p1
f037f8
%patch10 -p1
2b15a4
%patch11 -p1
98da24
%patch12 -p1
f037f8
f037f8
%build
f037f8
# mysql 5.5.10 has stopped #define'ing THREAD in its exports, and has
f037f8
# started #define'ing MY_PTHREAD_FASTMUTEX, and neither of those changes
f037f8
# sit well with mysql-connector-odbc 5.1.10.  Revisit need for these hacks
f037f8
# when updating to newer release.
f037f8
export CFLAGS="%{optflags} -fno-strict-aliasing -DTHREAD=1 -UMY_PTHREAD_FASTMUTEX -DDBUG_OFF"
f037f8
f037f8
cmake . -G "Unix Makefiles" \
f037f8
        -DWITH_UNIXODBC=1 \
f037f8
        -DRPM_BUILD=1 \
f037f8
        -DCMAKE_INSTALL_PREFIX="%{_prefix}"
f037f8
f037f8
make %{?_smp_mflags} VERBOSE=1
f037f8
f037f8
%install
f037f8
export tagname=CC
f037f8
make DESTDIR=$RPM_BUILD_ROOT install
f037f8
f037f8
# Remove stuff not to be packaged (possibly reconsider later)
f037f8
rm -f $RPM_BUILD_ROOT%{_bindir}/myodbc-installer
f037f8
f037f8
rm -f $RPM_BUILD_ROOT/usr/COPYING
f037f8
rm -f $RPM_BUILD_ROOT/usr/README
f037f8
rm -f $RPM_BUILD_ROOT/usr/README.debug
f037f8
rm -f $RPM_BUILD_ROOT/usr/ChangeLog
f037f8
rm -f $RPM_BUILD_ROOT/usr/INSTALL
f037f8
rm -f $RPM_BUILD_ROOT/usr/Licenses_for_Third-Party_Components.txt
f037f8
f037f8
# Create a symlink for library to offer name that users are used to
f037f8
ln -sf libmyodbc5w.so $RPM_BUILD_ROOT%{_libdir}/libmyodbc5.so
f037f8
f037f8
# Upstream provides a test suite with functional and regression tests.
f037f8
# However, some tests fail, so it would deserve some more investigation.
f037f8
# We don't include the test suite until it works fine.
f037f8
rm -rf $RPM_BUILD_ROOT/usr/test
f037f8
f037f8
%post -p /sbin/ldconfig
f037f8
f037f8
%postun -p /sbin/ldconfig
f037f8
f037f8
%files
f037f8
%doc README README.debug ChangeLog COPYING
f037f8
%{_libdir}/lib*so
f037f8
f037f8
%changelog
98da24
* Fri Oct 13 2017 Augusto Caringi <acaringi@redhat.com> - 5.2.5-7
98da24
- Add patch to fix memory leak in SQLPrepare.
98da24
  Resolves: #1425160
98da24
2b15a4
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 5.2.5-6
2b15a4
- Mass rebuild 2014-01-24
2b15a4
2b15a4
* Wed Jan 15 2014 Honza Horak <hhorak@redhat.com> - 5.2.5-5
2b15a4
- Rebuild for mariadb-libs
2b15a4
  Related: #1045013
2b15a4
2b15a4
* Wed Jan  8 2014 Marcin Juszkiewicz <mjuszkiewicz redhat com> - 5.2.5-4
2b15a4
- Build failed because whether to use lib64 or not is done by checking
2b15a4
  list of known 64-bit architectures. So added AArch64 to that list.
2b15a4
  Resolves: #1041348
2b15a4
2b15a4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 5.2.5-3
2b15a4
- Mass rebuild 2013-12-27
2b15a4
f037f8
* Mon Jun 17 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-2
f037f8
- Avoid potential segfault
f037f8
  Resolves: #974794
f037f8
f037f8
* Fri May 24 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-1
f037f8
- Update to 5.2.5
f037f8
- Enlarge buffer size for query string when getting info about tables
f037f8
  Related: #948619
f037f8
f037f8
* Wed Apr  3 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-2
f037f8
- Fix libdir in cmake for ppc64
f037f8
f037f8
* Tue Mar  5 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-1
f037f8
- Update to 5.2.4
f037f8
f037f8
* Fri Mar  1 2013 Honza Horak <hhorak@redhat.com> - 5.1.11-3
f037f8
- Fix data types for mariadb
f037f8
f037f8
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-2
f037f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f037f8
f037f8
* Sun Jul 22 2012 Tom Lane <tgl@redhat.com> 5.1.11-1
f037f8
- Update to 5.1.11
f037f8
f037f8
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.10-2
f037f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f037f8
f037f8
* Sun Feb  5 2012 Tom Lane <tgl@redhat.com> 5.1.10-1
f037f8
- Update to 5.1.10
f037f8
f037f8
* Tue Jan 10 2012 Tom Lane <tgl@redhat.com> 5.1.9-1
f037f8
- Update to 5.1.9
f037f8
- Add --with-unixODBC-libs to configure command for safer multilib behavior
f037f8
Related: #757088
f037f8
f037f8
* Wed Mar 23 2011 Tom Lane <tgl@redhat.com> 5.1.8-3
f037f8
- Rebuild for libmysqlclient 5.5.10 soname version bump
f037f8
f037f8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.8-2
f037f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f037f8
f037f8
* Thu Dec 23 2010 Tom Lane <tgl@redhat.com> 5.1.8-1
f037f8
- Update to 5.1.8
f037f8
- Deal with mysql packaging changes that prevent us from using mysys
f037f8
  utility functions directly
f037f8
f037f8
* Wed Jan 20 2010 Tom Lane <tgl@redhat.com> 5.1.5r1144-7
f037f8
- Correct Source: tag and comment to reflect how to get the tarball
f037f8
f037f8
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 5.1.5r1144-6
f037f8
- rebuilt with new openssl
f037f8
f037f8
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-5
f037f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f037f8
f037f8
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-4
f037f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f037f8
f037f8
* Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-3
f037f8
- Fix some 64-bitness issues with unixODBC 2.2.14.
f037f8
f037f8
* Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-2
f037f8
- Rebuild for unixODBC 2.2.14.
f037f8
- Fix problem with null username/password specifications
f037f8
f037f8
* Thu Jan 22 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-1
f037f8
- Update to mysql-connector-odbc 5.1.5r1144, to go with MySQL 5.1.x.
f037f8
  Note the library name has changed from libmyodbc3 to libmyodbc5.
f037f8
f037f8
* Tue Aug  5 2008 Tom Lane <tgl@redhat.com> 3.51.26r1127-1
f037f8
- Update to mysql-connector-odbc 3.51.26r1127
f037f8
f037f8
* Tue Mar 25 2008 Tom Lane <tgl@redhat.com> 3.51.24r1071-1
f037f8
- Update to mysql-connector-odbc 3.51.24r1071
f037f8
f037f8
* Tue Feb 12 2008 Tom Lane <tgl@redhat.com> 3.51.23r998-1
f037f8
- Update to mysql-connector-odbc 3.51.23r998
f037f8
f037f8
* Wed Dec  5 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-3
f037f8
- Rebuild for new openssl
f037f8
f037f8
* Thu Aug  2 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-2
f037f8
- Update License tag to match code.
f037f8
f037f8
* Fri Apr 20 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-1
f037f8
- Update to mysql-connector-odbc 3.51.14r248
f037f8
Resolves: #236473
f037f8
- Fix build problem on multilib machines
f037f8
f037f8
* Mon Jul 17 2006 Tom Lane <tgl@redhat.com> 3.51.12-2.2
f037f8
- rebuild
f037f8
f037f8
* Mon Mar 27 2006 Tom Lane <tgl@redhat.com> 3.51.12-2
f037f8
- Remove DLL-unload cleanup call from connection shutdown (bz#185343)
f037f8
f037f8
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2.1
f037f8
- bump again for double-long bug on ppc(64)
f037f8
f037f8
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2
f037f8
- rebuilt for new gcc4.1 snapshot and glibc changes
f037f8
f037f8
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
f037f8
- rebuilt
f037f8
f037f8
* Fri Nov 11 2005 Tom Lane <tgl@redhat.com> 3.51.12-1
f037f8
- New package replacing MyODBC.