]> git.pld-linux.org Git - packages/mysql.git/blame - mysql.spec
- rel 1; percona did change internal hsclient library, so we can't use system one now
[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
8b30bad8 33%define rel 1
1af27f8d 34%define percona_rel 79.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
1af27f8d 45Version: 5.6.34
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
1af27f8d 52# Source0-md5: 23dff9d6fcb47b8d0ae9168a637a0e98
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
63a6ce7c 76
1b41566d 77Patch9: %{name}-build.patch
9cc19375 78Patch11: %{name}-upgrade.patch
a2e8058d 79Patch12: %{name}-config.patch
3d4dbd2e 80Patch14: %{name}-bug-43594.patch
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
6e6b75c9 122Requires(triggerpostun): 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
63a6ce7c 530
1b41566d 531%patch9 -p1
bbae9ea7 532%patch11 -p1
a2e8058d 533%patch12 -p1
3d4dbd2e 534%patch14 -p0
fc032bd9 535%patch19 -p1
90e4ba9d 536%patch20 -p1
1ff19b43 537
758b3679 538%patch22 -p1
84a54893 539%patch23 -p1
96b6cbc2 540%patch24 -p1
1e4b76dd 541
f85f07de
AM
542# not compatible with percona server at this point, see content
543# of scripts/mysqldumpslow.sh
544#%patch26 -p1
db2e112e 545%patch27 -p1
fc032bd9 546
b4e1fa2c 547# to get these files rebuild
3d33ff78
JB
548[ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
549[ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
b24ee098 550
8fc77a5d
AM
551# map has more sane versioning that default "global everything" in ver.in
552cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
553
a09e0285 554%build
8ad2cc9f
AM
555install -d build
556cd build
92992b51
ER
557# NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
558# (it defaults to first cluster but user may change it to whatever
559# cluster it wants)
234eba13
ER
560
561%if "%{pld_release}" == "ac"
4b2e4b47 562# add suffix, but allow ccache, etc in ~/.rpmmacros
234eba13
ER
563%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
564%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
565%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
566%endif
567
abe20e21 568CPPFLAGS="%{rpmcppflags}" \
3d33ff78 569%cmake .. \
96962fb9 570 -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
abe20e21
JB
571 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
572 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
f42f4b0d
JB
573 -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
574 -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
d65cccc9 575 %{?with_systemtap:-DENABLE_DTRACE=ON} \
f42f4b0d
JB
576 -DFEATURE_SET="community" \
577 -DINSTALL_LAYOUT=RPM \
578 -DINSTALL_LIBDIR=%{_lib} \
579 -DINSTALL_MYSQLTESTDIR_RPM="" \
e4d6dd78 580 -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \
f42f4b0d 581 -DINSTALL_SQLBENCHDIR=%{_datadir} \
1ff19b43
AM
582 -DINSTALL_SUPPORTFILESDIR=share/%{_orgname}-support \
583 -DINSTALL_MYSQLSHAREDIR=share/%{_orgname} \
f42f4b0d 584 -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
8ad2cc9f 585 %{?debug:-DWITH_DEBUG=ON} \
f42f4b0d 586 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
8ad2cc9f 587 -DWITH_FAST_MUTEXES=ON \
f42f4b0d
JB
588 -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
589 -DWITH_PAM=ON \
590 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
591 -DWITH_PIC=ON \
e6dcb604
ER
592%if "%{pld_release}" == "ac"
593 -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
594%else
5d4c4d6c 595 -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
e6dcb604 596%endif
dbbad511 597 -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
375e1de2
AM
598 -DWITH_ZLIB=system \
599 -DWITH_READLINE=system
8ad2cc9f
AM
600
601%{__make}
b24ee098 602
7fbcff7e
AM
603%{?with_tests:%{__make} test}
604
ceb5ca86 605%install
3fe2f194 606rm -rf $RPM_BUILD_ROOT
978cdac2 607install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
92c38d0d 608 $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
59ef9fff 609 $RPM_BUILD_ROOT%{_mysqlhome} \
a4f004ee 610 $RPM_BUILD_ROOT%{_libdir}
b24ee098 611
8ad2cc9f
AM
612%{__make} -C build install \
613 DESTDIR=$RPM_BUILD_ROOT
d451850c 614
92992b51
ER
615install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
616cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
617cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
dbf4eb6a 618# This is template for configuration file which is created after 'service mysql init'
92992b51
ER
619cp -a %{SOURCE4} mysqld.conf
620cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
621touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
b24ee098 622
2e5f696d 623# remove innodb directives from mysqld.conf if mysqld is configured without
9cc19375 624%if %{without innodb}
2e5f696d
ER
625 cp mysqld.conf mysqld.tmp
626 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
627%endif
628
629# remove berkeley-db directives from mysqld.conf if mysqld is configured without
9cc19375
AM
630cp mysqld.conf mysqld.tmp
631awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
2e5f696d 632
72fb98c6 633cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.conf
92992b51 634cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
49e27b83 635ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
978cdac2 636cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
2e5f696d 637
d72472ee 638# NDB
f7fb94f7 639%if %{with ndb}
92992b51
ER
640install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
641cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
642install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
643cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
644install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
645cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
f7fb94f7 646%endif
17dc26d2 647
14996ad7 648sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
04497307 649sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
c01a1c0f 650sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
b24ee098 651
17dc26d2 652# remove known unpackaged files
72fb98c6 653%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{_orgname}-support
9cc19375 654
8b2cbaf3 655# rename not to be so generic name
8b2cbaf3 656mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
68e8a131 657mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
17dc26d2 658
ffd72f70
ŁK
659# move to _sysconfdir
660mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
661
c0326166 662# not useful without -debug build
21dbb6ad
JB
663%{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
664%{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
c0326166 665# generate symbols file, so one can generate backtrace using it
72fb98c6 666# mysql_resolve_stack_dump -s %{_datadir}/%{_orgname}/mysqld.sym -n mysqld.stack.
c0326166 667# http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
72fb98c6 668%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.sym}
c0326166 669
dabd8964 670# do not clobber users $PATH
734d6226 671mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
dabd8964
ER
672mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
673mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
674mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
675mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
676mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
c9b1588e 677#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
dabd8964 678mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
3b961fb0 679sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
dabd8964
ER
680mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
681
3b961fb0 682# delete - functionality in initscript / rpm
21dbb6ad
JB
683# note: mysql_install_db (and thus resolveip) are needed by digikam
684%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
685%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
686%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
72fb98c6
AM
687#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql-log-rotate
688#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql.server
689#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/binary-configure
690%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/errmsg-utf8.txt
21dbb6ad
JB
691%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
692%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
693%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
694%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
695%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
9cc19375
AM
696
697# we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
21dbb6ad
JB
698%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
699%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
700%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
701%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
702%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
703%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
48cc4c93
JB
704# libmysqld examples
705%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
17dc26d2 706
be74eb6e 707# not needed
15319871
ER
708%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
709%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
9cc19375 710
59ef9fff
ER
711# not an .info file
712%{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
713
f624a76e 714%clean
1d171524 715rm -rf $RPM_BUILD_ROOT
f624a76e 716
fd32e090 717%pre
ff5f125f
ER
718%groupadd -g 89 mysql
719%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
fd32e090 720
ceb5ca86 721%post
0f4ca10a 722/sbin/ldconfig
054c91be 723/sbin/chkconfig --add mysql
4ebde491 724%service mysql restart
dd6934b4 725
d5e8c713 726%preun
054c91be 727if [ "$1" = "0" ]; then
579146e7 728 %service -q mysql stop
054c91be 729 /sbin/chkconfig --del mysql
730fi
c44d1e10 731
ec56ce82 732%postun
0f4ca10a 733/sbin/ldconfig
fd32e090 734if [ "$1" = "0" ]; then
c354982f 735 %userremove mysql
736 %groupremove mysql
fd32e090 737fi
b24ee098 738
d72472ee
AM
739%post ndb
740/sbin/chkconfig --add mysql-ndb
1101e5b7 741%service mysql-ndb restart "mysql NDB engine"
d72472ee
AM
742
743%preun ndb
744if [ "$1" = "0" ]; then
1101e5b7
ER
745 %service mysql-ndb stop
746 /sbin/chkconfig --del mysql-ndb
d72472ee
AM
747fi
748
749%post ndb-mgm
750/sbin/chkconfig --add mysql-ndb-mgm
1101e5b7 751%service mysql-ndb-mgm restart "mysql NDB management node"
d72472ee
AM
752
753%preun ndb-mgm
754if [ "$1" = "0" ]; then
1101e5b7
ER
755 %service mysql-ndb-mgm stop
756 /sbin/chkconfig --del mysql-ndb-mgm
d72472ee
AM
757fi
758
759%post ndb-cpc
760/sbin/chkconfig --add mysql-ndb-cpc
1101e5b7 761%service mysql-ndb-cpc restart "mysql NDB CPC"
d72472ee
AM
762
763%preun ndb-cpc
764if [ "$1" = "0" ]; then
1101e5b7
ER
765 %service mysql-ndb-cpc stop
766 /sbin/chkconfig --del mysql-ndb-cpc
d72472ee
AM
767fi
768
3fe2f194 769%post libs -p /sbin/ldconfig
770%postun libs -p /sbin/ldconfig
b24ee098 771
80cc634b 772%triggerpostun -- mysql < 4.0.20-2.4
92992b51 773# For clusters in /etc/%{name}/clusters.conf
be74eb6e 774if [ -f /etc/sysconfig/mysql ]; then
99e0d1a2 775 . /etc/sysconfig/mysql
4c7c0ef7 776 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
99e0d1a2 777 for i in "$MYSQL_DB_CLUSTERS"; do
92992b51 778 echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
99e0d1a2 779 done
b545a308 780 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
92992b51
ER
781 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
782 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
783 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
99e0d1a2
PG
784 fi
785fi
786
80cc634b 787%triggerpostun -- mysql < 4.1.1
7f18dfce 788# For better compatibility with prevoius versions:
92992b51 789for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
7f18dfce
PG
790 if echo "$config" | grep -q '^/'; then
791 config_file="$config"
92992b51
ER
792 elif [ -f "/etc/%{name}/$config" ]; then
793 config_file=/etc/%{name}/$config
7f18dfce 794 else
92992b51 795 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
dd25dce8
ER
796 if [ -z "$clusterdir" ]; then
797 echo >&2 "Can't find cluster dir for $config!"
92992b51 798 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
dd25dce8
ER
799 exit 1
800 fi
7f18dfce
PG
801 config_file="$clusterdir/mysqld.conf"
802 fi
0e6ae684
ER
803
804 if [ ! -f "$config_file" ]; then
805 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
806 exit 1
807 fi
7f18dfce
PG
808 echo "Adding option old-passwords to config: $config_file"
809 echo "If you want to use new, better passwords - remove it"
6e6b75c9
ER
810
811 # sed magic to add 'old-passwords' to [mysqld] section
812 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
813 a
814 a; Compatibility options:
815 aold-passwords
816 }
817 ' $config_file
7f18dfce
PG
818done
819
a2d3f15b 820%banner -e %{name}-4.1.x <<-EOF
f1180631 821 If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
72fb98c6 822 mysql -u mysql mysql < %{_datadir}/%{_orgname}/fill_help_tables.sql
a2d3f15b
ER
823EOF
824#'
825
dc311758 826%triggerpostun -- mysql < 5.1.0
9cc19375 827configs=""
92992b51 828for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
9cc19375
AM
829 if echo "$config" | grep -q '^/'; then
830 config_file="$config"
92992b51
ER
831 elif [ -f "/etc/%{name}/$config" ]; then
832 config_file=/etc/%{name}/$config
9cc19375 833 else
92992b51 834 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
9cc19375
AM
835 if [ -z "$clusterdir" ]; then
836 echo >&2 "Can't find cluster dir for $config!"
92992b51 837 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
9cc19375
AM
838 exit 1
839 fi
840 config_file="$clusterdir/mysqld.conf"
841 fi
842
843 if [ ! -f "$config_file" ]; then
844 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/"
845 continue
846 fi
847 configs="$configs $config_file"
848done
849
1564ef07 850(
3a4d8c21 851echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
9cc19375
AM
852echo 'Thus, you should invoke:'
853for config in $configs; do
b432ea00 854 sed -i -e '
8348d337 855 s/set-variable\s*=\s* //
1564ef07
ER
856 # use # as comment in config
857 s/^;/#/
b432ea00
ER
858 ' $config
859
be74eb6e 860 datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
9cc19375
AM
861 echo "# mysql_upgrade --datadir=$datadir"
862done
1564ef07 863) | %banner -e %{name}-5.1
9cc19375 864
b5a439fb
AM
865%triggerpostun -- mysql < 5.5.0
866configs=""
867for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
868 if echo "$config" | grep -q '^/'; then
869 config_file="$config"
870 elif [ -f "/etc/%{name}/$config" ]; then
871 config_file=/etc/%{name}/$config
872 else
873 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
874 if [ -z "$clusterdir" ]; then
875 echo >&2 "Can't find cluster dir for $config!"
876 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
877 exit 1
878 fi
879 config_file="$clusterdir/mysqld.conf"
880 fi
881
882 if [ ! -f "$config_file" ]; then
883 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/"
884 continue
885 fi
886 configs="$configs $config_file"
887done
888
1564ef07
ER
889(
890echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
891echo 'Thus, you should invoke:'
b5a439fb 892for config in $configs; do
b432ea00 893 sed -i -e '
8348d337
ER
894 s/^language *= *polish/lc-messages = pl_PL/i
895 s/set-variable\s*=\s* //
76d420b8 896 s/^skip-locking/skip-external-locking/
a54e0fde 897 # this is not valid for server. it is client option
589be940 898 s/^default-character-set/# client-config: &/
1564ef07
ER
899 # use # as comment in config
900 s/^;/#/
b432ea00 901 ' $config
1564ef07 902
589be940
ER
903 socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs)
904 echo "# mysql_upgrade ${socket:+--socket=$socket}"
b5a439fb 905done
1564ef07 906) | %banner -e %{name}-5.5
b5a439fb 907
ceb5ca86 908%files
a09e0285 909%defattr(644,root,root,755)
3d33faed 910%doc build/support-files/*.cnf
92992b51
ER
911%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
912%attr(754,root,root) /etc/rc.d/init.d/%{name}
913%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
914%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
b1373c0b 915%attr(755,root,root) %{_bindir}/ps_tokudb_admin
dabd8964 916%attr(755,root,root) %{_sbindir}/innochecksum
2b48022a 917%attr(755,root,root) %{_sbindir}/my_print_defaults
dabd8964
ER
918%attr(755,root,root) %{_sbindir}/myisamchk
919%attr(755,root,root) %{_sbindir}/myisamlog
920%attr(755,root,root) %{_sbindir}/myisampack
c9b1588e 921#%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables
734d6226 922%attr(755,root,root) %{_sbindir}/mysql_plugin
dabd8964 923%attr(755,root,root) %{_sbindir}/mysql_upgrade
2b48022a
ER
924%attr(755,root,root) %{_sbindir}/mysqlcheck
925%attr(755,root,root) %{_sbindir}/mysqld
92992b51
ER
926%dir %{_libdir}/%{name}
927%dir %{_libdir}/%{name}/plugin
928%attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
1ff19b43 929%attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
92992b51 930%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
ce5017a4
JB
931%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
932%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
92992b51
ER
933%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
934%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
ce5017a4 935%attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
3d33faed
AM
936#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
937#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
938#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so
3d33ff78 939%attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
1ff19b43
AM
940%attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
941%attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
942%attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
92992b51 943%attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
abe20e21 944%attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
92992b51
ER
945%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
946%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
947%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
5e28c202 948%attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
8b30bad8 949#%attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so
92992b51
ER
950%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
951%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
f2308fd1 952%attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
fa51fc20 953%if %{with sphinx}
bfb02390 954%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
fa51fc20 955%endif
9f6c2f60
AM
956%if %{with tokudb}
957%attr(755,root,root) %{_bindir}/tokuft_logprint
958%attr(755,root,root) %{_bindir}/tokuftdump
959%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_tokudb.so
960%attr(755,root,root) %{_libdir}/%{name}/plugin/tokudb_backup.so
c8d900c2 961%attr(755,root,root) %{_libdir}/libHotBackup.so
2d4a28d0 962%endif
0f4ca10a 963# for plugins
16b39b90 964%attr(755,root,root) %{_libdir}/libmysqlservices.so
68e8a131 965%{_mandir}/man1/innochecksum.1*
2b48022a 966%{_mandir}/man1/my_print_defaults.1*
84628b90
AM
967%{_mandir}/man1/myisamchk.1*
968%{_mandir}/man1/myisamlog.1*
969%{_mandir}/man1/myisampack.1*
c9b1588e 970#%{_mandir}/man1/mysql_fix_privilege_tables.1*
734d6226 971%{_mandir}/man1/mysql_plugin.1*
d0fe1bc5 972%{_mandir}/man1/mysql_upgrade.1*
2b48022a 973%{_mandir}/man1/mysqlcheck.1*
c3389a2d 974%{_mandir}/man8/mysqld.8*
c486a119 975
c27588d8
ER
976%if %{?debug:1}0
977%attr(755,root,root) %{_bindir}/*resolve_stack_dump
72fb98c6 978%{_datadir}/%{_orgname}/mysqld.sym
c27588d8
ER
979%{_mandir}/man1/*resolve_stack_dump.1*
980%endif
981
ea2c1c6a 982%attr(700,mysql,mysql) %{_mysqlhome}
68e8a131 983# root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
179f04ff 984%attr(751,root,root) /var/lib/mysql
8594196c 985%attr(750,mysql,mysql) %dir /var/log/mysql
ced65266 986%attr(750,mysql,mysql) %dir /var/log/archive/mysql
13924afb 987%attr(640,mysql,mysql) %ghost /var/log/mysql/*
431c9391 988
dbf4eb6a 989# This is template for configuration file which is created after 'service mysql init'
72fb98c6
AM
990%{_datadir}/%{_orgname}/mysqld.conf
991%{_datadir}/%{_orgname}/mysql_security_commands.sql
992%{_datadir}/%{_orgname}/mysql_system_tables_data.sql
993%{_datadir}/%{_orgname}/mysql_system_tables.sql
994%{_datadir}/%{_orgname}/mysql_test_data_timezone.sql
995
996%{_datadir}/%{_orgname}/english
997%{_datadir}/%{_orgname}/dictionary.txt
998%{_datadir}/%{_orgname}/fill_help_tables.sql
999%{_datadir}/%{_orgname}/innodb_memcached_config.sql
1000#%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql
4fb27d2c
AM
1001# Don't mark these with %%lang. These are used depending
1002# on database client settings.
1003%{_datadir}/%{_orgname}/bulgarian
1004%{_datadir}/%{_orgname}/czech
1005%{_datadir}/%{_orgname}/danish
1006%{_datadir}/%{_orgname}/german
1007%{_datadir}/%{_orgname}/greek
1008%{_datadir}/%{_orgname}/spanish
1009%{_datadir}/%{_orgname}/estonian
1010%{_datadir}/%{_orgname}/french
1011%{_datadir}/%{_orgname}/hungarian
1012%{_datadir}/%{_orgname}/italian
1013%{_datadir}/%{_orgname}/japanese
1014%{_datadir}/%{_orgname}/korean
1015%{_datadir}/%{_orgname}/dutch
1016%{_datadir}/%{_orgname}/norwegian
1017%{_datadir}/%{_orgname}/norwegian-ny
1018%{_datadir}/%{_orgname}/polish
1019%{_datadir}/%{_orgname}/portuguese
1020%{_datadir}/%{_orgname}/romanian
1021%{_datadir}/%{_orgname}/russian
1022%{_datadir}/%{_orgname}/serbian
1023%{_datadir}/%{_orgname}/slovak
1024%{_datadir}/%{_orgname}/swedish
1025%{_datadir}/%{_orgname}/ukrainian
b24ee098 1026
ad0a7267
JR
1027%files charsets
1028%defattr(644,root,root,755)
72fb98c6
AM
1029%dir %{_datadir}/%{_orgname}
1030%{_datadir}/%{_orgname}/charsets
ad0a7267 1031
8de1b4ed 1032%files extras
1033%defattr(644,root,root,755)
f261d032 1034%attr(755,root,root) %{_bindir}/msql2mysql
8b2cbaf3 1035%attr(755,root,root) %{_bindir}/myisam_ftdump
90db0fd4 1036%attr(755,root,root) %{_bindir}/mysql_install_db
8b2cbaf3
ER
1037%attr(755,root,root) %{_bindir}/mysql_secure_installation
1038%attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
b94ecc67
JB
1039%attr(755,root,root) %{_bindir}/perror
1040%attr(755,root,root) %{_bindir}/replace
90db0fd4 1041%attr(755,root,root) %{_bindir}/resolveip
b94ecc67 1042%{_mandir}/man1/msql2mysql.1*
9787b388 1043%{_mandir}/man1/myisam_ftdump.1*
90db0fd4 1044%{_mandir}/man1/mysql_install_db.1*
68e8a131 1045%{_mandir}/man1/mysql_secure_installation.1*
77cbc8ff 1046%{_mandir}/man1/mysql_tzinfo_to_sql.1*
e474e322 1047%{_mandir}/man1/perror.1*
1048%{_mandir}/man1/replace.1*
90db0fd4 1049%{_mandir}/man1/resolveip.1*
8de1b4ed 1050
17299970
ER
1051%files -n mysqlhotcopy
1052%defattr(644,root,root,755)
1053%attr(755,root,root) %{_bindir}/mysqlhotcopy
1054%{_mandir}/man1/mysqlhotcopy.1*
1055
8afdedd4 1056%files extras-perl
1057%defattr(644,root,root,755)
8594196c 1058%attr(755,root,root) %{_bindir}/mysql_convert_table_format
8afdedd4 1059%attr(755,root,root) %{_bindir}/mysql_find_rows
8b2cbaf3 1060%attr(755,root,root) %{_bindir}/mysql_fix_extensions
b894e3d4 1061%attr(755,root,root) %{_bindir}/mysql_setpermission
b894e3d4 1062%attr(755,root,root) %{_bindir}/mysql_zap
2b48022a
ER
1063%attr(755,root,root) %{_bindir}/mysqlaccess
1064%attr(755,root,root) %{_bindir}/mysqldumpslow
ffd72f70 1065%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf
68e8a131 1066%{_mandir}/man1/mysql_convert_table_format.1*
ffda6e55 1067%{_mandir}/man1/mysql_find_rows.1*
68e8a131 1068%{_mandir}/man1/mysql_fix_extensions.1*
68e8a131
ER
1069%{_mandir}/man1/mysql_setpermission.1*
1070%{_mandir}/man1/mysql_zap.1*
2b48022a 1071%{_mandir}/man1/mysqlaccess.1*
08472466 1072%{_mandir}/man1/mysqldumpslow.1*
8afdedd4 1073
ceb5ca86 1074%files client
75eb20a9 1075%defattr(644,root,root,755)
978cdac2 1076%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
01dea3d5 1077%attr(755,root,root) %{_bindir}/mysql
9cc19375
AM
1078%attr(755,root,root) %{_bindir}/mysqladmin
1079%attr(755,root,root) %{_bindir}/mysqlbinlog
065b78b5 1080%attr(755,root,root) %{_bindir}/mysqlbug
f2308fd1 1081%attr(755,root,root) %{_bindir}/mysql_config_editor
01dea3d5 1082%attr(755,root,root) %{_bindir}/mysqldump
1083%attr(755,root,root) %{_bindir}/mysqlimport
1084%attr(755,root,root) %{_bindir}/mysqlshow
75eb20a9 1085%{_mandir}/man1/mysql.1*
e474e322 1086%{_mandir}/man1/mysqladmin.1*
84628b90 1087%{_mandir}/man1/mysqlbinlog.1*
512d8da1 1088%{_mandir}/man1/mysqlbug.1*
f2308fd1 1089%{_mandir}/man1/mysql_config_editor.1*
9cc19375 1090%{_mandir}/man1/mysqldump.1*
84628b90 1091%{_mandir}/man1/mysqlimport.1*
9cc19375 1092%{_mandir}/man1/mysqlshow.1*
b24ee098 1093
3fe2f194 1094%files libs
75eb20a9 1095%defattr(644,root,root,755)
2b48022a 1096%attr(751,root,root) %dir %{_sysconfdir}/mysql
92992b51 1097%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
49e27b83 1098%{_sysconfdir}/%{name}/my.cnf
3b9f87c2 1099%attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
df1b5770 1100%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
3b9f87c2 1101%attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
df1b5770 1102%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
08472466 1103%if %{with ndb}
3b9f87c2 1104%attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
bd1c7139 1105%attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
08472466 1106%endif
b24ee098 1107
ceb5ca86 1108%files devel
3fe2f194 1109%defattr(644,root,root,755)
bbc0ff50 1110%attr(755,root,root) %{_bindir}/mysql_config
3b9f87c2
JB
1111%attr(755,root,root) %{_libdir}/libmysqlclient.so
1112%attr(755,root,root) %{_libdir}/libmysqlclient_r.so
08472466 1113%if %{with ndb}
3b9f87c2 1114%attr(755,root,root) %{_libdir}/libndbclient.so
08472466 1115%endif
48cc4c93
JB
1116# static-only so far
1117%{_libdir}/libmysqld.a
3fe2f194 1118%{_includedir}/mysql
68e8a131 1119%{_aclocaldir}/mysql.m4
84628b90 1120%{_mandir}/man1/mysql_config.1*
3fe2f194 1121
1122%files static
75eb20a9 1123%defattr(644,root,root,755)
3b9f87c2
JB
1124%{_libdir}/libmysqlclient.a
1125%{_libdir}/libmysqlclient_r.a
08472466 1126%if %{with ndb}
3b9f87c2 1127%{_libdir}/libndbclient.a
08472466 1128%endif
ceb5ca86 1129
d1e91a2d
AM
1130%files bench
1131%defattr(644,root,root,755)
8ce69d92 1132%attr(755,root,root) %{_bindir}/mysqlslap
d1e91a2d
AM
1133%attr(755,root,root) %{_bindir}/mysqltest
1134%dir %{_datadir}/sql-bench
1135%{_datadir}/sql-bench/[CDRl]*
1136%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
8ce69d92 1137%{_mandir}/man1/mysqlslap.1*
ffda6e55
ER
1138%{_mandir}/man1/mysqltest.1*
1139%{_mandir}/man1/mysqltest_embedded.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 0.471139 seconds and 4 git commands to generate.