/[packages]/updates/1/mysql/current/SPECS/mysql.spec
ViewVC logotype

Contents of /updates/1/mysql/current/SPECS/mysql.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30