]> TLD Linux GIT Repositories - packages/mysql.git/blob - mysql.spec
- updated to 5.6.39-83.1
[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     83.1
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.39
39 Release:        %{percona_rel}.%{rel}
40 License:        GPL + MySQL FLOSS Exception
41 Group:          Applications/Databases
42 Source0:        http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz
43 # Source0-md5:  cc16e77d1504fdadb808c500cc8b23d5
44 Source100:      http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
45 # Source100-md5:        5cac34f3d78a9d612ca4301abfcbd666
46 Source1:        %{name}.init
47 Source2:        %{name}.sysconfig
48 Source3:        %{name}.logrotate
49 Source4:        %{name}d.conf
50 Source5:        %{name}-clusters.conf
51 Source7:        %{name}-ndb.init
52 Source8:        %{name}-ndb.sysconfig
53 Source9:        %{name}-ndb-mgm.init
54 Source10:       %{name}-ndb-mgm.sysconfig
55 Source11:       %{name}-ndb-cpc.init
56 Source12:       %{name}-ndb-cpc.sysconfig
57 Source13:       %{name}-client.conf
58 Source14:       my.cnf
59 Patch1:         %{name}-versioning.patch
60 Patch2:         %{name}hotcopy-5.0-5.5.patch
61 Patch3:         bug-67402.patch
62 Patch4:         %{name}-no-default-secure-auth.patch
63 Patch5:         %{name}-system-libhsclient.patch
64 Patch6:         handlersocket.patch
65
66 # from fedora
67 Patch8:         %{name}-system-users.patch
68
69 Patch9:         %{name}-build.patch
70 Patch11:        %{name}-upgrade.patch
71 Patch12:        %{name}-config.patch
72 Patch14:        %{name}-bug-43594.patch
73 Patch18:        %{name}-sphinx.patch
74 Patch19:        %{name}-chain-certs.patch
75 # from fedora
76 Patch20:        %{name}-dubious-exports.patch
77 Patch21:        bug-66589.patch
78 Patch22:        bug-44278.patch
79 URL:            http://www.mysql.com/products/community/
80 BuildRequires:  bison >= 1.875
81 BuildRequires:  cmake >= 2.6
82 BuildRequires:  readline-devel >= 6.2
83 BuildRequires:  libstdc++-devel >= 5:4.0
84 BuildRequires:  automake
85 BuildRequires:  libhsclient-devel
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 %patch5 -p1
506 %patch6 -p1
507
508 %patch8 -p1
509
510 %patch9 -p1
511 %patch11 -p1
512 %patch12 -p1
513 %patch14 -p0
514 %patch19 -p1
515 %patch20 -p1
516 %patch21 -p1
517 %patch22 -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_READLINE=system \
556         -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
557         -DWITHOUT_TOKUDB=1 \
558         -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \
559         -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
560         -DWITH_ZLIB=system
561
562 %{__make}
563
564 %{?with_tests:%{__make} test}
565
566 %install
567 rm -rf $RPM_BUILD_ROOT
568 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
569            $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
570            $RPM_BUILD_ROOT%{_mysqlhome} \
571            $RPM_BUILD_ROOT%{_libdir}
572
573 %{__make} -C build install \
574         DESTDIR=$RPM_BUILD_ROOT
575
576 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
577 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
578 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
579 # This is template for configuration file which is created after 'service mysql init'
580 cp -a %{SOURCE4} mysqld.conf
581 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
582 touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
583
584 # remove innodb directives from mysqld.conf if mysqld is configured without
585 %if %{without innodb}
586         cp mysqld.conf mysqld.tmp
587         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
588 %endif
589
590 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
591 cp mysqld.conf mysqld.tmp
592 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
593
594 cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.conf
595 cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
596 ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
597 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
598
599 # NDB
600 %if %{with ndb}
601 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
602 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
603 install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
604 cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
605 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
606 cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
607 %endif
608
609 sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
610 sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
611 sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
612
613 # remove known unpackaged files
614 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}-support
615
616 # rename not to be so generic name
617 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
618 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
619
620 # move to _sysconfdir
621 mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
622
623 # not useful without -debug build
624 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
625 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
626 # generate symbols file, so one can generate backtrace using it
627 # mysql_resolve_stack_dump -s %{_datadir}/%{name}/mysqld.sym -n mysqld.stack.
628 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
629 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.sym}
630
631 # do not clobber users $PATH
632 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
633 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
634 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
635 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
636 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
637 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
638 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
639 sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
640 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
641
642 # delete - functionality in initscript / rpm
643 # note: mysql_install_db (and thus resolveip) are needed by digikam
644 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
645 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
646 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
647 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg-utf8.txt
648 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
649 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
650 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
651 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
652 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
653
654 # we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
655 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
656 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
657 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
658 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
659 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
660 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
661 # libmysqld examples
662 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
663
664 # not needed
665 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
666 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
667
668 # not an .info file
669 %{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
670
671 %clean
672 rm -rf $RPM_BUILD_ROOT
673
674 %pre
675 %groupadd -g 89 mysql
676 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
677
678 %post
679 /sbin/ldconfig
680 /sbin/chkconfig --add mysql
681 %service mysql restart
682
683 %preun
684 if [ "$1" = "0" ]; then
685         %service -q mysql stop
686         /sbin/chkconfig --del mysql
687 fi
688
689 %postun
690 /sbin/ldconfig
691 if [ "$1" = "0" ]; then
692         %userremove mysql
693         %groupremove mysql
694 fi
695
696 %post ndb
697 /sbin/chkconfig --add mysql-ndb
698 %service mysql-ndb restart "mysql NDB engine"
699
700 %preun ndb
701 if [ "$1" = "0" ]; then
702         %service mysql-ndb stop
703         /sbin/chkconfig --del mysql-ndb
704 fi
705
706 %post ndb-mgm
707 /sbin/chkconfig --add mysql-ndb-mgm
708 %service mysql-ndb-mgm restart "mysql NDB management node"
709
710 %preun ndb-mgm
711 if [ "$1" = "0" ]; then
712         %service mysql-ndb-mgm stop
713         /sbin/chkconfig --del mysql-ndb-mgm
714 fi
715
716 %post ndb-cpc
717 /sbin/chkconfig --add mysql-ndb-cpc
718 %service mysql-ndb-cpc restart "mysql NDB CPC"
719
720 %preun ndb-cpc
721 if [ "$1" = "0" ]; then
722         %service mysql-ndb-cpc stop
723         /sbin/chkconfig --del mysql-ndb-cpc
724 fi
725
726 %post   libs -p /sbin/ldconfig
727 %postun libs -p /sbin/ldconfig
728
729 %triggerpostun -- mysql < 4.0.20-2.4
730 # For clusters in /etc/%{name}/clusters.conf
731 if [ -f /etc/sysconfig/mysql ]; then
732         . /etc/sysconfig/mysql
733         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
734                 for i in "$MYSQL_DB_CLUSTERS"; do
735                         echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
736                 done
737                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
738                 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
739                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
740                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
741         fi
742 fi
743
744 %triggerpostun -- mysql < 4.1.1
745 # For better compatibility with prevoius versions:
746 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
747         if echo "$config" | grep -q '^/'; then
748                 config_file="$config"
749         elif [ -f "/etc/%{name}/$config" ]; then
750                 config_file=/etc/%{name}/$config
751         else
752                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
753                 if [ -z "$clusterdir" ]; then
754                         echo >&2 "Can't find cluster dir for $config!"
755                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
756                         exit 1
757                 fi
758                 config_file="$clusterdir/mysqld.conf"
759         fi
760
761         if [ ! -f "$config_file" ]; then
762                         echo >&2 "Lost myself! Please report this (with above errors, if any) to TLD Linux mailing lists."
763                         exit 1
764         fi
765         echo "Adding option old-passwords to config: $config_file"
766         echo "If you want to use new, better passwords - remove it"
767
768         # sed magic to add 'old-passwords' to [mysqld] section
769         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
770                 a
771                 a; Compatibility options:
772                 aold-passwords
773         }
774         ' $config_file
775 done
776
777 %banner -e %{name}-4.1.x <<-EOF
778         If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
779         mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
780 EOF
781 #'
782
783 %triggerpostun -- mysql < 5.1.0
784 configs=""
785 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
786         if echo "$config" | grep -q '^/'; then
787                 config_file="$config"
788         elif [ -f "/etc/%{name}/$config" ]; then
789                 config_file=/etc/%{name}/$config
790         else
791                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
792                 if [ -z "$clusterdir" ]; then
793                         echo >&2 "Can't find cluster dir for $config!"
794                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
795                         exit 1
796                 fi
797                 config_file="$clusterdir/mysqld.conf"
798         fi
799
800         if [ ! -f "$config_file" ]; then
801                 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to TLD Linux mailing lists."
802                 continue
803         fi
804         configs="$configs $config_file"
805 done
806
807 (
808 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
809 echo 'Thus, you should invoke:'
810 for config in $configs; do
811         sed -i -e '
812                 s/set-variable\s*=\s* //
813                 # use # as comment in config
814                 s/^;/#/
815         ' $config
816
817         datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
818         echo "# mysql_upgrade --datadir=$datadir"
819 done
820 ) | %banner -e %{name}-5.1
821
822 %triggerpostun -- mysql < 5.5.0
823 configs=""
824 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
825         if echo "$config" | grep -q '^/'; then
826                 config_file="$config"
827         elif [ -f "/etc/%{name}/$config" ]; then
828                 config_file=/etc/%{name}/$config
829         else
830                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
831                 if [ -z "$clusterdir" ]; then
832                         echo >&2 "Can't find cluster dir for $config!"
833                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
834                         exit 1
835                 fi
836                 config_file="$clusterdir/mysqld.conf"
837         fi
838
839         if [ ! -f "$config_file" ]; then
840                 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to TLD Linux mailing lists."
841                 continue
842         fi
843         configs="$configs $config_file"
844 done
845
846 (
847 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
848 echo 'Thus, you should invoke:'
849 for config in $configs; do
850         sed -i -e '
851                 s/^language *= *polish/lc-messages = pl_PL/i
852                 s/set-variable\s*=\s* //
853                 s/^skip-locking/skip-external-locking/
854                 # this is not valid for server. it is client option
855                 s/^default-character-set/# client-config: &/
856                 # use # as comment in config
857                 s/^;/#/
858         ' $config
859
860         socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs)
861         echo "# mysql_upgrade ${socket:+--socket=$socket}"
862 done
863 ) | %banner -e %{name}-5.5
864
865 %files
866 %defattr(644,root,root,755)
867 %doc build/support-files/*.cnf
868 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
869 %attr(754,root,root) /etc/rc.d/init.d/%{name}
870 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
871 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
872 %attr(755,root,root) %{_sbindir}/innochecksum
873 %attr(755,root,root) %{_sbindir}/my_print_defaults
874 %attr(755,root,root) %{_sbindir}/myisamchk
875 %attr(755,root,root) %{_sbindir}/myisamlog
876 %attr(755,root,root) %{_sbindir}/myisampack
877 %attr(755,root,root) %{_sbindir}/mysql_plugin
878 %attr(755,root,root) %{_sbindir}/mysql_upgrade
879 %attr(755,root,root) %{_sbindir}/mysqlcheck
880 %attr(755,root,root) %{_sbindir}/mysqld
881 %dir %{_libdir}/%{name}
882 %dir %{_libdir}/%{name}/plugin
883 %attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
884 %attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
885 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
886 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
887 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
888 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
889 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
890 %attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so
891 %attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
892 %attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
893 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
894 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
895 %attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
896 %attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
897 %attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
898 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
899 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
900 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
901 %attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
902 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
903 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
904 %attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
905 %if %{with sphinx}
906 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
907 %endif
908 # for plugins
909 %attr(755,root,root) %{_libdir}/libmysqlservices.so
910 %{_mandir}/man1/innochecksum.1*
911 %{_mandir}/man1/my_print_defaults.1*
912 %{_mandir}/man1/myisamchk.1*
913 %{_mandir}/man1/myisamlog.1*
914 %{_mandir}/man1/myisampack.1*
915 %{_mandir}/man1/mysql_plugin.1*
916 %{_mandir}/man1/mysql_upgrade.1*
917 %{_mandir}/man1/mysqlcheck.1*
918 %{_mandir}/man8/mysqld.8*
919
920 %if %{?debug:1}0
921 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
922 %{_datadir}/%{name}/mysqld.sym
923 %{_mandir}/man1/*resolve_stack_dump.1*
924 %endif
925
926 %attr(700,mysql,mysql) %{_mysqlhome}
927 # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
928 %attr(751,root,root) /var/lib/mysql
929 %attr(750,mysql,mysql) %dir /var/log/mysql
930 %attr(750,mysql,mysql) %dir /var/log/archive/mysql
931 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
932
933 # This is template for configuration file which is created after 'service mysql init'
934 %{_datadir}/%{name}/mysqld.conf
935 %{_datadir}/%{name}/mysql_security_commands.sql
936 %{_datadir}/%{name}/mysql_system_tables_data.sql
937 %{_datadir}/%{name}/mysql_system_tables.sql
938 %{_datadir}/%{name}/mysql_test_data_timezone.sql
939
940 %{_datadir}/%{name}/english
941 %{_datadir}/%{name}/dictionary.txt
942 %{_datadir}/%{name}/fill_help_tables.sql
943 %{_datadir}/%{name}/innodb_memcached_config.sql
944 %lang(bg) %{_datadir}/%{name}/bulgarian
945 %lang(cs) %{_datadir}/%{name}/czech
946 %lang(da) %{_datadir}/%{name}/danish
947 %lang(de) %{_datadir}/%{name}/german
948 %lang(el) %{_datadir}/%{name}/greek
949 %lang(es) %{_datadir}/%{name}/spanish
950 %lang(et) %{_datadir}/%{name}/estonian
951 %lang(fr) %{_datadir}/%{name}/french
952 %lang(hu) %{_datadir}/%{name}/hungarian
953 %lang(it) %{_datadir}/%{name}/italian
954 %lang(ja) %{_datadir}/%{name}/japanese
955 %lang(ko) %{_datadir}/%{name}/korean
956 %lang(nl) %{_datadir}/%{name}/dutch
957 %lang(nb) %{_datadir}/%{name}/norwegian
958 %lang(nn) %{_datadir}/%{name}/norwegian-ny
959 %lang(pl) %{_datadir}/%{name}/polish
960 %lang(pt) %{_datadir}/%{name}/portuguese
961 %lang(ro) %{_datadir}/%{name}/romanian
962 %lang(ru) %{_datadir}/%{name}/russian
963 %lang(sr) %{_datadir}/%{name}/serbian
964 %lang(sk) %{_datadir}/%{name}/slovak
965 %lang(sv) %{_datadir}/%{name}/swedish
966 %lang(uk) %{_datadir}/%{name}/ukrainian
967
968 %files charsets
969 %defattr(644,root,root,755)
970 %dir %{_datadir}/%{name}
971 %{_datadir}/%{name}/charsets
972
973 %files extras
974 %defattr(644,root,root,755)
975 %attr(755,root,root) %{_bindir}/msql2mysql
976 %attr(755,root,root) %{_bindir}/myisam_ftdump
977 %attr(755,root,root) %{_bindir}/mysql_install_db
978 %attr(755,root,root) %{_bindir}/mysql_secure_installation
979 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
980 %attr(755,root,root) %{_bindir}/perror
981 %attr(755,root,root) %{_bindir}/replace
982 %attr(755,root,root) %{_bindir}/resolveip
983 %{_mandir}/man1/msql2mysql.1*
984 %{_mandir}/man1/myisam_ftdump.1*
985 %{_mandir}/man1/mysql_install_db.1*
986 %{_mandir}/man1/mysql_secure_installation.1*
987 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
988 %{_mandir}/man1/perror.1*
989 %{_mandir}/man1/replace.1*
990 %{_mandir}/man1/resolveip.1*
991
992 %files -n mysqlhotcopy
993 %defattr(644,root,root,755)
994 %attr(755,root,root) %{_bindir}/mysqlhotcopy
995 %{_mandir}/man1/mysqlhotcopy.1*
996
997 %files extras-perl
998 %defattr(644,root,root,755)
999 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
1000 %attr(755,root,root) %{_bindir}/mysql_find_rows
1001 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
1002 %attr(755,root,root) %{_bindir}/mysql_setpermission
1003 %attr(755,root,root) %{_bindir}/mysql_zap
1004 %attr(755,root,root) %{_bindir}/mysqlaccess
1005 %attr(755,root,root) %{_bindir}/mysqldumpslow
1006 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf
1007 %{_mandir}/man1/mysql_convert_table_format.1*
1008 %{_mandir}/man1/mysql_find_rows.1*
1009 %{_mandir}/man1/mysql_fix_extensions.1*
1010 %{_mandir}/man1/mysql_setpermission.1*
1011 %{_mandir}/man1/mysql_zap.1*
1012 %{_mandir}/man1/mysqlaccess.1*
1013 %{_mandir}/man1/mysqldumpslow.1*
1014
1015 %files client
1016 %defattr(644,root,root,755)
1017 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
1018 %attr(755,root,root) %{_bindir}/mysql
1019 %attr(755,root,root) %{_bindir}/mysqladmin
1020 %attr(755,root,root) %{_bindir}/mysqlbinlog
1021 %attr(755,root,root) %{_bindir}/mysqlbug
1022 %attr(755,root,root) %{_bindir}/mysql_config_editor
1023 %attr(755,root,root) %{_bindir}/mysqldump
1024 %attr(755,root,root) %{_bindir}/mysqlimport
1025 %attr(755,root,root) %{_bindir}/mysqlshow
1026 %{_mandir}/man1/mysql.1*
1027 %{_mandir}/man1/mysqladmin.1*
1028 %{_mandir}/man1/mysqlbinlog.1*
1029 %{_mandir}/man1/mysqlbug.1*
1030 %{_mandir}/man1/mysql_config_editor.1*
1031 %{_mandir}/man1/mysqldump.1*
1032 %{_mandir}/man1/mysqlimport.1*
1033 %{_mandir}/man1/mysqlshow.1*
1034
1035 %files libs
1036 %defattr(644,root,root,755)
1037 %attr(751,root,root) %dir %{_sysconfdir}/mysql
1038 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
1039 %{_sysconfdir}/%{name}/my.cnf
1040 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
1041 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
1042 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
1043 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
1044 %if %{with ndb}
1045 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
1046 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
1047 %endif
1048
1049 %files devel
1050 %defattr(644,root,root,755)
1051 %attr(755,root,root) %{_bindir}/mysql_config
1052 %attr(755,root,root) %{_libdir}/libmysqlclient.so
1053 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so
1054 %if %{with ndb}
1055 %attr(755,root,root) %{_libdir}/libndbclient.so
1056 %endif
1057 # static-only so far
1058 %{_libdir}/libmysqld.a
1059 %{_includedir}/mysql
1060 %{_aclocaldir}/mysql.m4
1061 %{_mandir}/man1/mysql_config.1*
1062
1063 %files static
1064 %defattr(644,root,root,755)
1065 %{_libdir}/libmysqlclient.a
1066 %{_libdir}/libmysqlclient_r.a
1067 %if %{with ndb}
1068 %{_libdir}/libndbclient.a
1069 %endif
1070
1071 %files bench
1072 %defattr(644,root,root,755)
1073 %attr(755,root,root) %{_bindir}/mysqlslap
1074 %attr(755,root,root) %{_bindir}/mysqltest
1075 %dir %{_datadir}/sql-bench
1076 %{_datadir}/sql-bench/[CDRl]*
1077 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
1078 %{_mandir}/man1/mysqlslap.1*
1079 %{_mandir}/man1/mysqltest.1*
1080 %{_mandir}/man1/mysqltest_embedded.1*
1081
1082 %if %{with ndb}
1083 %files ndb
1084 %defattr(644,root,root,755)
1085 %attr(755,root,root) %{_sbindir}/ndbd
1086 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
1087 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
1088 %{_mandir}/man1/ndbd_redo_log_reader.1*
1089 %{_mandir}/man8/ndbd.8*
1090
1091 %files ndb-client
1092 %defattr(644,root,root,755)
1093 %attr(755,root,root) %{_bindir}/ndb_config
1094 %attr(755,root,root) %{_bindir}/ndb_delete_all
1095 %attr(755,root,root) %{_bindir}/ndb_desc
1096 %attr(755,root,root) %{_bindir}/ndb_drop_index
1097 %attr(755,root,root) %{_bindir}/ndb_drop_table
1098 %attr(755,root,root) %{_bindir}/ndb_error_reporter
1099 %attr(755,root,root) %{_bindir}/ndb_mgm
1100 %attr(755,root,root) %{_bindir}/ndb_print_backup_file
1101 %attr(755,root,root) %{_bindir}/ndb_print_schema_file
1102 %attr(755,root,root) %{_bindir}/ndb_print_sys_file
1103 %attr(755,root,root) %{_bindir}/ndb_restore
1104 %attr(755,root,root) %{_bindir}/ndb_select_all
1105 %attr(755,root,root) %{_bindir}/ndb_select_count
1106 %attr(755,root,root) %{_bindir}/ndb_show_tables
1107 %attr(755,root,root) %{_bindir}/ndb_size.pl
1108 %attr(755,root,root) %{_bindir}/ndb_test_platform
1109 %attr(755,root,root) %{_bindir}/ndb_waiter
1110 %{_mandir}/man1/ndb_config.1*
1111 %{_mandir}/man1/ndb_delete_all.1*
1112 %{_mandir}/man1/ndb_desc.1*
1113 %{_mandir}/man1/ndb_drop_index.1*
1114 %{_mandir}/man1/ndb_drop_table.1*
1115 %{_mandir}/man1/ndb_error_reporter.1*
1116 %{_mandir}/man1/ndb_mgm.1*
1117 %{_mandir}/man1/ndb_print_backup_file.1*
1118 %{_mandir}/man1/ndb_print_schema_file.1*
1119 %{_mandir}/man1/ndb_print_sys_file.1*
1120 %{_mandir}/man1/ndb_restore.1*
1121 %{_mandir}/man1/ndb_select_all.1*
1122 %{_mandir}/man1/ndb_select_count.1*
1123 %{_mandir}/man1/ndb_show_tables.1*
1124 %{_mandir}/man1/ndb_size.pl.1*
1125 %{_mandir}/man1/ndb_waiter.1*
1126
1127 %files ndb-mgm
1128 %defattr(644,root,root,755)
1129 %attr(755,root,root) %{_sbindir}/ndb_mgmd
1130 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
1131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
1132 %{_mandir}/man8/ndb_mgmd.8*
1133
1134 %files ndb-cpc
1135 %defattr(644,root,root,755)
1136 %attr(755,root,root) %{_sbindir}/ndb_cpcd
1137 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
1138 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
1139 %{_mandir}/man1/ndb_cpcd.1*
1140 %endif