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