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

  ViewVC Help
Powered by ViewVC 1.1.28