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