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