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

  ViewVC Help
Powered by ViewVC 1.1.30