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