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