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