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