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