1 |
ahmad |
6918 |
%define Werror_cflags %nil |
2 |
|
|
%define _disable_ld_no_undefined 1 |
3 |
|
|
|
4 |
|
|
#(ie. use with rpm --rebuild): |
5 |
|
|
# |
6 |
|
|
# --with debug Compile with debugging code |
7 |
|
|
# |
8 |
|
|
# enable build with debugging code: will _not_ strip away any debugging code, |
9 |
|
|
# will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to |
10 |
|
|
# configure. |
11 |
|
|
|
12 |
|
|
%define build_debug 0 |
13 |
|
|
%define build_test 0 |
14 |
|
|
|
15 |
|
|
# commandline overrides: |
16 |
|
|
# rpm -ba|--rebuild --with 'xxx' |
17 |
|
|
%{?_with_debug: %{expand: %%define build_debug 1}} |
18 |
|
|
%{?_with_test: %{expand: %%define build_test 1}} |
19 |
|
|
%{?_without_test: %global build_test 0} |
20 |
|
|
|
21 |
|
|
%if %{build_debug} |
22 |
|
|
# disable build root strip policy |
23 |
|
|
%define __spec_install_post %{_libdir}/rpm/brp-compress || : |
24 |
|
|
|
25 |
|
|
# This gives extra debuggin and huge binaries |
26 |
|
|
%{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')} |
27 |
|
|
%endif |
28 |
|
|
|
29 |
|
|
%if %{build_debug} |
30 |
|
|
%define build_debug 1 |
31 |
|
|
%endif |
32 |
|
|
|
33 |
|
|
%if %{build_test} |
34 |
|
|
%define build_test 1 |
35 |
|
|
%endif |
36 |
|
|
|
37 |
|
|
%define _requires_exceptions perl(this) |
38 |
|
|
|
39 |
|
|
%define major 16 |
40 |
|
|
%define libname %mklibname mysql %{major} |
41 |
|
|
%define develname %mklibname -d mysql |
42 |
|
|
%define staticdevelname %mklibname -d -s mysql |
43 |
|
|
|
44 |
|
|
%define muser mysql |
45 |
|
|
|
46 |
|
|
Summary: A very fast and reliable SQL database engine |
47 |
|
|
Name: mysql |
48 |
|
|
Version: 5.5.8 |
49 |
ahmad |
29144 |
Release: %mkrel 6 |
50 |
ahmad |
6918 |
Group: Databases |
51 |
|
|
License: GPL |
52 |
|
|
URL: http://www.mysql.com/ |
53 |
|
|
Source0: http://mysql.dataphone.se/Downloads/MySQL-5.1/mysql-%{version}.tar.gz |
54 |
|
|
Source1: http://mysql.dataphone.se/Downloads/MySQL-5.1/mysql-%{version}.tar.gz.asc |
55 |
|
|
Source2: mysqld.sysconfig |
56 |
|
|
Source3: my.cnf |
57 |
|
|
Source4: libmysql.version |
58 |
|
|
# fedora patches |
59 |
|
|
Patch0: mysql-errno.patch |
60 |
|
|
Patch1: mysql-strmov.patch |
61 |
|
|
Patch2: mysql-install-test.patch |
62 |
|
|
Patch3: mysql-expired-certs.patch |
63 |
|
|
Patch4: mysql-stack-guard.patch |
64 |
|
|
Patch5: mysql-chain-certs.patch |
65 |
|
|
Patch6: mysql-versioning.patch |
66 |
|
|
Patch7: mysql-dubious-exports.patch |
67 |
|
|
Patch8: mysql-disable-test.patch |
68 |
ahmad |
29144 |
Patch9: mysql-home.patch |
69 |
|
|
Patch10: mysql-embedded-crash.patch |
70 |
|
|
|
71 |
ahmad |
6918 |
# mandriva patches |
72 |
|
|
Patch100: mysql-mysqldumpslow_no_basedir.diff |
73 |
|
|
Patch101: mysql-logrotate.diff |
74 |
|
|
Patch102: mysql-initscript.diff |
75 |
|
|
Patch103: mysql_upgrade-exit-status.patch |
76 |
|
|
Patch104: mysql-5.1.31-shebang.patch |
77 |
|
|
Patch105: mysql-5.1.35-test-variables-big.patch |
78 |
|
|
Patch106: mysql-5.1.36-hotcopy.patch |
79 |
|
|
Patch107: mysql-install_db-quiet.patch |
80 |
|
|
Patch108: mysql-5.5.8-bug58350.diff |
81 |
|
|
Requires(post): rpm-helper |
82 |
|
|
Requires(preun): rpm-helper |
83 |
|
|
Requires(pre): rpm-helper |
84 |
|
|
Requires(postun): rpm-helper |
85 |
|
|
Requires(post): mysql-common = %{version}-%{release} |
86 |
|
|
Requires(preun): mysql-common = %{version}-%{release} |
87 |
|
|
Requires(post): mysql-client = %{version}-%{release} |
88 |
|
|
Requires(preun): mysql-client = %{version}-%{release} |
89 |
|
|
Requires(postun): mysql-common = %{version}-%{release} |
90 |
|
|
Requires(postun): mysql-client = %{version}-%{release} |
91 |
|
|
Requires: mysql-common = %{version}-%{release} |
92 |
|
|
Requires: mysql-core = %{version}-%{release} |
93 |
|
|
Requires: mysql-client = %{version}-%{release} |
94 |
|
|
BuildRequires: bison |
95 |
|
|
BuildRequires: cmake |
96 |
|
|
BuildRequires: dos2unix |
97 |
|
|
BuildRequires: doxygen |
98 |
|
|
BuildRequires: glibc-devel |
99 |
|
|
BuildRequires: libaio-devel |
100 |
|
|
BuildRequires: libstdc++-devel |
101 |
|
|
BuildRequires: libtermcap-devel |
102 |
|
|
BuildRequires: multiarch-utils >= 1.0.3 |
103 |
|
|
BuildRequires: ncurses-devel |
104 |
|
|
BuildRequires: openssl-devel |
105 |
|
|
BuildRequires: python |
106 |
|
|
BuildRequires: readline-devel |
107 |
|
|
BuildRequires: systemtap |
108 |
|
|
BuildRequires: tetex |
109 |
|
|
BuildRequires: texinfo |
110 |
|
|
BuildRequires: xfs-devel |
111 |
|
|
BuildRequires: zlib-devel |
112 |
|
|
BuildConflicts: edit-devel |
113 |
|
|
Provides: msqlormysql mysqlserver |
114 |
|
|
Provides: mysql-max = %{version}-%{release} |
115 |
|
|
Obsoletes: mysql-max < 5.1.43 |
116 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
117 |
|
|
|
118 |
|
|
%description |
119 |
|
|
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and |
120 |
|
|
robust SQL (Structured Query Language) database server. MySQL Server is |
121 |
|
|
intended for mission-critical, heavy-load production systems as well as for |
122 |
|
|
embedding into mass-deployed software. MySQL is a trademark of MySQL AB. |
123 |
|
|
|
124 |
|
|
The mysql server is compiled with the following storage engines: |
125 |
|
|
|
126 |
|
|
- InnoDB Storage Engine |
127 |
|
|
- Archive Storage Engine |
128 |
|
|
- CSV Storage Engine |
129 |
|
|
- Federated Storage Engine |
130 |
|
|
- User Defined Functions (UDFs). |
131 |
|
|
- Blackhole Storage Engine |
132 |
|
|
- Partition Storage Engine |
133 |
|
|
- Perfschema Storage Engine |
134 |
|
|
|
135 |
|
|
%package core |
136 |
|
|
Summary: Server core binary |
137 |
|
|
Group: System/Servers |
138 |
|
|
Conflicts: mysql < 5.1.39-3 |
139 |
|
|
Conflicts: mysql-max < 5.1.43 |
140 |
|
|
Requires: mysql-common-core >= %{version}-%{release} |
141 |
|
|
|
142 |
|
|
%description core |
143 |
|
|
Core mysqld server binary. For a full MySQL database server, install |
144 |
|
|
package 'mysql'. |
145 |
|
|
|
146 |
|
|
%package common-core |
147 |
|
|
Summary: Common files required by core binary |
148 |
|
|
Group: System/Servers |
149 |
|
|
Conflicts: mysql-common < 5.1.43-1 |
150 |
|
|
|
151 |
|
|
%description common-core |
152 |
|
|
Common files minimally required by mysqld server binary. |
153 |
|
|
|
154 |
|
|
%package common |
155 |
|
|
Summary: Common files |
156 |
|
|
Group: System/Servers |
157 |
|
|
Requires(post): rpm-helper |
158 |
|
|
Requires(preun): rpm-helper |
159 |
|
|
Requires(pre): rpm-helper |
160 |
|
|
Requires(postun): rpm-helper |
161 |
|
|
Requires(post): mysql-client >= %{version}-%{release} |
162 |
|
|
Requires(preun): mysql-client >= %{version}-%{release} |
163 |
|
|
Requires: mysql-client >= %{version}-%{release} |
164 |
|
|
Requires: mysql-common-core >= %{version}-%{release} |
165 |
|
|
|
166 |
|
|
%description common |
167 |
|
|
Common files for the MySQL(TM) database server. |
168 |
|
|
|
169 |
|
|
%package client |
170 |
|
|
Summary: Client |
171 |
|
|
Group: Databases |
172 |
|
|
Requires(post): %{libname} >= %{version}-%{release} |
173 |
|
|
Requires(preun): %{libname} >= %{version}-%{release} |
174 |
|
|
Requires: %{libname} >= %{version}-%{release} |
175 |
|
|
|
176 |
|
|
%description client |
177 |
|
|
This package contains the standard MySQL clients. |
178 |
|
|
|
179 |
|
|
%package bench |
180 |
|
|
Summary: Benchmarks and test system |
181 |
|
|
Group: System/Servers |
182 |
|
|
Requires(post): mysql-client >= %{version}-%{release} |
183 |
|
|
Requires(preun): mysql-client >= %{version}-%{release} |
184 |
|
|
Requires: mysql-client >= %{version}-%{release} |
185 |
|
|
Requires: perl |
186 |
|
|
|
187 |
|
|
%description bench |
188 |
|
|
This package contains MySQL benchmark scripts and data. |
189 |
|
|
|
190 |
|
|
%package -n %{libname} |
191 |
|
|
Summary: Shared libraries |
192 |
|
|
Group: System/Libraries |
193 |
|
|
Provides: mysql-shared-libs = %{version}-%{release} |
194 |
|
|
Provides: mysql-shared = %{version}-%{release} |
195 |
|
|
|
196 |
|
|
%description -n %{libname} |
197 |
|
|
This package contains the shared libraries (*.so*) which certain languages and |
198 |
|
|
applications need to dynamically load and use MySQL. |
199 |
|
|
|
200 |
|
|
%package -n %{develname} |
201 |
|
|
Summary: Development header files and libraries |
202 |
|
|
Group: Development/Other |
203 |
|
|
Requires(post): %{libname} >= %{version}-%{release} |
204 |
|
|
Requires(preun): %{libname} >= %{version}-%{release} |
205 |
|
|
Requires(post): mysql-common >= %{version}-%{release} |
206 |
|
|
Requires(preun): mysql-common >= %{version}-%{release} |
207 |
|
|
Requires(post): mysql-client >= %{version}-%{release} |
208 |
|
|
Requires(preun): mysql-client >= %{version}-%{release} |
209 |
|
|
Requires: %{libname} = %{version}-%{release} |
210 |
|
|
Requires: mysql-common >= %{version}-%{release} |
211 |
|
|
Requires: mysql-client >= %{version}-%{release} |
212 |
|
|
Provides: mysql-devel = %{version}-%{release} |
213 |
|
|
Provides: %{libname}-devel = %{version}-%{release} |
214 |
|
|
Obsoletes: %{libname}-devel |
215 |
|
|
Conflicts: %{mklibname mysql 12 -d} |
216 |
|
|
Conflicts: %{mklibname mysql 14 -d} |
217 |
|
|
Conflicts: %{mklibname mysql 15 -d} |
218 |
|
|
|
219 |
|
|
%description -n %{develname} |
220 |
|
|
This package contains the development header files and libraries necessary to |
221 |
|
|
develop MySQL client applications. |
222 |
|
|
|
223 |
|
|
This package also contains the MySQL server as an embedded library. |
224 |
|
|
|
225 |
|
|
The embedded MySQL server library makes it possible to run a full-featured |
226 |
|
|
MySQL server inside the client application. The main benefits are increased |
227 |
|
|
speed and more simple management for embedded applications. |
228 |
|
|
|
229 |
|
|
The API is identical for the embedded MySQL version and the client/server |
230 |
|
|
version. |
231 |
|
|
|
232 |
|
|
%package -n %{staticdevelname} |
233 |
|
|
Summary: Static development libraries |
234 |
|
|
Group: Development/Other |
235 |
|
|
Requires: mysql-devel >= %{version}-%{release} |
236 |
|
|
Provides: mysql-static-devel = %{version}-%{release} |
237 |
|
|
Provides: %{libname}-static-devel = %{version}-%{release} |
238 |
|
|
Obsoletes: %{libname}-static-devel |
239 |
|
|
|
240 |
|
|
%description -n %{staticdevelname} |
241 |
|
|
This package contains the static development libraries. |
242 |
|
|
|
243 |
|
|
%prep |
244 |
|
|
|
245 |
|
|
%setup -q -n mysql-%{version} |
246 |
|
|
|
247 |
|
|
# fedora patches |
248 |
|
|
%patch0 -p1 -b .errno |
249 |
|
|
%patch1 -p1 -b .strmov |
250 |
|
|
%patch2 -p1 -b .install-test |
251 |
|
|
%patch3 -p1 -b .expired-certs |
252 |
|
|
%patch4 -p1 -b .stack-guard |
253 |
|
|
%patch5 -p1 -b .chain-certs |
254 |
|
|
%patch6 -p1 -b .versioning |
255 |
|
|
%patch7 -p1 -b .dubious-exports |
256 |
|
|
%patch8 -p1 -b .disable-test |
257 |
ahmad |
29144 |
%patch9 -p1 -b .mysql-home |
258 |
|
|
%patch10 -p1 -b .mysql-embedded-crash |
259 |
ahmad |
6918 |
|
260 |
|
|
# mandriva patches |
261 |
|
|
%patch100 -p0 -b .mysqldumpslow_no_basedir |
262 |
|
|
%patch101 -p0 -b .logrotate |
263 |
|
|
%patch102 -p0 -b .initscript |
264 |
|
|
%patch103 -p1 -b .mysql_upgrade-exit-status |
265 |
|
|
%patch104 -p1 -b .shebang |
266 |
|
|
%patch105 -p0 -b .test-variables-big |
267 |
|
|
%patch106 -p0 -b .hotcopy |
268 |
|
|
%patch107 -p0 -b .install_db-quiet |
269 |
|
|
%patch108 -p1 -b .bug58350 |
270 |
|
|
|
271 |
ahmad |
16644 |
mkdir -p Mageia |
272 |
|
|
cp %{SOURCE2} Mageia/mysqld.sysconfig |
273 |
|
|
cp %{SOURCE3} Mageia/my.cnf |
274 |
ahmad |
6918 |
|
275 |
|
|
# lib64 fix |
276 |
ahmad |
16644 |
perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf |
277 |
ahmad |
6918 |
|
278 |
|
|
# antiborker |
279 |
|
|
perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/* |
280 |
|
|
perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/* |
281 |
|
|
perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/* |
282 |
|
|
perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/* |
283 |
|
|
perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db* |
284 |
|
|
|
285 |
|
|
# this may be part of the problems with mysql-test |
286 |
|
|
# http://bugs.mysql.com/bug.php?id=52223 |
287 |
|
|
#perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl |
288 |
|
|
#perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl |
289 |
|
|
|
290 |
|
|
# workaround for upstream bug #56342 |
291 |
|
|
rm -f mysql-test/t/ssl_8k_key-master.opt |
292 |
|
|
|
293 |
|
|
# upstream has fallen down badly on symbol versioning, do it ourselves |
294 |
|
|
cp %{SOURCE4} libmysql/libmysql.version |
295 |
|
|
|
296 |
|
|
%build |
297 |
|
|
%serverbuild |
298 |
|
|
export CFLAGS="${CFLAGS:-%{optflags}}" |
299 |
|
|
export CXXFLAGS="${CXXFLAGS:-%{optflags}}" |
300 |
|
|
export FFLAGS="${FFLAGS:-%{optflags}}" |
301 |
|
|
|
302 |
|
|
%cmake \ |
303 |
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
304 |
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
305 |
|
|
-DINSTALL_SBINDIR=sbin \ |
306 |
|
|
-DMYSQL_DATADIR=/var/lib/mysql \ |
307 |
|
|
-DSYSCONFDIR=%{_sysconfdir} \ |
308 |
|
|
-DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \ |
309 |
|
|
-DINSTALL_MANDIR=share/man \ |
310 |
|
|
-DINSTALL_SHAREDIR=share/mysql \ |
311 |
|
|
-DINSTALL_LIBDIR=%{_lib} \ |
312 |
|
|
-DINSTALL_INCLUDEDIR=include/mysql \ |
313 |
|
|
-DINSTALL_INFODIR=share/info \ |
314 |
|
|
-DINSTALL_MYSQLDATADIR=/var/lib/mysql \ |
315 |
|
|
-DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \ |
316 |
|
|
-DINSTALL_SQLBENCHDIR=share/mysql \ |
317 |
|
|
-DINSTALL_SUPPORTFILESDIR=share/mysql \ |
318 |
|
|
-DINSTALL_MYSQLSHAREDIR=share/mysql \ |
319 |
|
|
-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ |
320 |
|
|
-DWITH_READLINE=0 \ |
321 |
|
|
-DWITH_LIBEDIT=0 \ |
322 |
|
|
-DWITH_LIBWRAP=1 \ |
323 |
|
|
-DWITH_SSL=system \ |
324 |
|
|
-DWITH_ZLIB=system \ |
325 |
|
|
-DWITH_PIC=1 \ |
326 |
|
|
-DMYSQL_TCP_PORT=3306 \ |
327 |
|
|
-DEXTRA_CHARSETS=all \ |
328 |
|
|
-DENABLED_LOCAL_INFILE=1 \ |
329 |
|
|
-DENABLE_DTRACE=1 \ |
330 |
|
|
-DWITH_EMBEDDED_SERVER=1 \ |
331 |
|
|
-DMYSQL_USER=%{muser} \ |
332 |
|
|
%if %{build_debug} |
333 |
|
|
-DWITH_DEBUG=1 \ |
334 |
|
|
%else |
335 |
|
|
-DWITH_DEBUG=0 \ |
336 |
|
|
%endif |
337 |
|
|
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ |
338 |
|
|
-DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \ |
339 |
|
|
-DWITHOUT_DAEMON_EXAMPLE=1 \ |
340 |
|
|
-DFEATURE_SET="community" \ |
341 |
ahmad |
16644 |
-DCOMPILATION_COMMENT="Mageia - MySQL Community Edition (GPL)" |
342 |
ahmad |
6918 |
|
343 |
|
|
cp ../libmysql/libmysql.version libmysql/libmysql.version |
344 |
|
|
|
345 |
|
|
%make |
346 |
|
|
|
347 |
|
|
|
348 |
|
|
%install |
349 |
|
|
rm -rf %{buildroot} |
350 |
|
|
|
351 |
|
|
# don't fiddle with the initscript! |
352 |
|
|
export DONT_GPRINTIFY=1 |
353 |
|
|
|
354 |
|
|
%if %{build_debug} |
355 |
|
|
export DONT_STRIP=1 |
356 |
|
|
%endif |
357 |
|
|
|
358 |
|
|
install -d %{buildroot}%{_sysconfdir}/sysconfig |
359 |
|
|
install -d %{buildroot}%{_initrddir} |
360 |
|
|
install -d %{buildroot}%{_var}/run/mysqld |
361 |
|
|
install -d %{buildroot}%{_var}/log/mysqld |
362 |
|
|
install -d %{buildroot}/var/lib/mysql/{mysql,test} |
363 |
|
|
|
364 |
|
|
%makeinstall_std -C build |
365 |
|
|
|
366 |
|
|
# install init scripts |
367 |
|
|
install -m0755 build/support-files/mysql.server %{buildroot}%{_initrddir}/mysqld |
368 |
|
|
|
369 |
|
|
# install configuration files |
370 |
ahmad |
16644 |
install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld |
371 |
|
|
install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf |
372 |
ahmad |
6918 |
|
373 |
|
|
# bork |
374 |
|
|
mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/ |
375 |
|
|
chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf |
376 |
|
|
mv %{buildroot}%{_prefix}/scripts/mysql_install_db %{buildroot}%{_bindir}/ |
377 |
|
|
mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal |
378 |
|
|
|
379 |
|
|
pushd %{buildroot}%{_bindir} |
380 |
|
|
ln -sf mysqlcheck mysqlrepair |
381 |
|
|
ln -sf mysqlcheck mysqlanalyze |
382 |
|
|
ln -sf mysqlcheck mysqloptimize |
383 |
|
|
popd |
384 |
|
|
|
385 |
|
|
# nuke -Wl,--as-needed from the mysql_config file |
386 |
|
|
perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config |
387 |
|
|
|
388 |
|
|
# cmake generates some completely wacko references to -lprobes_mysql when |
389 |
|
|
# building with dtrace support. Haven't found where to shut that off, |
390 |
|
|
# so resort to this blunt instrument. While at it, let's not reference |
391 |
|
|
# libmysqlclient_r anymore either. |
392 |
|
|
sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ |
393 |
|
|
%{buildroot}%{_bindir}/mysql_config >mysql_config.tmp |
394 |
|
|
cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config |
395 |
|
|
chmod 755 %{buildroot}%{_bindir}/mysql_config |
396 |
|
|
|
397 |
|
|
# libmysqlclient_r is no more. Upstream tries to replace it with symlinks |
398 |
|
|
# but that really doesn't work (wrong soname in particular). We'll keep |
399 |
|
|
# just the devel libmysqlclient_r.so link, so that rebuilding without any |
400 |
|
|
# source change is enough to get rid of dependency on libmysqlclient_r. |
401 |
|
|
rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so* |
402 |
|
|
ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so |
403 |
|
|
|
404 |
|
|
# mysql-test includes one executable that doesn't belong under /usr/share, |
405 |
|
|
# so move it and provide a symlink |
406 |
|
|
mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} |
407 |
|
|
ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process |
408 |
|
|
|
409 |
|
|
# house cleaning |
410 |
|
|
rm -rf %{buildroot}%{_datadir}/info |
411 |
|
|
rm -f %{buildroot}%{_bindir}/mysqltest_embedded |
412 |
|
|
rm -f %{buildroot}%{_bindir}/client_test |
413 |
|
|
rm -f %{buildroot}%{_bindir}/make_win_binary_distribution |
414 |
|
|
rm -f %{buildroot}%{_bindir}/make_win_src_distribution |
415 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/binary-configure |
416 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini |
417 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini |
418 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/config.small.ini |
419 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server |
420 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate |
421 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/mysql.server |
422 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini |
423 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/binary-configure |
424 |
|
|
rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1* |
425 |
|
|
rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1* |
426 |
|
|
rm -f %{buildroot}%{_datadir}/mysql/magic |
427 |
|
|
|
428 |
|
|
# no idea how to fix this |
429 |
|
|
rm -rf %{buildroot}%{_prefix}/data |
430 |
|
|
rm -rf %{buildroot}%{_prefix}/docs |
431 |
|
|
rm -rf %{buildroot}%{_prefix}/scripts |
432 |
|
|
rm -f %{buildroot}%{_prefix}/COPYING |
433 |
|
|
rm -f %{buildroot}%{_prefix}/INSTALL-BINARY |
434 |
|
|
rm -f %{buildroot}%{_prefix}/README |
435 |
|
|
|
436 |
|
|
%multiarch_binaries %{buildroot}%{_bindir}/mysql_config |
437 |
|
|
%multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h |
438 |
|
|
|
439 |
|
|
cat > README.urpmi <<EOF |
440 |
|
|
|
441 |
|
|
The initscript used to start mysql has been reverted to use the one shipped |
442 |
|
|
by MySQL AB. This means the following changes: |
443 |
|
|
|
444 |
|
|
* The generation of the initial system mysql database is now done when mysql |
445 |
|
|
is started from the initscript and only if the /var/lib/mysql/mysql |
446 |
|
|
directory is empty (mysql_install_db). Previousely this was quite hidden and |
447 |
|
|
silently done at (rpm) install time. As a consequence to this change you may |
448 |
|
|
have to perform some manual tasks to upgrade the mysql system database and |
449 |
|
|
such. So, doing something like this might help you: |
450 |
|
|
|
451 |
|
|
/etc/rc.d/init.d/mysqld stop |
452 |
|
|
TMPDIR=/var/tmp mysql_install_db |
453 |
|
|
mysql_upgrade |
454 |
|
|
|
455 |
|
|
The cluster functionalities (ndb) has been deactivated and will be removed in |
456 |
|
|
future mysql versions. A new product named mysql-cluster has been added (in |
457 |
|
|
contrib) that replaces the cluster functionalities. |
458 |
|
|
|
459 |
|
|
The mysql-common-core package ships with a default /etc/my.cnf file that is |
460 |
|
|
based on the my-medium.cnf file that comes with the source code. |
461 |
|
|
|
462 |
|
|
Starting from mysql-5.1.43-2 the storage engines is built as dynamically |
463 |
|
|
loadable modules. You can either load the engines using the /etc/my.cnf file or |
464 |
|
|
at runtime. Please look at these lines in the /etc/my.cnf file to enable |
465 |
|
|
additional engines or disable one or more of the default ones: |
466 |
|
|
|
467 |
|
|
plugin_dir=%{_libdir}/mysql/plugin |
468 |
|
|
plugin-load=ha_archive.so;ha_blackhole.so;ha_federated.so |
469 |
|
|
|
470 |
|
|
Starting from mysql-5.1.44-3 the html documentation and the mysql.info is not |
471 |
ahmad |
16644 |
shipped with the Mageia packages due to strict licensing. |
472 |
ahmad |
6918 |
|
473 |
|
|
EOF |
474 |
|
|
|
475 |
|
|
################################################################################ |
476 |
|
|
# run the tests |
477 |
|
|
%if %{build_test} |
478 |
|
|
# disable failing tests |
479 |
|
|
echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def |
480 |
|
|
echo "type_enum : Unstable test case" >> mysql-test/t/disabled.def |
481 |
|
|
echo "windows : For MS Windows only" >> mysql-test/t/disabled.def |
482 |
|
|
pushd build/mysql-test |
483 |
|
|
export LANG=C |
484 |
|
|
export LC_ALL=C |
485 |
|
|
export LANGUAGE=C |
486 |
|
|
perl ./mysql-test-run.pl \ |
487 |
|
|
--mtr-build-thread="$((${RANDOM} % 100))" \ |
488 |
|
|
--skip-ndb \ |
489 |
|
|
--timer \ |
490 |
|
|
--retry=0 \ |
491 |
|
|
--ssl \ |
492 |
|
|
--mysqld=--binlog-format=mixed \ |
493 |
|
|
--testcase-timeout=60 \ |
494 |
|
|
--suite-timeout=120 || false |
495 |
|
|
popd |
496 |
|
|
%endif |
497 |
|
|
|
498 |
|
|
%pre |
499 |
|
|
# enable plugins |
500 |
|
|
if [ -f %{_sysconfdir}/my.cnf ]; then |
501 |
|
|
perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf |
502 |
|
|
perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf |
503 |
|
|
fi |
504 |
|
|
|
505 |
|
|
%pre common |
506 |
|
|
# delete the mysql group if no mysql user is found, before adding the user |
507 |
|
|
if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then |
508 |
|
|
%{_sbindir}/groupdel %{muser} 2> /dev/null || : |
509 |
|
|
fi |
510 |
|
|
|
511 |
|
|
%_pre_useradd %{muser} /var/lib/mysql /bin/bash |
512 |
|
|
|
513 |
|
|
%post common |
514 |
|
|
|
515 |
|
|
%post |
516 |
|
|
# Change permissions so that the user that will run the MySQL daemon |
517 |
|
|
# owns all needed files. |
518 |
|
|
chown -R %{muser}:%{muser} /var/lib/mysql /var/run/mysqld /var/log/mysqld |
519 |
|
|
|
520 |
|
|
# make sure the /var/lib/mysql directory can be accessed |
521 |
|
|
chmod 711 /var/lib/mysql |
522 |
|
|
|
523 |
|
|
%_post_service mysqld |
524 |
|
|
|
525 |
|
|
%preun |
526 |
|
|
%_preun_service mysqld |
527 |
|
|
|
528 |
|
|
%postun |
529 |
|
|
if [ "$1" = "0" ]; then |
530 |
|
|
if [ -f /var/lock/subsys/mysqld ]; then |
531 |
|
|
%{_initrddir}/mysqld restart > /dev/null 2>/dev/null || : |
532 |
|
|
fi |
533 |
|
|
fi |
534 |
|
|
|
535 |
|
|
%pre common-core |
536 |
|
|
# enable plugins |
537 |
|
|
if [ -f %{_sysconfdir}/my.cnf ]; then |
538 |
|
|
perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf |
539 |
|
|
perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf |
540 |
|
|
fi |
541 |
|
|
|
542 |
|
|
%clean |
543 |
|
|
rm -rf %{buildroot} |
544 |
|
|
|
545 |
|
|
%files |
546 |
|
|
%defattr(-,root,root) |
547 |
|
|
%doc README.urpmi |
548 |
|
|
%attr(0755,root,root) %{_initrddir}/mysqld |
549 |
|
|
%dir %{_libdir}/mysql/plugin |
550 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/adt_null.so |
551 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/auth.so |
552 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/auth_socket.so |
553 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/auth_test_plugin.so |
554 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/ha_archive.so |
555 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/ha_blackhole.so |
556 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/ha_federated.so |
557 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/mypluglib.so |
558 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_client.so |
559 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_interface.so |
560 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_server.so |
561 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/semisync_master.so |
562 |
|
|
%attr(0755,root,root) %{_libdir}/mysql/plugin/semisync_slave.so |
563 |
|
|
|
564 |
|
|
%files client |
565 |
|
|
%defattr(-,root,root) |
566 |
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mysqlaccess.conf |
567 |
|
|
%attr(0755,root,root) %{_bindir}/msql2mysql |
568 |
|
|
%attr(0755,root,root) %{_bindir}/mysql |
569 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlaccess |
570 |
|
|
%attr(0755,root,root) %{_bindir}/mysqladmin |
571 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlanalyze |
572 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlbinlog |
573 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlcheck |
574 |
|
|
%attr(0755,root,root) %{_bindir}/mysqldump |
575 |
|
|
%attr(0755,root,root) %{_bindir}/mysqldumpslow |
576 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_find_rows |
577 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlimport |
578 |
|
|
%attr(0755,root,root) %{_bindir}/mysqloptimize |
579 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlrepair |
580 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlshow |
581 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlslap |
582 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_waitpid |
583 |
|
|
%attr(0644,root,root) %{_mandir}/man1/msql2mysql.1* |
584 |
|
|
%attr(0644,root,root) %{_mandir}/man1/myisam_ftdump.1* |
585 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql.1* |
586 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlaccess.1* |
587 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqladmin.1* |
588 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlbinlog.1* |
589 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlcheck.1* |
590 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqldump.1* |
591 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqldumpslow.1* |
592 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_find_rows.1* |
593 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlimport.1* |
594 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlshow.1* |
595 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_waitpid.1* |
596 |
|
|
|
597 |
|
|
%files bench |
598 |
|
|
%defattr(-,root,root) |
599 |
|
|
%doc build/sql-bench/README |
600 |
|
|
%attr(0755,root,root) %{_bindir}/my_safe_process |
601 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_client_test |
602 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_client_test_embedded |
603 |
|
|
%{_datadir}/mysql/sql-bench |
604 |
|
|
%attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test |
605 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql-stress-test.pl.1* |
606 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql-test-run.pl.1* |
607 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_client_test.1* |
608 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_client_test_embedded.1* |
609 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqltest.1* |
610 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqltest_embedded.1* |
611 |
|
|
|
612 |
|
|
%files core |
613 |
|
|
%defattr(-,root,root) |
614 |
|
|
%attr(0755,root,root) %{_sbindir}/mysqld |
615 |
|
|
|
616 |
|
|
%files common-core |
617 |
|
|
%defattr(-,root,root) |
618 |
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/my.cnf |
619 |
|
|
%dir %{_datadir}/mysql |
620 |
|
|
%{_datadir}/mysql/english |
621 |
|
|
%{_datadir}/mysql/charsets |
622 |
|
|
|
623 |
|
|
%files common |
624 |
|
|
%defattr(-,root,root) |
625 |
|
|
%doc README COPYING |
626 |
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/mysqld |
627 |
|
|
%attr(0755,root,root) %{_bindir}/innochecksum |
628 |
|
|
%attr(0755,root,root) %{_bindir}/myisamchk |
629 |
|
|
%attr(0755,root,root) %{_bindir}/myisam_ftdump |
630 |
|
|
%attr(0755,root,root) %{_bindir}/myisamlog |
631 |
|
|
%attr(0755,root,root) %{_bindir}/myisampack |
632 |
|
|
%attr(0755,root,root) %{_bindir}/my_print_defaults |
633 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlbug |
634 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_convert_table_format |
635 |
|
|
%attr(0755,root,root) %{_bindir}/mysqld_multi |
636 |
|
|
%attr(0755,root,root) %{_bindir}/mysqld_safe |
637 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_fix_extensions |
638 |
|
|
%attr(0755,root,root) %{_bindir}/mysqlhotcopy |
639 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_install_db |
640 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_secure_installation |
641 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_setpermission |
642 |
|
|
%attr(0755,root,root) %{_bindir}/mysqltest |
643 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_tzinfo_to_sql |
644 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_upgrade |
645 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_zap |
646 |
|
|
%attr(0755,root,root) %{_bindir}/perror |
647 |
|
|
%attr(0755,root,root) %{_bindir}/replace |
648 |
|
|
%attr(0755,root,root) %{_bindir}/resolveip |
649 |
|
|
%attr(0755,root,root) %{_bindir}/resolve_stack_dump |
650 |
|
|
%attr(0711,%{muser},%{muser}) %dir /var/lib/mysql |
651 |
|
|
%attr(0711,%{muser},%{muser}) %dir /var/lib/mysql/mysql |
652 |
|
|
%attr(0711,%{muser},%{muser}) %dir /var/lib/mysql/test |
653 |
|
|
%attr(0755,%{muser},%{muser}) %dir %{_var}/run/mysqld |
654 |
|
|
%attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld |
655 |
|
|
%{_datadir}/mysql/*.cnf |
656 |
|
|
%{_datadir}/mysql/fill_help_tables.sql |
657 |
|
|
%{_datadir}/mysql/mysql_system_tables.sql |
658 |
|
|
%{_datadir}/mysql/mysql_system_tables_data.sql |
659 |
|
|
%{_datadir}/mysql/mysql_test_data_timezone.sql |
660 |
|
|
%{_datadir}/mysql/errmsg-utf8.txt |
661 |
|
|
%{_datadir}/mysql/czech |
662 |
|
|
%{_datadir}/mysql/danish |
663 |
|
|
%{_datadir}/mysql/dutch |
664 |
|
|
%{_datadir}/mysql/estonian |
665 |
|
|
%{_datadir}/mysql/french |
666 |
|
|
%{_datadir}/mysql/german |
667 |
|
|
%{_datadir}/mysql/greek |
668 |
|
|
%{_datadir}/mysql/hungarian |
669 |
|
|
%{_datadir}/mysql/italian |
670 |
|
|
%{_datadir}/mysql/japanese |
671 |
|
|
%{_datadir}/mysql/korean |
672 |
|
|
%{_datadir}/mysql/norwegian |
673 |
|
|
%{_datadir}/mysql/norwegian-ny |
674 |
|
|
%{_datadir}/mysql/polish |
675 |
|
|
%{_datadir}/mysql/portuguese |
676 |
|
|
%{_datadir}/mysql/romanian |
677 |
|
|
%{_datadir}/mysql/russian |
678 |
|
|
%{_datadir}/mysql/serbian |
679 |
|
|
%{_datadir}/mysql/slovak |
680 |
|
|
%{_datadir}/mysql/spanish |
681 |
|
|
%{_datadir}/mysql/swedish |
682 |
|
|
%{_datadir}/mysql/ukrainian |
683 |
|
|
%attr(0644,root,root) %{_mandir}/man1/innochecksum.1* |
684 |
|
|
%attr(0644,root,root) %{_mandir}/man1/myisamchk.1* |
685 |
|
|
%attr(0644,root,root) %{_mandir}/man1/myisamlog.1* |
686 |
|
|
%attr(0644,root,root) %{_mandir}/man1/myisampack.1* |
687 |
|
|
%attr(0644,root,root) %{_mandir}/man1/my_print_defaults.1* |
688 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlbug.1* |
689 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_convert_table_format.1* |
690 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqld_multi.1* |
691 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqld_safe.1* |
692 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_fix_extensions.1* |
693 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlhotcopy.1* |
694 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_install_db.1* |
695 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlman.1* |
696 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_secure_installation.1* |
697 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql.server.1* |
698 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_setpermission.1* |
699 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysqlslap.1* |
700 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_tzinfo_to_sql.1* |
701 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_upgrade.1* |
702 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_zap.1* |
703 |
|
|
%attr(0644,root,root) %{_mandir}/man1/perror.1* |
704 |
|
|
%attr(0644,root,root) %{_mandir}/man1/replace.1* |
705 |
|
|
%attr(0644,root,root) %{_mandir}/man1/resolveip.1* |
706 |
|
|
%attr(0644,root,root) %{_mandir}/man1/resolve_stack_dump.1* |
707 |
|
|
%attr(0644,root,root) %{_mandir}/man8/mysqld.8* |
708 |
|
|
|
709 |
|
|
%files -n %{libname} |
710 |
|
|
%defattr(-,root,root) |
711 |
|
|
%doc Docs/ChangeLog |
712 |
|
|
%attr(0755,root,root) %{_libdir}/libmysqlclient.so.%{major}* |
713 |
|
|
# not sure about this one... |
714 |
|
|
%attr(0755,root,root) %{_libdir}/libmysqlservices.so |
715 |
|
|
|
716 |
|
|
%files -n %{develname} |
717 |
|
|
%defattr(-,root,root) |
718 |
|
|
%doc INSTALL-SOURCE |
719 |
|
|
%multiarch %{multiarch_bindir}/mysql_config |
720 |
|
|
%attr(0755,root,root) %{_bindir}/mysql_config |
721 |
|
|
%attr(0755,root,root) %{_libdir}/libmysqlclient_r.so |
722 |
|
|
%attr(0755,root,root) %{_libdir}/libmysqlclient.so |
723 |
|
|
%dir %{_includedir}/mysql |
724 |
|
|
%dir %{_includedir}/mysql/psi |
725 |
|
|
%attr(0644,root,root) %{_includedir}/mysql/*.h |
726 |
|
|
%attr(0644,root,root) %{_includedir}/mysql/psi/*.h |
727 |
|
|
%multiarch %{multiarch_includedir}/mysql/my_config.h |
728 |
|
|
%attr(0644,root,root) %{_mandir}/man1/comp_err.1* |
729 |
|
|
%attr(0644,root,root) %{_mandir}/man1/mysql_config.1* |
730 |
|
|
%attr(0644,root,root) %{_datadir}/aclocal/mysql.m4 |
731 |
|
|
|
732 |
|
|
%files -n %{staticdevelname} |
733 |
|
|
%defattr(-,root,root) |
734 |
|
|
%attr(0644,root,root) %{_libdir}/*.a |
735 |
|
|
|
736 |
|
|
|