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