]> git.pld-linux.org Git - packages/mysql.git/blame - mysql.spec
- mysql-extras needs mysql-client instead of mysql
[packages/mysql.git] / mysql.spec
CommitLineData
50200f22 1# TODO:
92992b51
ER
2# - unpackaged:
3# /usr/bin/mysqlaccess.conf
4# /usr/data/mysql/.empty
5# /usr/data/test/.empty
c0326166 6# - http://bugs.mysql.com/bug.php?id=16470
9cc19375
AM
7# - innodb are dynamic (= as plugins) ?
8# - missing have_archive, have_merge
9# - is plugin_dir lib64 safe?
10# - Using NDB Cluster... could not find sci transporter in /{include, lib}
13e51307 11# - !!! Makefiles for libmysqld.so !!!
643c5039
AG
12# - segfaults on select from non-mysql user (caused by builder environment):
13# https://bugs.launchpad.net/pld-linux/+bug/381904
20272b1d 14# (profiling disabled temporaily to workaround this)
6c94aa6c 15#
16# Conditional build:
aa8262f8 17%bcond_with autodeps # BR packages needed only for resolving deps
54e670e7 18%bcond_without innodb # InnoDB storage engine support
84fe95c7 19%bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
dc311758 20%bcond_without federated # Federated storage engine support
54e670e7
PG
21%bcond_without raid # RAID support
22%bcond_without ssl # OpenSSL support
23%bcond_without tcpd # libwrap (tcp_wrappers) support
14996ad7 24%bcond_with sphinx # Sphinx storage engine support
7fbcff7e 25%bcond_with tests # FIXME: don't run correctly
08472466 26%bcond_with ndb # NDB is now a separate product, this here is broken, so disable it
92992b51 27
c2c4112b 28%include /usr/lib/rpm/macros.perl
ceb5ca86 29Summary: MySQL: a very fast and reliable SQL database engine
fe56cb4d
ER
30Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank
31Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable
32Summary(pl.UTF-8): MySQL: bardzo szybka i niezawodna baza danych (SQL)
33Summary(pt_BR.UTF-8): MySQL: Um servidor SQL rápido e confiável
34Summary(ru.UTF-8): MySQL - быстрый SQL-сервер
35Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
36Summary(zh_CN.UTF-8): MySQL数据库服务器
75eb20a9 37Name: mysql
d8778560 38Version: 5.5.9
1af84d13 39Release: 2
5a944cb3 40License: GPL + MySQL FLOSS Exception
7803433d 41Group: Applications/Databases
92992b51 42# Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads
0a9213dd 43Source0: http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz
d8778560 44# Source0-md5: 701c0c44b7f1c2300adc0dc45729f903
3af19278
ER
45Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
46# Source100-md5: 7b9b618cb9b378f949bb1b91ddcc4f54
2a30c7ca 47Source1: %{name}.init
48Source2: %{name}.sysconfig
49Source3: %{name}.logrotate
50Source4: %{name}d.conf
50200f22 51Source5: %{name}-clusters.conf
d72472ee
AM
52Source7: %{name}-ndb.init
53Source8: %{name}-ndb.sysconfig
54Source9: %{name}-ndb-mgm.init
55Source10: %{name}-ndb-mgm.sysconfig
56Source11: %{name}-ndb-cpc.init
57Source12: %{name}-ndb-cpc.sysconfig
7df2d935 58Source13: %{name}-client.conf
978cdac2 59Source14: my.cnf
fc032bd9
AM
60# from fedora
61Source15: lib%{name}.version
51298838 62Patch2: %{name}-c++.patch
e94fe593
JB
63Patch3: %{name}-info.patch
64Patch4: %{name}-sql-cxx-pic.patch
fc032bd9
AM
65# from fedora
66Patch5: %{name}-versioning.patch
94fa71d5 67Patch6: %{name}-system-users.patch
f29ae69c 68Patch7: %{name}-bug-34192.patch
7df2d935 69Patch8: %{name}-client-config.patch
1b41566d 70Patch9: %{name}-build.patch
623893be 71Patch10: %{name}-alpha.patch
9cc19375 72Patch11: %{name}-upgrade.patch
a2e8058d 73Patch12: %{name}-config.patch
3d4dbd2e 74Patch14: %{name}-bug-43594.patch
fa51fc20 75Patch18: %{name}-sphinx.patch
fc032bd9 76Patch19: %{name}-chain-certs.patch
b4e1fa2c
AM
77# <percona patches, http://bazaar.launchpad.net/~percona-dev/percona-server/5.5.8/files>
78# series file shows the order of patches
79Patch100: microsec_process.patch
80Patch101: optimizer_fix.patch
fc032bd9 81Patch102: %{name}_dump_ignore_ct.patch
b4e1fa2c
AM
82Patch103: control_online_alter_index.patch
83Patch104: show_temp.patch
84Patch105: innodb_show_status.patch
85Patch106: innodb_io_patches.patch
86Patch107: innodb_opt_lru_count.patch
87Patch108: innodb_extra_rseg.patch
88Patch109: innodb_overwrite_relay_log_info.patch
89Patch110: innodb_thread_concurrency_timer_based.patch
90Patch111: innodb_dict_size_limit.patch
91Patch112: innodb_split_buf_pool_mutex.patch
92Patch113: innodb_expand_import.patch
93Patch114: innodb_show_sys_tables.patch
94Patch115: innodb_stats.patch
95Patch116: innodb_recovery_patches.patch
96Patch117: innodb_admin_command_base.patch
97Patch118: innodb_show_lock_name.patch
98Patch119: innodb_extend_slow.patch
99Patch120: innodb_lru_dump_restore.patch
100Patch121: innodb_separate_doublewrite.patch
101Patch122: innodb_pass_corrupt_table.patch
102Patch123: innodb_fast_checksum.patch
103Patch124: innodb_files_extend.patch
104Patch125: innodb_fix_misc.patch
105Patch126: innodb_deadlock_count.patch
106Patch127: innodb_adaptive_hash_index_partitions.patch
107Patch128: innodb_buffer_pool_pages_i_s.patch
108Patch129: innodb_buffer_pool_shm.patch
109Patch130: innodb_show_status_extend.patch
110Patch131: slow_extended.patch
111Patch132: percona_support.patch
112Patch133: query_cache_enhance.patch
113Patch134: log_connection_error.patch
114Patch135: mysql_syslog.patch
115Patch136: response_time_distribution.patch
116Patch137: error_pad.patch
117Patch138: remove_fcntl_excessive_calls.patch
118Patch139: sql_no_fcache.patch
119Patch140: show_slave_status_nolock.patch
120Patch141: log_warnings_silence.patch
121Patch142: userstat.patch
122Patch143: bug580324.patch
123Patch144: mysql_remove_eol_carret.patch
124Patch145: mysql-test.diff
19c2f221 125# </percona>
92992b51 126URL: http://www.mysql.com/products/community/
9dca226d 127BuildRequires: bison
cd6a3f78 128BuildRequires: cmake >= 2.6
e85f7aef 129BuildRequires: groff
dc8a8fa0
ER
130%if "%{pld_release}" == "ac"
131BuildRequires: libstdc++4-devel >= 5:4.0
132%else
6a4d2f37 133BuildRequires: libstdc++-devel >= 5:4.0
dc8a8fa0 134%endif
374c3070 135BuildRequires: libtool
2e5f696d 136%{?with_tcpd:BuildRequires: libwrap-devel}
7b36dde8 137BuildRequires: ncurses-devel >= 4.2
2e5f696d 138%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
3f8fcf96 139%{?with_autodeps:BuildRequires: perl-DBI}
d15a6540 140BuildRequires: perl-devel >= 1:5.6.1
7b36dde8 141BuildRequires: readline-devel >= 4.2
d15a6540 142BuildRequires: rpm-perlprov >= 4.1-13
6a4d2f37 143BuildRequires: rpmbuild(macros) >= 1.597
84fe95c7 144BuildRequires: sed >= 4.0
5a225b4d 145BuildRequires: zlib-devel
7803433d
ER
146Requires(post,preun): /sbin/chkconfig
147Requires(postun): /usr/sbin/groupdel
148Requires(postun): /usr/sbin/userdel
33f9bccb 149Requires(pre): /bin/id
7803433d 150Requires(pre): /usr/bin/getgid
33f9bccb 151Requires(pre): /usr/sbin/groupadd
152Requires(pre): /usr/sbin/useradd
6e6b75c9 153Requires(triggerpostun): sed >= 4.0
ad0a7267 154Requires: %{name}-charsets = %{version}-%{release}
5a0031b8 155Requires: %{name}-libs = %{version}-%{release}
2539bd3a 156Requires: /usr/bin/setsid
7803433d 157Requires: rc-scripts >= 0.2.0
99e96521
ER
158Suggests: mysql-client
159%{?with_tcpd:Suggests: tcp_wrappers}
a76adf0b 160Suggests: vim-syntax-mycnf
717073d7 161Provides: MySQL-server
c354982f 162Provides: group(mysql)
717073d7 163Provides: msqlormysql
c354982f 164Provides: user(mysql)
5a225b4d 165Obsoletes: MySQL
166Obsoletes: mysql-server
8aecfbc6 167Conflicts: logrotate < 3.7-4
c354982f 168BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
ceb5ca86 169
8de1b4ed 170%define _libexecdir %{_sbindir}
e2417b45 171%define _localstatedir /var/lib/mysql
ea2c1c6a 172%define _mysqlhome /home/services/mysql
e73cea44 173
6eab349a 174%define _noautoreqdep 'perl(DBD::mysql)'
9cc19375 175
ceb5ca86 176%description
75eb20a9 177MySQL is a true multi-user, multi-threaded SQL (Structured Query
178Language) database server. SQL is the most popular database language
179in the world. MySQL is a client/server implementation that consists of
180a server daemon mysqld and many different client programs/libraries.
181
182The main goals of MySQL are speed, robustness and easy to use. MySQL
183was originally developed because we at Tcx needed a SQL server that
184could handle very big databases with magnitude higher speed than what
185any database vendor could offer to us. We have now been using MySQL
186since 1996 in a environment with more than 40 databases, 10,000
187tables, of which more than 500 have more than 7 million rows. This is
188about 50G of mission critical data.
189
190The base upon which MySQL is built is a set of routines that have been
191used in a highly demanding production environment for many years.
192While MySQL is still in development, it already offers a rich and
193highly useful function set.
ceb5ca86 194
a82d818e 195%description -l fr.UTF-8
3fe2f194 196MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
75eb20a9 197multi-taches. Le langage SQL est le langage de bases de donnees le
198plus populaire au monde. MySQL est une implementation client/serveur
199qui consiste en un serveur (mysqld) et differents
200programmes/bibliotheques clientes.
201
202Les objectifs principaux de MySQL sont: vitesse, robustesse et
203facilite d'utilisation. MySQL fut originalement developpe parce que
204nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
205tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
206superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
207utilisons MySQL depuis 1996 dans un environnement avec plus de 40
208bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
209millions de lignes. Ceci represente environ 50G de donnees critiques.
210
211A la base de la conception de MySQL, on retrouve une serie de routines
212qui ont ete utilisees dans un environnement de production pendant
213plusieurs annees. Meme si MySQL est encore en developpement, il offre
214deja une riche et utile serie de fonctions.
3fe2f194 215
a82d818e
JR
216%description -l pl.UTF-8
217MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych
218SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz
219danych. MySQL to implementacja klient/serwer składająca się z demona
220mysqld i wielu różnych programów i bibliotek klienckich.
221
222Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania.
223MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali
224serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele
225większą, niż mogli zaoferować inni producenci baz danych. Używają go
226od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z
227których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około
d451850c
JB
22850GB krytycznych danych.
229
a82d818e
JR
230Baza, na której oparty jest MySQL, składa się ze zbioru procedur,
231które były używane w bardzo wymagającym środowisku produkcyjnym przez
232wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty
233i użyteczny zbiór funkcji.
ceb5ca86 234
a82d818e 235%description -l de.UTF-8
1c06b825 236MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
237Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
a82d818e
JR
238werden zwar in zweidimensionalen Tabellen gespeichert und können mit
239einem Primärschlüssel versehen werden. Es ist aber keine Definition
240eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
241MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
1c06b825 242Daten verantwortlich. Allein durch die Nutzung externer
a82d818e
JR
243Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
244ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
1c06b825 245
a82d818e
JR
246%description -l pt_BR.UTF-8
247O MySQL é um servidor de banco de dados SQL realmente multiusuário e
248multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
249dados no mundo. O MySQL é uma implementação cliente/servidor que
75eb20a9 250consiste de um servidor chamado mysqld e diversos
a82d818e 251programas/bibliotecas clientes. Os principais objetivos do MySQL são:
75eb20a9 252velocidade, robustez e facilidade de uso. O MySQL foi originalmente
a82d818e 253desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
75eb20a9 254pudesse lidar com grandes bases de dados e com uma velocidade muito
255maior do que a que qualquer vendedor podia nos oferecer. Estamos
256usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
a82d818e
JR
257com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
258linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
259A base da construção do MySQL é uma série de rotinas que foram usadas
260em um ambiente de produção com alta demanda por muitos anos. Mesmo o
261MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
262funções muito ricas e úteis. Veja a documentação para maiores
263informações.
264
265%description -l ru.UTF-8
266MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL
267была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в
268дистрибутиве на предмет других участников проекта и прочей информации
269о MySQL.
270
271%description -l uk.UTF-8
272MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL
273було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в
274дистрибутиві для інформації про інших учасників проекту та іншої
275інформації.
bf60a170 276
2539bd3a
JB
277%package charsets
278Summary: MySQL - character sets definitions
fe56cb4d 279Summary(pl.UTF-8): MySQL - definicje kodowań znaków
2539bd3a
JB
280Group: Applications/Databases
281
282%description charsets
283This package contains character sets definitions needed by both client
284and server.
285
a82d818e
JR
286%description charsets -l pl.UTF-8
287Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
2539bd3a
JB
288klienta.
289
17299970
ER
290%package -n mysqlhotcopy
291Summary: mysqlhotcopy - A MySQL database backup program
5fc524a3 292Summary(pl.UTF-8): mysqlhotcopy - program do tworzenia kopii zapasowych baz MySQL
17299970 293Group: Applications/Databases
17299970
ER
294Requires: perl-DBD-mysql
295
296%description -n mysqlhotcopy
297mysqlhotcopy uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a
298database backup quickly. It is the fastest way to make a backup of the
299database or single tables, but it can be run only on the same machine
300where the database directories are located. mysqlhotcopy works only
301for backing up MyISAM and ARCHIVE tables.
302
303See innobackup package to backup InnoDB tables.
304
5fc524a3
JB
305%description -n mysqlhotcopy -l pl.UTF-8
306mysqlhotcopy wykorzystuje LOCK TABLES, FLUSH TABLES oraz cp i scp do
307szybkiego tworzenia kopii zapasowych baz danych. Jest to najszybszy
308sposób wykonania kopii zapasowej bazy danych lub pojedynczych tabel,
309ale może działać tylko na maszynie, na której znajdują się katalogi z
310bazą danych. mysqlhotcopy działa tylko dla tabel typu MyISAM i
311ARCHIVE.
312
313Narzędzie do tworzenia kopii tabel InnoDB znajduje się w pakiecie
314innobackup.
315
8de1b4ed 316%package extras
84bd803c 317Summary: MySQL additional utilities
fe56cb4d 318Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL
8de1b4ed 319Group: Applications/Databases
da1eef6c 320Requires: %{name}-client = %{version}-%{release}
3103a6d7 321Requires: %{name}-libs = %{version}-%{release}
8de1b4ed 322
323%description extras
8afdedd4 324MySQL additional utilities except Perl scripts (they may be found in
73d155ac 325%{name}-extras-perl package).
8afdedd4 326
a82d818e
JR
327%description extras -l pl.UTF-8
328Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w
3c7e6ab8 329pakiecie %{name}-extras-perl).
84bd803c 330
8afdedd4 331%package extras-perl
332Summary: MySQL additional utilities written in Perl
fe56cb4d 333Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu
8afdedd4 334Group: Applications/Databases
3103a6d7 335Requires: %{name}-extras = %{version}-%{release}
716c371c
ER
336# this is just for the sake of smooth upgrade, not to break systems
337Requires: mysqlhotcopy = %{version}-%{release}
b8f6b666 338Requires: perl(DBD::mysql)
339
8afdedd4 340%description extras-perl
341MySQL additional utilities written in Perl.
8de1b4ed 342
a82d818e
JR
343%description extras-perl -l pl.UTF-8
344Dodatkowe narzędzia do MySQL napisane w Perlu.
84bd803c 345
ceb5ca86 346%package client
ceb5ca86 347Summary: MySQL - Client
fe56cb4d
ER
348Summary(pl.UTF-8): MySQL - Klient
349Summary(pt.UTF-8): MySQL - Cliente
350Summary(ru.UTF-8): MySQL клиент
351Summary(uk.UTF-8): MySQL клієнт
ceb5ca86 352Group: Applications/Databases
ad0a7267 353Requires: %{name}-charsets = %{version}-%{release}
1101e5b7 354Requires: %{name}-libs = %{version}-%{release}
c486a119 355Obsoletes: MySQL-client
ceb5ca86
AM
356
357%description client
75eb20a9 358This package contains the standard MySQL clients.
ceb5ca86 359
a82d818e 360%description client -l fr.UTF-8
3fe2f194 361Ce package contient les clients MySQL standards.
362
a82d818e 363%description client -l pl.UTF-8
ceb5ca86
AM
364Standardowe programy klienckie MySQL.
365
a82d818e
JR
366%description client -l pt_BR.UTF-8
367Este pacote contém os clientes padrão para o MySQL.
ceb5ca86 368
a82d818e
JR
369%description client -l ru.UTF-8
370Этот пакет содержит только клиент MySQL.
bf60a170 371
a82d818e
JR
372%description client -l uk.UTF-8
373Цей пакет містить тільки клієнта MySQL.
bf60a170 374
3fe2f194 375%package libs
376Summary: Shared libraries for MySQL
fe56cb4d 377Summary(pl.UTF-8): Biblioteki dzielone MySQL
031565bb 378Group: Libraries
5c69de9f 379Obsoletes: libmysql10
be07ff22 380Obsoletes: mysql-doc < 4.1.12
ceb5ca86 381
3fe2f194 382%description libs
c2c4112b 383Shared libraries for MySQL.
ceb5ca86 384
a82d818e 385%description libs -l pl.UTF-8
84bd803c
JB
386Biblioteki dzielone MySQL.
387
ceb5ca86 388%package devel
ceb5ca86 389Summary: MySQL - Development header files and libraries
fe56cb4d
ER
390Summary(pl.UTF-8): MySQL - Pliki nagłówkowe i biblioteki dla programistów
391Summary(pt.UTF-8): MySQL - Medições de desempenho
392Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработчика
393Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста
047122f1 394Group: Development/Libraries
3103a6d7 395Requires: %{name}-libs = %{version}-%{release}
2e5f696d 396%{?with_ssl:Requires: openssl-devel}
bbc0ff50 397Requires: zlib-devel
c486a119 398Obsoletes: MySQL-devel
5c69de9f 399Obsoletes: libmysql10-devel
ceb5ca86
AM
400
401%description devel
402This package contains the development header files and libraries
403necessary to develop MySQL client applications.
404
a82d818e 405%description devel -l fr.UTF-8
bf60a170 406Ce package contient les fichiers entetes et les librairies de
407developpement necessaires pour developper des applications clientes
408MySQL.
409
a82d818e
JR
410%description devel -l pl.UTF-8
411Pliki nagłówkowe i biblioteki konieczne do kompilacji aplikacji
ceb5ca86 412klienckich MySQL.
b24ee098 413
a82d818e
JR
414%description devel -l pt_BR.UTF-8
415Este pacote contém os arquivos de cabeçalho (header files) e
416bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
b24ee098 417
a82d818e
JR
418%description devel -l ru.UTF-8
419Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
420разработки клиентских приложений.
bf60a170 421
a82d818e
JR
422%description devel -l uk.UTF-8
423Цей пакет містить хедери та бібліотеки програміста, необхідні для
424розробки програм-клієнтів.
3fe2f194 425
426%package static
01875e6d 427Summary: MySQL static libraries
fe56cb4d
ER
428Summary(pl.UTF-8): Biblioteki statyczne MySQL
429Summary(ru.UTF-8): MySQL - статические библиотеки
430Summary(uk.UTF-8): MySQL - статичні бібліотеки
3fe2f194 431Group: Development/Libraries
3103a6d7 432Requires: %{name}-devel = %{version}-%{release}
c44d1e10 433Obsoletes: MySQL-static
3fe2f194 434
435%description static
73d155ac 436MySQL static libraries.
3fe2f194 437
a82d818e 438%description static -l pl.UTF-8
3fe2f194 439Biblioteki statyczne MySQL.
440
a82d818e
JR
441%description static -l ru.UTF-8
442Этот пакет содержит статические библиотеки разработчика, необходимые
443для разработки клиентских приложений.
bf60a170 444
a82d818e
JR
445%description static -l uk.UTF-8
446Цей пакет містить статичні бібліотеки програміста, необхідні для
447розробки програм-клієнтів.
bf60a170 448
d1e91a2d
AM
449%package bench
450Summary: MySQL - Benchmarks
fe56cb4d
ER
451Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy
452Summary(pt.UTF-8): MySQL - Medições de desempenho
453Summary(ru.UTF-8): MySQL - бенчмарки
454Summary(uk.UTF-8): MySQL - бенчмарки
d1e91a2d
AM
455Group: Applications/Databases
456Requires: %{name} = %{version}-%{release}
457Requires: %{name}-client
458Requires: perl(DBD::mysql)
459Obsoletes: MySQL-bench
460
461%description bench
462This package contains MySQL benchmark scripts and data.
463
a82d818e
JR
464%description bench -l pl.UTF-8
465Programy testujące szybkość serwera MySQL.
d1e91a2d 466
a82d818e
JR
467%description bench -l pt_BR.UTF-8
468Este pacote contém medições de desempenho de scripts e dados do MySQL.
d1e91a2d 469
a82d818e
JR
470%description bench -l ru.UTF-8
471Этот пакет содержит скрипты и данные для оценки производительности
d1e91a2d
AM
472MySQL.
473
a82d818e
JR
474%description bench -l uk.UTF-8
475Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
d1e91a2d
AM
476
477%package doc
478Summary: MySQL manual
fe56cb4d 479Summary(pl.UTF-8): Podręcznik użytkownika MySQL
d1e91a2d
AM
480Group: Applications/Databases
481
482%description doc
483This package contains manual in HTML format.
484
a82d818e
JR
485%description doc -l pl.UTF-8
486Podręcznik MySQL-a w formacie HTML.
d1e91a2d 487
d72472ee
AM
488%package ndb
489Summary: MySQL - NDB Storage Engine Daemon
fe56cb4d 490Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB
d72472ee
AM
491Group: Applications/Databases
492Requires: %{name}-libs = %{version}-%{release}
493
494%description ndb
495This package contains the standard MySQL NDB Storage Engine Daemon.
496
a82d818e 497%description ndb -l pl.UTF-8
8cdaa5ca
ER
498Ten pakiet zawiera standardowego demona silnika przechowywania danych
499NDB.
a4fd19f2 500
d72472ee
AM
501%package ndb-client
502Summary: MySQL - NDB Clients
fe56cb4d 503Summary(pl.UTF-8): MySQL - programy klienckie NDB
d72472ee
AM
504Group: Applications/Databases
505Requires: %{name}-libs = %{version}-%{release}
506
507%description ndb-client
508This package contains the standard MySQL NDB Clients.
509
a82d818e 510%description ndb-client -l pl.UTF-8
a4fd19f2
JB
511Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
512
d72472ee
AM
513%package ndb-mgm
514Summary: MySQL - NDB Management Daemon
fe56cb4d 515Summary(pl.UTF-8): MySQL - demon zarządzający NDB
d72472ee
AM
516Group: Applications/Databases
517Requires: %{name}-libs = %{version}-%{release}
518
519%description ndb-mgm
520This package contains the standard MySQL NDB Management Daemon.
521
a82d818e
JR
522%description ndb-mgm -l pl.UTF-8
523Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
a4fd19f2 524
d72472ee
AM
525%package ndb-cpc
526Summary: MySQL - NDB CPC Daemon
fe56cb4d 527Summary(pl.UTF-8): MySQL - demon NDB CPC
d72472ee
AM
528Group: Applications/Databases
529Requires: %{name}-libs = %{version}-%{release}
530
531%description ndb-cpc
532This package contains the standard MySQL NDB CPC Daemon.
533
a82d818e 534%description ndb-cpc -l pl.UTF-8
a4fd19f2
JB
535Ten pakiet zawiera standardowego demona MySQL NDB CPC.
536
a09e0285 537%prep
bac101f3 538%setup -q %{?with_sphinx:-a100}
e6696823 539%if %{with sphinx}
fa51fc20 540# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
e6696823 541mv sphinx-*/mysqlse storage/sphinx
fa51fc20 542%patch18 -p1
e6696823 543%endif
9cc19375 544#%patch2 -p1 # NEEDS CHECK, which exact program needs -lc++
13701330 545%patch3 -p1
4910fc31
JB
546%ifarch alpha
547# this is strange: mysqld functions for UDF modules are not explicitly defined,
548# so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
549# in objects compiled without -fPIC
e94fe593 550%patch4 -p1
2539bd3a 551# gcc 3.3.x ICE
623893be 552%patch10 -p1
4910fc31 553%endif
fc032bd9 554%patch5 -p1
14996ad7 555%patch6 -p1
f29ae69c 556%patch7 -p1
7df2d935 557%patch8 -p1
1b41566d 558%patch9 -p1
bbae9ea7 559%patch11 -p1
a2e8058d 560%patch12 -p1
3d4dbd2e 561%patch14 -p0
fc032bd9 562%patch19 -p1
075b91cf 563# <percona %patches>
b4e1fa2c
AM
564%patch100 -p1
565%patch101 -p1
8ad2cc9f 566#%patch102 -p1
b4e1fa2c
AM
567%patch103 -p1
568%patch104 -p1
569%patch105 -p1
570%patch106 -p1
571%patch107 -p1
572%patch108 -p1
573%patch109 -p1
574%patch110 -p1
575%patch111 -p1
576%patch112 -p1
577%patch113 -p1
578%patch114 -p1
579%patch115 -p1
580%patch116 -p1
581%patch117 -p1
582%patch118 -p1
583%patch119 -p1
584%patch120 -p1
585%patch121 -p1
586%patch122 -p1
587%patch123 -p1
588%patch124 -p1
589%patch125 -p1
590%patch126 -p1
591%patch127 -p1
592%patch128 -p1
593%patch129 -p1
594%patch130 -p1
595%patch131 -p1
596%patch132 -p1
597%patch133 -p1
598%patch134 -p1
599%patch135 -p1
600%patch136 -p1
601%patch137 -p1
602%patch138 -p1
603%patch139 -p1
604%patch140 -p1
605%patch141 -p1
606%patch142 -p1
607%patch143 -p1
608%patch144 -p1
609%patch145 -p1
fc032bd9
AM
610# </percona>
611
b4e1fa2c
AM
612# to get these files rebuild
613rm sql/sql_yacc.cc
614rm sql/sql_yacc.h
b24ee098 615
a09e0285 616%build
8ad2cc9f
AM
617install -d build
618cd build
92992b51
ER
619# NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
620# (it defaults to first cluster but user may change it to whatever
621# cluster it wants)
234eba13
ER
622
623%if "%{pld_release}" == "ac"
4b2e4b47 624# add suffix, but allow ccache, etc in ~/.rpmmacros
234eba13
ER
625%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
626%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
627%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
628%endif
629
fc032bd9
AM
630# upstream has fallen down badly on symbol versioning, do it ourselves
631install -d libmysql
632cp -a %{SOURCE15} libmysql/libmysql.version
633
92992b51 634%cmake \
259cadd8 635 -DFEATURE_SET="community" \
dbbad511
ER
636 -DCMAKE_C_FLAGS_RELEASE="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
637 -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
575c6276 638 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
8ad2cc9f
AM
639 %{?debug:-DWITH_DEBUG=ON} \
640 -DWITH_FAST_MUTEXES=ON \
dbbad511 641 -DWITH_PIC=ON \
8ad2cc9f 642 -DWITH_LIBEDIT=OFF \
fc032bd9 643 -DWITH_READLINE=OFF \
e6dcb604
ER
644%if "%{pld_release}" == "ac"
645 -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
646%else
5d4c4d6c 647 -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
e6dcb604 648%endif
8ad2cc9f 649 -DWITH_ZLIB=system \
259cadd8 650 -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
5d4c4d6c 651 -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
dbbad511 652 -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
234eba13 653 -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
92992b51 654 -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
5dc334e6
ER
655 -DINSTALL_LAYOUT=RPM \
656 -DINSTALL_MYSQLTESTDIR_RPM="" \
c9b1588e 657 -DINSTALL_SQLBENCHDIR=%{_datadir} \
92992b51 658 -DINSTALL_SUPPORTFILESDIR=%{_datadir}/%{name}-support \
8ad2cc9f
AM
659 ..
660
661%{__make}
b24ee098 662
7fbcff7e
AM
663%{?with_tests:%{__make} test}
664
ceb5ca86 665%install
3fe2f194 666rm -rf $RPM_BUILD_ROOT
978cdac2 667install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
92c38d0d 668 $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
921dc37c 669 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
b24ee098 670
8ad2cc9f
AM
671%{__make} -C build install \
672 DESTDIR=$RPM_BUILD_ROOT
d451850c 673
92992b51 674cp -a Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
b24ee098 675
92992b51
ER
676install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
677cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
678cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
dbf4eb6a 679# This is template for configuration file which is created after 'service mysql init'
92992b51
ER
680cp -a %{SOURCE4} mysqld.conf
681cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
682touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
b24ee098 683
2e5f696d 684# remove innodb directives from mysqld.conf if mysqld is configured without
9cc19375 685%if %{without innodb}
2e5f696d
ER
686 cp mysqld.conf mysqld.tmp
687 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
688%endif
689
690# remove berkeley-db directives from mysqld.conf if mysqld is configured without
9cc19375
AM
691cp mysqld.conf mysqld.tmp
692awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
2e5f696d 693
92992b51
ER
694cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.conf
695cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
978cdac2 696cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
2e5f696d 697
d72472ee 698# NDB
f7fb94f7 699%if %{with ndb}
92992b51
ER
700install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
701cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
702install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
703cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
704install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
705cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
f7fb94f7 706%endif
17dc26d2 707
14996ad7
AM
708# symlinks point to the .so file, fix it
709ln -sf libmysqlclient.so.16 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.16
710ln -sf libmysqlclient.so.16.0.0 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.16.0.0
711
712sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
04497307 713sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
b24ee098 714
17dc26d2 715# remove known unpackaged files
c9b1588e 716rm -rf $RPM_BUILD_ROOT%{_datadir}/mysql-support
d4f3faae 717
9cc19375
AM
718# remove .txt variants for .sys messages
719rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
720
8b2cbaf3 721# rename not to be so generic name
8b2cbaf3 722mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
68e8a131 723mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
17dc26d2 724
c0326166
ER
725# not useful without -debug build
726%{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
68e8a131 727%{!?debug:rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
c0326166 728# generate symbols file, so one can generate backtrace using it
92992b51 729# mysql_resolve_stack_dump -s %{_datadir}/%{name}/mysqld.sym -n mysqld.stack.
c0326166 730# http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
92992b51 731%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.sym}
c0326166 732
dabd8964 733# do not clobber users $PATH
dabd8964
ER
734mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
735mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
736mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
737mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
738mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
c9b1588e 739#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
dabd8964 740mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
3b961fb0 741sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
dabd8964
ER
742mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
743
3b961fb0
AM
744# delete - functionality in initscript / rpm
745# mysql_install_db is needed by digikam
746#rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
747#rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_install_db.1*
17dc26d2
ER
748rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
749rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
750rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
c9b1588e
AM
751#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
752#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
753#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
754rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg-utf8.txt
17dc26d2 755rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
68e8a131 756rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
a62ea18e 757rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
a44a043c 758rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
1af84d13
ZU
759#rm $RPM_BUILD_ROOT%{_bindir}/resolveip
760#rm $RPM_BUILD_ROOT%{_mandir}/man1/resolveip.1*
68e8a131 761rm $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
9cc19375
AM
762
763# we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
764rm $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
68e8a131
ER
765rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
766rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
767rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
768rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
cae37d69 769rm -rf $RPM_BUILD_ROOT%{_datadir}/mysql-test
17dc26d2 770
be74eb6e 771# not needed
92992b51
ER
772rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
773rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/ha_example.*
774rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/sphinx.{a,la}
9cc19375 775
f624a76e 776%clean
1d171524 777rm -rf $RPM_BUILD_ROOT
f624a76e 778
fd32e090 779%pre
ff5f125f
ER
780%groupadd -g 89 mysql
781%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
fd32e090 782
ceb5ca86 783%post
054c91be 784[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
785/sbin/chkconfig --add mysql
4ebde491 786%service mysql restart
dd6934b4 787
d5e8c713 788%preun
054c91be 789if [ "$1" = "0" ]; then
579146e7 790 %service -q mysql stop
054c91be 791 /sbin/chkconfig --del mysql
792fi
c44d1e10 793
ec56ce82
AM
794%postun
795[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
9cc19375 796
fd32e090 797if [ "$1" = "0" ]; then
c354982f 798 %userremove mysql
799 %groupremove mysql
fd32e090 800fi
b24ee098 801
d72472ee
AM
802%post ndb
803/sbin/chkconfig --add mysql-ndb
1101e5b7 804%service mysql-ndb restart "mysql NDB engine"
d72472ee
AM
805
806%preun ndb
807if [ "$1" = "0" ]; then
1101e5b7
ER
808 %service mysql-ndb stop
809 /sbin/chkconfig --del mysql-ndb
d72472ee
AM
810fi
811
812%post ndb-mgm
813/sbin/chkconfig --add mysql-ndb-mgm
1101e5b7 814%service mysql-ndb-mgm restart "mysql NDB management node"
d72472ee
AM
815
816%preun ndb-mgm
817if [ "$1" = "0" ]; then
1101e5b7
ER
818 %service mysql-ndb-mgm stop
819 /sbin/chkconfig --del mysql-ndb-mgm
d72472ee
AM
820fi
821
822%post ndb-cpc
823/sbin/chkconfig --add mysql-ndb-cpc
1101e5b7 824%service mysql-ndb-cpc restart "mysql NDB CPC"
d72472ee
AM
825
826%preun ndb-cpc
827if [ "$1" = "0" ]; then
1101e5b7
ER
828 %service mysql-ndb-cpc stop
829 /sbin/chkconfig --del mysql-ndb-cpc
d72472ee
AM
830fi
831
3fe2f194 832%post libs -p /sbin/ldconfig
833%postun libs -p /sbin/ldconfig
b24ee098 834
80cc634b 835%triggerpostun -- mysql < 4.0.20-2.4
92992b51 836# For clusters in /etc/%{name}/clusters.conf
be74eb6e 837if [ -f /etc/sysconfig/mysql ]; then
99e0d1a2 838 . /etc/sysconfig/mysql
4c7c0ef7 839 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
99e0d1a2 840 for i in "$MYSQL_DB_CLUSTERS"; do
92992b51 841 echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
99e0d1a2 842 done
b545a308 843 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
92992b51
ER
844 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
845 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
846 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
99e0d1a2
PG
847 fi
848fi
849
80cc634b 850%triggerpostun -- mysql < 4.1.1
7f18dfce 851# For better compatibility with prevoius versions:
92992b51 852for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
7f18dfce
PG
853 if echo "$config" | grep -q '^/'; then
854 config_file="$config"
92992b51
ER
855 elif [ -f "/etc/%{name}/$config" ]; then
856 config_file=/etc/%{name}/$config
7f18dfce 857 else
92992b51 858 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
dd25dce8
ER
859 if [ -z "$clusterdir" ]; then
860 echo >&2 "Can't find cluster dir for $config!"
92992b51 861 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
dd25dce8
ER
862 exit 1
863 fi
7f18dfce
PG
864 config_file="$clusterdir/mysqld.conf"
865 fi
0e6ae684
ER
866
867 if [ ! -f "$config_file" ]; then
868 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
869 exit 1
870 fi
7f18dfce
PG
871 echo "Adding option old-passwords to config: $config_file"
872 echo "If you want to use new, better passwords - remove it"
6e6b75c9
ER
873
874 # sed magic to add 'old-passwords' to [mysqld] section
875 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
876 a
877 a; Compatibility options:
878 aold-passwords
879 }
880 ' $config_file
7f18dfce
PG
881done
882
a2d3f15b 883%banner -e %{name}-4.1.x <<-EOF
f1180631
ER
884 If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
885 mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
a2d3f15b
ER
886EOF
887#'
888
dc311758 889%triggerpostun -- mysql < 5.1.0
9cc19375 890configs=""
92992b51 891for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
9cc19375
AM
892 if echo "$config" | grep -q '^/'; then
893 config_file="$config"
92992b51
ER
894 elif [ -f "/etc/%{name}/$config" ]; then
895 config_file=/etc/%{name}/$config
9cc19375 896 else
92992b51 897 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
9cc19375
AM
898 if [ -z "$clusterdir" ]; then
899 echo >&2 "Can't find cluster dir for $config!"
92992b51 900 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
9cc19375
AM
901 exit 1
902 fi
903 config_file="$clusterdir/mysqld.conf"
904 fi
905
906 if [ ! -f "$config_file" ]; then
907 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
908 continue
909 fi
910 configs="$configs $config_file"
911done
912
913(
3a4d8c21 914echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
9cc19375
AM
915echo 'Thus, you should invoke:'
916for config in $configs; do
be74eb6e 917 datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
9cc19375
AM
918 echo "# mysql_upgrade --datadir=$datadir"
919done
920) | %banner -e %{name}-5.1
921
b5a439fb
AM
922%triggerpostun -- mysql < 5.5.0
923configs=""
924for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
925 if echo "$config" | grep -q '^/'; then
926 config_file="$config"
927 elif [ -f "/etc/%{name}/$config" ]; then
928 config_file=/etc/%{name}/$config
929 else
930 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
931 if [ -z "$clusterdir" ]; then
932 echo >&2 "Can't find cluster dir for $config!"
933 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
934 exit 1
935 fi
936 config_file="$clusterdir/mysqld.conf"
937 fi
938
939 if [ ! -f "$config_file" ]; then
940 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
941 continue
942 fi
943 configs="$configs $config_file"
944done
945
946for config in $configs; do
947 sed -i -e 's#^language *= *polish#lc-messages = pl_PL#gi' $config
948done
949
ceb5ca86 950%files
a09e0285 951%defattr(644,root,root,755)
c9b1588e 952%doc build/support-files/*.cnf build/support-files/*.ini
92992b51
ER
953%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
954%attr(754,root,root) /etc/rc.d/init.d/%{name}
955%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
956%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
dabd8964 957%attr(755,root,root) %{_sbindir}/innochecksum
2b48022a 958%attr(755,root,root) %{_sbindir}/my_print_defaults
dabd8964
ER
959%attr(755,root,root) %{_sbindir}/myisamchk
960%attr(755,root,root) %{_sbindir}/myisamlog
961%attr(755,root,root) %{_sbindir}/myisampack
c9b1588e 962#%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables
dabd8964 963%attr(755,root,root) %{_sbindir}/mysql_upgrade
2b48022a
ER
964%attr(755,root,root) %{_sbindir}/mysqlcheck
965%attr(755,root,root) %{_sbindir}/mysqld
92992b51
ER
966%dir %{_libdir}/%{name}
967%dir %{_libdir}/%{name}/plugin
968%attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
969%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
970%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
971%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
972%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
973%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
974%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so
975%attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
976%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
977%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
978%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
979%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
980%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
fa51fc20 981%if %{with sphinx}
92992b51 982%attr(755,root,root) %{_libdir}/%{name}/plugin/sphinx.so
fa51fc20 983%endif
68e8a131 984%{_mandir}/man1/innochecksum.1*
2b48022a 985%{_mandir}/man1/my_print_defaults.1*
84628b90
AM
986%{_mandir}/man1/myisamchk.1*
987%{_mandir}/man1/myisamlog.1*
988%{_mandir}/man1/myisampack.1*
c9b1588e 989#%{_mandir}/man1/mysql_fix_privilege_tables.1*
d0fe1bc5 990%{_mandir}/man1/mysql_upgrade.1*
2b48022a 991%{_mandir}/man1/mysqlcheck.1*
c3389a2d 992%{_mandir}/man8/mysqld.8*
c486a119 993
c27588d8
ER
994%if %{?debug:1}0
995%attr(755,root,root) %{_bindir}/*resolve_stack_dump
92992b51 996%{_datadir}/%{name}/mysqld.sym
c27588d8
ER
997%{_mandir}/man1/*resolve_stack_dump.1*
998%endif
999
ea2c1c6a 1000%attr(700,mysql,mysql) %{_mysqlhome}
68e8a131 1001# root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
179f04ff 1002%attr(751,root,root) /var/lib/mysql
8594196c 1003%attr(750,mysql,mysql) %dir /var/log/mysql
ced65266 1004%attr(750,mysql,mysql) %dir /var/log/archive/mysql
13924afb 1005%attr(640,mysql,mysql) %ghost /var/log/mysql/*
431c9391 1006
8de1b4ed 1007%{_infodir}/mysql.info*
dbf4eb6a 1008# This is template for configuration file which is created after 'service mysql init'
92992b51
ER
1009%{_datadir}/%{name}/mysqld.conf
1010%{_datadir}/%{name}/mysql_system_tables.sql
1011%{_datadir}/%{name}/mysql_system_tables_data.sql
1012%{_datadir}/%{name}/mysql_test_data_timezone.sql
1013
1014%{_datadir}/%{name}/english
1015%{_datadir}/%{name}/fill_help_tables.sql
1016#%{_datadir}/%{name}/mysql_fix_privilege_tables.sql
1017%lang(cs) %{_datadir}/%{name}/czech
1018%lang(da) %{_datadir}/%{name}/danish
1019%lang(de) %{_datadir}/%{name}/german
1020%lang(el) %{_datadir}/%{name}/greek
1021%lang(es) %{_datadir}/%{name}/spanish
1022%lang(et) %{_datadir}/%{name}/estonian
1023%lang(fr) %{_datadir}/%{name}/french
1024%lang(hu) %{_datadir}/%{name}/hungarian
1025%lang(it) %{_datadir}/%{name}/italian
1026%lang(ja) %{_datadir}/%{name}/japanese
1027%lang(ko) %{_datadir}/%{name}/korean
1028%lang(nl) %{_datadir}/%{name}/dutch
1029%lang(nb) %{_datadir}/%{name}/norwegian
1030%lang(nn) %{_datadir}/%{name}/norwegian-ny
1031%lang(pl) %{_datadir}/%{name}/polish
1032%lang(pt) %{_datadir}/%{name}/portuguese
1033%lang(ro) %{_datadir}/%{name}/romanian
1034%lang(ru) %{_datadir}/%{name}/russian
1035%lang(sr) %{_datadir}/%{name}/serbian
1036%lang(sk) %{_datadir}/%{name}/slovak
1037%lang(sv) %{_datadir}/%{name}/swedish
1038%lang(uk) %{_datadir}/%{name}/ukrainian
b24ee098 1039
ad0a7267
JR
1040%files charsets
1041%defattr(644,root,root,755)
2539bd3a 1042%dir %{_datadir}/mysql
92992b51 1043%{_datadir}/%{name}/charsets
ad0a7267 1044
8de1b4ed 1045%files extras
1046%defattr(644,root,root,755)
f261d032 1047%attr(755,root,root) %{_bindir}/msql2mysql
8b2cbaf3 1048%attr(755,root,root) %{_bindir}/myisam_ftdump
90db0fd4 1049%attr(755,root,root) %{_bindir}/mysql_install_db
8b2cbaf3
ER
1050%attr(755,root,root) %{_bindir}/mysql_secure_installation
1051%attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
b94ecc67
JB
1052%attr(755,root,root) %{_bindir}/perror
1053%attr(755,root,root) %{_bindir}/replace
90db0fd4 1054%attr(755,root,root) %{_bindir}/resolveip
b94ecc67 1055%{_mandir}/man1/msql2mysql.1*
9787b388 1056%{_mandir}/man1/myisam_ftdump.1*
90db0fd4 1057%{_mandir}/man1/mysql_install_db.1*
68e8a131 1058%{_mandir}/man1/mysql_secure_installation.1*
77cbc8ff 1059%{_mandir}/man1/mysql_tzinfo_to_sql.1*
e474e322 1060%{_mandir}/man1/perror.1*
1061%{_mandir}/man1/replace.1*
90db0fd4 1062%{_mandir}/man1/resolveip.1*
8de1b4ed 1063
17299970
ER
1064%files -n mysqlhotcopy
1065%defattr(644,root,root,755)
1066%attr(755,root,root) %{_bindir}/mysqlhotcopy
1067%{_mandir}/man1/mysqlhotcopy.1*
1068
8afdedd4 1069%files extras-perl
1070%defattr(644,root,root,755)
8594196c 1071%attr(755,root,root) %{_bindir}/mysql_convert_table_format
8afdedd4 1072%attr(755,root,root) %{_bindir}/mysql_find_rows
8b2cbaf3 1073%attr(755,root,root) %{_bindir}/mysql_fix_extensions
b894e3d4 1074%attr(755,root,root) %{_bindir}/mysql_setpermission
b894e3d4 1075%attr(755,root,root) %{_bindir}/mysql_zap
2b48022a
ER
1076%attr(755,root,root) %{_bindir}/mysqlaccess
1077%attr(755,root,root) %{_bindir}/mysqldumpslow
68e8a131 1078%{_mandir}/man1/mysql_convert_table_format.1*
ffda6e55 1079%{_mandir}/man1/mysql_find_rows.1*
68e8a131 1080%{_mandir}/man1/mysql_fix_extensions.1*
68e8a131
ER
1081%{_mandir}/man1/mysql_setpermission.1*
1082%{_mandir}/man1/mysql_zap.1*
2b48022a 1083%{_mandir}/man1/mysqlaccess.1*
08472466 1084%{_mandir}/man1/mysqldumpslow.1*
8afdedd4 1085
ceb5ca86 1086%files client
75eb20a9 1087%defattr(644,root,root,755)
978cdac2 1088%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
01dea3d5 1089%attr(755,root,root) %{_bindir}/mysql
9cc19375
AM
1090%attr(755,root,root) %{_bindir}/mysqladmin
1091%attr(755,root,root) %{_bindir}/mysqlbinlog
065b78b5 1092%attr(755,root,root) %{_bindir}/mysqlbug
01dea3d5 1093%attr(755,root,root) %{_bindir}/mysqldump
1094%attr(755,root,root) %{_bindir}/mysqlimport
1095%attr(755,root,root) %{_bindir}/mysqlshow
c9b1588e 1096#%attr(755,root,root) %{_sbindir}/mysqlmanager
75eb20a9 1097%{_mandir}/man1/mysql.1*
e474e322 1098%{_mandir}/man1/mysqladmin.1*
84628b90 1099%{_mandir}/man1/mysqlbinlog.1*
512d8da1 1100%{_mandir}/man1/mysqlbug.1*
9cc19375 1101%{_mandir}/man1/mysqldump.1*
84628b90 1102%{_mandir}/man1/mysqlimport.1*
9cc19375 1103%{_mandir}/man1/mysqlshow.1*
c9b1588e 1104#%{_mandir}/man8/mysqlmanager.8*
b24ee098 1105
3fe2f194 1106%files libs
75eb20a9 1107%defattr(644,root,root,755)
2b48022a 1108%attr(751,root,root) %dir %{_sysconfdir}/mysql
92992b51 1109%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
3b9f87c2 1110%attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
bd1c7139 1111%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.16
3b9f87c2 1112%attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
bd1c7139 1113%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.16
08472466 1114%if %{with ndb}
3b9f87c2 1115%attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
bd1c7139 1116%attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
08472466 1117%endif
b24ee098 1118
ceb5ca86 1119%files devel
3fe2f194 1120%defattr(644,root,root,755)
bbc0ff50 1121%attr(755,root,root) %{_bindir}/mysql_config
3b9f87c2
JB
1122%attr(755,root,root) %{_libdir}/libmysqlclient.so
1123%attr(755,root,root) %{_libdir}/libmysqlclient_r.so
c9b1588e
AM
1124# what's this?
1125%attr(755,root,root) %{_libdir}/libmysqlservices.so
08472466 1126%if %{with ndb}
3b9f87c2 1127%attr(755,root,root) %{_libdir}/libndbclient.so
08472466 1128%endif
3fe2f194 1129%{_includedir}/mysql
68e8a131 1130%{_aclocaldir}/mysql.m4
84628b90 1131%{_mandir}/man1/mysql_config.1*
3fe2f194 1132
1133%files static
75eb20a9 1134%defattr(644,root,root,755)
3b9f87c2
JB
1135%{_libdir}/libmysqlclient.a
1136%{_libdir}/libmysqlclient_r.a
08472466 1137%if %{with ndb}
3b9f87c2 1138%{_libdir}/libndbclient.a
08472466 1139%endif
ceb5ca86 1140
d1e91a2d
AM
1141%files bench
1142%defattr(644,root,root,755)
8ce69d92 1143%attr(755,root,root) %{_bindir}/mysqlslap
d1e91a2d
AM
1144%attr(755,root,root) %{_bindir}/mysqltest
1145%dir %{_datadir}/sql-bench
1146%{_datadir}/sql-bench/[CDRl]*
1147%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
8ce69d92 1148%{_mandir}/man1/mysqlslap.1*
ffda6e55
ER
1149%{_mandir}/man1/mysqltest.1*
1150%{_mandir}/man1/mysqltest_embedded.1*
d1e91a2d 1151
be07ff22
AM
1152#%files doc
1153#%defattr(644,root,root,755)
1154#%doc Docs/manual.html Docs/manual_toc.html
d1e91a2d 1155
08472466 1156%if %{with ndb}
d72472ee
AM
1157%files ndb
1158%defattr(644,root,root,755)
1159%attr(755,root,root) %{_sbindir}/ndbd
1160%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
8cdaa5ca 1161%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
ffda6e55 1162%{_mandir}/man1/ndbd_redo_log_reader.1*
210f47d4 1163%{_mandir}/man8/ndbd.8*
d72472ee
AM
1164
1165%files ndb-client
1166%defattr(644,root,root,755)
e56168f2
ER
1167%attr(755,root,root) %{_bindir}/ndb_config
1168%attr(755,root,root) %{_bindir}/ndb_delete_all
1169%attr(755,root,root) %{_bindir}/ndb_desc
1170%attr(755,root,root) %{_bindir}/ndb_drop_index
1171%attr(755,root,root) %{_bindir}/ndb_drop_table
1172%attr(755,root,root) %{_bindir}/ndb_error_reporter
1173%attr(755,root,root) %{_bindir}/ndb_mgm
1174%attr(755,root,root) %{_bindir}/ndb_print_backup_file
1175%attr(755,root,root) %{_bindir}/ndb_print_schema_file
1176%attr(755,root,root) %{_bindir}/ndb_print_sys_file
1177%attr(755,root,root) %{_bindir}/ndb_restore
1178%attr(755,root,root) %{_bindir}/ndb_select_all
1179%attr(755,root,root) %{_bindir}/ndb_select_count
1180%attr(755,root,root) %{_bindir}/ndb_show_tables
1181%attr(755,root,root) %{_bindir}/ndb_size.pl
1182%attr(755,root,root) %{_bindir}/ndb_test_platform
1183%attr(755,root,root) %{_bindir}/ndb_waiter
e56168f2
ER
1184%{_mandir}/man1/ndb_config.1*
1185%{_mandir}/man1/ndb_delete_all.1*
1186%{_mandir}/man1/ndb_desc.1*
68e8a131
ER
1187%{_mandir}/man1/ndb_drop_index.1*
1188%{_mandir}/man1/ndb_drop_table.1*
1189%{_mandir}/man1/ndb_error_reporter.1*
1190%{_mandir}/man1/ndb_mgm.1*
1191%{_mandir}/man1/ndb_print_backup_file.1*
1192%{_mandir}/man1/ndb_print_schema_file.1*
1193%{_mandir}/man1/ndb_print_sys_file.1*
1194%{_mandir}/man1/ndb_restore.1*
1195%{_mandir}/man1/ndb_select_all.1*
1196%{_mandir}/man1/ndb_select_count.1*
1197%{_mandir}/man1/ndb_show_tables.1*
e56168f2 1198%{_mandir}/man1/ndb_size.pl.1*
68e8a131 1199%{_mandir}/man1/ndb_waiter.1*
d72472ee
AM
1200
1201%files ndb-mgm
1202%defattr(644,root,root,755)
1203%attr(755,root,root) %{_sbindir}/ndb_mgmd
1204%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
8cdaa5ca 1205%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
210f47d4 1206%{_mandir}/man8/ndb_mgmd.8*
d72472ee 1207
d72472ee
AM
1208%files ndb-cpc
1209%defattr(644,root,root,755)
1210%attr(755,root,root) %{_sbindir}/ndb_cpcd
1211%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
8cdaa5ca 1212%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
68e8a131 1213%{_mandir}/man1/ndb_cpcd.1*
08472466 1214%endif
This page took 0.369612 seconds and 4 git commands to generate.