/[packages]/cauldron/mariadb/current/SPECS/mariadb.spec
ViewVC logotype

Contents of /cauldron/mariadb/current/SPECS/mariadb.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.28