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