]> TLD Linux GIT Repositories - packages/mysql.git/blob - mysql.spec
- fix building with OpenSSL 3.0, no R(triggerpostun) in rpm.org
[packages/mysql.git] / mysql.spec
1 # TODO:
2 # - mysqldump ... (invalid usage) prints to stdout not stderr (idiotic if you want to create dump and get usage in .sql)
3 # - http://bugs.mysql.com/bug.php?id=16470
4 # - innodb are dynamic (= as plugins) ?
5 # - missing have_archive, have_merge
6 # - is plugin_dir lib64 safe?
7 # - Using NDB Cluster... could not find sci transporter in /{include, lib}
8 # - !!! Makefiles for libmysqld.so !!!
9 # - segfaults on select from non-mysql user (caused by builder environment):
10 #     https://bugs.launchpad.net/pld-linux/+bug/381904
11 #     (profiling disabled temporaily to workaround this)
12 # - unpackaged files:
13 #        /usr/COPYING.AGPLv3
14 #        /usr/COPYING.GPLv2
15 #        /usr/PATENTS
16 #        /usr/README.md
17 #        /usr/bin/mysqlxtest
18 #        /usr/include/backup.h
19 # NOTE:
20 # - mysql 'root' user will be 'root' not 'mysql' with 5.7 package
21 #   this is to make pld consistent what the rest of the world uses.
22 #
23 # Conditional build:
24 %bcond_with     autodeps        # BR packages needed only for resolving deps
25 %bcond_without  innodb          # InnoDB storage engine support
26 %bcond_without  big_tables      # Support tables with more than 4G rows even on 32 bit platforms
27 %bcond_without  federated       # Federated storage engine support
28 %bcond_without  raid            # RAID support
29 %bcond_without  ssl             # OpenSSL support
30 %bcond_with     systemtap       # systemtap/dtrace probes
31 %bcond_without  tcpd            # libwrap (tcp_wrappers) support
32 %bcond_with     sphinx          # Sphinx storage engine support
33 %bcond_with     tokudb          # TokuDB
34 %bcond_without  rocksdb         # RocksDB
35 # mysql needs boost 1.59.0 and doesn't support newer/older boost versions
36 %bcond_with     system_boost    # Use system boost package
37 %bcond_with     tests           # FIXME: don't run correctly
38 %bcond_with     ndb             # NDB is now a separate product, this here is broken, so disable it
39 %bcond_with     coredumper      # coredumper support
40
41 # tokudb is only supported on x86_64
42 %ifnarch %{x8664}
43 %undefine       with_rocksdb
44 %undefine       with_tokudb
45 %endif
46
47 %define         rel     2
48 %define         percona_rel     40
49 Summary:        MySQL: a very fast and reliable SQL database engine
50 Summary(de.UTF-8):      MySQL: ist eine SQL-Datenbank
51 Summary(fr.UTF-8):      MySQL: un serveur SQL rapide et fiable
52 Summary(pl.UTF-8):      MySQL: bardzo szybka i niezawodna baza danych (SQL)
53 Summary(pt_BR.UTF-8):   MySQL: Um servidor SQL rápido e confiável
54 Summary(ru.UTF-8):      MySQL - быстрый SQL-сервер
55 Summary(uk.UTF-8):      MySQL - швидкий SQL-сервер
56 Summary(zh_CN.UTF-8):   MySQL数据库服务器
57 Name:           mysql
58 Version:        5.7.37
59 Release:        %{percona_rel}.%{rel}
60 License:        GPL + MySQL FLOSS Exception
61 Group:          Applications/Databases
62 Source0:        https://www.percona.com/downloads/Percona-Server-5.7/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz
63 # Source0-md5:  ab5a63fbe6872b719c49f1bbf091c09b
64 Source100:      http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
65 # Source100-md5:        5cac34f3d78a9d612ca4301abfcbd666
66 %if %{without system_boost}
67 Source101:      http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
68 # Source101-md5:        6aa9a5c6a4ca1016edd0ed1178e3cb87
69 %endif
70 Source1:        %{name}.init
71 Source2:        %{name}.sysconfig
72 Source3:        %{name}.logrotate
73 Source4:        mysqld.conf
74 Source5:        %{name}-clusters.conf
75 Source7:        %{name}-ndb.init
76 Source8:        %{name}-ndb.sysconfig
77 Source9:        %{name}-ndb-mgm.init
78 Source10:       %{name}-ndb-mgm.sysconfig
79 Source11:       %{name}-ndb-cpc.init
80 Source12:       %{name}-ndb-cpc.sysconfig
81 Source13:       %{name}-client.conf
82 Source14:       my.cnf
83 Patch0:         mysql-opt.patch
84 Patch1:         mysql-versioning.patch
85 Patch2:         mysql-protobuf.patch
86 Patch3:         build.patch
87 Patch4:         mysql-sphinx.patch
88 Patch5:         mysql-5.7-sphinx.patch
89 Patch6:         mysql-chain-certs.patch
90 Patch7:         mysql-dubious-exports.patch
91 Patch8:         mysql-cmake.patch
92 Patch9:         openssl-3.patch
93 URL:            https://www.percona.com/software/mysql-database/percona-server
94 BuildRequires:  bison >= 1.875
95 BuildRequires:  cmake >= 2.8.2
96 BuildRequires:  curl-devel
97 BuildRequires:  readline-devel >= 6.2
98 BuildRequires:  libstdc++-devel >= 5:4.0
99 BuildRequires:  automake
100 %{?with_system_boost:BuildRequires:     boost-devel = 1.59.0}
101 BuildRequires:  libhsclient-devel
102 %{?with_tcpd:BuildRequires:     libwrap-devel}
103 BuildRequires:  lz4-devel >= 1:1.9.3
104 BuildRequires:  mecab-devel
105 BuildRequires:  ncurses-devel >= 4.2
106 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
107 BuildRequires:  pam-devel
108 %{?with_autodeps:BuildRequires: perl-DBI}
109 BuildRequires:  perl-devel >= 1:5.6.1
110 BuildRequires:  protobuf-devel
111 BuildRequires:  python3-modules
112 BuildRequires:  rpcsvc-proto
113 BuildRequires:  rpm-perlprov >= 4.1-13
114 BuildRequires:  rpmbuild(macros) >= 1.597
115 BuildRequires:  sed >= 4.0
116 %{?with_systemtap:BuildRequires:        systemtap-sdt-devel}
117 BuildRequires:  zlib-devel
118 Requires(post,preun):   /sbin/chkconfig
119 Requires(postun):       /usr/sbin/groupdel
120 Requires(postun):       /usr/sbin/userdel
121 Requires(pre):  /bin/id
122 Requires(pre):  /usr/bin/getgid
123 Requires(pre):  /usr/sbin/groupadd
124 Requires(pre):  /usr/sbin/useradd
125 Requires(post): sed >= 4.0
126 Requires:       %{name}-charsets = %{version}-%{release}
127 Requires:       %{name}-libs = %{version}-%{release}
128 Requires:       /usr/bin/setsid
129 Requires:       rc-scripts >= 0.2.0
130 Suggests:       mysql-client
131 %{?with_tcpd:Suggests:  tcp_wrappers}
132 Suggests:       vim-syntax-mycnf
133 Provides:       MySQL-server
134 Provides:       group(mysql)
135 Provides:       msqlormysql
136 Provides:       user(mysql)
137 Obsoletes:      MySQL
138 Obsoletes:      mysql-server
139 Conflicts:      logrotate < 3.8.0
140 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
141
142 %define         _libexecdir     %{_sbindir}
143 %define         _localstatedir  /var/lib/mysql
144 %define         _mysqlhome      /home/services/%{name}
145
146 %description
147 MySQL is a true multi-user, multi-threaded SQL (Structured
148 Query Language) database server. SQL is the most popular database
149 language in the world. MySQL is a client/server
150 implementation that consists of a server daemon mysqld and many
151 different client programs/libraries.
152
153 The main goals of MySQL are speed, robustness and easy to
154 use. MySQL was originally developed because we at Tcx needed
155 a SQL server that could handle very big databases with magnitude
156 higher speed than what any database vendor could offer to us. We have
157 now been using MySQL since 1996 in a environment with more
158 than 40 databases, 10,000 tables, of which more than 500 have more
159 than 7 million rows. This is about 50G of mission critical data.
160
161 The base upon which MySQL is built is a set of routines that
162 have been used in a highly demanding production environment for many
163 years. While MySQL is still in development, it already offers
164 a rich and highly useful function set.
165
166 %description -l fr.UTF-8
167 MySQL est un serveur de bases de donnees SQL vraiment
168 multi-usagers et multi-taches. Le langage SQL est le langage de bases
169 de donnees le plus populaire au monde. MySQL est une
170 implementation client/serveur qui consiste en un serveur (mysqld) et
171 differents programmes/bibliotheques clientes.
172
173 Les objectifs principaux de MySQL sont: vitesse, robustesse
174 et facilite d'utilisation. MySQL fut originalement developpe
175 parce que nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait
176 gerer de tres grandes bases de donnees avec une vitesse d'un ordre de
177 magnitude superieur a ce que n'importe quel vendeur pouvait nous
178 offrir. Nous utilisons MySQL depuis 1996 dans un
179 environnement avec plus de 40 bases de donnees, 10000 tables,
180 desquelles plus de 500 ont plus de 7 millions de lignes. Ceci
181 represente environ 50G de donnees critiques.
182
183 A la base de la conception de MySQL, on retrouve une serie de
184 routines qui ont ete utilisees dans un environnement de production
185 pendant plusieurs annees. Meme si MySQL est encore en
186 developpement, il offre deja une riche et utile serie de fonctions.
187
188 %description -l pl.UTF-8
189 MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer
190 baz danych SQL. SQL jest najpopularniejszym na świecie językiem
191 używanym do baz danych. MySQL to implementacja klient/serwer
192 składająca się z demona mysqld i wielu różnych programów i bibliotek
193 klienckich.
194
195 Głównymi celami MySQL-a są szybkość, potęga i łatwość
196 użytkowania. MySQL oryginalnie był tworzony, ponieważ autorzy
197 w Tcx potrzebowali serwera SQL do obsługi bardzo dużych baz danych z
198 szybkością o wiele większą, niż mogli zaoferować inni producenci baz
199 danych. Używają go od 1996 roku w środowisku z ponad 40 bazami danych,
200 10 000 tabel, z których ponad 500 zawiera ponad 7 milionów rekordów -
201 w sumie około 50GB krytycznych danych.
202
203 Baza, na której oparty jest MySQL, składa się ze zbioru
204 procedur, które były używane w bardzo wymagającym środowisku
205 produkcyjnym przez wiele lat. Pomimo, że MySQL jest ciągle
206 rozwijany, już oferuje bogaty i użyteczny zbiór funkcji.
207
208 %description -l de.UTF-8
209 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz
210 zu Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
211 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
212 einem Primärschlüssel versehen werden. Es ist aber keine Definition
213 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
214 MySQL-Datenbank völlig allein für die (referenzielle)
215 Integrität der Daten verantwortlich. Allein durch die Nutzung externer
216 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
217 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu
218 betrachten.
219
220 %description -l pt_BR.UTF-8
221 O MySQL é um servidor de banco de dados SQL realmente
222 multiusuário e multi-tarefa. A linguagem SQL é a mais popular
223 linguagem para banco de dados no mundo. O MySQL é uma
224 implementação cliente/servidor que consiste de um servidor chamado
225 mysqld e diversos programas/bibliotecas clientes. Os principais
226 objetivos do MySQL são: velocidade, robustez e facilidade de
227 uso. O MySQL foi originalmente desenvolvido porque nós na Tcx
228 precisávamos de um servidor SQL que pudesse lidar com grandes bases de
229 dados e com uma velocidade muito maior do que a que qualquer vendedor
230 podia nos oferecer. Estamos usando o MySQL desde 1996 em um
231 ambiente com mais de 40 bases de dados com 10.000 tabelas, das quais
232 mais de 500 têm mais de 7 milhões de linhas. Isto é o equivalente a
233 aproximadamente 50G de dados críticos. A base da construção do Percona
234 Server é uma série de rotinas que foram usadas em um ambiente de
235 produção com alta demanda por muitos anos. Mesmo o MySQL
236 estando ainda em desenvolvimento, ele já oferece um conjunto de
237 funções muito ricas e úteis. Veja a documentação para maiores
238 informações.
239
240 %description -l ru.UTF-8
241 MySQL - это SQL (Structured Query Language) сервер базы
242 данных. MySQL была написана Michael'ом (monty) Widenius'ом.
243 См. файл CREDITS в дистрибутиве на предмет других участников проекта и
244 прочей информации о MySQL.
245
246 %description -l uk.UTF-8
247 MySQL - це SQL (Structured Query Language) сервер бази даних.
248 MySQL було написано Michael'ом (monty) Widenius'ом. Див. файл
249 CREDITS в дистрибутиві для інформації про інших учасників проекту та
250 іншої інформації.
251
252 %package charsets
253 Summary:        MySQL - character sets definitions
254 Summary(pl.UTF-8):      MySQL - definicje kodowań znaków
255 Group:          Applications/Databases
256
257 %description charsets
258 This package contains character sets definitions needed by both client
259 and server.
260
261 %description charsets -l pl.UTF-8
262 Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
263 klienta.
264
265 %package extras
266 Summary:        MySQL additional utilities
267 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL
268 Group:          Applications/Databases
269 Requires:       %{name}-client = %{version}-%{release}
270 Requires:       %{name}-libs = %{version}-%{release}
271
272 %description extras
273 MySQL additional utilities except Perl scripts (they may be
274 found in %{name}-extras-perl package).
275
276 %description extras -l pl.UTF-8
277 Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla
278 (które są w pakiecie %{name}-extras-perl).
279
280 %package extras-perl
281 Summary:        MySQL additional utilities written in Perl
282 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL napisane w Perlu
283 Group:          Applications/Databases
284 Requires:       %{name}-extras = %{version}-%{release}
285 Requires:       perl-DBD-mysql
286
287 %description extras-perl
288 MySQL additional utilities written in Perl.
289
290 %description extras-perl -l pl.UTF-8
291 Dodatkowe narzędzia do MySQL napisane w Perlu.
292
293 %package client
294 Summary:        MySQL - Client
295 Summary(pl.UTF-8):      MySQL - Klient
296 Summary(pt.UTF-8):      MySQL - Cliente
297 Summary(ru.UTF-8):      MySQL клиент
298 Summary(uk.UTF-8):      MySQL клієнт
299 Group:          Applications/Databases
300 Requires:       %{name}-charsets = %{version}-%{release}
301 Requires:       %{name}-libs = %{version}-%{release}
302 Requires:       readline >= 6.2
303 Obsoletes:      MySQL-client
304
305 %description client
306 This package contains the standard MySQL clients.
307
308 %description client -l fr.UTF-8
309 Ce package contient les clients MySQL standards.
310
311 %description client -l pl.UTF-8
312 Standardowe programy klienckie MySQL.
313
314 %description client -l pt_BR.UTF-8
315 Este pacote contém os clientes padrão para o MySQL.
316
317 %description client -l ru.UTF-8
318 Этот пакет содержит только клиент MySQL.
319
320 %description client -l uk.UTF-8
321 Цей пакет містить тільки клієнта MySQL.
322
323 %package libs
324 Summary:        Shared libraries for MySQL
325 Summary(pl.UTF-8):      Biblioteki współdzielone MySQL
326 Group:          Libraries
327 Obsoletes:      libmysql10
328 Obsoletes:      mysql-doc < 4.1.12
329
330 %description libs
331 Shared libraries for MySQL.
332
333 %description libs -l pl.UTF-8
334 Biblioteki współdzielone MySQL.
335
336 %package devel
337 Summary:        MySQL - development header files and other files
338 Summary(pl.UTF-8):      MySQL - Pliki nagłówkowe i inne dla programistów
339 Summary(pt.UTF-8):      MySQL - Medições de desempenho
340 Summary(ru.UTF-8):      MySQL - хедеры и библиотеки разработчика
341 Summary(uk.UTF-8):      MySQL - хедери та бібліотеки програміста
342 Group:          Development/Libraries
343 Requires:       %{name}-libs = %{version}-%{release}
344 %{?with_ssl:Requires: openssl-devel}
345 Requires:       zlib-devel
346 Obsoletes:      MySQL-devel
347 Obsoletes:      libmysql10-devel
348 Obsoletes:      webscalesql-devel
349
350 %description devel
351 This package contains the development header files and other files
352 necessary to develop MySQL client applications.
353
354 %description devel -l fr.UTF-8
355 Ce package contient les fichiers entetes et les librairies de
356 developpement necessaires pour developper des applications clientes
357 MySQL.
358
359 %description devel -l pl.UTF-8
360 Pliki nagłówkowe i inne pliki konieczne do kompilacji aplikacji
361 klienckich MySQL.
362
363 %description devel -l pt_BR.UTF-8
364 Este pacote contém os arquivos de cabeçalho (header files) e
365 bibliotecas necessárias para desenvolver aplicações clientes do
366 MySQL.
367
368 %description devel -l ru.UTF-8
369 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
370 разработки клиентских приложений.
371
372 %description devel -l uk.UTF-8
373 Цей пакет містить хедери та бібліотеки програміста, необхідні для
374 розробки програм-клієнтів.
375
376 %package static
377 Summary:        MySQL static libraries
378 Summary(pl.UTF-8):      Biblioteki statyczne MySQL
379 Summary(ru.UTF-8):      MySQL - статические библиотеки
380 Summary(uk.UTF-8):      MySQL - статичні бібліотеки
381 Group:          Development/Libraries
382 Requires:       %{name}-devel = %{version}-%{release}
383 Obsoletes:      MySQL-static
384
385 %description static
386 MySQL static libraries.
387
388 %description static -l pl.UTF-8
389 Biblioteki statyczne MySQL.
390
391 %description static -l ru.UTF-8
392 Этот пакет содержит статические библиотеки разработчика, необходимые
393 для разработки клиентских приложений.
394
395 %description static -l uk.UTF-8
396 Цей пакет містить статичні бібліотеки програміста, необхідні для
397 розробки програм-клієнтів.
398
399 %package bench
400 Summary:        MySQL - Benchmarks
401 Summary(pl.UTF-8):      MySQL - Programy testujące szybkość działania bazy
402 Summary(pt.UTF-8):      MySQL - Medições de desempenho
403 Summary(ru.UTF-8):      MySQL - бенчмарки
404 Summary(uk.UTF-8):      MySQL - бенчмарки
405 Group:          Applications/Databases
406 Requires:       %{name} = %{version}-%{release}
407 Requires:       %{name}-client
408 Requires:       perl(DBD::mysql)
409 Obsoletes:      MySQL-bench
410
411 %description bench
412 This package contains MySQL benchmark scripts and data.
413
414 %description bench -l pl.UTF-8
415 Programy testujące szybkość serwera MySQL.
416
417 %description bench -l pt_BR.UTF-8
418 Este pacote contém medições de desempenho de scripts e dados do
419 MySQL.
420
421 %description bench -l ru.UTF-8
422 Этот пакет содержит скрипты и данные для оценки производительности
423 MySQL.
424
425 %description bench -l uk.UTF-8
426 Цей пакет містить скрипти та дані для оцінки продуктивності Percona
427 Server.
428
429 %package doc
430 Summary:        MySQL manual
431 Summary(pl.UTF-8):      Podręcznik użytkownika MySQL
432 Group:          Applications/Databases
433
434 %description doc
435 This package contains manual in HTML format.
436
437 %description doc -l pl.UTF-8
438 Podręcznik MySQL-a w formacie HTML.
439
440 %package ndb
441 Summary:        MySQL - NDB Storage Engine Daemon
442 Summary(pl.UTF-8):      MySQL - demon silnika przechowywania danych NDB
443 Group:          Applications/Databases
444 Requires:       %{name}-libs = %{version}-%{release}
445
446 %description ndb
447 This package contains the standard MySQL NDB Storage Engine
448 Daemon.
449
450 %description ndb -l pl.UTF-8
451 Ten pakiet zawiera standardowego demona silnika przechowywania danych
452 NDB.
453
454 %package ndb-client
455 Summary:        MySQL - NDB Clients
456 Summary(pl.UTF-8):      MySQL - programy klienckie NDB
457 Group:          Applications/Databases
458 Requires:       %{name}-libs = %{version}-%{release}
459
460 %description ndb-client
461 This package contains the standard MySQL NDB Clients.
462
463 %description ndb-client -l pl.UTF-8
464 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
465
466 %package ndb-mgm
467 Summary:        MySQL - NDB Management Daemon
468 Summary(pl.UTF-8):      MySQL - demon zarządzający NDB
469 Group:          Applications/Databases
470 Requires:       %{name}-libs = %{version}-%{release}
471
472 %description ndb-mgm
473 This package contains the standard MySQL NDB Management
474 Daemon.
475
476 %description ndb-mgm -l pl.UTF-8
477 Ten pakiet zawiera standardowego demona zarządzającego MySQL
478 NDB.
479
480 %package ndb-cpc
481 Summary:        MySQL - NDB CPC Daemon
482 Summary(pl.UTF-8):      MySQL - demon NDB CPC
483 Group:          Applications/Databases
484 Requires:       %{name}-libs = %{version}-%{release}
485
486 %description ndb-cpc
487 This package contains the standard MySQL NDB CPC Daemon.
488
489 %description ndb-cpc -l pl.UTF-8
490 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
491
492 %prep
493 %setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100} %{!?with_system_boost:-a101}
494
495 # we want to use old, mysql compatible client library name
496 find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";"
497 sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.*
498
499 %patch0 -p1
500 %patch1 -p1
501 %patch2 -p1
502 %patch3 -p1
503 %if %{with sphinx}
504 # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
505 %{__mv} sphinx-*/mysqlse storage/sphinx
506 %patch4 -p1
507 %patch5 -p1
508 %endif
509 %patch6 -p1
510 %patch7 -p1
511 %patch8 -p1
512 %patch9 -p1
513
514 # to get these files rebuild
515 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
516 [ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
517
518 # map has more sane versioning that default "global everything" in ver.in
519 #cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
520
521 %build
522 install -d build
523 cd build
524 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
525 # (it defaults to first cluster but user may change it to whatever
526 # cluster it wants)
527
528 %if "%{cc_version}" >= "7.0"
529 FALLTHROUGH_OPT="-Wimplicit-fallthrough=0"
530 %else
531 FALLTHROUGH_OPT=
532 %endif
533
534 CPPFLAGS="%{rpmcppflags}" \
535 %cmake .. \
536         -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
537         -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
538         -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT" \
539         -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
540         -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing $FALLTHROUGH_OPT -Wno-shadow" \
541         -DCOMPILATION_COMMENT="TLD Linux MySQL RPM" \
542         -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
543         %{?with_systemtap:-DENABLE_DTRACE=ON} \
544         -DFEATURE_SET="community" \
545         -DINSTALL_LAYOUT=RPM \
546         -DINSTALL_LIBDIR=%{_lib} \
547         -DINSTALL_MYSQLTESTDIR_RPM="" \
548         -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \
549         -DINSTALL_SQLBENCHDIR=%{_datadir} \
550         -DINSTALL_SUPPORTFILESDIR=share/%{name}-support \
551         -DINSTALL_MYSQLSHAREDIR=share/%{name} \
552         -DINSTALL_SECURE_FILE_PRIVDIR="" \
553         -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
554         %{?debug:-DWITH_DEBUG=ON} \
555         -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
556         -DWITH_FAST_MUTEXES=ON \
557         -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
558         -DWITH_PAM=ON \
559         -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
560         -DWITH_PIC=ON \
561         -DWITH_SCALABILITY_METRICS=ON \
562         -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
563         -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
564         -DWITH_COREDUMPER=%{?with_coredumper:ON}%{!?with_coredumper:OFF} \
565         %{!?with_tokudb:-DWITHOUT_TOKUDB=ON} \
566         %{!?with_rocksdb:-DWITHOUT_ROCKSDB=ON} \
567 %if %{without system_boost}
568         %{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \
569 %endif
570         -DWITH_LIBEVENT=system \
571         -DWITH_LZ4=system \
572         -DWITH_MECAB=system \
573         -DWITH_PROTOBUF=system \
574         -DWITH_READLINE=system \
575         -DWITH_ZLIB=system \
576         -DTMPDIR=/var/tmp
577
578 %{__make}
579
580 %if %{with tests}
581 %{__make} test
582
583 cd mysql-test
584
585 MTR_BINDIR=$(pwd)/../build/ \
586 %{__perl} ./mysql-test-run.pl \
587         --force \
588         --retry=0 \
589         --ssl \
590         --suite-timeout=720 \
591         --testcase-timeout=30 \
592         --mysqld=--binlog-format=mixed \
593         --force-restart \
594         --shutdown-timeout=60 \
595         --max-test-fail=0 \
596         --big-test \
597         --skip-test-list=unstable-tests
598 %endif
599
600 %install
601 rm -rf $RPM_BUILD_ROOT
602 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,%{name},skel} \
603            $RPM_BUILD_ROOT/var/{log/{archive,}/%{name},lib/mysql} \
604            $RPM_BUILD_ROOT%{_mysqlhome} \
605            $RPM_BUILD_ROOT%{_libdir}
606
607 %{__make} -C build install \
608         DESTDIR=$RPM_BUILD_ROOT
609
610 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
611 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
612 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
613 # This is template for configuration file which is created after 'service mysql init'
614 cp -a %{SOURCE4} mysqld.conf
615 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
616 touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
617
618 # remove innodb directives from mysqld.conf if mysqld is configured without
619 %if %{without innodb}
620         cp mysqld.conf mysqld.tmp
621         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
622 %endif
623
624 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
625 cp mysqld.conf mysqld.tmp
626 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
627
628 cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.conf
629 cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
630 ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
631 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
632
633 # NDB
634 %if %{with ndb}
635 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb
636 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb
637 install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb-mgm
638 cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb-mgm
639 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb-cpc
640 cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb-cpc
641 %endif
642
643 sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
644 sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
645 sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
646
647 # remove known unpackaged files
648 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}-support
649
650 # rename not to be so generic name
651 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
652 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
653
654 # move to _sysconfdir
655 #mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
656
657 # not useful without -debug build
658 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
659 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
660 # generate symbols file, so one can generate backtrace using it
661 # mysql_resolve_stack_dump -s %{_datadir}/%{name}/mysqld.sym -n mysqld.stack.
662 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
663 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.sym}
664
665 # do not clobber users $PATH
666 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
667 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
668 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
669 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
670 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
671 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
672 #mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
673 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
674 sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
675 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
676
677 # delete - functionality in initscript / rpm
678 # note: mysql_install_db (and thus resolveip) are needed by digikam
679 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
680 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
681 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
682 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg-utf8.txt
683 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
684 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
685 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
686
687 # we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
688 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
689 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
690 # libmysqld examples
691 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
692
693 # not needed
694 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
695 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
696 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/udf_example.so
697
698 # not an .info file
699 %{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
700
701 %clean
702 rm -rf $RPM_BUILD_ROOT
703
704 %pre
705 %groupadd -g 89 mysql
706 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
707
708 %post
709 /sbin/ldconfig
710 /sbin/chkconfig --add %{name}
711 %service %{name} restart
712
713 %preun
714 if [ "$1" = "0" ]; then
715         %service -q %{name} stop
716         /sbin/chkconfig --del %{name}
717 fi
718
719 %postun
720 /sbin/ldconfig
721 if [ "$1" = "0" ]; then
722         %userremove mysql
723         %groupremove mysql
724 fi
725
726 %post ndb
727 /sbin/chkconfig --add %{name}-ndb
728 %service %{name}-ndb restart "%{name} NDB engine"
729
730 %preun ndb
731 if [ "$1" = "0" ]; then
732         %service %{name}-ndb stop
733         /sbin/chkconfig --del %{name}-ndb
734 fi
735
736 %post ndb-mgm
737 /sbin/chkconfig --add %{name}-ndb-mgm
738 %service %{name}-ndb-mgm restart "%{name} NDB management node"
739
740 %preun ndb-mgm
741 if [ "$1" = "0" ]; then
742         %service %{name}-ndb-mgm stop
743         /sbin/chkconfig --del %{name}-ndb-mgm
744 fi
745
746 %post ndb-cpc
747 /sbin/chkconfig --add %{name}-ndb-cpc
748 %service %{name}-ndb-cpc restart "mysql NDB CPC"
749
750 %preun ndb-cpc
751 if [ "$1" = "0" ]; then
752         %service %{name}-ndb-cpc stop
753         /sbin/chkconfig --del %{name}-ndb-cpc
754 fi
755
756 %post   libs -p /sbin/ldconfig
757 %postun libs -p /sbin/ldconfig
758
759 %files
760 %defattr(644,root,root,755)
761 %doc build-ps/rpm/*.cnf
762 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
763 %attr(754,root,root) /etc/rc.d/init.d/%{name}
764 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
765 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
766 %attr(755,root,root) %{_bindir}/ps_mysqld_helper
767 %attr(755,root,root) %{_bindir}/ps_tokudb_admin
768 %attr(755,root,root) %{_bindir}/ps-admin
769 %attr(755,root,root) %{_sbindir}/innochecksum
770 %attr(755,root,root) %{_sbindir}/my_print_defaults
771 %attr(755,root,root) %{_sbindir}/myisamchk
772 %attr(755,root,root) %{_sbindir}/myisamlog
773 %attr(755,root,root) %{_sbindir}/myisampack
774 %attr(755,root,root) %{_sbindir}/mysql_plugin
775 %attr(755,root,root) %{_sbindir}/mysql_upgrade
776 %attr(755,root,root) %{_sbindir}/mysqlcheck
777 %attr(755,root,root) %{_sbindir}/mysqld
778 %dir %{_libdir}/%{name}
779 %dir %{_libdir}/%{name}/plugin
780 %attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
781 %attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
782 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
783 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
784 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
785 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
786 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
787 %attr(755,root,root) %{_libdir}/%{name}/plugin/authentication_ldap_sasl_client.so
788 %attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so
789 %attr(755,root,root) %{_libdir}/%{name}/plugin/data_masking.ini
790 %attr(755,root,root) %{_libdir}/%{name}/plugin/data_masking.so
791 %attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
792 %attr(755,root,root) %{_libdir}/%{name}/plugin/group_replication.so
793 %attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_file.so
794 %attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_udf.so
795 %attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_vault.so
796 %attr(755,root,root) %{_libdir}/%{name}/plugin/libpluginmecab.so
797 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
798 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
799 %attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
800 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_framework.so
801 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_services.so
802 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_services_threaded.so
803 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_detach.so
804 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_info.so
805 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_in_thd.so
806 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_2_sessions.so
807 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_all_col_types.so
808 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_cmds_1.so
809 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_commit.so
810 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_complex.so
811 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_errors.so
812 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_lock.so
813 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_processlist.so
814 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_replication.so
815 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_shutdown.so
816 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_sqlmode.so
817 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_stored_procedures_functions.so
818 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_views_triggers.so
819 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_x_sessions_deinit.so
820 %attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_x_sessions_init.so
821 %attr(755,root,root) %{_libdir}/%{name}/plugin/locking_service.so
822 %attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
823 %attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
824 %attr(755,root,root) %{_libdir}/%{name}/plugin/mysqlx.so
825 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
826 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
827 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
828 %attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
829 %attr(755,root,root) %{_libdir}/%{name}/plugin/replication_observers_example_plugin.so
830 %attr(755,root,root) %{_libdir}/%{name}/plugin/rewrite_example.so
831 %attr(755,root,root) %{_libdir}/%{name}/plugin/rewriter.so
832 %attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so
833 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
834 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
835 %attr(755,root,root) %{_libdir}/%{name}/plugin/test_security_context.so
836 %attr(755,root,root) %{_libdir}/%{name}/plugin/test_udf_services.so
837 %attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
838 %attr(755,root,root) %{_libdir}/%{name}/plugin/version_token.so
839 %if %{with sphinx}
840 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
841 %endif
842 %if %{with tokudb}
843 %attr(755,root,root) %{_bindir}/tokuft_logprint
844 %attr(755,root,root) %{_bindir}/tokuftdump
845 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_tokudb.so
846 %attr(755,root,root) %{_libdir}/%{name}/plugin/tokudb_backup.so
847 %attr(755,root,root) %{_libdir}/libHotBackup.so
848 %endif
849 %if %{with rocksdb}
850 %attr(755,root,root) %{_bindir}/ldb
851 %attr(755,root,root) %{_bindir}/mysql_ldb
852 %attr(755,root,root) %{_bindir}/sst_dump
853 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_rocksdb.so
854 %endif
855 # for plugins
856 %{_mandir}/man1/innochecksum.1*
857 %{_mandir}/man1/my_print_defaults.1*
858 %{_mandir}/man1/myisamchk.1*
859 %{_mandir}/man1/myisamlog.1*
860 %{_mandir}/man1/myisampack.1*
861 %{_mandir}/man1/mysql_plugin.1*
862 %{_mandir}/man1/mysql_upgrade.1*
863 %{_mandir}/man1/mysqlcheck.1*
864 %{_mandir}/man8/mysqld.8*
865
866 %if %{?debug:1}0
867 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
868 %{_datadir}/%{name}/mysqld.sym
869 %{_mandir}/man1/*resolve_stack_dump.1*
870 %endif
871
872 %attr(700,mysql,mysql) %{_mysqlhome}
873 # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
874 %attr(751,root,root) /var/lib/mysql
875 %attr(750,mysql,mysql) %dir /var/log/%{name}
876 %attr(750,mysql,mysql) %dir /var/log/archive/%{name}
877 %attr(640,mysql,mysql) %ghost /var/log/%{name}/*
878
879 # This is template for configuration file which is created after 'service mysql init'
880 %{_datadir}/%{name}/mysqld.conf
881 %{_datadir}/%{name}/install_rewriter.sql
882 %{_datadir}/%{name}/mysql_security_commands.sql
883 %{_datadir}/%{name}/mysql_sys_schema.sql
884 %{_datadir}/%{name}/mysql_system_tables.sql
885 %{_datadir}/%{name}/mysql_system_tables_data.sql
886 %{_datadir}/%{name}/mysql_test_data_timezone.sql
887 %{_datadir}/%{name}/uninstall_rewriter.sql
888
889 %{_datadir}/%{name}/english
890 %{_datadir}/%{name}/dictionary.txt
891 %{_datadir}/%{name}/fill_help_tables.sql
892 %{_datadir}/%{name}/innodb_memcached_config.sql
893 # Don't mark these with %%lang. These are used depending
894 # on database client settings.
895 %{_datadir}/%{name}/bulgarian
896 %{_datadir}/%{name}/czech
897 %{_datadir}/%{name}/danish
898 %{_datadir}/%{name}/german
899 %{_datadir}/%{name}/greek
900 %{_datadir}/%{name}/spanish
901 %{_datadir}/%{name}/estonian
902 %{_datadir}/%{name}/french
903 %{_datadir}/%{name}/hungarian
904 %{_datadir}/%{name}/italian
905 %{_datadir}/%{name}/japanese
906 %{_datadir}/%{name}/korean
907 %{_datadir}/%{name}/dutch
908 %{_datadir}/%{name}/norwegian
909 %{_datadir}/%{name}/norwegian-ny
910 %{_datadir}/%{name}/polish
911 %{_datadir}/%{name}/portuguese
912 %{_datadir}/%{name}/romanian
913 %{_datadir}/%{name}/russian
914 %{_datadir}/%{name}/serbian
915 %{_datadir}/%{name}/slovak
916 %{_datadir}/%{name}/swedish
917 %{_datadir}/%{name}/ukrainian
918
919 %files charsets
920 %defattr(644,root,root,755)
921 %dir %{_datadir}/%{name}
922 %{_datadir}/%{name}/charsets
923
924 %files extras
925 %defattr(644,root,root,755)
926 %attr(755,root,root) %{_bindir}/myisam_ftdump
927 %attr(755,root,root) %{_bindir}/mysql_install_db
928 %attr(755,root,root) %{_bindir}/mysql_secure_installation
929 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
930 %attr(755,root,root) %{_bindir}/perror
931 %attr(755,root,root) %{_bindir}/replace
932 %attr(755,root,root) %{_bindir}/resolveip
933 %{_mandir}/man1/myisam_ftdump.1*
934 %{_mandir}/man1/mysql_install_db.1*
935 %{_mandir}/man1/mysql_secure_installation.1*
936 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
937 %{_mandir}/man1/perror.1*
938 %{_mandir}/man1/replace.1*
939 %{_mandir}/man1/resolveip.1*
940
941 %files extras-perl
942 %defattr(644,root,root,755)
943 %attr(755,root,root) %{_bindir}/mysqldumpslow
944 %{_mandir}/man1/mysqldumpslow.1*
945
946 %files client
947 %defattr(644,root,root,755)
948 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
949 %attr(755,root,root) %{_bindir}/lz4_decompress
950 %attr(755,root,root) %{_bindir}/mysql
951 %attr(755,root,root) %{_bindir}/mysql_config_editor
952 %attr(755,root,root) %{_bindir}/mysql_ssl_rsa_setup
953 %attr(755,root,root) %{_bindir}/mysqladmin
954 %attr(755,root,root) %{_bindir}/mysqlbinlog
955 %attr(755,root,root) %{_bindir}/mysqldump
956 %attr(755,root,root) %{_bindir}/mysqlimport
957 %attr(755,root,root) %{_bindir}/mysqlpump
958 %attr(755,root,root) %{_bindir}/mysqlshow
959 %attr(755,root,root) %{_bindir}/zlib_decompress
960 %{_mandir}/man1/lz4_decompress.1*
961 %{_mandir}/man1/mysql.1*
962 %{_mandir}/man1/mysql_config_editor.1*
963 %{_mandir}/man1/mysql_ssl_rsa_setup.1*
964 %{_mandir}/man1/mysqladmin.1*
965 %{_mandir}/man1/mysqlbinlog.1*
966 %{_mandir}/man1/mysqldump.1*
967 %{_mandir}/man1/mysqlimport.1*
968 %{_mandir}/man1/mysqlpump.1*
969 %{_mandir}/man1/mysqlshow.1*
970 %{_mandir}/man1/zlib_decompress.1*
971
972 %files libs
973 %defattr(644,root,root,755)
974 %attr(751,root,root) %dir %{_sysconfdir}/%{name}
975 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
976 %{_sysconfdir}/%{name}/my.cnf
977 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
978 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.20
979 %if %{with ndb}
980 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
981 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
982 %endif
983
984 %files devel
985 %defattr(644,root,root,755)
986 %attr(755,root,root) %{_bindir}/mysql_config
987 %attr(755,root,root) %{_libdir}/libmysqlclient.so
988 %{_pkgconfigdir}/mysqlclient.pc
989 %if %{with ndb}
990 %attr(755,root,root) %{_libdir}/libndbclient.so
991 %endif
992 # static-only so far
993 %{_libdir}/libmysqld.a
994 %{_libdir}/libmysqlservices.a
995 %{_includedir}/mysql
996 %{_aclocaldir}/mysql.m4
997 %{_mandir}/man1/mysql_config.1*
998
999 %files static
1000 %defattr(644,root,root,755)
1001 %{_libdir}/libmysqlclient.a
1002 %if %{with ndb}
1003 %{_libdir}/libndbclient.a
1004 %endif
1005
1006 %files bench
1007 %defattr(644,root,root,755)
1008 %attr(755,root,root) %{_bindir}/mysqlslap
1009 %attr(755,root,root) %{_bindir}/mysqltest
1010 %{_mandir}/man1/mysqlslap.1*
1011
1012 %if %{with ndb}
1013 %files ndb
1014 %defattr(644,root,root,755)
1015 %attr(755,root,root) %{_sbindir}/ndbd
1016 %attr(754,root,root) /etc/rc.d/init.d/%{name}-ndb
1017 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb
1018 %{_mandir}/man1/ndbd_redo_log_reader.1*
1019 %{_mandir}/man8/ndbd.8*
1020
1021 %files ndb-client
1022 %defattr(644,root,root,755)
1023 %attr(755,root,root) %{_bindir}/ndb_config
1024 %attr(755,root,root) %{_bindir}/ndb_delete_all
1025 %attr(755,root,root) %{_bindir}/ndb_desc
1026 %attr(755,root,root) %{_bindir}/ndb_drop_index
1027 %attr(755,root,root) %{_bindir}/ndb_drop_table
1028 %attr(755,root,root) %{_bindir}/ndb_error_reporter
1029 %attr(755,root,root) %{_bindir}/ndb_mgm
1030 %attr(755,root,root) %{_bindir}/ndb_print_backup_file
1031 %attr(755,root,root) %{_bindir}/ndb_print_schema_file
1032 %attr(755,root,root) %{_bindir}/ndb_print_sys_file
1033 %attr(755,root,root) %{_bindir}/ndb_restore
1034 %attr(755,root,root) %{_bindir}/ndb_select_all
1035 %attr(755,root,root) %{_bindir}/ndb_select_count
1036 %attr(755,root,root) %{_bindir}/ndb_show_tables
1037 %attr(755,root,root) %{_bindir}/ndb_size.pl
1038 %attr(755,root,root) %{_bindir}/ndb_test_platform
1039 %attr(755,root,root) %{_bindir}/ndb_waiter
1040 %{_mandir}/man1/ndb_config.1*
1041 %{_mandir}/man1/ndb_delete_all.1*
1042 %{_mandir}/man1/ndb_desc.1*
1043 %{_mandir}/man1/ndb_drop_index.1*
1044 %{_mandir}/man1/ndb_drop_table.1*
1045 %{_mandir}/man1/ndb_error_reporter.1*
1046 %{_mandir}/man1/ndb_mgm.1*
1047 %{_mandir}/man1/ndb_print_backup_file.1*
1048 %{_mandir}/man1/ndb_print_schema_file.1*
1049 %{_mandir}/man1/ndb_print_sys_file.1*
1050 %{_mandir}/man1/ndb_restore.1*
1051 %{_mandir}/man1/ndb_select_all.1*
1052 %{_mandir}/man1/ndb_select_count.1*
1053 %{_mandir}/man1/ndb_show_tables.1*
1054 %{_mandir}/man1/ndb_size.pl.1*
1055 %{_mandir}/man1/ndb_waiter.1*
1056
1057 %files ndb-mgm
1058 %defattr(644,root,root,755)
1059 %attr(755,root,root) %{_sbindir}/ndb_mgmd
1060 %attr(754,root,root) /etc/rc.d/init.d/%{name}-ndb-mgm
1061 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb-mgm
1062 %{_mandir}/man8/ndb_mgmd.8*
1063
1064 %files ndb-cpc
1065 %defattr(644,root,root,755)
1066 %attr(755,root,root) %{_sbindir}/ndb_cpcd
1067 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
1068 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb-cpc
1069 %{_mandir}/man1/ndb_cpcd.1*
1070 %endif