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