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