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