]> TLD Linux GIT Repositories - packages/mysql.git/blob - mysql.spec
- updated to 5.5.35
[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     33.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.35
38 Release:        1
39 License:        GPL + MySQL FLOSS Exception
40 Group:          Applications/Databases
41 Source0:        http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/Percona-Server-%{version}-rel%{percona_rel}.tar.gz
42 # Source0-md5:  f64e535a4c6d0cb7daeaf0ba3eeccbd7
43 Source100:      http://www.sphinxsearch.com/files/sphinx-2.1.4-release.tar.gz
44 # Source100-md5:        3d453b507834ec746237e2016d34f928
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 # from fedora
59 Source15:       lib%{name}.version
60
61 Patch2:         %{name}hotcopy-5.0-5.5.patch
62 Patch3:         bug-67402.patch
63 # from fedora
64 Patch6:         %{name}-system-users.patch
65
66 Patch9:         %{name}-build.patch
67 Patch11:        %{name}-upgrade.patch
68 Patch12:        %{name}-config.patch
69 Patch14:        %{name}-bug-43594.patch
70 Patch18:        %{name}-sphinx.patch
71 Patch19:        %{name}-chain-certs.patch
72 # from fedora
73 Patch20:        %{name}-dubious-exports.patch
74 Patch21:        bison3.patch
75 Patch22:        bug-66589.patch
76 URL:            http://www.mysql.com/products/community/
77 BuildRequires:  bison >= 1.875
78 BuildRequires:  cmake >= 2.6
79 BuildRequires:  groff
80 BuildRequires:  libstdc++-devel >= 5:4.0
81 BuildRequires:  libtool
82 %{?with_tcpd:BuildRequires:     libwrap-devel}
83 BuildRequires:  ncurses-devel >= 4.2
84 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
85 %{?with_autodeps:BuildRequires: perl-DBI}
86 BuildRequires:  perl-devel >= 1:5.6.1
87 BuildRequires:  readline-devel >= 4.2
88 BuildRequires:  rpm-perlprov >= 4.1-13
89 BuildRequires:  rpmbuild(macros) >= 1.597
90 BuildRequires:  sed >= 4.0
91 %{?with_systemtap:BuildRequires:        systemtap-sdt-devel}
92 BuildRequires:  zlib-devel
93 Requires(post,preun):   /sbin/chkconfig
94 Requires(postun):       /usr/sbin/groupdel
95 Requires(postun):       /usr/sbin/userdel
96 Requires(pre):  /bin/id
97 Requires(pre):  /usr/bin/getgid
98 Requires(pre):  /usr/sbin/groupadd
99 Requires(pre):  /usr/sbin/useradd
100 Requires(triggerpostun):        sed >= 4.0
101 Requires:       %{name}-charsets = %{version}-%{release}
102 Requires:       %{name}-libs = %{version}-%{release}
103 Requires:       /usr/bin/setsid
104 Requires:       rc-scripts >= 0.2.0
105 Suggests:       mysql-client
106 %{?with_tcpd:Suggests:  tcp_wrappers}
107 Suggests:       vim-syntax-mycnf
108 Provides:       MySQL-server
109 Provides:       group(mysql)
110 Provides:       msqlormysql
111 Provides:       user(mysql)
112 Obsoletes:      MySQL
113 Obsoletes:      mysql-server
114 Conflicts:      logrotate < 3.8.0
115 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
116
117 %define         _libexecdir     %{_sbindir}
118 %define         _localstatedir  /var/lib/mysql
119 %define         _mysqlhome      /home/services/mysql
120
121 %description
122 MySQL is a true multi-user, multi-threaded SQL (Structured Query
123 Language) database server. SQL is the most popular database language
124 in the world. MySQL is a client/server implementation that consists of
125 a server daemon mysqld and many different client programs/libraries.
126
127 The main goals of MySQL are speed, robustness and easy to use. MySQL
128 was originally developed because we at Tcx needed a SQL server that
129 could handle very big databases with magnitude higher speed than what
130 any database vendor could offer to us. We have now been using MySQL
131 since 1996 in a environment with more than 40 databases, 10,000
132 tables, of which more than 500 have more than 7 million rows. This is
133 about 50G of mission critical data.
134
135 The base upon which MySQL is built is a set of routines that have been
136 used in a highly demanding production environment for many years.
137 While MySQL is still in development, it already offers a rich and
138 highly useful function set.
139
140 %description -l fr.UTF-8
141 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
142 multi-taches. Le langage SQL est le langage de bases de donnees le
143 plus populaire au monde. MySQL est une implementation client/serveur
144 qui consiste en un serveur (mysqld) et differents
145 programmes/bibliotheques clientes.
146
147 Les objectifs principaux de MySQL sont: vitesse, robustesse et
148 facilite d'utilisation. MySQL fut originalement developpe parce que
149 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
150 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
151 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
152 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
153 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
154 millions de lignes. Ceci represente environ 50G de donnees critiques.
155
156 A la base de la conception de MySQL, on retrouve une serie de routines
157 qui ont ete utilisees dans un environnement de production pendant
158 plusieurs annees. Meme si MySQL est encore en developpement, il offre
159 deja une riche et utile serie de fonctions.
160
161 %description -l pl.UTF-8
162 MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych
163 SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz
164 danych. MySQL to implementacja klient/serwer składająca się z demona
165 mysqld i wielu różnych programów i bibliotek klienckich.
166
167 Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania.
168 MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali
169 serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele
170 większą, niż mogli zaoferować inni producenci baz danych. Używają go
171 od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z
172 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około
173 50GB krytycznych danych.
174
175 Baza, na której oparty jest MySQL, składa się ze zbioru procedur,
176 które były używane w bardzo wymagającym środowisku produkcyjnym przez
177 wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty
178 i użyteczny zbiór funkcji.
179
180 %description -l de.UTF-8
181 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
182 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
183 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
184 einem Primärschlüssel versehen werden. Es ist aber keine Definition
185 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
186 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
187 Daten verantwortlich. Allein durch die Nutzung externer
188 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
189 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
190
191 %description -l pt_BR.UTF-8
192 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
193 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
194 dados no mundo. O MySQL é uma implementação cliente/servidor que
195 consiste de um servidor chamado mysqld e diversos
196 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
197 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
198 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
199 pudesse lidar com grandes bases de dados e com uma velocidade muito
200 maior do que a que qualquer vendedor podia nos oferecer. Estamos
201 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
202 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
203 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
204 A base da construção do MySQL é uma série de rotinas que foram usadas
205 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
206 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
207 funções muito ricas e úteis. Veja a documentação para maiores
208 informações.
209
210 %description -l ru.UTF-8
211 MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL
212 была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в
213 дистрибутиве на предмет других участников проекта и прочей информации
214 о MySQL.
215
216 %description -l uk.UTF-8
217 MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL
218 було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в
219 дистрибутиві для інформації про інших учасників проекту та іншої
220 інформації.
221
222 %package charsets
223 Summary:        MySQL - character sets definitions
224 Summary(pl.UTF-8):      MySQL - definicje kodowań znaków
225 Group:          Applications/Databases
226
227 %description charsets
228 This package contains character sets definitions needed by both client
229 and server.
230
231 %description charsets -l pl.UTF-8
232 Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
233 klienta.
234
235 %package -n mysqlhotcopy
236 Summary:        mysqlhotcopy - A MySQL database backup program
237 Summary(pl.UTF-8):      mysqlhotcopy - program do tworzenia kopii zapasowych baz MySQL
238 Group:          Applications/Databases
239 Requires:       perl-DBD-mysql
240
241 %description -n mysqlhotcopy
242 mysqlhotcopy uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a
243 database backup quickly. It is the fastest way to make a backup of the
244 database or single tables, but it can be run only on the same machine
245 where the database directories are located. mysqlhotcopy works only
246 for backing up MyISAM and ARCHIVE tables.
247
248 See innobackup package to backup InnoDB tables.
249
250 %description -n mysqlhotcopy -l pl.UTF-8
251 mysqlhotcopy wykorzystuje LOCK TABLES, FLUSH TABLES oraz cp i scp do
252 szybkiego tworzenia kopii zapasowych baz danych. Jest to najszybszy
253 sposób wykonania kopii zapasowej bazy danych lub pojedynczych tabel,
254 ale może działać tylko na maszynie, na której znajdują się katalogi z
255 bazą danych. mysqlhotcopy działa tylko dla tabel typu MyISAM i
256 ARCHIVE.
257
258 Narzędzie do tworzenia kopii tabel InnoDB znajduje się w pakiecie
259 innobackup.
260
261 %package extras
262 Summary:        MySQL additional utilities
263 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL
264 Group:          Applications/Databases
265 Requires:       %{name}-client = %{version}-%{release}
266 Requires:       %{name}-libs = %{version}-%{release}
267
268 %description extras
269 MySQL additional utilities except Perl scripts (they may be found in
270 %{name}-extras-perl package).
271
272 %description extras -l pl.UTF-8
273 Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w
274 pakiecie %{name}-extras-perl).
275
276 %package extras-perl
277 Summary:        MySQL additional utilities written in Perl
278 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL napisane w Perlu
279 Group:          Applications/Databases
280 Requires:       %{name}-extras = %{version}-%{release}
281 # this is just for the sake of smooth upgrade, not to break systems
282 Requires:       mysqlhotcopy = %{version}-%{release}
283 Requires:       perl(DBD::mysql)
284
285 %description extras-perl
286 MySQL additional utilities written in Perl.
287
288 %description extras-perl -l pl.UTF-8
289 Dodatkowe narzędzia do MySQL napisane w Perlu.
290
291 %package client
292 Summary:        MySQL - Client
293 Summary(pl.UTF-8):      MySQL - Klient
294 Summary(pt.UTF-8):      MySQL - Cliente
295 Summary(ru.UTF-8):      MySQL клиент
296 Summary(uk.UTF-8):      MySQL клієнт
297 Group:          Applications/Databases
298 Requires:       %{name}-charsets = %{version}-%{release}
299 Requires:       %{name}-libs = %{version}-%{release}
300 Obsoletes:      MySQL-client
301
302 %description client
303 This package contains the standard MySQL clients.
304
305 %description client -l fr.UTF-8
306 Ce package contient les clients MySQL standards.
307
308 %description client -l pl.UTF-8
309 Standardowe programy klienckie MySQL.
310
311 %description client -l pt_BR.UTF-8
312 Este pacote contém os clientes padrão para o MySQL.
313
314 %description client -l ru.UTF-8
315 Этот пакет содержит только клиент MySQL.
316
317 %description client -l uk.UTF-8
318 Цей пакет містить тільки клієнта MySQL.
319
320 %package libs
321 Summary:        Shared libraries for MySQL
322 Summary(pl.UTF-8):      Biblioteki współdzielone MySQL
323 Group:          Libraries
324 Obsoletes:      libmysql10
325 Obsoletes:      mysql-doc < 4.1.12
326
327 %description libs
328 Shared libraries for MySQL.
329
330 %description libs -l pl.UTF-8
331 Biblioteki współdzielone MySQL.
332
333 %package devel
334 Summary:        MySQL - development header files and other files
335 Summary(pl.UTF-8):      MySQL - Pliki nagłówkowe i inne dla programistów
336 Summary(pt.UTF-8):      MySQL - Medições de desempenho
337 Summary(ru.UTF-8):      MySQL - хедеры и библиотеки разработчика
338 Summary(uk.UTF-8):      MySQL - хедери та бібліотеки програміста
339 Group:          Development/Libraries
340 Requires:       %{name}-libs = %{version}-%{release}
341 %{?with_ssl:Requires:   openssl-devel}
342 Requires:       zlib-devel
343 Obsoletes:      MySQL-devel
344 Obsoletes:      libmysql10-devel
345
346 %description devel
347 This package contains the development header files and other files
348 necessary to develop MySQL client applications.
349
350 %description devel -l fr.UTF-8
351 Ce package contient les fichiers entetes et les librairies de
352 developpement necessaires pour developper des applications clientes
353 MySQL.
354
355 %description devel -l pl.UTF-8
356 Pliki nagłówkowe i inne pliki konieczne do kompilacji aplikacji
357 klienckich MySQL.
358
359 %description devel -l pt_BR.UTF-8
360 Este pacote contém os arquivos de cabeçalho (header files) e
361 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
362
363 %description devel -l ru.UTF-8
364 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
365 разработки клиентских приложений.
366
367 %description devel -l uk.UTF-8
368 Цей пакет містить хедери та бібліотеки програміста, необхідні для
369 розробки програм-клієнтів.
370
371 %package static
372 Summary:        MySQL static libraries
373 Summary(pl.UTF-8):      Biblioteki statyczne MySQL
374 Summary(ru.UTF-8):      MySQL - статические библиотеки
375 Summary(uk.UTF-8):      MySQL - статичні бібліотеки
376 Group:          Development/Libraries
377 Requires:       %{name}-devel = %{version}-%{release}
378 Obsoletes:      MySQL-static
379
380 %description static
381 MySQL static libraries.
382
383 %description static -l pl.UTF-8
384 Biblioteki statyczne MySQL.
385
386 %description static -l ru.UTF-8
387 Этот пакет содержит статические библиотеки разработчика, необходимые
388 для разработки клиентских приложений.
389
390 %description static -l uk.UTF-8
391 Цей пакет містить статичні бібліотеки програміста, необхідні для
392 розробки програм-клієнтів.
393
394 %package bench
395 Summary:        MySQL - Benchmarks
396 Summary(pl.UTF-8):      MySQL - Programy testujące szybkość działania bazy
397 Summary(pt.UTF-8):      MySQL - Medições de desempenho
398 Summary(ru.UTF-8):      MySQL - бенчмарки
399 Summary(uk.UTF-8):      MySQL - бенчмарки
400 Group:          Applications/Databases
401 Requires:       %{name} = %{version}-%{release}
402 Requires:       %{name}-client
403 Requires:       perl(DBD::mysql)
404 Obsoletes:      MySQL-bench
405
406 %description bench
407 This package contains MySQL benchmark scripts and data.
408
409 %description bench -l pl.UTF-8
410 Programy testujące szybkość serwera MySQL.
411
412 %description bench -l pt_BR.UTF-8
413 Este pacote contém medições de desempenho de scripts e dados do MySQL.
414
415 %description bench -l ru.UTF-8
416 Этот пакет содержит скрипты и данные для оценки производительности
417 MySQL.
418
419 %description bench -l uk.UTF-8
420 Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
421
422 %package doc
423 Summary:        MySQL manual
424 Summary(pl.UTF-8):      Podręcznik użytkownika MySQL
425 Group:          Applications/Databases
426
427 %description doc
428 This package contains manual in HTML format.
429
430 %description doc -l pl.UTF-8
431 Podręcznik MySQL-a w formacie HTML.
432
433 %package ndb
434 Summary:        MySQL - NDB Storage Engine Daemon
435 Summary(pl.UTF-8):      MySQL - demon silnika przechowywania danych NDB
436 Group:          Applications/Databases
437 Requires:       %{name}-libs = %{version}-%{release}
438
439 %description ndb
440 This package contains the standard MySQL NDB Storage Engine Daemon.
441
442 %description ndb -l pl.UTF-8
443 Ten pakiet zawiera standardowego demona silnika przechowywania danych
444 NDB.
445
446 %package ndb-client
447 Summary:        MySQL - NDB Clients
448 Summary(pl.UTF-8):      MySQL - programy klienckie NDB
449 Group:          Applications/Databases
450 Requires:       %{name}-libs = %{version}-%{release}
451
452 %description ndb-client
453 This package contains the standard MySQL NDB Clients.
454
455 %description ndb-client -l pl.UTF-8
456 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
457
458 %package ndb-mgm
459 Summary:        MySQL - NDB Management Daemon
460 Summary(pl.UTF-8):      MySQL - demon zarządzający NDB
461 Group:          Applications/Databases
462 Requires:       %{name}-libs = %{version}-%{release}
463
464 %description ndb-mgm
465 This package contains the standard MySQL NDB Management Daemon.
466
467 %description ndb-mgm -l pl.UTF-8
468 Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
469
470 %package ndb-cpc
471 Summary:        MySQL - NDB CPC Daemon
472 Summary(pl.UTF-8):      MySQL - demon NDB CPC
473 Group:          Applications/Databases
474 Requires:       %{name}-libs = %{version}-%{release}
475
476 %description ndb-cpc
477 This package contains the standard MySQL NDB CPC Daemon.
478
479 %description ndb-cpc -l pl.UTF-8
480 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
481
482 %prep
483 %setup -q -n Percona-Server-%{version}-rel%{percona_rel} %{?with_sphinx:-a100}
484 %if %{with sphinx}
485 # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
486 mv sphinx-*/mysqlse storage/sphinx
487 %patch18 -p1
488 %endif
489
490 %patch2 -p1
491 %patch3 -p1
492
493 %patch6 -p1
494
495 %patch9 -p1
496 %patch11 -p1
497 %patch12 -p1
498 %patch14 -p0
499 %patch19 -p1
500 %patch20 -p1
501 %patch21 -p1
502 %patch22 -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=ON} \
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