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