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