/[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 637582 - (show annotations) (download)
Mon Jun 16 16:36:09 2014 UTC (5 years, 8 months ago) by oden
File size: 35553 byte(s)
- 10.0.12
- drop p121, it's fixed upstream

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
54 # rule out some useless autodeps in the test suite
55 %define _requires_exceptions perl(th\\|perl(lib\\|perl(mtr\\|perl(My
56 %define _provides_exceptions perl(th\\|perl(lib\\|perl(mtr\\|perl(My
57
58 Summary: A very fast and reliable SQL database engine
59 Name: mariadb
60 Version: 10.0.12
61 Release: %mkrel 1
62 Group: Databases
63 License: GPLv2 with exceptions
64 URL: http://mariadb.org/
65 Source0: %{mirror}/%{name}-%{version}/kvm-tarbake-jaunty-x86/%{name}-%{version}.tar.gz
66 Source3: my.cnf
67 Source10: mysql.tmpfiles.d
68 Source11: mysqld.service
69 Source12: mysqld-prepare-db-dir
70 Source13: mysqld-wait-ready
71 Source50: auth_pam.cnf
72 Source51: auth_socket.cnf
73 Source52: dialog.cnf
74 Source53: ha_archive.cnf
75 Source54: ha_blackhole.cnf
76 Source55: ha_cassandra.cnf
77 Source56: ha_connect.cnf
78 Source57: ha_federatedx.cnf
79 Source58: handlersocket.cnf
80 Source59: ha_oqgraph.cnf
81 Source60: ha_sequence.cnf
82 Source61: ha_sphinx.cnf
83 Source62: ha_spider.cnf
84 Source63: locales.cnf
85 Source64: metadata_lock_info.cnf
86 Source65: mysql_clear_password.cnf
87 Source66: query_cache_info.cnf
88 Source67: query_response_time.cnf
89 Source68: semisync_master.cnf
90 Source69: semisync_slave.cnf
91 Source70: sql_errlog.cnf
92 Source71: feedback.cnf
93 Source72: ha_innodb.cnf
94 Source73: server_audit.cnf
95
96 # the following patches are rediffed from the mysql-5.5 src.rpm to mariadb-5.5
97 # fedora patches
98 Patch1: mariadb-5.5-errno.patch
99 Patch3: mariadb-5.5-install-test.patch
100
101 # mandriva patches
102 Patch101: mariadb-5.5-logrotate.patch
103 Patch106: mariadb-5.5-hotcopy.patch
104 Patch107: mariadb-5.5-mysql_install_db-quiet.patch
105
106 Requires(post): systemd >= %{systemd_required_version}
107 Requires(post): rpm-helper >= 0.24.8-1
108 Requires(preun): rpm-helper >= 0.24.8-1
109 Requires(post): %{name}-common%{_isa} = %{version}-%{release}
110 Requires(preun): %{name}-common%{_isa} = %{version}-%{release}
111 Requires(post): %{name}-client%{_isa} = %{version}-%{release}
112 Requires(preun): %{name}-client%{_isa} = %{version}-%{release}
113 Requires(postun): %{name}-common%{_isa} = %{version}-%{release}
114 Requires(postun): %{name}-client%{_isa} = %{version}-%{release}
115 Requires: %{name}-common%{_isa} = %{version}-%{release}
116 Requires: %{name}-core%{_isa} = %{version}-%{release}
117 Requires: %{name}-client%{_isa} = %{version}-%{release}
118 Provides: mysql = %{version}-%{release}
119 Obsoletes: mysql < %{version}-%{release}
120 Obsoletes: %{libmariadbservices} < 5.5.18-0.3194.20111227.1
121 Obsoletes: %{libmysqlservices} < %{version}-%{release}
122 Conflicts: %{name}-extra%{_isa} < %{version}-%{release}
123 Conflicts: %{name}-feedback%{_isa} < %{version}-%{release}
124 Conflicts: %{name}-obsolete%{_isa} < %{version}-%{release}
125 Suggests: %{name}-extra%{_isa}
126 BuildRequires: bison
127 BuildRequires: cmake
128 BuildRequires: doxygen
129 BuildRequires: glibc-devel
130 BuildRequires: libaio-devel
131 BuildRequires: libstdc++-devel
132 BuildRequires: libtermcap-devel
133 BuildRequires: multiarch-utils >= 1.0.3
134 BuildRequires: ncurses-devel
135 BuildRequires: openssl-devel
136 BuildRequires: wrap-devel
137 BuildRequires: python
138 BuildRequires: systemtap
139 BuildRequires: tetex
140 BuildRequires: texinfo
141 BuildRequires: xfs-devel
142 BuildRequires: zlib-devel
143 BuildRequires: libaio-devel
144 BuildRequires: pam-devel
145 BuildConflicts: edit-devel
146 BuildRequires: python-devel
147 BuildRequires: icu-devel
148 BuildRequires: bzip2-devel
149 # use system jemalloc libs instead of bundled ones
150 BuildRequires: jemalloc-devel
151 # required by oqgraph v3
152 BuildRequires: boost-devel
153 BuildRequires: judy-devel
154 # required by cassandra
155 BuildRequires: thrift-devel
156 # external pcre, 10.0.9+
157 # https://bugs.mageia.org/show_bug.cgi?id=12665
158 BuildRequires: pcre-devel >= 8.34-2
159 BuildRequires: pcreposix-devel >= 8.34-2
160
161 %description
162 The MariaDB software delivers a very fast, multi-threaded, multi-user, and
163 robust SQL (Structured Query Language) database server. MariaDB Server is
164 intended for mission-critical, heavy-load production systems as well as for
165 embedding into mass-deployed software.
166
167 The mariadb server is compiled with the following storage engines:
168
169 - Aria Storage Engine
170 - Archive Storage Engine
171 - Blackhole Storage Engine
172 - CSV Storage Engine
173 - FederatedX Storage Engine (Federated replacement)
174 - Heap Storage Engine
175 - MyISAM Storage Engine
176 - MyISAMMRG Storage Engine
177 - Partition Storage Engine
178 - Perfschema Storage Engine
179 - Percona XtraDB Storage Engine (InnoDB replacement)
180
181 A multitude of storage engines and handlers are being provided in separate sub
182 packages such as:
183
184 mariadb-cassandra - Cassandra Storage Engine
185 mariadb-feedback - Feedback Storage Engine
186 mariadb-oqgraph - Open Query GRAPH computation engine
187 mariadb-connect - CONNECT handler
188 mariadb-sphinx - Sphinx Storage Engine
189 mariadb-sequence - Sequence Storage Engine
190 mariadb-spider - Spider Storage Engine
191
192 The following extra storage engines are provided by the mariadb-extra package
193
194 - handlersocket
195 - query_cache_info
196
197 The following storage engines are provided in the mariadb-obsolete package
198
199 - Federated Storage Engine
200
201 %package -n mysql-MariaDB
202 Summary: A MySQL drop-in replacement
203 Group: System/Servers
204 Requires: %{name}%{_isa}
205
206 %description -n mysql-MariaDB
207 MariaDB is a complete MySQL drop-in replacement with additional fixes and
208 storage engines.
209
210 This package is used as a transitional virtual package, which requires
211 MariaDB so that people who used to use mysql can find it nicely.
212
213 %package cassandra
214 Summary: Cassandra Storage Engine
215 Group: System/Servers
216 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
217 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
218
219 %description cassandra
220 The Cassandra Storage Engine allows access to data in a Cassandra cluster from
221 MariaDB.
222
223 %package feedback
224 Summary: Feedback storage engine
225 Group: System/Servers
226 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
227 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
228
229 %description feedback
230 MariaDB feedback storage engine submits feedback about your mariadb server.
231 Results can be seen on http://mariadb.org/feedback_plugin/ .
232
233 %package oqgraph
234 Summary: Open Query GRAPH computation engine
235 Group: System/Servers
236 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
237 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
238 Conflicts: mariadb-extra < 10.0.7
239
240 %description oqgraph
241 The Open Query GRAPH computation engine allows you to handle hierarchies
242 (tree structures) and complex graphs (nodes having many connections in
243 several directions).
244
245 %package connect
246 Summary: CONNECT handler
247 Group: System/Servers
248 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
249 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
250
251 %description connect
252 The CONNECT handler enables MariaDB to access external local or remote data.
253 This is done by defining tables based on different data types, in particular
254 files of various format, data extracted from other products (such as Excel),
255 or data retrieved from the environment (for example DIR, WMI, and MAC tables).
256
257 This handler supports MariaDB virtual columns and also permits to define
258 “special” columns such as ROWID and FILEID.
259
260 %package sphinx
261 Summary: Sphinx Storage Engine
262 Group: System/Servers
263 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
264 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
265 Conflicts: mariadb-extra < 10.0.7
266 Suggests: sphinx >= 2.1.5
267
268 %description sphinx
269 SphinxSE is a storage engine that talks to searchd (Sphinx daemon) to enable
270 full text searching.
271
272 %package sequence
273 Summary: Sequence Storage Engine
274 Group: System/Servers
275 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
276 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
277
278 %description sequence
279 A Sequence engine allows the creation of ascending or descending sequences of
280 numbers with a given starting value, ending value and increment.
281
282 It creates completely virtual, ephemeral tables automatically when you need
283 them. There is no way to create a Sequence table explicitly. Nor are they ever
284 written to disk or create .frm files. They are read-only, transactional, and
285 support XA.
286
287 %package spider
288 Summary: Spider Storage Engine
289 Group: System/Servers
290 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
291 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
292
293 %description spider
294 The Spider storage engine supports partitioning and xa transactions, and allows
295 tables of different MariaDB instances to be handled as if they were on the same
296 instance.
297
298 %package extra
299 Summary: MariaDB extra storage engines
300 Group: System/Servers
301 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
302 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
303
304 %description extra
305 This package provides various storage engines/handlers such as:
306
307 - handlersocket
308 - query_cache_info
309
310 %package obsolete
311 Summary: MariaDB obsolete storage engines
312 Group: System/Servers
313 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
314 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
315 Conflicts: mysql-core < 5.5.18
316
317 %description obsolete
318 MariaDB obsolete storage engines. Federated are being replaced by XtraDB and
319 FederatedX storage engines. These obsolete storage engines are provided in
320 case you need the vanilla mysql storage engines.
321
322 %package core
323 Summary: Server core binary
324 Group: System/Servers
325 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
326 Provides: mysql-core = %{version}-%{release}
327 Obsoletes: mysql-core < %{version}-%{release}
328
329 %description core
330 Core mysqld server binary. For a full MariaDB database server, install
331 package 'mariadb'.
332
333 %package common-core
334 Summary: Common files required by core binary
335 Group: System/Servers
336 Provides: mysql-common-core = %{version}-%{release}
337 Obsoletes: mysql-common-core < %{version}-%{release}
338
339 %description common-core
340 Common files minimally required by mysqld server binary.
341
342 %package common
343 Summary: Common files
344 Group: System/Servers
345 Requires(post): rpm-helper
346 Requires(preun): rpm-helper
347 Requires(pre): rpm-helper
348 Requires(postun): rpm-helper
349 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
350 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
351 Requires: %{name}-client%{_isa} >= %{version}-%{release}
352 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
353 Provides: mysql-common = %{version}-%{release}
354 Obsoletes: mysql-common < %{version}-%{release}
355
356 %description common
357 Common files for the MariaDB database server.
358
359 %package client
360 Summary: Client
361 Group: Databases
362 Requires(post): %{libname}%{_isa} >= %{version}-%{release}
363 Requires(preun): %{libname}%{_isa} >= %{version}-%{release}
364 Requires: %{libname}%{_isa} >= %{version}-%{release}
365 Provides: mysql-client = %{version}-%{release}
366 Obsoletes: mysql-client < %{version}-%{release}
367
368 %description client
369 This package contains the standard MariaDB clients.
370
371 %package bench
372 Summary: Benchmarks and test system
373 Group: System/Servers
374 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
375 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
376 Requires: %{name}-client%{_isa} >= %{version}-%{release}
377 Suggests: %{name}%{_isa} >= %{version}-%{release}
378 Provides: mysql-bench = %{version}-%{release}
379 Obsoletes: mysql-bench < %{version}-%{release}
380 Conflicts: mariadb < 10.0.7
381
382 %description bench
383 This package contains MariaDB benchmark scripts and data.
384
385 %package -n %{libname}
386 Summary: Shared libraries
387 Group: System/Libraries
388 Provides: %{name}-shared-libs = %{version}-%{release}
389 Provides: %{name}-shared = %{version}-%{release}
390 Provides: %{mysql_libname} = %{version}-%{release}
391 Obsoletes: %{mysql_libname} < %{version}-%{release}
392
393 %description -n %{libname}
394 This package contains the shared libraries (*.so*) which certain languages and
395 applications need to dynamically load and use MariaDB.
396
397 %package -n %{develname}
398 Summary: Development header files and libraries
399 Group: Development/Other
400 Requires(post): %{libname} >= %{version}-%{release}
401 Requires(preun): %{libname} >= %{version}-%{release}
402 Requires(post): %{name}-common%{_isa} >= %{version}-%{release}
403 Requires(preun): %{name}-common%{_isa} >= %{version}-%{release}
404 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
405 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
406 Requires: %{libname} = %{version}-%{release}
407 Requires: %{name}-common%{_isa} >= %{version}-%{release}
408 Requires: %{name}-client%{_isa} >= %{version}-%{release}
409 Provides: %{name}-devel = %{version}-%{release}
410 Provides: %{libname}-devel = %{version}-%{release}
411 Obsoletes: %{libname}-devel < %{version}-%{release}
412 Obsoletes: %{old_staticdevelname} < %{version}-%{release}
413 Provides: %{mysql_develname} = %{version}-%{release}
414 Obsoletes: %{mysql_develname} < %{version}-%{release}
415 Provides: mysql-devel = %{version}-%{release}
416
417 %description -n %{develname}
418 This package contains the development header files and libraries necessary to
419 develop MariaDB client applications.
420
421 %package -n %{libmariadbembedded}
422 Summary: MariaDB as an embeddable library
423 Group: System/Libraries
424 Provides: %{name}-embedded = %{version}-%{release}
425 Obsoletes: %{name}-embedded < %{version}-%{release}
426 Provides: %{libmysqlembedded} = %{version}-%{release}
427 Obsoletes: %{libmysqlembedded} < %{version}-%{release}
428
429 %description -n %{libmariadbembedded}
430 MariaDB is a multi-user, multi-threaded SQL database server. This
431 package contains a version of the MariaDB server that can be embedded
432 into a client application instead of running as a separate process.
433
434 The API is identical for the embedded MariaDB version and the client/server
435 version.
436
437 %package -n %{libmariadbembedded_devel}
438 Summary: Development files for MySQL as an embeddable library
439 Group: Development/Other
440 Provides: %{name}-embedded-devel = %{version}-%{release}
441 Obsoletes: %{name}-embedded-devel < %{version}-%{release}
442 Requires: %{libmariadbembedded} = %{version}-%{release}
443 Requires: %{develname} = %{version}-%{release}
444 Provides: %{libmysqlembedded_devel} = %{version}-%{release}
445 Obsoletes: %{libmysqlembedded_devel} < %{version}-%{release}
446 Provides: mysql-embedded-devel = %{version}-%{release}
447
448 %description -n %{libmariadbembedded_devel}
449 MariaDB is a multi-user, multi-threaded SQL database server. This
450 package contains files needed for developing and testing with
451 the embedded version of the MariaDB server.
452
453 The API is identical for the embedded MariaDB version and the client/server
454 version.
455
456
457 %prep
458 %setup -q
459 %patch1 -p1
460 %patch3 -p1
461 %patch101 -p1
462 %patch106 -p1
463 %patch107 -p1
464
465 # no bundled pcre
466 rm -rf pcre
467
468 mkdir -p Mageia
469 cp %{SOURCE3} Mageia/my.cnf
470
471 # remove the sql_yacc.cc file so that bison will regenerate it properly, even if it's patched
472 rm -f sql/sql_yacc.cc
473
474 # lib64 fix
475 perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf
476
477 # antiborker
478 perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/*
479 perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/*
480 perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/*
481 perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/*
482 perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db*
483
484 # this may be part of the problems with mysql-test
485 # http://bugs.mysql.com/bug.php?id=52223
486 #perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl
487 #perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl
488
489 # workaround for upstream bug #56342
490 rm -f mysql-test/t/ssl_8k_key-master.opt
491 rm -f mysql-test/t/file_contents.test
492
493 # fix distribution name
494 sed -i 's/Source distribution/%{_vendor} MariaDB Server/' mysql-test/suite/percona/innodb_sys_index.result
495
496 %build
497
498 ## MariaDB
499 %serverbuild
500 export CFLAGS="${CFLAGS:-%{optflags}}"
501 export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
502 export FFLAGS="${FFLAGS:-%{optflags}}"
503 export LC_ALL=C
504
505 %cmake \
506 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
507 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
508 -DINSTALL_SBINDIR=sbin \
509 -DMYSQL_DATADIR=/var/lib/mysql \
510 -DSYSCONFDIR=%{_sysconfdir} \
511 -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \
512 -DINSTALL_MANDIR=share/man \
513 -DINSTALL_SHAREDIR=share/mysql \
514 -DINSTALL_LIBDIR=%{_lib} \
515 -DINSTALL_INCLUDEDIR=include/mysql \
516 -DINSTALL_INFODIR=share/info \
517 -DINSTALL_MYSQLDATADIR=/var/lib/mysql \
518 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
519 -DINSTALL_SQLBENCHDIR=share/mysql \
520 -DINSTALL_SUPPORTFILESDIR=share/mysql \
521 -DINSTALL_MYSQLSHAREDIR=share/mysql \
522 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
523 -DWITH_READLINE=0 \
524 -DWITH_LIBEDIT=0 \
525 -DWITH_LIBWRAP=1 \
526 -DWITH_SSL=system \
527 -DWITH_ZLIB=system \
528 -DWITH_PRCE=system \
529 -DWITH_PIC=1 \
530 -DMYSQL_TCP_PORT=3306 \
531 -DEXTRA_CHARSETS=all \
532 -DENABLED_LOCAL_INFILE=1 \
533 -DENABLE_DTRACE=1 \
534 -DWITH_EMBEDDED_SERVER=1 \
535 -DMYSQL_USER=%{muser} \
536 %if %{build_debug}
537 -DWITH_DEBUG=1 \
538 %else
539 -DWITH_DEBUG=0 \
540 %endif
541 -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \
542 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
543 -DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \
544 -DWITHOUT_DAEMON_EXAMPLE=1 \
545 -DWITH_PLUGIN_PBXT=0 \
546 -DFEATURE_SET="community" \
547 -DRPM=1 \
548 -DCOMPILATION_COMMENT="%{_vendor} MariaDB Server"
549
550 %make VERBOSE=1
551
552 %install
553 rm -rf %{buildroot}
554
555 # don't fiddle with the initscript!
556 export DONT_GPRINTIFY=1
557
558 %if %{build_debug}
559 export DONT_STRIP=1
560 %endif
561
562 install -d %{buildroot}%{_sysconfdir}/sysconfig
563 install -d %{buildroot}%{_var}/log/mysqld
564 install -d %{buildroot}/var/lib/mysql/{mysql,test}
565
566 %makeinstall_std -C build
567
568 # exclude loaddata7 from being converted
569 export EXCLUDE_FROM_EOL_CONVERSION="std_data/loaddata7.dat"
570
571 # install configuration files
572 install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
573
574 install -m 0644 -D %{SOURCE10} %{buildroot}%{_tmpfilesdir}/mysql.conf
575 install -m 0644 -D %{SOURCE11} %{buildroot}%{_unitdir}/mysqld.service
576 install -m 0755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir
577 install -m 0755 %{SOURCE13} %{buildroot}%{_sbindir}/mysqld-wait-ready
578
579 # cleanup some config files
580 rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/cassandra.cnf \
581 %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf \
582 %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf
583
584 # magic by anssi
585 pushd %{buildroot}%{_sysconfdir}/my.cnf.d
586 %{expand:%(for i in {50..73}; do echo "install -m 644 %%SOURCE$i ."; done)}
587 popd
588
589 # bork
590 mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
591
592 pushd %{buildroot}%{_bindir}
593 ln -sf mysqlcheck mysqlrepair
594 ln -sf mysqlcheck mysqlanalyze
595 ln -sf mysqlcheck mysqloptimize
596 popd
597
598 # nuke -Wl,--as-needed from the mysql_config file
599 perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
600
601 # cmake generates some completely wacko references to -lprobes_mysql when
602 # building with dtrace support. Haven't found where to shut that off,
603 # so resort to this blunt instrument. While at it, let's not reference
604 # libmysqlclient_r anymore either.
605 sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
606 %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
607 cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
608 chmod 755 %{buildroot}%{_bindir}/mysql_config
609 install -m 0755 -d %{buildroot}/var/lib/mysql
610
611 # Remove libmysqld.a, + hardlink libmysqld.so.%{libmysqlembedded_major} so that it's provided
612 rm -f %{buildroot}%{_libdir}/libmysqld.a
613 ln %{buildroot}%{_libdir}/libmysqld.so.%{major} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor}
614 ln -s libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}
615
616 # missing header
617 install -m0644 build/include/probes_mysql_dtrace.h %{buildroot}%{_includedir}/mysql/
618 cp -rp %{buildroot}%{_datadir}/mysql/english %{buildroot}%{_datadir}/mysql/default
619
620 # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
621 # but that really doesn't work (wrong soname in particular). We'll keep
622 # just the devel libmysqlclient_r.so link, so that rebuilding without any
623 # source change is enough to get rid of dependency on libmysqlclient_r.
624 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
625 ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
626
627 # remove static libs
628 rm -f %{buildroot}%{_libdir}/libmysqlclient.a
629 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a
630
631 # mysql-test includes one executable that doesn't belong under /usr/share,
632 # so move it and provide a symlink
633 mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
634 ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
635
636 # mysql client statically built against a local embedded library, pretty useless
637 rm -f %{buildroot}%{_bindir}/mysql_embedded
638
639 # this command enables plugins, but needs ini file + configuration in my.cnf
640 # before executing... and oh yeah, mysql must be stopped... => useless
641 # however, apparently tests seem to want it, even thought they don't use it.
642 #rm -f %{buildroot}%{_bindir}/mysql_plugin
643 rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
644
645 # no RHEL4 selinux files for us
646 rm -rf %{buildroot}%{_datadir}/mysql/SELinux
647 # no solaris files for us
648 rm -rf %{buildroot}%{_datadir}/mysql/solaris
649 # no init script for us
650 rm -f %{buildroot}%{_initrddir}/mysql
651 rm -f %{buildroot}%{_initrddir}/mysqld
652
653 # house cleaning
654 rm -rf %{buildroot}%{_datadir}/info
655 rm -f %{buildroot}%{_bindir}/client_test
656 rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
657 rm -f %{buildroot}%{_bindir}/make_win_src_distribution
658 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
659 rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
660 rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
661 rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
662 rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
663 rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
664 rm -f %{buildroot}%{_datadir}/mysql/mysql.server
665 rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
666 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
667 rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
668 rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
669 rm -f %{buildroot}%{_datadir}/mysql/magic
670
671 # no idea how to fix this
672 rm -rf %{buildroot}%{_prefix}/data
673 rm -rf %{buildroot}%{_prefix}/docs
674 rm -rf %{buildroot}%{_prefix}/scripts
675 rm -rf %{buildroot}%{_datadir}/doc
676 rm -rf %{buildroot}%{_sysconfdir}/init.d/mysql
677 rm -rf %{buildroot}%{_sysconfdir}/logrotate.d/mysql
678
679 %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
680 %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
681
682 cat > README.urpmi <<EOF
683
684 NOTE: MariaDB is installed without root password, it is recommended to set the
685 root password with the following command as soon as possible:
686
687 mysqladmin password
688
689 The initscript used to start mysql has been reverted to use the one shipped
690 by MariaDB. This means the following changes:
691
692 * The generation of the initial system mysql database is now done when mysql
693 is started from the initscript and only if the /var/lib/mysql/mysql
694 directory is empty (mysql_install_db). Previousely this was quite hidden and
695 silently done at (rpm) install time. As a consequence to this change you may
696 have to perform some manual tasks to upgrade the mysql system database and
697 such. So, doing something like this might help you:
698
699 systemctl stop mysqld.service
700 TMPDIR=/var/tmp mysql_install_db
701 mysql_upgrade --skip-write-binlog
702
703 The cluster functionalities (ndb) has been deactivated and will be removed in
704 future mysql versions. Oracle has a new product named mysql-cluster that
705 replaces the cluster functionalities.
706
707 The mysql-common-core package ships with a default /etc/my.cnf file that is
708 based on the my-medium.cnf file that comes with the source code.
709 EOF
710
711 ################################################################################
712 # run the tests
713 %if %{build_test}
714 # disable failing tests
715 pushd build/mysql-test
716 export LANG=C
717 export LC_ALL=C
718 export LANGUAGE=C
719 perl ./mysql-test-run.pl \
720 --mtr-build-thread="$((${RANDOM} % 100))" \
721 --retry=0 \
722 --ssl \
723 --big-test \
724 --force \
725 --max-test-fail=0 \
726 --testcase-timeout=60 \
727 --suite-timeout=1200 || false
728 popd
729 %endif
730
731 %pre
732 # enable plugins
733 if [ -f %{_sysconfdir}/my.cnf ]; then
734 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
735 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
736 # switch to federatedx provider
737 perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
738 fi
739
740 %pre common
741 # delete the mysql group if no mysql user is found, before adding the user
742 if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
743 %{_sbindir}/groupdel %{muser} 2> /dev/null || :
744 fi
745
746 %_pre_useradd %{muser} /var/lib/mysql /bin/bash
747
748 %post
749 %_tmpfilescreate mysql
750 %_post_service mysqld
751
752 %preun
753 %_preun_service mysqld
754
755 %postun
756 %_post_service mysqld
757
758 %pre common-core
759 # enable plugins
760 if [ -f %{_sysconfdir}/my.cnf ]; then
761 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
762 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
763 # switch to federatedx provider
764 perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
765 fi
766
767 %files
768 %doc README.urpmi
769 # authentication plugins
770 %config(noreplace) %{_sysconfdir}/my.cnf.d/auth_pam.cnf
771 %config(noreplace) %{_sysconfdir}/my.cnf.d/auth_socket.cnf
772 %config(noreplace) %{_sysconfdir}/my.cnf.d/dialog.cnf
773 %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql_clear_password.cnf
774 # replication plugins
775 %config(noreplace) %{_sysconfdir}/my.cnf.d/semisync_master.cnf
776 %config(noreplace) %{_sysconfdir}/my.cnf.d/semisync_slave.cnf
777 # storage engines
778 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_archive.cnf
779 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_blackhole.cnf
780 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_federatedx.cnf
781 # sql logging plugin
782 %config(noreplace) %{_sysconfdir}/my.cnf.d/sql_errlog.cnf
783 # new since 10.x
784 %config(noreplace) %{_sysconfdir}/my.cnf.d/locales.cnf
785 %config(noreplace) %{_sysconfdir}/my.cnf.d/metadata_lock_info.cnf
786 %config(noreplace) %{_sysconfdir}/my.cnf.d/query_response_time.cnf
787 %config(noreplace) %{_sysconfdir}/my.cnf.d/server_audit.cnf
788
789 %{_tmpfilesdir}/mysql.conf
790 %{_unitdir}/mysqld.service
791 %{_sbindir}/mysqld-prepare-db-dir
792 %{_sbindir}/mysqld-wait-ready
793 %dir %{_libdir}/mysql/plugin
794 # authentication plugins
795 %{_libdir}/mysql/plugin/auth_pam.so
796 %{_libdir}/mysql/plugin/auth_socket.so
797 %{_libdir}/mysql/plugin/dialog.so
798 %{_libdir}/mysql/plugin/mysql_clear_password.so
799 # replication plugins
800 %{_libdir}/mysql/plugin/semisync_master.so
801 %{_libdir}/mysql/plugin/semisync_slave.so
802 # storage engines
803 %{_libdir}/mysql/plugin/ha_archive.so
804 %{_libdir}/mysql/plugin/ha_blackhole.so
805 %{_libdir}/mysql/plugin/ha_federatedx.so
806 # sql logging plugin
807 %{_libdir}/mysql/plugin/sql_errlog.so
808 # new since 10.x
809 %{_libdir}/mysql/plugin/locales.so
810 %{_libdir}/mysql/plugin/metadata_lock_info.so
811 %{_libdir}/mysql/plugin/query_response_time.so
812 %{_libdir}/mysql/plugin/server_audit.so
813
814 %files -n mysql-MariaDB
815
816 %files obsolete
817 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_innodb.cnf
818 %{_libdir}/mysql/plugin/ha_innodb.so
819 %{_libdir}/mysql/plugin/ha_federated.so
820
821 %files cassandra
822 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_cassandra.cnf
823 %{_libdir}/mysql/plugin/ha_cassandra.so
824
825 %files feedback
826 %config(noreplace) %{_sysconfdir}/my.cnf.d/feedback.cnf
827 %{_libdir}/mysql/plugin/feedback.so
828
829 %files oqgraph
830 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_oqgraph.cnf
831 %{_libdir}/mysql/plugin/ha_oqgraph.so
832
833 %files connect
834 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_connect.cnf
835 %{_libdir}/mysql/plugin/ha_connect.so
836
837 %files sphinx
838 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_sphinx.cnf
839 %{_libdir}/mysql/plugin/ha_sphinx.so
840
841 %files sequence
842 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_sequence.cnf
843 %{_libdir}/mysql/plugin/ha_sequence.so
844
845 %files spider
846 %config(noreplace) %{_sysconfdir}/my.cnf.d/ha_spider.cnf
847 %{_libdir}/mysql/plugin/ha_spider.so
848 %{_datadir}/mysql/install_spider.sql
849
850 %files extra
851 %config(noreplace) %{_sysconfdir}/my.cnf.d/handlersocket.cnf
852 %config(noreplace) %{_sysconfdir}/my.cnf.d/query_cache_info.cnf
853 %{_libdir}/mysql/plugin/handlersocket.so
854 # new optional functionality
855 %{_libdir}/mysql/plugin/query_cache_info.so
856
857 %files client
858 %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
859 %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf
860 %{_bindir}/msql2mysql
861 %{_bindir}/mysql
862 %{_bindir}/mysqlaccess
863 %{_bindir}/mysqladmin
864 %{_bindir}/mysqlanalyze
865 %{_bindir}/mysqlbinlog
866 %{_bindir}/mysqlcheck
867 %{_bindir}/mysqldump
868 %{_bindir}/mysqldumpslow
869 %{_bindir}/mysql_find_rows
870 %{_bindir}/mysqlimport
871 %{_bindir}/mysqloptimize
872 %{_bindir}/mysqlrepair
873 %{_bindir}/mysqlshow
874 %{_bindir}/mysqlslap
875 %{_bindir}/mysql_waitpid
876 %{_mandir}/man1/msql2mysql.1*
877 %{_mandir}/man1/myisam_ftdump.1*
878 %{_mandir}/man1/mysql.1*
879 %{_mandir}/man1/mysqlaccess.1*
880 %{_mandir}/man1/mysqladmin.1*
881 %{_mandir}/man1/mysqlbinlog.1*
882 %{_mandir}/man1/mysqlcheck.1*
883 %{_mandir}/man1/mysqldump.1*
884 %{_mandir}/man1/mysqldumpslow.1*
885 %{_mandir}/man1/mysql_find_rows.1*
886 %{_mandir}/man1/mysqlimport.1*
887 %{_mandir}/man1/mysqlshow.1*
888 %{_mandir}/man1/mysql_waitpid.1*
889
890 %files bench
891 %doc build/sql-bench/README
892 %{_bindir}/my_safe_process
893 %{_bindir}/mysql_client_test
894 %{_bindir}/mysql_client_test_embedded
895 %{_bindir}/mysqltest_embedded
896 %{_datadir}/mysql/sql-bench
897 %attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test
898 %{_mandir}/man1/mysql-stress-test.pl.1*
899 %{_mandir}/man1/mysql-test-run.pl.1*
900 %{_mandir}/man1/mysql_client_test.1*
901 %{_mandir}/man1/mysql_client_test_embedded.1*
902 %{_mandir}/man1/mysqltest.1*
903 %{_mandir}/man1/mysqltest_embedded.1*
904 %{_libdir}/mysql/plugin/adt_null.so
905 %{_libdir}/mysql/plugin/auth_0x0100.so
906 %{_libdir}/mysql/plugin/auth_test_plugin.so
907 %{_libdir}/mysql/plugin/dialog_examples.so
908 %{_libdir}/mysql/plugin/ha_test_sql_discovery.so
909 %{_libdir}/mysql/plugin/mypluglib.so
910 %{_libdir}/mysql/plugin/qa_auth_client.so
911 %{_libdir}/mysql/plugin/qa_auth_interface.so
912 %{_libdir}/mysql/plugin/qa_auth_server.so
913
914 %files core
915 %{_sbindir}/mysqld
916
917 %files common-core
918 %config(noreplace) %{_sysconfdir}/my.cnf.d/server.cnf
919 %config(noreplace) %{_sysconfdir}/my.cnf
920 %dir %{_datadir}/mysql
921 %{_datadir}/mysql/english
922 %{_datadir}/mysql/charsets
923
924 %files common
925 %doc README COPYING
926 %dir %{_sysconfdir}/my.cnf.d
927 %{_bindir}/aria_chk
928 %{_bindir}/aria_dump_log
929 %{_bindir}/aria_ftdump
930 %{_bindir}/aria_pack
931 %{_bindir}/aria_read_log
932 %{_bindir}/innochecksum
933 %{_bindir}/myisamchk
934 %{_bindir}/myisam_ftdump
935 %{_bindir}/myisamlog
936 %{_bindir}/myisampack
937 %{_bindir}/my_print_defaults
938 %{_bindir}/mysqlbug
939 %{_bindir}/mysql_convert_table_format
940 %{_bindir}/mysqld_multi
941 %{_bindir}/mysqld_safe
942 %{_bindir}/mysql_fix_extensions
943 %{_bindir}/mysqlhotcopy
944 %{_bindir}/mysql_install_db
945 %{_bindir}/mysql_plugin
946 %{_bindir}/mysql_secure_installation
947 %{_bindir}/mysql_setpermission
948 %{_bindir}/mysqltest
949 %{_bindir}/mysql_tzinfo_to_sql
950 %{_bindir}/mysql_upgrade
951 %{_bindir}/mysql_zap
952 %{_bindir}/mytop
953 %{_bindir}/perror
954 %{_bindir}/replace
955 %{_bindir}/resolveip
956 %{_bindir}/resolve_stack_dump
957 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql
958 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/mysql
959 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/test
960 %attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
961 %{_datadir}/mysql/*.cnf
962 %{_datadir}/mysql/fill_help_tables.sql
963 %{_datadir}/mysql/mysql_performance_tables.sql
964 %{_datadir}/mysql/mysql_system_tables.sql
965 %{_datadir}/mysql/mysql_system_tables_data.sql
966 %{_datadir}/mysql/mysql_test_data_timezone.sql
967 %{_datadir}/mysql/errmsg-utf8.txt
968 %{_datadir}/mysql/czech
969 %{_datadir}/mysql/danish
970 %{_datadir}/mysql/dutch
971 %{_datadir}/mysql/estonian
972 %{_datadir}/mysql/french
973 %{_datadir}/mysql/german
974 %{_datadir}/mysql/greek
975 %{_datadir}/mysql/hungarian
976 %{_datadir}/mysql/italian
977 %{_datadir}/mysql/japanese
978 %{_datadir}/mysql/korean
979 %{_datadir}/mysql/norwegian
980 %{_datadir}/mysql/norwegian-ny
981 %{_datadir}/mysql/polish
982 %{_datadir}/mysql/portuguese
983 %{_datadir}/mysql/romanian
984 %{_datadir}/mysql/russian
985 %{_datadir}/mysql/serbian
986 %{_datadir}/mysql/slovak
987 %{_datadir}/mysql/spanish
988 %{_datadir}/mysql/swedish
989 %{_datadir}/mysql/ukrainian
990 %{_mandir}/man1/innochecksum.1*
991 %{_mandir}/man1/myisamchk.1*
992 %{_mandir}/man1/myisamlog.1*
993 %{_mandir}/man1/myisampack.1*
994 %{_mandir}/man1/my_print_defaults.1*
995 %{_mandir}/man1/mysqlbug.1*
996 %{_mandir}/man1/mysql_convert_table_format.1*
997 %{_mandir}/man1/mysqld_multi.1*
998 %{_mandir}/man1/mysqld_safe.1*
999 %{_mandir}/man1/mysql_fix_extensions.1*
1000 %{_mandir}/man1/mysqlhotcopy.1*
1001 %{_mandir}/man1/mysql_install_db.1*
1002 %{_mandir}/man1/mysql_plugin.1*
1003 %{_mandir}/man1/mysql_secure_installation.1*
1004 %{_mandir}/man1/mysql.server.1*
1005 %{_mandir}/man1/mysql_setpermission.1*
1006 %{_mandir}/man1/mysqlslap.1*
1007 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
1008 %{_mandir}/man1/mysql_upgrade.1*
1009 %{_mandir}/man1/mysql_zap.1*
1010 %{_mandir}/man1/perror.1*
1011 %{_mandir}/man1/replace.1*
1012 %{_mandir}/man1/resolveip.1*
1013 %{_mandir}/man1/resolve_stack_dump.1*
1014 %{_mandir}/man8/mysqld.8*
1015
1016 %files -n %{libname}
1017 %{_libdir}/libmysqlclient.so.%{major}*
1018
1019 %files -n %{develname}
1020 %doc INSTALL-SOURCE
1021 %multiarch %{multiarch_bindir}/mysql_config
1022 %{_bindir}/mysql_config
1023 %{_libdir}/libmysqlclient_r.so
1024 %{_libdir}/libmysqlclient.so
1025 %dir %{_includedir}/mysql
1026 %dir %{_includedir}/mysql/psi
1027 %{_includedir}/mysql/*.h
1028 %{_includedir}/mysql/private/*.h
1029 %{_includedir}/mysql/private/atomic/*.h
1030 %{_includedir}/mysql/psi/*.h
1031 %multiarch %{multiarch_includedir}/mysql/my_config.h
1032 %{_mandir}/man1/mysql_config.1*
1033 %{_datadir}/aclocal/mysql.m4
1034 # mysqlservices library is static, because it doesn't contain any code
1035 # itself, and is meant to be statically linked to all plugins.
1036 %{_libdir}/libmysqlservices.a
1037
1038 %files -n %{libmariadbembedded}
1039 %doc README COPYING
1040 %{_datadir}/mysql/default
1041 %{_libdir}/libmysqld.so.%{major}
1042 %{_libdir}/libmysqld.so.%{libmysqlembedded_major}*
1043
1044 %files -n %{libmariadbembedded_devel}
1045 %{_libdir}/libmysqld.so
1046 %{_bindir}/mysql_client_test_embedded
1047 %{_bindir}/mysqltest_embedded
1048 %{_mandir}/man1/mysql_client_test_embedded.1*
1049 %{_mandir}/man1/mysqltest_embedded.1*

  ViewVC Help
Powered by ViewVC 1.1.26