mysql-connector-odbc-vl.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. #%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define build_compat32 0
  3. Summary: ODBC driver for MySQL
  4. Name: mysql-connector-odbc
  5. Version: 5.3.4
  6. Release: 3%{?_dist_release}
  7. Group: System Environment/Libraries
  8. URL: http://dev.mysql.com/downloads/connector/odbc/
  9. # exceptions allow library to be linked with most open source SW,
  10. # not only GPL code.
  11. License: GPLv2 with exceptions
  12. Source0: http://dev.mysql.com/get/Downloads/Connector-ODBC/5.2/%{name}-%{version}-src.tar.gz
  13. # mysql-connector-odbc expects to be able to get at a bunch of utility
  14. # functions inside libmysqlclient. Now that we are restricting what symbols
  15. # are exported by libmysqlclient, that doesn't work. Instead, copy those
  16. # functions here. mysql and mysql-connector-odbc are published under the same
  17. # license, so this creates no legal issues. (Note: we don't worry about
  18. # polluting application namespace in mysql-connector-odbc, since it's never
  19. # directly statically linked with any application code.)
  20. Source1: mariadb-mysys.tar.gz
  21. Patch1: myodbc-add-mysys.patch
  22. Patch2: myodbc-shutdown.patch
  23. Patch3: myodbc-64bit.patch
  24. Patch4: myodbc-movecmpfunc.patch
  25. Patch5: mysql-connector-odbc-buffsize.patch
  26. Patch6: mysql-connector-odbc-cleartext.patch
  27. Patch7: mysql-connector-odbc-format-security.patch
  28. Patch8: mysql-connector-odbc-5.2.5-aarch64.patch
  29. Patch9: myodbc-mariadb10.patch
  30. Patch10: mysql-connector-odbc-fix-segv.patch
  31. BuildRequires: libmysqlclient-devel unixODBC-devel gtk3-devel
  32. BuildRequires: cmake
  33. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  34. %description
  35. An ODBC (rev 3) driver for MySQL, for use with unixODBC.
  36. %package -n compat32-%{name}
  37. Summary: ODBC driver for MySQL
  38. Group: System Environment/Libraries
  39. Requires: %{name} = %{version}-%{release}
  40. %description -n compat32-%{name}
  41. An ODBC (rev 3) driver for MySQL, for use with unixODBC.
  42. %prep
  43. %setup -q -n %{name}-%{version}-src
  44. tar xfz %{SOURCE1}
  45. %patch1 -p1
  46. %patch2 -p1
  47. %patch3 -p1
  48. %patch4 -p1
  49. %patch5 -p1
  50. %patch6 -p1
  51. %patch7 -p1
  52. %patch8 -p1
  53. %patch9 -p1
  54. %patch10 -p1
  55. # mysql_config does not support --cxxflags option
  56. sed -i 's/--cxxflags/--cflags/g' cmake/FindMySQL.cmake
  57. %build
  58. # mysql 5.5.10 has stopped #define'ing THREAD in its exports, and has
  59. # started #define'ing MY_PTHREAD_FASTMUTEX, and neither of those changes
  60. # sit well with mysql-connector-odbc 5.1.10. Revisit need for these hacks
  61. # when updating to newer release.
  62. export CFLAGS="%{optflags} -lpthread -fno-strict-aliasing -DTHREAD=1 -UMY_PTHREAD_FASTMUTEX -DDBUG_OFF"
  63. cmake . -G "Unix Makefiles" \
  64. -DWITH_UNIXODBC=1 \
  65. -DRPM_BUILD=1 \
  66. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
  67. -DMYSQLCLIENT_LIB_NAME=mysqlclient
  68. make %{?_smp_mflags} VERBOSE=1
  69. %install
  70. export tagname=CC
  71. make DESTDIR=$RPM_BUILD_ROOT install
  72. # Remove stuff not to be packaged (possibly reconsider later)
  73. rm -f $RPM_BUILD_ROOT%{_bindir}/myodbc-installer
  74. rm -f $RPM_BUILD_ROOT/usr/COPYING
  75. rm -f $RPM_BUILD_ROOT/usr/README
  76. rm -f $RPM_BUILD_ROOT/usr/README.debug
  77. rm -f $RPM_BUILD_ROOT/usr/ChangeLog
  78. rm -f $RPM_BUILD_ROOT/usr/INSTALL
  79. rm -f $RPM_BUILD_ROOT/usr/Licenses_for_Third-Party_Components.txt
  80. # Create a symlink for library to offer name that users are used to
  81. ln -sf libmyodbc5w.so $RPM_BUILD_ROOT%{_libdir}/libmyodbc5.so
  82. # Upstream provides a test suite with functional and regression tests.
  83. # However, some tests fail, so it would deserve some more investigation.
  84. # We don't include the test suite until it works fine.
  85. rm -rf $RPM_BUILD_ROOT/usr/test
  86. %post
  87. /sbin/ldconfig
  88. %postun
  89. /sbin/ldconfig
  90. %post -n compat32-%{name}
  91. /sbin/ldconfig
  92. %postun -n compat32-%{name}
  93. /sbin/ldconfig
  94. %files
  95. %license COPYING
  96. %doc README README.debug ChangeLog
  97. %{_libdir}/lib*so
  98. %if %{build_compat32}
  99. %files -n compat32-%{name}
  100. %{_libdir}/lib*so
  101. %endif
  102. %changelog
  103. * Fri Jul 22 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-3
  104. - rebuilt with gcc-5.4.
  105. * Thu Nov 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-2
  106. - fixed a bug causing segmentation fault.
  107. * Sat Jul 19 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.4-1
  108. - new upstream release.
  109. * Tue Jul 8 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.2-2
  110. - initial build for Vine Linux.
  111. * Thu Jun 12 2014 Jakub Dorňák <jdornak@redhat.com> - 5.3.2-1
  112. - Rebase to version 5.3.2
  113. - MariaDB 10 compatibility
  114. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.6-2
  115. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  116. * Fri Jan 24 2014 Jakub Dorňák <jdornak@redhat.com> - 5.2.6-1
  117. - Update to 2.5.6
  118. Resolves: #1047895
  119. * Wed Jan 8 2014 Marcin Juszkiewicz <mjuszkiewicz redhat com> - 5.2.5-5
  120. - Build failed because whether to use lib64 or not is done by checking
  121. list of known 64-bit architectures. So added AArch64 to that list.
  122. Resolves: #1041348
  123. * Thu Dec 12 2013 Jakub Dorňák <jdornak@redhat.com> - 5.2.5-4
  124. - format-security
  125. Resolves: #1037209
  126. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.5-3
  127. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  128. * Mon Jun 17 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-2
  129. - Avoid potential segfault
  130. Resolves: #974794
  131. * Fri May 24 2013 Honza Horak <hhorak@redhat.com> - 5.2.5-1
  132. - Update to 5.2.5
  133. - Enlarge buffer size for query string when getting info about tables
  134. Related: #948619
  135. * Wed Apr 3 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-2
  136. - Fix libdir in cmake for ppc64
  137. * Tue Mar 5 2013 Honza Horak <hhorak@redhat.com> - 5.2.4-1
  138. - Update to 5.2.4
  139. * Fri Mar 1 2013 Honza Horak <hhorak@redhat.com> - 5.1.11-3
  140. - Fix data types for mariadb
  141. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-2
  142. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  143. * Sun Jul 22 2012 Tom Lane <tgl@redhat.com> 5.1.11-1
  144. - Update to 5.1.11
  145. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.10-2
  146. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  147. * Sun Feb 5 2012 Tom Lane <tgl@redhat.com> 5.1.10-1
  148. - Update to 5.1.10
  149. * Tue Jan 10 2012 Tom Lane <tgl@redhat.com> 5.1.9-1
  150. - Update to 5.1.9
  151. - Add --with-unixODBC-libs to configure command for safer multilib behavior
  152. Related: #757088
  153. * Wed Mar 23 2011 Tom Lane <tgl@redhat.com> 5.1.8-3
  154. - Rebuild for libmysqlclient 5.5.10 soname version bump
  155. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.8-2
  156. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  157. * Thu Dec 23 2010 Tom Lane <tgl@redhat.com> 5.1.8-1
  158. - Update to 5.1.8
  159. - Deal with mysql packaging changes that prevent us from using mysys
  160. utility functions directly
  161. * Wed Jan 20 2010 Tom Lane <tgl@redhat.com> 5.1.5r1144-7
  162. - Correct Source: tag and comment to reflect how to get the tarball
  163. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 5.1.5r1144-6
  164. - rebuilt with new openssl
  165. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-5
  166. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  167. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5r1144-4
  168. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  169. * Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-3
  170. - Fix some 64-bitness issues with unixODBC 2.2.14.
  171. * Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-2
  172. - Rebuild for unixODBC 2.2.14.
  173. - Fix problem with null username/password specifications
  174. * Thu Jan 22 2009 Tom Lane <tgl@redhat.com> 5.1.5r1144-1
  175. - Update to mysql-connector-odbc 5.1.5r1144, to go with MySQL 5.1.x.
  176. Note the library name has changed from libmyodbc3 to libmyodbc5.
  177. * Tue Aug 5 2008 Tom Lane <tgl@redhat.com> 3.51.26r1127-1
  178. - Update to mysql-connector-odbc 3.51.26r1127
  179. * Tue Mar 25 2008 Tom Lane <tgl@redhat.com> 3.51.24r1071-1
  180. - Update to mysql-connector-odbc 3.51.24r1071
  181. * Tue Feb 12 2008 Tom Lane <tgl@redhat.com> 3.51.23r998-1
  182. - Update to mysql-connector-odbc 3.51.23r998
  183. * Wed Dec 5 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-3
  184. - Rebuild for new openssl
  185. * Thu Aug 2 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-2
  186. - Update License tag to match code.
  187. * Fri Apr 20 2007 Tom Lane <tgl@redhat.com> 3.51.14r248-1
  188. - Update to mysql-connector-odbc 3.51.14r248
  189. Resolves: #236473
  190. - Fix build problem on multilib machines
  191. * Mon Jul 17 2006 Tom Lane <tgl@redhat.com> 3.51.12-2.2
  192. - rebuild
  193. * Mon Mar 27 2006 Tom Lane <tgl@redhat.com> 3.51.12-2
  194. - Remove DLL-unload cleanup call from connection shutdown (bz#185343)
  195. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2.1
  196. - bump again for double-long bug on ppc(64)
  197. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.51.12-1.2
  198. - rebuilt for new gcc4.1 snapshot and glibc changes
  199. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  200. - rebuilt
  201. * Fri Nov 11 2005 Tom Lane <tgl@redhat.com> 3.51.12-1
  202. - New package replacing MyODBC.