Blame SPECS/mysql-connector-odbc.spec

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