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