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