]> git.pld-linux.org Git - packages/mysql.git/blame - mysql.spec
-devel obsoletes webscalesql-devel to allow switching
[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
2adeda85 26%define rel 2
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
2adeda85 362Obsoletes: webscalesql-devel
ceb5ca86
AM
363
364%description devel
21dbb6ad 365This package contains the development header files and other files
ceb5ca86
AM
366necessary to develop MySQL client applications.
367
a82d818e 368%description devel -l fr.UTF-8
bf60a170 369Ce package contient les fichiers entetes et les librairies de
370developpement necessaires pour developper des applications clientes
371MySQL.
372
a82d818e 373%description devel -l pl.UTF-8
21dbb6ad 374Pliki nagłówkowe i inne pliki konieczne do kompilacji aplikacji
ceb5ca86 375klienckich MySQL.
b24ee098 376
a82d818e
JR
377%description devel -l pt_BR.UTF-8
378Este pacote contém os arquivos de cabeçalho (header files) e
379bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
b24ee098 380
a82d818e
JR
381%description devel -l ru.UTF-8
382Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
383разработки клиентских приложений.
bf60a170 384
a82d818e
JR
385%description devel -l uk.UTF-8
386Цей пакет містить хедери та бібліотеки програміста, необхідні для
387розробки програм-клієнтів.
3fe2f194 388
389%package static
01875e6d 390Summary: MySQL static libraries
fe56cb4d
ER
391Summary(pl.UTF-8): Biblioteki statyczne MySQL
392Summary(ru.UTF-8): MySQL - статические библиотеки
393Summary(uk.UTF-8): MySQL - статичні бібліотеки
3fe2f194 394Group: Development/Libraries
3103a6d7 395Requires: %{name}-devel = %{version}-%{release}
c44d1e10 396Obsoletes: MySQL-static
3fe2f194 397
398%description static
73d155ac 399MySQL static libraries.
3fe2f194 400
a82d818e 401%description static -l pl.UTF-8
3fe2f194 402Biblioteki statyczne MySQL.
403
a82d818e
JR
404%description static -l ru.UTF-8
405Этот пакет содержит статические библиотеки разработчика, необходимые
406для разработки клиентских приложений.
bf60a170 407
a82d818e
JR
408%description static -l uk.UTF-8
409Цей пакет містить статичні бібліотеки програміста, необхідні для
410розробки програм-клієнтів.
bf60a170 411
d1e91a2d
AM
412%package bench
413Summary: MySQL - Benchmarks
fe56cb4d
ER
414Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy
415Summary(pt.UTF-8): MySQL - Medições de desempenho
416Summary(ru.UTF-8): MySQL - бенчмарки
417Summary(uk.UTF-8): MySQL - бенчмарки
d1e91a2d
AM
418Group: Applications/Databases
419Requires: %{name} = %{version}-%{release}
420Requires: %{name}-client
421Requires: perl(DBD::mysql)
422Obsoletes: MySQL-bench
423
424%description bench
425This package contains MySQL benchmark scripts and data.
426
a82d818e
JR
427%description bench -l pl.UTF-8
428Programy testujące szybkość serwera MySQL.
d1e91a2d 429
a82d818e
JR
430%description bench -l pt_BR.UTF-8
431Este pacote contém medições de desempenho de scripts e dados do MySQL.
d1e91a2d 432
a82d818e
JR
433%description bench -l ru.UTF-8
434Этот пакет содержит скрипты и данные для оценки производительности
d1e91a2d
AM
435MySQL.
436
a82d818e
JR
437%description bench -l uk.UTF-8
438Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
d1e91a2d
AM
439
440%package doc
441Summary: MySQL manual
fe56cb4d 442Summary(pl.UTF-8): Podręcznik użytkownika MySQL
d1e91a2d
AM
443Group: Applications/Databases
444
445%description doc
446This package contains manual in HTML format.
447
a82d818e
JR
448%description doc -l pl.UTF-8
449Podręcznik MySQL-a w formacie HTML.
d1e91a2d 450
d72472ee
AM
451%package ndb
452Summary: MySQL - NDB Storage Engine Daemon
fe56cb4d 453Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB
d72472ee
AM
454Group: Applications/Databases
455Requires: %{name}-libs = %{version}-%{release}
456
457%description ndb
458This package contains the standard MySQL NDB Storage Engine Daemon.
459
a82d818e 460%description ndb -l pl.UTF-8
8cdaa5ca
ER
461Ten pakiet zawiera standardowego demona silnika przechowywania danych
462NDB.
a4fd19f2 463
d72472ee
AM
464%package ndb-client
465Summary: MySQL - NDB Clients
fe56cb4d 466Summary(pl.UTF-8): MySQL - programy klienckie NDB
d72472ee
AM
467Group: Applications/Databases
468Requires: %{name}-libs = %{version}-%{release}
469
470%description ndb-client
471This package contains the standard MySQL NDB Clients.
472
a82d818e 473%description ndb-client -l pl.UTF-8
a4fd19f2
JB
474Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
475
d72472ee
AM
476%package ndb-mgm
477Summary: MySQL - NDB Management Daemon
fe56cb4d 478Summary(pl.UTF-8): MySQL - demon zarządzający NDB
d72472ee
AM
479Group: Applications/Databases
480Requires: %{name}-libs = %{version}-%{release}
481
482%description ndb-mgm
483This package contains the standard MySQL NDB Management Daemon.
484
a82d818e
JR
485%description ndb-mgm -l pl.UTF-8
486Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
a4fd19f2 487
d72472ee
AM
488%package ndb-cpc
489Summary: MySQL - NDB CPC Daemon
fe56cb4d 490Summary(pl.UTF-8): MySQL - demon NDB CPC
d72472ee
AM
491Group: Applications/Databases
492Requires: %{name}-libs = %{version}-%{release}
493
494%description ndb-cpc
495This package contains the standard MySQL NDB CPC Daemon.
496
a82d818e 497%description ndb-cpc -l pl.UTF-8
a4fd19f2
JB
498Ten pakiet zawiera standardowego demona MySQL NDB CPC.
499
a09e0285 500%prep
2e1318f3
AM
501%setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100}
502
503# we want to use old, mysql compatible client library name
504find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";"
caca288d 505sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.*
2e1318f3 506
abe20e21
JB
507%patch0 -p1
508
e6696823 509%if %{with sphinx}
fa51fc20 510# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
e6696823 511mv sphinx-*/mysqlse storage/sphinx
fa51fc20 512%patch18 -p1
e6696823 513%endif
c7a645af 514%patch1 -p1
b9dfaa43 515%patch2 -p1
d6ae4994 516%patch3 -p1
610a5a46 517%patch4 -p1
3d33ff78 518%patch5 -p1
14996ad7 519%patch6 -p1
63a6ce7c 520
1b41566d 521%patch9 -p1
bbae9ea7 522%patch11 -p1
a2e8058d 523%patch12 -p1
3d4dbd2e 524%patch14 -p0
fc032bd9 525%patch19 -p1
90e4ba9d 526%patch20 -p1
1ff19b43 527
758b3679 528%patch22 -p1
84a54893 529%patch23 -p1
96b6cbc2 530%patch24 -p1
1e4b76dd 531
4256f553 532%patch26 -p1
db2e112e 533%patch27 -p1
fc032bd9 534
b4e1fa2c 535# to get these files rebuild
3d33ff78
JB
536[ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
537[ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
b24ee098 538
8fc77a5d
AM
539# map has more sane versioning that default "global everything" in ver.in
540cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
541
a09e0285 542%build
8ad2cc9f
AM
543install -d build
544cd build
92992b51
ER
545# NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
546# (it defaults to first cluster but user may change it to whatever
547# cluster it wants)
234eba13
ER
548
549%if "%{pld_release}" == "ac"
4b2e4b47 550# add suffix, but allow ccache, etc in ~/.rpmmacros
234eba13
ER
551%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
552%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
553%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
554%endif
555
abe20e21 556CPPFLAGS="%{rpmcppflags}" \
3d33ff78 557%cmake .. \
96962fb9 558 -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
abe20e21
JB
559 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
560 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
f42f4b0d
JB
561 -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
562 -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
d65cccc9 563 %{?with_systemtap:-DENABLE_DTRACE=ON} \
f42f4b0d
JB
564 -DFEATURE_SET="community" \
565 -DINSTALL_LAYOUT=RPM \
566 -DINSTALL_LIBDIR=%{_lib} \
567 -DINSTALL_MYSQLTESTDIR_RPM="" \
e4d6dd78 568 -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \
f42f4b0d 569 -DINSTALL_SQLBENCHDIR=%{_datadir} \
1ff19b43
AM
570 -DINSTALL_SUPPORTFILESDIR=share/%{_orgname}-support \
571 -DINSTALL_MYSQLSHAREDIR=share/%{_orgname} \
f42f4b0d 572 -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
8ad2cc9f 573 %{?debug:-DWITH_DEBUG=ON} \
f42f4b0d 574 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
8ad2cc9f 575 -DWITH_FAST_MUTEXES=ON \
f42f4b0d
JB
576 -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
577 -DWITH_PAM=ON \
578 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
579 -DWITH_PIC=ON \
e6dcb604
ER
580%if "%{pld_release}" == "ac"
581 -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
582%else
5d4c4d6c 583 -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
e6dcb604 584%endif
dbbad511 585 -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
375e1de2
AM
586 -DWITH_ZLIB=system \
587 -DWITH_READLINE=system
8ad2cc9f
AM
588
589%{__make}
b24ee098 590
7fbcff7e
AM
591%{?with_tests:%{__make} test}
592
ceb5ca86 593%install
3fe2f194 594rm -rf $RPM_BUILD_ROOT
978cdac2 595install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
92c38d0d 596 $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
59ef9fff 597 $RPM_BUILD_ROOT%{_mysqlhome} \
a4f004ee 598 $RPM_BUILD_ROOT%{_libdir}
b24ee098 599
8ad2cc9f
AM
600%{__make} -C build install \
601 DESTDIR=$RPM_BUILD_ROOT
d451850c 602
92992b51
ER
603install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
604cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
605cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
dbf4eb6a 606# This is template for configuration file which is created after 'service mysql init'
92992b51
ER
607cp -a %{SOURCE4} mysqld.conf
608cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
609touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
b24ee098 610
2e5f696d 611# remove innodb directives from mysqld.conf if mysqld is configured without
9cc19375 612%if %{without innodb}
2e5f696d
ER
613 cp mysqld.conf mysqld.tmp
614 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
615%endif
616
617# remove berkeley-db directives from mysqld.conf if mysqld is configured without
9cc19375
AM
618cp mysqld.conf mysqld.tmp
619awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
2e5f696d 620
72fb98c6 621cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.conf
92992b51 622cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
49e27b83 623ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
978cdac2 624cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
2e5f696d 625
d72472ee 626# NDB
f7fb94f7 627%if %{with ndb}
92992b51
ER
628install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
629cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
630install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
631cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
632install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
633cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
f7fb94f7 634%endif
17dc26d2 635
14996ad7 636sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
04497307 637sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
c01a1c0f 638sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
b24ee098 639
17dc26d2 640# remove known unpackaged files
72fb98c6 641%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{_orgname}-support
9cc19375 642
8b2cbaf3 643# rename not to be so generic name
8b2cbaf3 644mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
68e8a131 645mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
17dc26d2 646
ffd72f70
ŁK
647# move to _sysconfdir
648mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
649
c0326166 650# not useful without -debug build
21dbb6ad
JB
651%{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
652%{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
c0326166 653# generate symbols file, so one can generate backtrace using it
72fb98c6 654# mysql_resolve_stack_dump -s %{_datadir}/%{_orgname}/mysqld.sym -n mysqld.stack.
c0326166 655# http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
72fb98c6 656%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.sym}
c0326166 657
dabd8964 658# do not clobber users $PATH
734d6226 659mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
dabd8964
ER
660mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
661mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
662mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
663mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
664mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
c9b1588e 665#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
dabd8964 666mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
3b961fb0 667sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
dabd8964
ER
668mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
669
3b961fb0 670# delete - functionality in initscript / rpm
21dbb6ad
JB
671# note: mysql_install_db (and thus resolveip) are needed by digikam
672%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
673%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
674%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
72fb98c6
AM
675#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql-log-rotate
676#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql.server
677#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/binary-configure
678%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/errmsg-utf8.txt
21dbb6ad
JB
679%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
680%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
681%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
682%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
683%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
9cc19375
AM
684
685# we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
21dbb6ad
JB
686%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
687%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
688%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
689%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
690%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
691%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
48cc4c93
JB
692# libmysqld examples
693%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
17dc26d2 694
be74eb6e 695# not needed
15319871
ER
696%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
697%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
9cc19375 698
59ef9fff
ER
699# not an .info file
700%{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
701
f624a76e 702%clean
1d171524 703rm -rf $RPM_BUILD_ROOT
f624a76e 704
fd32e090 705%pre
ff5f125f
ER
706%groupadd -g 89 mysql
707%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
fd32e090 708
ceb5ca86 709%post
0f4ca10a 710/sbin/ldconfig
054c91be 711/sbin/chkconfig --add mysql
4ebde491 712%service mysql restart
dd6934b4 713
d5e8c713 714%preun
054c91be 715if [ "$1" = "0" ]; then
579146e7 716 %service -q mysql stop
054c91be 717 /sbin/chkconfig --del mysql
718fi
c44d1e10 719
ec56ce82 720%postun
0f4ca10a 721/sbin/ldconfig
fd32e090 722if [ "$1" = "0" ]; then
c354982f 723 %userremove mysql
724 %groupremove mysql
fd32e090 725fi
b24ee098 726
d72472ee
AM
727%post ndb
728/sbin/chkconfig --add mysql-ndb
1101e5b7 729%service mysql-ndb restart "mysql NDB engine"
d72472ee
AM
730
731%preun ndb
732if [ "$1" = "0" ]; then
1101e5b7
ER
733 %service mysql-ndb stop
734 /sbin/chkconfig --del mysql-ndb
d72472ee
AM
735fi
736
737%post ndb-mgm
738/sbin/chkconfig --add mysql-ndb-mgm
1101e5b7 739%service mysql-ndb-mgm restart "mysql NDB management node"
d72472ee
AM
740
741%preun ndb-mgm
742if [ "$1" = "0" ]; then
1101e5b7
ER
743 %service mysql-ndb-mgm stop
744 /sbin/chkconfig --del mysql-ndb-mgm
d72472ee
AM
745fi
746
747%post ndb-cpc
748/sbin/chkconfig --add mysql-ndb-cpc
1101e5b7 749%service mysql-ndb-cpc restart "mysql NDB CPC"
d72472ee
AM
750
751%preun ndb-cpc
752if [ "$1" = "0" ]; then
1101e5b7
ER
753 %service mysql-ndb-cpc stop
754 /sbin/chkconfig --del mysql-ndb-cpc
d72472ee
AM
755fi
756
3fe2f194 757%post libs -p /sbin/ldconfig
758%postun libs -p /sbin/ldconfig
b24ee098 759
80cc634b 760%triggerpostun -- mysql < 4.0.20-2.4
92992b51 761# For clusters in /etc/%{name}/clusters.conf
be74eb6e 762if [ -f /etc/sysconfig/mysql ]; then
99e0d1a2 763 . /etc/sysconfig/mysql
4c7c0ef7 764 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
99e0d1a2 765 for i in "$MYSQL_DB_CLUSTERS"; do
92992b51 766 echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
99e0d1a2 767 done
b545a308 768 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
92992b51
ER
769 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
770 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
771 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
99e0d1a2
PG
772 fi
773fi
774
80cc634b 775%triggerpostun -- mysql < 4.1.1
7f18dfce 776# For better compatibility with prevoius versions:
92992b51 777for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
7f18dfce
PG
778 if echo "$config" | grep -q '^/'; then
779 config_file="$config"
92992b51
ER
780 elif [ -f "/etc/%{name}/$config" ]; then
781 config_file=/etc/%{name}/$config
7f18dfce 782 else
92992b51 783 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
dd25dce8
ER
784 if [ -z "$clusterdir" ]; then
785 echo >&2 "Can't find cluster dir for $config!"
92992b51 786 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
dd25dce8
ER
787 exit 1
788 fi
7f18dfce
PG
789 config_file="$clusterdir/mysqld.conf"
790 fi
0e6ae684
ER
791
792 if [ ! -f "$config_file" ]; then
793 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
794 exit 1
795 fi
7f18dfce
PG
796 echo "Adding option old-passwords to config: $config_file"
797 echo "If you want to use new, better passwords - remove it"
6e6b75c9
ER
798
799 # sed magic to add 'old-passwords' to [mysqld] section
800 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
801 a
802 a; Compatibility options:
803 aold-passwords
804 }
805 ' $config_file
7f18dfce
PG
806done
807
a2d3f15b 808%banner -e %{name}-4.1.x <<-EOF
f1180631 809 If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
72fb98c6 810 mysql -u mysql mysql < %{_datadir}/%{_orgname}/fill_help_tables.sql
a2d3f15b
ER
811EOF
812#'
813
dc311758 814%triggerpostun -- mysql < 5.1.0
9cc19375 815configs=""
92992b51 816for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
9cc19375
AM
817 if echo "$config" | grep -q '^/'; then
818 config_file="$config"
92992b51
ER
819 elif [ -f "/etc/%{name}/$config" ]; then
820 config_file=/etc/%{name}/$config
9cc19375 821 else
92992b51 822 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
9cc19375
AM
823 if [ -z "$clusterdir" ]; then
824 echo >&2 "Can't find cluster dir for $config!"
92992b51 825 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
9cc19375
AM
826 exit 1
827 fi
828 config_file="$clusterdir/mysqld.conf"
829 fi
830
831 if [ ! -f "$config_file" ]; then
832 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/"
833 continue
834 fi
835 configs="$configs $config_file"
836done
837
1564ef07 838(
3a4d8c21 839echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
9cc19375
AM
840echo 'Thus, you should invoke:'
841for config in $configs; do
b432ea00 842 sed -i -e '
8348d337 843 s/set-variable\s*=\s* //
1564ef07
ER
844 # use # as comment in config
845 s/^;/#/
b432ea00
ER
846 ' $config
847
be74eb6e 848 datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
9cc19375
AM
849 echo "# mysql_upgrade --datadir=$datadir"
850done
1564ef07 851) | %banner -e %{name}-5.1
9cc19375 852
b5a439fb
AM
853%triggerpostun -- mysql < 5.5.0
854configs=""
855for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
856 if echo "$config" | grep -q '^/'; then
857 config_file="$config"
858 elif [ -f "/etc/%{name}/$config" ]; then
859 config_file=/etc/%{name}/$config
860 else
861 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
862 if [ -z "$clusterdir" ]; then
863 echo >&2 "Can't find cluster dir for $config!"
864 echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
865 exit 1
866 fi
867 config_file="$clusterdir/mysqld.conf"
868 fi
869
870 if [ ! -f "$config_file" ]; then
871 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/"
872 continue
873 fi
874 configs="$configs $config_file"
875done
876
1564ef07
ER
877(
878echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
879echo 'Thus, you should invoke:'
b5a439fb 880for config in $configs; do
b432ea00 881 sed -i -e '
8348d337
ER
882 s/^language *= *polish/lc-messages = pl_PL/i
883 s/set-variable\s*=\s* //
76d420b8 884 s/^skip-locking/skip-external-locking/
a54e0fde 885 # this is not valid for server. it is client option
589be940 886 s/^default-character-set/# client-config: &/
1564ef07
ER
887 # use # as comment in config
888 s/^;/#/
b432ea00 889 ' $config
1564ef07 890
589be940
ER
891 socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs)
892 echo "# mysql_upgrade ${socket:+--socket=$socket}"
b5a439fb 893done
1564ef07 894) | %banner -e %{name}-5.5
b5a439fb 895
ceb5ca86 896%files
a09e0285 897%defattr(644,root,root,755)
3d33faed 898%doc build/support-files/*.cnf
92992b51
ER
899%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
900%attr(754,root,root) /etc/rc.d/init.d/%{name}
901%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
902%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
b1373c0b 903%attr(755,root,root) %{_bindir}/ps_tokudb_admin
dabd8964 904%attr(755,root,root) %{_sbindir}/innochecksum
2b48022a 905%attr(755,root,root) %{_sbindir}/my_print_defaults
dabd8964
ER
906%attr(755,root,root) %{_sbindir}/myisamchk
907%attr(755,root,root) %{_sbindir}/myisamlog
908%attr(755,root,root) %{_sbindir}/myisampack
c9b1588e 909#%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables
734d6226 910%attr(755,root,root) %{_sbindir}/mysql_plugin
dabd8964 911%attr(755,root,root) %{_sbindir}/mysql_upgrade
2b48022a
ER
912%attr(755,root,root) %{_sbindir}/mysqlcheck
913%attr(755,root,root) %{_sbindir}/mysqld
92992b51
ER
914%dir %{_libdir}/%{name}
915%dir %{_libdir}/%{name}/plugin
916%attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
1ff19b43 917%attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
92992b51 918%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
ce5017a4
JB
919%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
920%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
92992b51
ER
921%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
922%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
ce5017a4 923%attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
3d33faed
AM
924#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
925#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
926#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so
3d33ff78 927%attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
1ff19b43
AM
928%attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
929%attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
930%attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
92992b51 931%attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
abe20e21 932%attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
92992b51
ER
933%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
934%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
935%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
5e28c202 936%attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
1ff19b43 937%attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so
92992b51
ER
938%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
939%attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
f2308fd1 940%attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
fa51fc20 941%if %{with sphinx}
bfb02390 942%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
fa51fc20 943%endif
0f4ca10a 944# for plugins
16b39b90 945%attr(755,root,root) %{_libdir}/libmysqlservices.so
68e8a131 946%{_mandir}/man1/innochecksum.1*
2b48022a 947%{_mandir}/man1/my_print_defaults.1*
84628b90
AM
948%{_mandir}/man1/myisamchk.1*
949%{_mandir}/man1/myisamlog.1*
950%{_mandir}/man1/myisampack.1*
c9b1588e 951#%{_mandir}/man1/mysql_fix_privilege_tables.1*
734d6226 952%{_mandir}/man1/mysql_plugin.1*
d0fe1bc5 953%{_mandir}/man1/mysql_upgrade.1*
2b48022a 954%{_mandir}/man1/mysqlcheck.1*
c3389a2d 955%{_mandir}/man8/mysqld.8*
c486a119 956
c27588d8
ER
957%if %{?debug:1}0
958%attr(755,root,root) %{_bindir}/*resolve_stack_dump
72fb98c6 959%{_datadir}/%{_orgname}/mysqld.sym
c27588d8
ER
960%{_mandir}/man1/*resolve_stack_dump.1*
961%endif
962
ea2c1c6a 963%attr(700,mysql,mysql) %{_mysqlhome}
68e8a131 964# root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
179f04ff 965%attr(751,root,root) /var/lib/mysql
8594196c 966%attr(750,mysql,mysql) %dir /var/log/mysql
ced65266 967%attr(750,mysql,mysql) %dir /var/log/archive/mysql
13924afb 968%attr(640,mysql,mysql) %ghost /var/log/mysql/*
431c9391 969
dbf4eb6a 970# This is template for configuration file which is created after 'service mysql init'
72fb98c6
AM
971%{_datadir}/%{_orgname}/mysqld.conf
972%{_datadir}/%{_orgname}/mysql_security_commands.sql
973%{_datadir}/%{_orgname}/mysql_system_tables_data.sql
974%{_datadir}/%{_orgname}/mysql_system_tables.sql
975%{_datadir}/%{_orgname}/mysql_test_data_timezone.sql
976
977%{_datadir}/%{_orgname}/english
978%{_datadir}/%{_orgname}/dictionary.txt
979%{_datadir}/%{_orgname}/fill_help_tables.sql
980%{_datadir}/%{_orgname}/innodb_memcached_config.sql
981#%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql
982%lang(bg) %{_datadir}/%{_orgname}/bulgarian
983%lang(cs) %{_datadir}/%{_orgname}/czech
984%lang(da) %{_datadir}/%{_orgname}/danish
985%lang(de) %{_datadir}/%{_orgname}/german
986%lang(el) %{_datadir}/%{_orgname}/greek
987%lang(es) %{_datadir}/%{_orgname}/spanish
988%lang(et) %{_datadir}/%{_orgname}/estonian
989%lang(fr) %{_datadir}/%{_orgname}/french
990%lang(hu) %{_datadir}/%{_orgname}/hungarian
991%lang(it) %{_datadir}/%{_orgname}/italian
992%lang(ja) %{_datadir}/%{_orgname}/japanese
993%lang(ko) %{_datadir}/%{_orgname}/korean
994%lang(nl) %{_datadir}/%{_orgname}/dutch
995%lang(nb) %{_datadir}/%{_orgname}/norwegian
996%lang(nn) %{_datadir}/%{_orgname}/norwegian-ny
997%lang(pl) %{_datadir}/%{_orgname}/polish
998%lang(pt) %{_datadir}/%{_orgname}/portuguese
999%lang(ro) %{_datadir}/%{_orgname}/romanian
1000%lang(ru) %{_datadir}/%{_orgname}/russian
1001%lang(sr) %{_datadir}/%{_orgname}/serbian
1002%lang(sk) %{_datadir}/%{_orgname}/slovak
1003%lang(sv) %{_datadir}/%{_orgname}/swedish
1004%lang(uk) %{_datadir}/%{_orgname}/ukrainian
b24ee098 1005
ad0a7267
JR
1006%files charsets
1007%defattr(644,root,root,755)
72fb98c6
AM
1008%dir %{_datadir}/%{_orgname}
1009%{_datadir}/%{_orgname}/charsets
ad0a7267 1010
8de1b4ed 1011%files extras
1012%defattr(644,root,root,755)
f261d032 1013%attr(755,root,root) %{_bindir}/msql2mysql
8b2cbaf3 1014%attr(755,root,root) %{_bindir}/myisam_ftdump
90db0fd4 1015%attr(755,root,root) %{_bindir}/mysql_install_db
8b2cbaf3
ER
1016%attr(755,root,root) %{_bindir}/mysql_secure_installation
1017%attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
b94ecc67
JB
1018%attr(755,root,root) %{_bindir}/perror
1019%attr(755,root,root) %{_bindir}/replace
90db0fd4 1020%attr(755,root,root) %{_bindir}/resolveip
b94ecc67 1021%{_mandir}/man1/msql2mysql.1*
9787b388 1022%{_mandir}/man1/myisam_ftdump.1*
90db0fd4 1023%{_mandir}/man1/mysql_install_db.1*
68e8a131 1024%{_mandir}/man1/mysql_secure_installation.1*
77cbc8ff 1025%{_mandir}/man1/mysql_tzinfo_to_sql.1*
e474e322 1026%{_mandir}/man1/perror.1*
1027%{_mandir}/man1/replace.1*
90db0fd4 1028%{_mandir}/man1/resolveip.1*
8de1b4ed 1029
17299970
ER
1030%files -n mysqlhotcopy
1031%defattr(644,root,root,755)
1032%attr(755,root,root) %{_bindir}/mysqlhotcopy
1033%{_mandir}/man1/mysqlhotcopy.1*
1034
8afdedd4 1035%files extras-perl
1036%defattr(644,root,root,755)
8594196c 1037%attr(755,root,root) %{_bindir}/mysql_convert_table_format
8afdedd4 1038%attr(755,root,root) %{_bindir}/mysql_find_rows
8b2cbaf3 1039%attr(755,root,root) %{_bindir}/mysql_fix_extensions
b894e3d4 1040%attr(755,root,root) %{_bindir}/mysql_setpermission
b894e3d4 1041%attr(755,root,root) %{_bindir}/mysql_zap
2b48022a
ER
1042%attr(755,root,root) %{_bindir}/mysqlaccess
1043%attr(755,root,root) %{_bindir}/mysqldumpslow
ffd72f70 1044%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf
68e8a131 1045%{_mandir}/man1/mysql_convert_table_format.1*
ffda6e55 1046%{_mandir}/man1/mysql_find_rows.1*
68e8a131 1047%{_mandir}/man1/mysql_fix_extensions.1*
68e8a131
ER
1048%{_mandir}/man1/mysql_setpermission.1*
1049%{_mandir}/man1/mysql_zap.1*
2b48022a 1050%{_mandir}/man1/mysqlaccess.1*
08472466 1051%{_mandir}/man1/mysqldumpslow.1*
8afdedd4 1052
ceb5ca86 1053%files client
75eb20a9 1054%defattr(644,root,root,755)
978cdac2 1055%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
01dea3d5 1056%attr(755,root,root) %{_bindir}/mysql
9cc19375
AM
1057%attr(755,root,root) %{_bindir}/mysqladmin
1058%attr(755,root,root) %{_bindir}/mysqlbinlog
065b78b5 1059%attr(755,root,root) %{_bindir}/mysqlbug
f2308fd1 1060%attr(755,root,root) %{_bindir}/mysql_config_editor
01dea3d5 1061%attr(755,root,root) %{_bindir}/mysqldump
1062%attr(755,root,root) %{_bindir}/mysqlimport
1063%attr(755,root,root) %{_bindir}/mysqlshow
75eb20a9 1064%{_mandir}/man1/mysql.1*
e474e322 1065%{_mandir}/man1/mysqladmin.1*
84628b90 1066%{_mandir}/man1/mysqlbinlog.1*
512d8da1 1067%{_mandir}/man1/mysqlbug.1*
f2308fd1 1068%{_mandir}/man1/mysql_config_editor.1*
9cc19375 1069%{_mandir}/man1/mysqldump.1*
84628b90 1070%{_mandir}/man1/mysqlimport.1*
9cc19375 1071%{_mandir}/man1/mysqlshow.1*
b24ee098 1072
3fe2f194 1073%files libs
75eb20a9 1074%defattr(644,root,root,755)
2b48022a 1075%attr(751,root,root) %dir %{_sysconfdir}/mysql
92992b51 1076%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
49e27b83 1077%{_sysconfdir}/%{name}/my.cnf
3b9f87c2 1078%attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
df1b5770 1079%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
3b9f87c2 1080%attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
df1b5770 1081%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
08472466 1082%if %{with ndb}
3b9f87c2 1083%attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
bd1c7139 1084%attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
08472466 1085%endif
b24ee098 1086
ceb5ca86 1087%files devel
3fe2f194 1088%defattr(644,root,root,755)
bbc0ff50 1089%attr(755,root,root) %{_bindir}/mysql_config
3b9f87c2
JB
1090%attr(755,root,root) %{_libdir}/libmysqlclient.so
1091%attr(755,root,root) %{_libdir}/libmysqlclient_r.so
08472466 1092%if %{with ndb}
3b9f87c2 1093%attr(755,root,root) %{_libdir}/libndbclient.so
08472466 1094%endif
48cc4c93
JB
1095# static-only so far
1096%{_libdir}/libmysqld.a
3fe2f194 1097%{_includedir}/mysql
68e8a131 1098%{_aclocaldir}/mysql.m4
84628b90 1099%{_mandir}/man1/mysql_config.1*
3fe2f194 1100
1101%files static
75eb20a9 1102%defattr(644,root,root,755)
3b9f87c2
JB
1103%{_libdir}/libmysqlclient.a
1104%{_libdir}/libmysqlclient_r.a
08472466 1105%if %{with ndb}
3b9f87c2 1106%{_libdir}/libndbclient.a
08472466 1107%endif
ceb5ca86 1108
d1e91a2d
AM
1109%files bench
1110%defattr(644,root,root,755)
8ce69d92 1111%attr(755,root,root) %{_bindir}/mysqlslap
d1e91a2d
AM
1112%attr(755,root,root) %{_bindir}/mysqltest
1113%dir %{_datadir}/sql-bench
1114%{_datadir}/sql-bench/[CDRl]*
1115%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
8ce69d92 1116%{_mandir}/man1/mysqlslap.1*
ffda6e55
ER
1117%{_mandir}/man1/mysqltest.1*
1118%{_mandir}/man1/mysqltest_embedded.1*
d1e91a2d 1119
be07ff22
AM
1120#%files doc
1121#%defattr(644,root,root,755)
1122#%doc Docs/manual.html Docs/manual_toc.html
d1e91a2d 1123
08472466 1124%if %{with ndb}
d72472ee
AM
1125%files ndb
1126%defattr(644,root,root,755)
1127%attr(755,root,root) %{_sbindir}/ndbd
1128%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
8cdaa5ca 1129%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
ffda6e55 1130%{_mandir}/man1/ndbd_redo_log_reader.1*
210f47d4 1131%{_mandir}/man8/ndbd.8*
d72472ee
AM
1132
1133%files ndb-client
1134%defattr(644,root,root,755)
e56168f2
ER
1135%attr(755,root,root) %{_bindir}/ndb_config
1136%attr(755,root,root) %{_bindir}/ndb_delete_all
1137%attr(755,root,root) %{_bindir}/ndb_desc
1138%attr(755,root,root) %{_bindir}/ndb_drop_index
1139%attr(755,root,root) %{_bindir}/ndb_drop_table
1140%attr(755,root,root) %{_bindir}/ndb_error_reporter
1141%attr(755,root,root) %{_bindir}/ndb_mgm
1142%attr(755,root,root) %{_bindir}/ndb_print_backup_file
1143%attr(755,root,root) %{_bindir}/ndb_print_schema_file
1144%attr(755,root,root) %{_bindir}/ndb_print_sys_file
1145%attr(755,root,root) %{_bindir}/ndb_restore
1146%attr(755,root,root) %{_bindir}/ndb_select_all
1147%attr(755,root,root) %{_bindir}/ndb_select_count
1148%attr(755,root,root) %{_bindir}/ndb_show_tables
1149%attr(755,root,root) %{_bindir}/ndb_size.pl
1150%attr(755,root,root) %{_bindir}/ndb_test_platform
1151%attr(755,root,root) %{_bindir}/ndb_waiter
e56168f2
ER
1152%{_mandir}/man1/ndb_config.1*
1153%{_mandir}/man1/ndb_delete_all.1*
1154%{_mandir}/man1/ndb_desc.1*
68e8a131
ER
1155%{_mandir}/man1/ndb_drop_index.1*
1156%{_mandir}/man1/ndb_drop_table.1*
1157%{_mandir}/man1/ndb_error_reporter.1*
1158%{_mandir}/man1/ndb_mgm.1*
1159%{_mandir}/man1/ndb_print_backup_file.1*
1160%{_mandir}/man1/ndb_print_schema_file.1*
1161%{_mandir}/man1/ndb_print_sys_file.1*
1162%{_mandir}/man1/ndb_restore.1*
1163%{_mandir}/man1/ndb_select_all.1*
1164%{_mandir}/man1/ndb_select_count.1*
1165%{_mandir}/man1/ndb_show_tables.1*
e56168f2 1166%{_mandir}/man1/ndb_size.pl.1*
68e8a131 1167%{_mandir}/man1/ndb_waiter.1*
d72472ee
AM
1168
1169%files ndb-mgm
1170%defattr(644,root,root,755)
1171%attr(755,root,root) %{_sbindir}/ndb_mgmd
1172%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
8cdaa5ca 1173%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
210f47d4 1174%{_mandir}/man8/ndb_mgmd.8*
d72472ee 1175
d72472ee
AM
1176%files ndb-cpc
1177%defattr(644,root,root,755)
1178%attr(755,root,root) %{_sbindir}/ndb_cpcd
1179%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
8cdaa5ca 1180%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
68e8a131 1181%{_mandir}/man1/ndb_cpcd.1*
08472466 1182%endif
This page took 0.383633 seconds and 4 git commands to generate.