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