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