]>
Commit | Line | Data |
---|---|---|
13ce82d8 | 1 | # TODO: |
2 | # - C(XX)FLAGS for innodb subdirs are overriden by ./configure! | |
3 | # - http://bugs.mysql.com/bug.php?id=16470 | |
4 | # | |
5 | # Conditional build: | |
f3b912d8 ER |
6 | %bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms |
7 | %bcond_without federated # Federated storage engine support | |
a78a22c1 | 8 | %bcond_without innodb # InnoDB storage engine support |
13ce82d8 | 9 | %bcond_without raid # Without raid |
10 | %bcond_without ssl # Without OpenSSL | |
11 | %bcond_without tcpd # Without libwrap (tcp_wrappers) support | |
420c5d74 | 12 | %bcond_without autodeps # BR packages needed only for resolving deps |
f3b912d8 | 13 | %bcond_with bdb # Berkeley DB support |
b79f901f | 14 | %bcond_without sphinx # Sphinx storage engine support |
f8f6f421 | 15 | %bcond_with xtrabackup # XtraBackup |
4ea87158 | 16 | |
13ce82d8 | 17 | %include /usr/lib/rpm/macros.perl |
13ce82d8 | 18 | Summary: MySQL: a very fast and reliable SQL database engine |
89316dd1 ER |
19 | Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank |
20 | Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable | |
21 | Summary(pl.UTF-8): MySQL: bardzo szybka i niezawodna baza danych (SQL) | |
22 | Summary(pt_BR.UTF-8): MySQL: Um servidor SQL rápido e confiável | |
23 | Summary(ru.UTF-8): MySQL - быстрый SQL-сервер | |
24 | Summary(uk.UTF-8): MySQL - швидкий SQL-сервер | |
25 | Summary(zh_CN.UTF-8): MySQL数据库服务器 | |
13ce82d8 | 26 | Name: mysql |
5b9e9ff4 | 27 | Version: 5.0.87 |
c6c45637 | 28 | Release: 2 |
13ce82d8 | 29 | License: GPL + MySQL FLOSS Exception |
30 | Group: Applications/Databases | |
7628f771 | 31 | #Source0: ftp://ftp.mysql.com/pub/mysql/src/%{name}-%{version}.tar.gz |
2644efb8 | 32 | Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz |
5b9e9ff4 | 33 | # Source0-md5: 65e6229cc98b6a8d4c5206d7fe16c7be |
fd2b4d8b | 34 | #Source0: http://mysql.he.net/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz |
2644efb8 | 35 | #Source0: http://mirror.provenscaling.com/mysql/enterprise/source/5.0/%{name}-%{version}.tar.gz |
45532174 ER |
36 | Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.9-rc2.tar.gz |
37 | # Source100-md5: 1ca266613bfdb0e6952d9ca1af93f7cc | |
13ce82d8 | 38 | Source1: %{name}.init |
39 | Source2: %{name}.sysconfig | |
40 | Source3: %{name}.logrotate | |
41 | Source4: %{name}d.conf | |
42 | Source5: %{name}-clusters.conf | |
43 | Source7: %{name}-ndb.init | |
44 | Source8: %{name}-ndb.sysconfig | |
45 | Source9: %{name}-ndb-mgm.init | |
46 | Source10: %{name}-ndb-mgm.sysconfig | |
47 | Source11: %{name}-ndb-cpc.init | |
48 | Source12: %{name}-ndb-cpc.sysconfig | |
49 | Source13: %{name}-client.conf | |
0dd56262 | 50 | Source14: percona.sh |
13ce82d8 | 51 | Patch0: %{name}-libs.patch |
a78a22c1 | 52 | Patch1: %{name}-sphinx.patch |
13ce82d8 | 53 | Patch2: %{name}-c++.patch |
54 | Patch3: %{name}-info.patch | |
55 | Patch4: %{name}-sql-cxx-pic.patch | |
56 | Patch5: %{name}-noproc.patch | |
57 | Patch6: %{name}-fix_privilege_tables.patch | |
58 | Patch7: %{name}-align.patch | |
59 | Patch8: %{name}-client-config.patch | |
60 | Patch9: %{name}-build.patch | |
61 | Patch10: %{name}-alpha.patch | |
62 | Patch11: %{name}-ndb-ldflags.patch | |
63 | Patch12: %{name}-bug-20153.patch | |
8ecd9b33 ER |
64 | Patch13: %{name}-bug-34192.patch |
65 | Patch14: %{name}-bug-16470.patch | |
66 | Patch15: %{name}-system-users.patch | |
0dd56262 ER |
67 | Patch16: %{name}-errorlog-no-rename.patch |
68 | Patch17: %{name}-alpha-stack.patch | |
69 | Patch18: %{name}-xtrabackup.patch | |
70 | Patch19: %{name}-fixes.patch | |
71 | Patch20: %{name}-gcc3.patch | |
3ff095bd | 72 | Patch21: %{name}-atomic.patch |
c6c45637 | 73 | Patch22: %{name}-fix-dummy-thread-race-condition.patch |
a660043b | 74 | # <percona patches, http://www.percona.com/percona-lab.html> |
89b96684 ER |
75 | Patch100: %{name}-show_patches.patch |
76 | Patch101: %{name}-microslow_innodb.patch | |
77 | Patch102: %{name}-profiling_slow.patch | |
78 | Patch103: %{name}-userstatv2.patch | |
79 | Patch104: %{name}-microsec_process.patch | |
80 | Patch105: %{name}-innodb_io_patches.patch | |
81 | Patch106: %{name}-innodb_locks_held.patch | |
82 | Patch107: %{name}-innodb_show_bp.patch | |
83 | Patch108: %{name}-innodb_check_fragmentation.patch | |
84 | Patch109: %{name}-innodb_io_pattern.patch | |
85 | Patch110: %{name}-innodb_fsync_source.patch | |
86 | Patch111: %{name}-innodb_show_hashed_memory.patch | |
87 | Patch112: %{name}-innodb_dict_size_limit.patch | |
88 | Patch113: %{name}-innodb_extra_rseg.patch | |
89 | Patch114: %{name}-innodb_thread_concurrency_timer_based.patch | |
90 | Patch115: %{name}-innodb_use_sys_malloc.patch | |
91 | Patch116: %{name}-innodb_recovery_patches.patch | |
5b9e9ff4 ER |
92 | Patch117: %{name}-innodb_misc_patch.patch |
93 | Patch118: %{name}-innodb_split_buf_pool_mutex.patch | |
94 | Patch119: %{name}-innodb_rw_lock.patch | |
95 | Patch120: %{name}-mysql-test.patch | |
a660043b | 96 | # </percona> |
13ce82d8 | 97 | URL: http://www.mysql.com/products/database/mysql/community_edition.html |
98 | BuildRequires: autoconf | |
99 | BuildRequires: automake | |
a203d680 | 100 | BuildRequires: bison |
13ce82d8 | 101 | %{?with_bdb:BuildRequires: db3-devel} |
a203d680 | 102 | BuildRequires: flex |
13ce82d8 | 103 | BuildRequires: libstdc++-devel >= 5:3.0 |
104 | BuildRequires: libtool | |
105 | %{?with_tcpd:BuildRequires: libwrap-devel} | |
106 | BuildRequires: ncurses-devel >= 4.2 | |
107 | %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d} | |
420c5d74 | 108 | %{?with_autodeps:BuildRequires: perl-DBI} |
13ce82d8 | 109 | BuildRequires: perl-devel >= 1:5.6.1 |
110 | BuildRequires: readline-devel >= 4.2 | |
111 | BuildRequires: rpm-perlprov >= 4.1-13 | |
34c3c791 | 112 | BuildRequires: rpmbuild(macros) >= 1.453 |
13ce82d8 | 113 | BuildRequires: sed >= 4.0 |
114 | BuildRequires: texinfo | |
115 | BuildRequires: zlib-devel | |
116 | Requires(post,preun): /sbin/chkconfig | |
117 | Requires(postun): /usr/sbin/groupdel | |
118 | Requires(postun): /usr/sbin/userdel | |
119 | Requires(pre): /bin/id | |
120 | Requires(pre): /usr/bin/getgid | |
121 | Requires(pre): /usr/sbin/groupadd | |
122 | Requires(pre): /usr/sbin/useradd | |
123 | Requires(triggerpostun): sed >= 4.0 | |
124 | Requires: %{name}-charsets = %{version}-%{release} | |
420c5d74 | 125 | Requires: %{name}-libs = %{version}-%{release} |
13ce82d8 | 126 | Requires: /usr/bin/setsid |
127 | Requires: rc-scripts >= 0.2.0 | |
37400e9a ER |
128 | Suggests: mysql-client |
129 | %{?with_tcpd:Suggests: tcp_wrappers} | |
13ce82d8 | 130 | Provides: MySQL-server |
131 | Provides: group(mysql) | |
132 | Provides: msqlormysql | |
133 | Provides: user(mysql) | |
134 | Obsoletes: MySQL | |
135 | Obsoletes: mysql-server | |
73ecfc30 | 136 | Conflicts: logrotate < 3.7-4 |
13ce82d8 | 137 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
138 | ||
139 | %define _libexecdir %{_sbindir} | |
140 | %define _localstatedir /var/lib/mysql | |
141 | %define _mysqlhome /home/services/mysql | |
142 | ||
143 | %define _noautoreqdep 'perl(DBD::mysql)' | |
144 | # CFLAGS for innodb are altered | |
145 | %undefine configure_cache | |
146 | ||
147 | %description | |
148 | MySQL is a true multi-user, multi-threaded SQL (Structured Query | |
149 | Language) database server. SQL is the most popular database language | |
150 | in the world. MySQL is a client/server implementation that consists of | |
151 | a server daemon mysqld and many different client programs/libraries. | |
152 | ||
153 | The main goals of MySQL are speed, robustness and easy to use. MySQL | |
154 | was originally developed because we at Tcx needed a SQL server that | |
155 | could handle very big databases with magnitude higher speed than what | |
156 | any database vendor could offer to us. We have now been using MySQL | |
157 | since 1996 in a environment with more than 40 databases, 10,000 | |
158 | tables, of which more than 500 have more than 7 million rows. This is | |
159 | about 50G of mission critical data. | |
160 | ||
161 | The base upon which MySQL is built is a set of routines that have been | |
162 | used in a highly demanding production environment for many years. | |
163 | While MySQL is still in development, it already offers a rich and | |
164 | highly useful function set. | |
165 | ||
89316dd1 | 166 | %description -l fr.UTF-8 |
13ce82d8 | 167 | MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et |
168 | multi-taches. Le langage SQL est le langage de bases de donnees le | |
169 | plus populaire au monde. MySQL est une implementation client/serveur | |
170 | qui consiste en un serveur (mysqld) et differents | |
171 | programmes/bibliotheques clientes. | |
172 | ||
173 | Les objectifs principaux de MySQL sont: vitesse, robustesse et | |
174 | facilite d'utilisation. MySQL fut originalement developpe parce que | |
175 | nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de | |
176 | tres grandes bases de donnees avec une vitesse d'un ordre de magnitude | |
177 | superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous | |
178 | utilisons MySQL depuis 1996 dans un environnement avec plus de 40 | |
179 | bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7 | |
180 | millions de lignes. Ceci represente environ 50G de donnees critiques. | |
181 | ||
182 | A la base de la conception de MySQL, on retrouve une serie de routines | |
183 | qui ont ete utilisees dans un environnement de production pendant | |
184 | plusieurs annees. Meme si MySQL est encore en developpement, il offre | |
185 | deja une riche et utile serie de fonctions. | |
186 | ||
89316dd1 ER |
187 | %description -l pl.UTF-8 |
188 | MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych | |
189 | SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz | |
190 | danych. MySQL to implementacja klient/serwer składająca się z demona | |
191 | mysqld i wielu różnych programów i bibliotek klienckich. | |
192 | ||
193 | Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania. | |
194 | MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali | |
195 | serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele | |
196 | większą, niż mogli zaoferować inni producenci baz danych. Używają go | |
197 | od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z | |
198 | których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około | |
13ce82d8 | 199 | 50GB krytycznych danych. |
200 | ||
89316dd1 ER |
201 | Baza, na której oparty jest MySQL, składa się ze zbioru procedur, |
202 | które były używane w bardzo wymagającym środowisku produkcyjnym przez | |
203 | wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty | |
204 | i użyteczny zbiór funkcji. | |
13ce82d8 | 205 | |
89316dd1 | 206 | %description -l de.UTF-8 |
13ce82d8 | 207 | MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu |
208 | Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten | |
89316dd1 ER |
209 | werden zwar in zweidimensionalen Tabellen gespeichert und können mit |
210 | einem Primärschlüssel versehen werden. Es ist aber keine Definition | |
211 | eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer | |
212 | MySQL-Datenbank völlig allein für die (referenzielle) Integrität der | |
13ce82d8 | 213 | Daten verantwortlich. Allein durch die Nutzung externer |
89316dd1 ER |
214 | Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität |
215 | ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten. | |
13ce82d8 | 216 | |
89316dd1 ER |
217 | %description -l pt_BR.UTF-8 |
218 | O MySQL é um servidor de banco de dados SQL realmente multiusuário e | |
219 | multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de | |
220 | dados no mundo. O MySQL é uma implementação cliente/servidor que | |
13ce82d8 | 221 | consiste de um servidor chamado mysqld e diversos |
89316dd1 | 222 | programas/bibliotecas clientes. Os principais objetivos do MySQL são: |
13ce82d8 | 223 | velocidade, robustez e facilidade de uso. O MySQL foi originalmente |
89316dd1 | 224 | desenvolvido porque nós na Tcx precisávamos de um servidor SQL que |
13ce82d8 | 225 | pudesse lidar com grandes bases de dados e com uma velocidade muito |
226 | maior do que a que qualquer vendedor podia nos oferecer. Estamos | |
227 | usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados | |
89316dd1 ER |
228 | com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de |
229 | linhas. Isto é o equivalente a aproximadamente 50G de dados críticos. | |
230 | A base da construção do MySQL é uma série de rotinas que foram usadas | |
231 | em um ambiente de produção com alta demanda por muitos anos. Mesmo o | |
232 | MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de | |
233 | funções muito ricas e úteis. Veja a documentação para maiores | |
234 | informações. | |
235 | ||
236 | %description -l ru.UTF-8 | |
237 | MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL | |
238 | была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в | |
239 | дистрибутиве на предмет других участников проекта и прочей информации | |
240 | о MySQL. | |
241 | ||
242 | %description -l uk.UTF-8 | |
243 | MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL | |
244 | було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в | |
245 | дистрибутиві для інформації про інших учасників проекту та іншої | |
246 | інформації. | |
13ce82d8 | 247 | |
248 | %package charsets | |
249 | Summary: MySQL - character sets definitions | |
89316dd1 | 250 | Summary(pl.UTF-8): MySQL - definicje kodowań znaków |
13ce82d8 | 251 | Group: Applications/Databases |
252 | ||
253 | %description charsets | |
254 | This package contains character sets definitions needed by both client | |
255 | and server. | |
256 | ||
89316dd1 ER |
257 | %description charsets -l pl.UTF-8 |
258 | Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i | |
13ce82d8 | 259 | klienta. |
260 | ||
4ea87158 ER |
261 | %package -n mysqlhotcopy |
262 | Summary: mysqlhotcopy - A MySQL database backup program | |
263 | Group: Applications/Databases | |
264 | Requires: %{name}-libs = %{version}-%{release} | |
265 | Requires: perl-DBD-mysql | |
266 | ||
267 | %description -n mysqlhotcopy | |
268 | mysqlhotcopy uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a | |
269 | database backup quickly. It is the fastest way to make a backup of the | |
270 | database or single tables, but it can be run only on the same machine | |
271 | where the database directories are located. mysqlhotcopy works only | |
272 | for backing up MyISAM and ARCHIVE tables. | |
273 | ||
274 | See innobackup package to backup InnoDB tables. | |
275 | ||
13ce82d8 | 276 | %package extras |
277 | Summary: MySQL additional utilities | |
89316dd1 | 278 | Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL |
13ce82d8 | 279 | Group: Applications/Databases |
280 | Requires: %{name}-libs = %{version}-%{release} | |
281 | ||
282 | %description extras | |
283 | MySQL additional utilities except Perl scripts (they may be found in | |
284 | %{name}-extras-perl package). | |
285 | ||
89316dd1 ER |
286 | %description extras -l pl.UTF-8 |
287 | Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w | |
13ce82d8 | 288 | pakiecie %{name}-extras-perl). |
289 | ||
290 | %package extras-perl | |
291 | Summary: MySQL additional utilities written in Perl | |
89316dd1 | 292 | Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu |
13ce82d8 | 293 | Group: Applications/Databases |
294 | Requires: %{name}-extras = %{version}-%{release} | |
4ea87158 ER |
295 | # this is just for the sake of smooth upgrade, not to break systems |
296 | Requires: mysqlhotcopy = %{version}-%{release} | |
13ce82d8 | 297 | Requires: perl(DBD::mysql) |
298 | ||
299 | %description extras-perl | |
300 | MySQL additional utilities written in Perl. | |
301 | ||
89316dd1 ER |
302 | %description extras-perl -l pl.UTF-8 |
303 | Dodatkowe narzędzia do MySQL napisane w Perlu. | |
13ce82d8 | 304 | |
305 | %package client | |
306 | Summary: MySQL - Client | |
89316dd1 ER |
307 | Summary(pl.UTF-8): MySQL - Klient |
308 | Summary(pt.UTF-8): MySQL - Cliente | |
309 | Summary(ru.UTF-8): MySQL клиент | |
310 | Summary(uk.UTF-8): MySQL клієнт | |
13ce82d8 | 311 | Group: Applications/Databases |
312 | Requires: %{name}-charsets = %{version}-%{release} | |
313 | Requires: %{name}-libs = %{version}-%{release} | |
314 | Obsoletes: MySQL-client | |
315 | ||
316 | %description client | |
317 | This package contains the standard MySQL clients. | |
318 | ||
89316dd1 | 319 | %description client -l fr.UTF-8 |
13ce82d8 | 320 | Ce package contient les clients MySQL standards. |
321 | ||
89316dd1 | 322 | %description client -l pl.UTF-8 |
13ce82d8 | 323 | Standardowe programy klienckie MySQL. |
324 | ||
89316dd1 ER |
325 | %description client -l pt_BR.UTF-8 |
326 | Este pacote contém os clientes padrão para o MySQL. | |
13ce82d8 | 327 | |
89316dd1 ER |
328 | %description client -l ru.UTF-8 |
329 | Этот пакет содержит только клиент MySQL. | |
13ce82d8 | 330 | |
89316dd1 ER |
331 | %description client -l uk.UTF-8 |
332 | Цей пакет містить тільки клієнта MySQL. | |
13ce82d8 | 333 | |
334 | %package libs | |
335 | Summary: Shared libraries for MySQL | |
89316dd1 | 336 | Summary(pl.UTF-8): Biblioteki dzielone MySQL |
13ce82d8 | 337 | Group: Libraries |
c6c45637 | 338 | Requires: glibc >= 6:2.3.6-15 |
13ce82d8 | 339 | Obsoletes: libmysql10 |
340 | Obsoletes: mysql-doc < 4.1.12 | |
341 | ||
342 | %description libs | |
343 | Shared libraries for MySQL. | |
344 | ||
89316dd1 | 345 | %description libs -l pl.UTF-8 |
13ce82d8 | 346 | Biblioteki dzielone MySQL. |
347 | ||
348 | %package devel | |
349 | Summary: MySQL - Development header files and libraries | |
89316dd1 ER |
350 | Summary(pl.UTF-8): MySQL - Pliki nagłówkowe i biblioteki dla programistów |
351 | Summary(pt.UTF-8): MySQL - Medições de desempenho | |
352 | Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработчика | |
353 | Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста | |
13ce82d8 | 354 | Group: Development/Libraries |
355 | Requires: %{name}-libs = %{version}-%{release} | |
356 | %{?with_ssl:Requires: openssl-devel} | |
357 | Requires: zlib-devel | |
358 | Obsoletes: MySQL-devel | |
359 | Obsoletes: libmysql10-devel | |
360 | ||
361 | %description devel | |
362 | This package contains the development header files and libraries | |
363 | necessary to develop MySQL client applications. | |
364 | ||
89316dd1 | 365 | %description devel -l fr.UTF-8 |
13ce82d8 | 366 | Ce package contient les fichiers entetes et les librairies de |
367 | developpement necessaires pour developper des applications clientes | |
368 | MySQL. | |
369 | ||
89316dd1 ER |
370 | %description devel -l pl.UTF-8 |
371 | Pliki nagłówkowe i biblioteki konieczne do kompilacji aplikacji | |
13ce82d8 | 372 | klienckich MySQL. |
373 | ||
89316dd1 ER |
374 | %description devel -l pt_BR.UTF-8 |
375 | Este pacote contém os arquivos de cabeçalho (header files) e | |
376 | bibliotecas necessárias para desenvolver aplicações clientes do MySQL. | |
13ce82d8 | 377 | |
89316dd1 ER |
378 | %description devel -l ru.UTF-8 |
379 | Этот пакет содержит хедеры и библиотеки разработчика, необходимые для | |
380 | разработки клиентских приложений. | |
13ce82d8 | 381 | |
89316dd1 ER |
382 | %description devel -l uk.UTF-8 |
383 | Цей пакет містить хедери та бібліотеки програміста, необхідні для | |
384 | розробки програм-клієнтів. | |
13ce82d8 | 385 | |
386 | %package static | |
387 | Summary: MySQL static libraries | |
89316dd1 ER |
388 | Summary(pl.UTF-8): Biblioteki statyczne MySQL |
389 | Summary(ru.UTF-8): MySQL - статические библиотеки | |
390 | Summary(uk.UTF-8): MySQL - статичні бібліотеки | |
13ce82d8 | 391 | Group: Development/Libraries |
392 | Requires: %{name}-devel = %{version}-%{release} | |
393 | Obsoletes: MySQL-static | |
394 | ||
395 | %description static | |
396 | MySQL static libraries. | |
397 | ||
89316dd1 | 398 | %description static -l pl.UTF-8 |
13ce82d8 | 399 | Biblioteki statyczne MySQL. |
400 | ||
89316dd1 ER |
401 | %description static -l ru.UTF-8 |
402 | Этот пакет содержит статические библиотеки разработчика, необходимые | |
403 | для разработки клиентских приложений. | |
13ce82d8 | 404 | |
89316dd1 ER |
405 | %description static -l uk.UTF-8 |
406 | Цей пакет містить статичні бібліотеки програміста, необхідні для | |
407 | розробки програм-клієнтів. | |
13ce82d8 | 408 | |
409 | %package bench | |
410 | Summary: MySQL - Benchmarks | |
89316dd1 ER |
411 | Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy |
412 | Summary(pt.UTF-8): MySQL - Medições de desempenho | |
413 | Summary(ru.UTF-8): MySQL - бенчмарки | |
414 | Summary(uk.UTF-8): MySQL - бенчмарки | |
13ce82d8 | 415 | Group: Applications/Databases |
416 | Requires: %{name} = %{version}-%{release} | |
417 | Requires: %{name}-client | |
418 | Requires: perl(DBD::mysql) | |
419 | Obsoletes: MySQL-bench | |
420 | ||
421 | %description bench | |
422 | This package contains MySQL benchmark scripts and data. | |
423 | ||
89316dd1 ER |
424 | %description bench -l pl.UTF-8 |
425 | Programy testujące szybkość serwera MySQL. | |
13ce82d8 | 426 | |
89316dd1 ER |
427 | %description bench -l pt_BR.UTF-8 |
428 | Este pacote contém medições de desempenho de scripts e dados do MySQL. | |
13ce82d8 | 429 | |
89316dd1 ER |
430 | %description bench -l ru.UTF-8 |
431 | Этот пакет содержит скрипты и данные для оценки производительности | |
13ce82d8 | 432 | MySQL. |
433 | ||
89316dd1 ER |
434 | %description bench -l uk.UTF-8 |
435 | Цей пакет містить скрипти та дані для оцінки продуктивності MySQL. | |
13ce82d8 | 436 | |
437 | %package doc | |
438 | Summary: MySQL manual | |
89316dd1 | 439 | Summary(pl.UTF-8): Podręcznik użytkownika MySQL |
13ce82d8 | 440 | Group: Applications/Databases |
441 | ||
442 | %description doc | |
443 | This package contains manual in HTML format. | |
444 | ||
89316dd1 ER |
445 | %description doc -l pl.UTF-8 |
446 | Podręcznik MySQL-a w formacie HTML. | |
13ce82d8 | 447 | |
448 | %package ndb | |
449 | Summary: MySQL - NDB Storage Engine Daemon | |
89316dd1 | 450 | Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB |
13ce82d8 | 451 | Group: Applications/Databases |
452 | Requires: %{name}-libs = %{version}-%{release} | |
453 | ||
454 | %description ndb | |
455 | This package contains the standard MySQL NDB Storage Engine Daemon. | |
456 | ||
89316dd1 | 457 | %description ndb -l pl.UTF-8 |
13ce82d8 | 458 | Ten pakiet zawiera standardowego demona silnika przechowywania danych |
459 | NDB. | |
460 | ||
461 | %package ndb-client | |
462 | Summary: MySQL - NDB Clients | |
89316dd1 | 463 | Summary(pl.UTF-8): MySQL - programy klienckie NDB |
13ce82d8 | 464 | Group: Applications/Databases |
465 | Requires: %{name}-libs = %{version}-%{release} | |
466 | ||
467 | %description ndb-client | |
468 | This package contains the standard MySQL NDB Clients. | |
469 | ||
89316dd1 | 470 | %description ndb-client -l pl.UTF-8 |
13ce82d8 | 471 | Ten pakiet zawiera standardowe programy klienckie MySQL NDB. |
472 | ||
473 | %package ndb-mgm | |
474 | Summary: MySQL - NDB Management Daemon | |
89316dd1 | 475 | Summary(pl.UTF-8): MySQL - demon zarządzający NDB |
13ce82d8 | 476 | Group: Applications/Databases |
477 | Requires: %{name}-libs = %{version}-%{release} | |
478 | ||
479 | %description ndb-mgm | |
480 | This package contains the standard MySQL NDB Management Daemon. | |
481 | ||
89316dd1 ER |
482 | %description ndb-mgm -l pl.UTF-8 |
483 | Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB. | |
13ce82d8 | 484 | |
485 | %package ndb-cpc | |
486 | Summary: MySQL - NDB CPC Daemon | |
89316dd1 | 487 | Summary(pl.UTF-8): MySQL - demon NDB CPC |
13ce82d8 | 488 | Group: Applications/Databases |
489 | Requires: %{name}-libs = %{version}-%{release} | |
490 | ||
491 | %description ndb-cpc | |
492 | This package contains the standard MySQL NDB CPC Daemon. | |
493 | ||
89316dd1 | 494 | %description ndb-cpc -l pl.UTF-8 |
13ce82d8 | 495 | Ten pakiet zawiera standardowego demona MySQL NDB CPC. |
496 | ||
497 | %prep | |
5b9e9ff4 | 498 | %setup -q %{?with_sphinx:-a100} |
13ce82d8 | 499 | %patch0 -p1 |
a78a22c1 ER |
500 | %if %{with sphinx} |
501 | mv sphinx-*/mysqlse sql/sphinx | |
502 | %patch1 -p1 | |
503 | %endif | |
13ce82d8 | 504 | %patch2 -p1 |
505 | %patch3 -p1 | |
506 | %ifarch alpha | |
507 | # this is strange: mysqld functions for UDF modules are not explicitly defined, | |
508 | # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables | |
509 | # in objects compiled without -fPIC | |
510 | %patch4 -p1 | |
511 | # gcc 3.3.x ICE | |
512 | %patch10 -p1 | |
513 | %endif | |
514 | %patch5 -p1 | |
515 | %patch6 -p1 | |
516 | %patch7 -p1 | |
517 | %patch8 -p1 | |
518 | %patch9 -p1 | |
519 | %patch11 -p1 | |
520 | %patch12 -p1 | |
e140e412 | 521 | %patch13 -p1 |
f22fdf33 | 522 | %patch14 -p1 |
f2227d5a | 523 | %patch15 -p1 |
0dd56262 ER |
524 | %patch16 -p1 |
525 | %ifarch alpha | |
526 | %patch17 -p1 | |
527 | %endif | |
528 | %{?with_xtrabackup:%patch18 -p1} | |
89b96684 | 529 | |
425dfcbb | 530 | # <percona %patches> |
89b96684 ER |
531 | %patch100 -p1 |
532 | %patch101 -p1 | |
533 | %patch102 -p1 | |
534 | %patch103 -p1 | |
535 | %patch104 -p1 | |
536 | %patch105 -p1 | |
537 | %patch106 -p1 | |
538 | %patch107 -p1 | |
539 | %patch108 -p1 | |
540 | %patch109 -p1 | |
541 | %patch110 -p1 | |
542 | %patch111 -p1 | |
543 | %patch112 -p1 | |
544 | %patch113 -p1 | |
545 | %patch114 -p1 | |
546 | %patch115 -p1 | |
547 | %patch116 -p1 | |
548 | %patch117 -p1 | |
549 | %patch118 -p1 | |
550 | %patch119 -p1 | |
5b9e9ff4 | 551 | %patch120 -p1 |
89b96684 ER |
552 | # </percona> |
553 | ||
0dd56262 | 554 | %patch19 -p1 |
45532174 | 555 | %if "%{cxx_version}" < "4.1" |
0dd56262 | 556 | %patch20 -p1 |
34c3c791 | 557 | %endif |
3ff095bd | 558 | %patch21 -p0 |
c6c45637 | 559 | %patch22 -p1 |
13ce82d8 | 560 | |
561 | %build | |
562 | %{__libtoolize} | |
563 | %{__aclocal} | |
564 | %{__automake} | |
3ff095bd | 565 | %{__autoheader} |
13ce82d8 | 566 | %{__autoconf} |
567 | ||
568 | # The compiler flags are as per their "official" spec ;) | |
c2495d4f AM |
569 | CXXFLAGS="%{rpmcflags} -fno-implicit-templates -fno-exceptions -fno-rtti" |
570 | CFLAGS="%{rpmcflags}" | |
571 | CPPFLAGS="%{rpmcppflags}" | |
13ce82d8 | 572 | |
573 | # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux | |
574 | # and therefore do not add BR on these. These are here just to satisfy | |
575 | # configure. | |
576 | ||
577 | %configure \ | |
578 | PS='/bin/ps' \ | |
579 | FIND_PROC='/bin/ps p $$PID' \ | |
580 | KILL='/bin/kill' \ | |
581 | CHECK_PID='/bin/kill -0 $$PID' \ | |
582 | --enable-assembler \ | |
583 | --enable-largefile=yes \ | |
584 | --enable-shared \ | |
585 | --enable-static \ | |
586 | --enable-thread-safe-client \ | |
587 | --with%{!?with_bdb:out}-berkeley-db \ | |
588 | --with%{!?with_innodb:out}-innodb \ | |
589 | --with%{!?with_raid:out}-raid \ | |
590 | --with%{!?with_ssl:out}-openssl \ | |
591 | --with%{!?with_tcpd:out}-libwrap \ | |
592 | %{?with_big_tables:--with-big-tables} \ | |
593 | --with-comment="PLD Linux Distribution MySQL RPM" \ | |
594 | --with%{!?debug:out}-debug \ | |
595 | --with%{!?debug:out}-ndb-debug \ | |
596 | --with-embedded-server \ | |
597 | --with-extra-charsets=all \ | |
598 | --with-low-memory \ | |
599 | --with-mysqld-user=mysql \ | |
600 | --with-named-curses-libs="-lncurses" \ | |
601 | --with-named-thread-libs="-lpthread" \ | |
602 | --with-unix-socket-path=/var/lib/mysql/mysql.sock \ | |
603 | --with-archive-storage-engine \ | |
a78a22c1 | 604 | %{?with_sphinx:--with-sphinx-storage-engine} \ |
f3b912d8 | 605 | %{?with_federated:--with-federated-storage-engine} \ |
13ce82d8 | 606 | --with-vio \ |
607 | --with-ndbcluster \ | |
608 | --without-readline \ | |
609 | --without-libedit \ | |
610 | --without-docs | |
611 | # --with-mysqlfs | |
612 | # --with-ndb-test --with-ndb-docs | |
613 | ||
614 | # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file | |
615 | # (it defaults to first cluster but user may change it to whatever | |
616 | # cluster it wants) | |
617 | ||
618 | echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile | |
619 | ||
620 | %{__make} \ | |
621 | benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench | |
622 | ||
f8f6f421 ER |
623 | %if %{with xtrabackup} |
624 | %{__make} -C innobase/xtrabackup \ | |
625 | CC="%{__cc}" | |
626 | %endif | |
627 | ||
13ce82d8 | 628 | %{__make} -C Docs mysql.info |
629 | ||
630 | %install | |
631 | rm -rf $RPM_BUILD_ROOT | |
a8c2b192 | 632 | install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,ssl/certs/mysql} \ |
37400e9a | 633 | $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \ |
13ce82d8 | 634 | $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}} |
635 | ||
636 | %if %{with bdb} | |
637 | install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp} | |
638 | %endif | |
639 | ||
640 | # Make install | |
641 | %{__make} install \ | |
642 | DESTDIR=$RPM_BUILD_ROOT \ | |
643 | benchdir=%{_datadir}/sql-bench \ | |
644 | libsdir=/tmp | |
645 | # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs | |
646 | ||
647 | install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir} | |
648 | ||
649 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql | |
650 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql | |
651 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql | |
652 | # This is template for configuration file which is created after 'service mysql init' | |
653 | install %{SOURCE4} mysqld.conf | |
654 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf | |
655 | touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update} | |
656 | ||
657 | # remove innodb directives from mysqld.conf if mysqld is configured without | |
37400e9a | 658 | %if %{without innodb} |
13ce82d8 | 659 | cp mysqld.conf mysqld.tmp |
660 | awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf | |
661 | %endif | |
662 | ||
663 | # remove berkeley-db directives from mysqld.conf if mysqld is configured without | |
37400e9a | 664 | %if %{without bdb} |
13ce82d8 | 665 | cp mysqld.conf mysqld.tmp |
666 | awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf | |
667 | %endif | |
668 | ||
669 | install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf | |
37400e9a | 670 | cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf |
13ce82d8 | 671 | |
672 | # NDB | |
673 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb | |
674 | install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb | |
675 | install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm | |
676 | install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm | |
677 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc | |
678 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc | |
13ce82d8 | 679 | |
680 | mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir} | |
681 | sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config} | |
37400e9a | 682 | sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config |
13ce82d8 | 683 | |
684 | # remove known unpackaged files | |
685 | rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test | |
686 | ||
37400e9a ER |
687 | # remove .txt variants for .sys messages |
688 | rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt | |
689 | ||
13ce82d8 | 690 | # rename not to be so generic name |
13ce82d8 | 691 | mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump |
448811bf | 692 | mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1 |
13ce82d8 | 693 | |
694 | # not useful without -debug build | |
695 | %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump} | |
448811bf | 696 | %{!?debug:rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1} |
13ce82d8 | 697 | # generate symbols file, so one can generate backtrace using it |
698 | # mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack. | |
699 | # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html | |
700 | %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym} | |
701 | ||
37400e9a ER |
702 | # do not clobber users $PATH |
703 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade | |
704 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum | |
705 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk | |
706 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog | |
707 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack | |
708 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables | |
709 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults | |
710 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck | |
711 | ||
712 | # functionality in initscript / rpm | |
13ce82d8 | 713 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db |
37400e9a | 714 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_upgrade_shell |
13ce82d8 | 715 | rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe |
716 | rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi | |
717 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}* | |
718 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate | |
719 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server | |
720 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure | |
721 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt | |
722 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid | |
723 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server* | |
724 | rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld* | |
725 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1* | |
37400e9a ER |
726 | rm $RPM_BUILD_ROOT%{_bindir}/resolveip |
727 | rm $RPM_BUILD_ROOT%{_mandir}/man1/resolveip.1* | |
37400e9a ER |
728 | rm $RPM_BUILD_ROOT%{_bindir}/comp_err |
729 | rm $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1 | |
a78a22c1 | 730 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_install_db.1 |
2cc8e9c5 | 731 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1 |
e32f1a7b | 732 | rm $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld_multi.server |
448811bf ER |
733 | |
734 | # no package for tests | |
735 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1 | |
736 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1 | |
737 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1 | |
37400e9a | 738 | # orphaned manuals |
37400e9a | 739 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqltest_embedded.1 |
13ce82d8 | 740 | |
741 | # in %doc | |
742 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf} | |
743 | ||
744 | %clean | |
745 | rm -rf $RPM_BUILD_ROOT | |
746 | ||
747 | %pre | |
748 | %groupadd -g 89 mysql | |
749 | %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql | |
750 | ||
751 | %post | |
752 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
753 | /sbin/chkconfig --add mysql | |
754 | %service mysql restart | |
755 | ||
756 | %preun | |
757 | if [ "$1" = "0" ]; then | |
758 | %service -q mysql stop | |
759 | /sbin/chkconfig --del mysql | |
760 | fi | |
761 | ||
762 | %postun | |
763 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
764 | if [ "$1" = "0" ]; then | |
765 | %userremove mysql | |
766 | %groupremove mysql | |
767 | fi | |
768 | ||
769 | %post ndb | |
770 | /sbin/chkconfig --add mysql-ndb | |
771 | %service mysql-ndb restart "mysql NDB engine" | |
772 | ||
773 | %preun ndb | |
774 | if [ "$1" = "0" ]; then | |
775 | %service mysql-ndb stop | |
776 | /sbin/chkconfig --del mysql-ndb | |
777 | fi | |
778 | ||
779 | %post ndb-mgm | |
780 | /sbin/chkconfig --add mysql-ndb-mgm | |
781 | %service mysql-ndb-mgm restart "mysql NDB management node" | |
782 | ||
783 | %preun ndb-mgm | |
784 | if [ "$1" = "0" ]; then | |
785 | %service mysql-ndb-mgm stop | |
786 | /sbin/chkconfig --del mysql-ndb-mgm | |
787 | fi | |
788 | ||
789 | %post ndb-cpc | |
790 | /sbin/chkconfig --add mysql-ndb-cpc | |
791 | %service mysql-ndb-cpc restart "mysql NDB CPC" | |
792 | ||
793 | %preun ndb-cpc | |
794 | if [ "$1" = "0" ]; then | |
795 | %service mysql-ndb-cpc stop | |
796 | /sbin/chkconfig --del mysql-ndb-cpc | |
797 | fi | |
798 | ||
799 | %post libs -p /sbin/ldconfig | |
800 | %postun libs -p /sbin/ldconfig | |
801 | ||
885918e3 | 802 | %triggerpostun -- mysql < 4.0.20-2.4 |
13ce82d8 | 803 | # For clusters in /etc/mysql/clusters.conf |
885918e3 | 804 | if [ -f /etc/sysconfig/mysql ]; then |
13ce82d8 | 805 | . /etc/sysconfig/mysql |
806 | if [ -n "$MYSQL_DB_CLUSTERS" ]; then | |
807 | for i in "$MYSQL_DB_CLUSTERS"; do | |
808 | echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf | |
809 | done | |
810 | echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql | |
811 | echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql | |
812 | echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf." | |
813 | echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf." | |
814 | fi | |
815 | fi | |
816 | ||
885918e3 | 817 | %triggerpostun -- mysql < 4.1.1 |
13ce82d8 | 818 | # For better compatibility with prevoius versions: |
819 | for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do | |
820 | if echo "$config" | grep -q '^/'; then | |
821 | config_file="$config" | |
822 | elif [ -f "/etc/mysql/$config" ]; then | |
823 | config_file=/etc/mysql/$config | |
824 | else | |
825 | clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf) | |
826 | if [ -z "$clusterdir" ]; then | |
827 | echo >&2 "Can't find cluster dir for $config!" | |
828 | echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf" | |
829 | exit 1 | |
830 | fi | |
831 | config_file="$clusterdir/mysqld.conf" | |
832 | fi | |
833 | ||
834 | if [ ! -f "$config_file" ]; then | |
835 | echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" | |
836 | exit 1 | |
837 | fi | |
838 | echo "Adding option old-passwords to config: $config_file" | |
839 | echo "If you want to use new, better passwords - remove it" | |
840 | ||
841 | # sed magic to add 'old-passwords' to [mysqld] section | |
842 | sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{ | |
843 | a | |
844 | a; Compatibility options: | |
845 | aold-passwords | |
846 | } | |
847 | ' $config_file | |
848 | done | |
849 | ||
850 | %banner -e %{name}-4.1.x <<-EOF | |
851 | If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data: | |
852 | mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql | |
853 | EOF | |
854 | #' | |
855 | ||
856 | %files | |
857 | %defattr(644,root,root,755) | |
d5eb4b14 | 858 | %doc support-files/*.cnf support-files/*.ini ChangeLog |
13ce82d8 | 859 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql |
860 | %attr(754,root,root) /etc/rc.d/init.d/mysql | |
861 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql | |
a8c2b192 | 862 | %dir /etc/ssl/certs/mysql |
13ce82d8 | 863 | %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf |
37400e9a ER |
864 | %attr(755,root,root) %{_sbindir}/innochecksum |
865 | %attr(755,root,root) %{_sbindir}/my_print_defaults | |
866 | %attr(755,root,root) %{_sbindir}/myisamchk | |
867 | %attr(755,root,root) %{_sbindir}/myisamlog | |
868 | %attr(755,root,root) %{_sbindir}/myisampack | |
869 | %attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables | |
870 | %attr(755,root,root) %{_sbindir}/mysql_upgrade | |
871 | %attr(755,root,root) %{_sbindir}/mysqlcheck | |
13ce82d8 | 872 | %attr(755,root,root) %{_sbindir}/mysqld |
37400e9a | 873 | %{_mandir}/man1/innochecksum.1* |
540a650f | 874 | %{_mandir}/man1/my_print_defaults.1* |
13ce82d8 | 875 | %{_mandir}/man1/myisamchk.1* |
876 | %{_mandir}/man1/myisamlog.1* | |
877 | %{_mandir}/man1/myisampack.1* | |
37400e9a | 878 | %{_mandir}/man1/mysql_fix_privilege_tables.1* |
13ce82d8 | 879 | %{_mandir}/man1/mysql_upgrade.1* |
37400e9a | 880 | %{_mandir}/man1/mysqlcheck.1* |
13ce82d8 | 881 | %{_mandir}/man8/mysqld.8* |
882 | ||
a397d2f1 ER |
883 | %if %{?debug:1}0 |
884 | %attr(755,root,root) %{_bindir}/*resolve_stack_dump | |
885 | %{_datadir}/mysql/mysqld.sym | |
886 | %{_mandir}/man1/*resolve_stack_dump.1* | |
887 | %endif | |
888 | ||
13ce82d8 | 889 | %attr(700,mysql,mysql) %{_mysqlhome} |
37400e9a | 890 | # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole |
13ce82d8 | 891 | %attr(751,root,root) /var/lib/mysql |
892 | %attr(750,mysql,mysql) %dir /var/log/mysql | |
37400e9a | 893 | %attr(750,mysql,mysql) %dir /var/log/archive/mysql |
13ce82d8 | 894 | %attr(640,mysql,mysql) %ghost /var/log/mysql/* |
895 | ||
896 | %{_infodir}/mysql.info* | |
897 | # This is template for configuration file which is created after 'service mysql init' | |
898 | %{_datadir}/mysql/mysqld.conf | |
448811bf ER |
899 | %{_datadir}/mysql/mysql_system_tables.sql |
900 | %{_datadir}/mysql/mysql_system_tables_data.sql | |
901 | %{_datadir}/mysql/mysql_test_data_timezone.sql | |
902 | ||
903 | %{_datadir}/mysql/english | |
37400e9a ER |
904 | %{_datadir}/mysql/fill_help_tables.sql |
905 | %{_datadir}/mysql/mysql_fix_privilege_tables.sql | |
13ce82d8 | 906 | %lang(cs) %{_datadir}/mysql/czech |
907 | %lang(da) %{_datadir}/mysql/danish | |
908 | %lang(de) %{_datadir}/mysql/german | |
909 | %lang(el) %{_datadir}/mysql/greek | |
910 | %lang(es) %{_datadir}/mysql/spanish | |
911 | %lang(et) %{_datadir}/mysql/estonian | |
912 | %lang(fr) %{_datadir}/mysql/french | |
913 | %lang(hu) %{_datadir}/mysql/hungarian | |
914 | %lang(it) %{_datadir}/mysql/italian | |
915 | %lang(ja) %{_datadir}/mysql/japanese | |
916 | %lang(ko) %{_datadir}/mysql/korean | |
917 | %lang(nl) %{_datadir}/mysql/dutch | |
918 | %lang(nb) %{_datadir}/mysql/norwegian | |
919 | %lang(nn) %{_datadir}/mysql/norwegian-ny | |
920 | %lang(pl) %{_datadir}/mysql/polish | |
921 | %lang(pt) %{_datadir}/mysql/portuguese | |
922 | %lang(ro) %{_datadir}/mysql/romanian | |
923 | %lang(ru) %{_datadir}/mysql/russian | |
924 | %lang(sr) %{_datadir}/mysql/serbian | |
925 | %lang(sk) %{_datadir}/mysql/slovak | |
926 | %lang(sv) %{_datadir}/mysql/swedish | |
927 | %lang(uk) %{_datadir}/mysql/ukrainian | |
928 | ||
929 | %files charsets | |
930 | %defattr(644,root,root,755) | |
931 | %dir %{_datadir}/mysql | |
932 | %{_datadir}/mysql/charsets | |
933 | ||
934 | %files extras | |
935 | %defattr(644,root,root,755) | |
936 | %attr(755,root,root) %{_bindir}/msql2mysql | |
937 | %attr(755,root,root) %{_bindir}/myisam_ftdump | |
938 | %attr(755,root,root) %{_bindir}/mysql_secure_installation | |
939 | %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql | |
13ce82d8 | 940 | %attr(755,root,root) %{_bindir}/perror |
941 | %attr(755,root,root) %{_bindir}/replace | |
13ce82d8 | 942 | %{_mandir}/man1/msql2mysql.1* |
943 | %{_mandir}/man1/myisam_ftdump.1* | |
448811bf | 944 | %{_mandir}/man1/mysql_secure_installation.1* |
540a650f | 945 | %{_mandir}/man1/mysql_tzinfo_to_sql.1* |
13ce82d8 | 946 | %{_mandir}/man1/perror.1* |
947 | %{_mandir}/man1/replace.1* | |
948 | ||
4ea87158 ER |
949 | %files -n mysqlhotcopy |
950 | %defattr(644,root,root,755) | |
951 | %attr(755,root,root) %{_bindir}/mysqlhotcopy | |
952 | %{_mandir}/man1/mysqlhotcopy.1* | |
953 | ||
13ce82d8 | 954 | %files extras-perl |
955 | %defattr(644,root,root,755) | |
956 | %attr(755,root,root) %{_bindir}/mysql_convert_table_format | |
957 | %attr(755,root,root) %{_bindir}/mysql_explain_log | |
958 | %attr(755,root,root) %{_bindir}/mysql_find_rows | |
959 | %attr(755,root,root) %{_bindir}/mysql_fix_extensions | |
960 | %attr(755,root,root) %{_bindir}/mysql_setpermission | |
961 | %attr(755,root,root) %{_bindir}/mysql_tableinfo | |
962 | %attr(755,root,root) %{_bindir}/mysql_zap | |
963 | %attr(755,root,root) %{_bindir}/mysqlaccess | |
964 | %attr(755,root,root) %{_bindir}/mysqldumpslow | |
37400e9a | 965 | %{_mandir}/man1/mysql_convert_table_format.1* |
13ce82d8 | 966 | %{_mandir}/man1/mysql_explain_log.1* |
37400e9a ER |
967 | %{_mandir}/man1/mysql_find_rows.1* |
968 | %{_mandir}/man1/mysql_fix_extensions.1* | |
969 | %{_mandir}/man1/mysql_setpermission.1* | |
970 | %{_mandir}/man1/mysql_tableinfo.1* | |
13ce82d8 | 971 | %{_mandir}/man1/mysql_zap.1* |
972 | %{_mandir}/man1/mysqlaccess.1* | |
309acf82 | 973 | %{_mandir}/man1/mysqldumpslow.1* |
13ce82d8 | 974 | |
975 | %files client | |
976 | %defattr(644,root,root,755) | |
977 | %attr(755,root,root) %{_bindir}/mysql | |
37400e9a ER |
978 | %attr(755,root,root) %{_bindir}/mysqladmin |
979 | %attr(755,root,root) %{_bindir}/mysqlbinlog | |
13ce82d8 | 980 | %attr(755,root,root) %{_bindir}/mysqlbug |
981 | %attr(755,root,root) %{_bindir}/mysqldump | |
982 | %attr(755,root,root) %{_bindir}/mysqlimport | |
13ce82d8 | 983 | %attr(755,root,root) %{_bindir}/mysqlshow |
37400e9a | 984 | %attr(755,root,root) %{_sbindir}/mysqlmanager |
13ce82d8 | 985 | %{_mandir}/man1/mysql.1* |
986 | %{_mandir}/man1/mysqladmin.1* | |
13ce82d8 | 987 | %{_mandir}/man1/mysqlbinlog.1* |
37400e9a ER |
988 | %{_mandir}/man1/mysqlbug.1* |
989 | %{_mandir}/man1/mysqldump.1* | |
13ce82d8 | 990 | %{_mandir}/man1/mysqlimport.1* |
37400e9a | 991 | %{_mandir}/man1/mysqlshow.1* |
13ce82d8 | 992 | %{_mandir}/man8/mysqlmanager.8* |
993 | ||
994 | %files libs | |
995 | %defattr(644,root,root,755) | |
996 | %doc EXCEPTIONS-CLIENT | |
37400e9a ER |
997 | %attr(751,root,root) %dir %{_sysconfdir}/mysql |
998 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf | |
e32f1a7b | 999 | %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.* |
e32f1a7b | 1000 | %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.15 |
37400e9a | 1001 | %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.* |
e32f1a7b | 1002 | %attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.15 |
37400e9a | 1003 | %attr(755,root,root) %{_libdir}/libndbclient.so.*.* |
e32f1a7b | 1004 | %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.2 |
13ce82d8 | 1005 | |
1006 | %files devel | |
1007 | %defattr(644,root,root,755) | |
1008 | %attr(755,root,root) %{_bindir}/mysql_config | |
37400e9a ER |
1009 | %attr(755,root,root) %{_libdir}/libmysqlclient.so |
1010 | %attr(755,root,root) %{_libdir}/libmysqlclient_r.so | |
1011 | %attr(755,root,root) %{_libdir}/libndbclient.so | |
1012 | %{_libdir}/libmysqlclient.la | |
1013 | %{_libdir}/libmysqlclient_r.la | |
1014 | %{_libdir}/libndbclient.la | |
1015 | # static-only | |
1016 | %{_libdir}/libdbug.a | |
1017 | %{_libdir}/libheap.a | |
1018 | %{_libdir}/libmyisam.a | |
1019 | %{_libdir}/libmyisammrg.a | |
1020 | %{_libdir}/libmysqld.a | |
1021 | %{_libdir}/libmystrings.a | |
1022 | %{_libdir}/libmysys.a | |
1023 | %{_libdir}/libvio.a | |
13ce82d8 | 1024 | %{_includedir}/mysql |
1025 | %{_mandir}/man1/mysql_config.1* | |
1026 | ||
1027 | %files static | |
1028 | %defattr(644,root,root,755) | |
37400e9a ER |
1029 | %{_libdir}/libmysqlclient.a |
1030 | %{_libdir}/libmysqlclient_r.a | |
1031 | %{_libdir}/libndbclient.a | |
13ce82d8 | 1032 | |
1033 | %files bench | |
1034 | %defattr(644,root,root,755) | |
13ce82d8 | 1035 | %attr(755,root,root) %{_bindir}/mysql_client_test |
e32f1a7b ER |
1036 | %attr(755,root,root) %{_bindir}/mysqltest |
1037 | %attr(755,root,root) %{_bindir}/mysqltestmanager | |
1038 | %attr(755,root,root) %{_bindir}/mysqltestmanager-pwgen | |
1039 | %attr(755,root,root) %{_bindir}/mysqltestmanagerc | |
13ce82d8 | 1040 | %dir %{_datadir}/sql-bench |
1041 | %{_datadir}/sql-bench/[CDRl]* | |
1042 | %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]* | |
1043 | # wrong dir? | |
1044 | %{_datadir}/mysql/mi_test_all.res | |
1045 | %attr(755,root,root) %{_datadir}/mysql/mi_test_all | |
2cc8e9c5 | 1046 | %{_mandir}/man1/mysql_client_test.1* |
37400e9a | 1047 | %{_mandir}/man1/mysqltest.1* |
13ce82d8 | 1048 | |
1049 | #%files doc | |
1050 | #%defattr(644,root,root,755) | |
1051 | #%doc Docs/manual.html Docs/manual_toc.html | |
1052 | ||
1053 | %files ndb | |
1054 | %defattr(644,root,root,755) | |
1055 | %attr(755,root,root) %{_sbindir}/ndbd | |
1056 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb | |
1057 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb | |
8ecd9b33 | 1058 | %{_mandir}/man8/ndbd.8* |
13ce82d8 | 1059 | |
1060 | %files ndb-client | |
1061 | %defattr(644,root,root,755) | |
37400e9a ER |
1062 | %attr(755,root,root) %{_bindir}/ndb_config |
1063 | %attr(755,root,root) %{_bindir}/ndb_delete_all | |
1064 | %attr(755,root,root) %{_bindir}/ndb_desc | |
1065 | %attr(755,root,root) %{_bindir}/ndb_drop_index | |
1066 | %attr(755,root,root) %{_bindir}/ndb_drop_table | |
1067 | %attr(755,root,root) %{_bindir}/ndb_error_reporter | |
1068 | %attr(755,root,root) %{_bindir}/ndb_mgm | |
1069 | %attr(755,root,root) %{_bindir}/ndb_restore | |
1070 | %attr(755,root,root) %{_bindir}/ndb_select_all | |
1071 | %attr(755,root,root) %{_bindir}/ndb_select_count | |
1072 | %attr(755,root,root) %{_bindir}/ndb_show_tables | |
1073 | %attr(755,root,root) %{_bindir}/ndb_size.pl | |
1074 | %attr(755,root,root) %{_bindir}/ndb_test_platform | |
1075 | %attr(755,root,root) %{_bindir}/ndb_waiter | |
13ce82d8 | 1076 | %attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl |
37400e9a ER |
1077 | %{_mandir}/man1/ndb_config.1* |
1078 | %{_mandir}/man1/ndb_delete_all.1* | |
1079 | %{_mandir}/man1/ndb_desc.1* | |
1080 | %{_mandir}/man1/ndb_drop_index.1* | |
1081 | %{_mandir}/man1/ndb_drop_table.1* | |
1082 | %{_mandir}/man1/ndb_error_reporter.1* | |
1083 | %{_mandir}/man1/ndb_mgm.1* | |
1084 | %{_mandir}/man1/ndb_restore.1* | |
1085 | %{_mandir}/man1/ndb_select_all.1* | |
1086 | %{_mandir}/man1/ndb_select_count.1* | |
1087 | %{_mandir}/man1/ndb_show_tables.1* | |
1088 | %{_mandir}/man1/ndb_size.pl.1* | |
1089 | %{_mandir}/man1/ndb_waiter.1* | |
13ce82d8 | 1090 | |
1091 | %files ndb-mgm | |
1092 | %defattr(644,root,root,755) | |
1093 | %attr(755,root,root) %{_sbindir}/ndb_mgmd | |
1094 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm | |
1095 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm | |
8ecd9b33 | 1096 | %{_mandir}/man8/ndb_mgmd.8* |
13ce82d8 | 1097 | |
1098 | %files ndb-cpc | |
1099 | %defattr(644,root,root,755) | |
1100 | %attr(755,root,root) %{_sbindir}/ndb_cpcd | |
1101 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc | |
1102 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc | |
fae2e159 | 1103 | %{_mandir}/man1/ndb_cpcd.1* |