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