]>
Commit | Line | Data |
---|---|---|
50200f22 | 1 | # TODO: |
d0fe1bc5 | 2 | # - C(XX)FLAGS for innodb subdirs are overriden by ./configure! |
c0326166 | 3 | # - http://bugs.mysql.com/bug.php?id=16470 |
9cc19375 AM |
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} | |
189f91a4 ER |
8 | # - unpackaged: |
9 | # /usr/share/man/man1/mysql_tableinfo.1.gz | |
6c94aa6c | 10 | # |
11 | # Conditional build: | |
54e670e7 | 12 | %bcond_without innodb # InnoDB storage engine support |
84fe95c7 | 13 | %bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms |
dc311758 | 14 | %bcond_without federated # Federated storage engine support |
54e670e7 PG |
15 | %bcond_without raid # RAID support |
16 | %bcond_without ssl # OpenSSL support | |
17 | %bcond_without tcpd # libwrap (tcp_wrappers) support | |
3f8fcf96 | 18 | %bcond_with autodeps # BR packages needed only for resolving deps |
54e670e7 | 19 | %bcond_with sphinx # Sphinx storage engine support |
7fbcff7e | 20 | %bcond_with tests # FIXME: don't run correctly |
6c94aa6c | 21 | # |
c2c4112b | 22 | %include /usr/lib/rpm/macros.perl |
ceb5ca86 | 23 | Summary: MySQL: a very fast and reliable SQL database engine |
fe56cb4d ER |
24 | Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank |
25 | Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable | |
26 | Summary(pl.UTF-8): MySQL: bardzo szybka i niezawodna baza danych (SQL) | |
27 | Summary(pt_BR.UTF-8): MySQL: Um servidor SQL rápido e confiável | |
28 | Summary(ru.UTF-8): MySQL - быстрый SQL-сервер | |
29 | Summary(uk.UTF-8): MySQL - швидкий SQL-сервер | |
30 | Summary(zh_CN.UTF-8): MySQL数据库服务器 | |
75eb20a9 | 31 | Name: mysql |
189f91a4 | 32 | Version: 5.1.22 |
dc311758 | 33 | Release: 5 |
5a944cb3 | 34 | License: GPL + MySQL FLOSS Exception |
7803433d | 35 | Group: Applications/Databases |
98f2cdb9 | 36 | #Source0Download: http://dev.mysql.com/downloads/mysql/5.1.html#source |
189f91a4 ER |
37 | Source0: http://mysql.tonnikala.org/Downloads/MySQL-5.1/%{name}-%{version}-rc.tar.gz |
38 | # Source0-md5: 87be813d1b2d76b1c756de0a16fa29fb | |
c2c0e3a3 ER |
39 | Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.7.tar.gz |
40 | # Source100-md5: 32f2b7e98d8485c86108851d52c5cef4 | |
2a30c7ca | 41 | Source1: %{name}.init |
42 | Source2: %{name}.sysconfig | |
43 | Source3: %{name}.logrotate | |
44 | Source4: %{name}d.conf | |
50200f22 | 45 | Source5: %{name}-clusters.conf |
d72472ee AM |
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 | |
7df2d935 | 52 | Source13: %{name}-client.conf |
25233ec0 | 53 | Patch0: %{name}-libs.patch |
9cc19375 | 54 | Patch1: %{name}-libwrap.patch |
51298838 | 55 | Patch2: %{name}-c++.patch |
e94fe593 JB |
56 | Patch3: %{name}-info.patch |
57 | Patch4: %{name}-sql-cxx-pic.patch | |
58 | Patch5: %{name}-noproc.patch | |
94fa71d5 | 59 | Patch6: %{name}-system-users.patch |
68e8a131 | 60 | |
7df2d935 | 61 | Patch8: %{name}-client-config.patch |
1b41566d | 62 | Patch9: %{name}-build.patch |
623893be | 63 | Patch10: %{name}-alpha.patch |
9cc19375 | 64 | Patch11: %{name}-upgrade.patch |
6a2d55d7 | 65 | #Patch12: %{name}-NDB_CXXFLAGS.patch |
7d3809c7 | 66 | Patch13: %{name}-min_max.patch |
4d98b68c | 67 | #Patch14: %{name}-bug-18156.patch |
5165e25b ER |
68 | Patch15: %{name}-bug-27694.patch |
69 | Patch16: %{name}-bug-29082.patch | |
e64d0675 | 70 | URL: http://www.mysql.com/products/database/mysql/community_edition.html |
374c3070 | 71 | BuildRequires: autoconf |
72 | BuildRequires: automake | |
79e736a0 | 73 | BuildRequires: doxygen |
c42989f9 | 74 | BuildRequires: libstdc++-devel >= 5:3.0 |
374c3070 | 75 | BuildRequires: libtool |
2e5f696d | 76 | %{?with_tcpd:BuildRequires: libwrap-devel} |
7b36dde8 | 77 | BuildRequires: ncurses-devel >= 4.2 |
2e5f696d | 78 | %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d} |
3f8fcf96 | 79 | %{?with_autodeps:BuildRequires: perl-DBI} |
d15a6540 | 80 | BuildRequires: perl-devel >= 1:5.6.1 |
7b36dde8 | 81 | BuildRequires: readline-devel >= 4.2 |
d15a6540 | 82 | BuildRequires: rpm-perlprov >= 4.1-13 |
be74eb6e | 83 | BuildRequires: rpmbuild(macros) >= 1.414 |
84fe95c7 | 84 | BuildRequires: sed >= 4.0 |
5a225b4d | 85 | BuildRequires: texinfo |
86 | BuildRequires: zlib-devel | |
7803433d ER |
87 | Requires(post,preun): /sbin/chkconfig |
88 | Requires(postun): /usr/sbin/groupdel | |
89 | Requires(postun): /usr/sbin/userdel | |
33f9bccb | 90 | Requires(pre): /bin/id |
7803433d | 91 | Requires(pre): /usr/bin/getgid |
33f9bccb | 92 | Requires(pre): /usr/sbin/groupadd |
93 | Requires(pre): /usr/sbin/useradd | |
6e6b75c9 | 94 | Requires(triggerpostun): sed >= 4.0 |
ad0a7267 | 95 | Requires: %{name}-charsets = %{version}-%{release} |
2539bd3a | 96 | Requires: /usr/bin/setsid |
7803433d | 97 | Requires: rc-scripts >= 0.2.0 |
717073d7 | 98 | Provides: MySQL-server |
c354982f | 99 | Provides: group(mysql) |
717073d7 | 100 | Provides: msqlormysql |
c354982f | 101 | Provides: user(mysql) |
5a225b4d | 102 | Obsoletes: MySQL |
103 | Obsoletes: mysql-server | |
2f1d6d28 | 104 | Conflicts: logrotate < 3.7-4 |
c354982f | 105 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ceb5ca86 | 106 | |
8de1b4ed | 107 | %define _libexecdir %{_sbindir} |
e2417b45 | 108 | %define _localstatedir /var/lib/mysql |
ea2c1c6a | 109 | %define _mysqlhome /home/services/mysql |
e73cea44 | 110 | |
6eab349a | 111 | %define _noautoreqdep 'perl(DBD::mysql)' |
9cc19375 AM |
112 | |
113 | # readline/libedit detection goes wrong | |
d0fe1bc5 | 114 | %undefine configure_cache |
6eab349a | 115 | |
ceb5ca86 | 116 | %description |
75eb20a9 | 117 | MySQL is a true multi-user, multi-threaded SQL (Structured Query |
118 | Language) database server. SQL is the most popular database language | |
119 | in the world. MySQL is a client/server implementation that consists of | |
120 | a server daemon mysqld and many different client programs/libraries. | |
121 | ||
122 | The main goals of MySQL are speed, robustness and easy to use. MySQL | |
123 | was originally developed because we at Tcx needed a SQL server that | |
124 | could handle very big databases with magnitude higher speed than what | |
125 | any database vendor could offer to us. We have now been using MySQL | |
126 | since 1996 in a environment with more than 40 databases, 10,000 | |
127 | tables, of which more than 500 have more than 7 million rows. This is | |
128 | about 50G of mission critical data. | |
129 | ||
130 | The base upon which MySQL is built is a set of routines that have been | |
131 | used in a highly demanding production environment for many years. | |
132 | While MySQL is still in development, it already offers a rich and | |
133 | highly useful function set. | |
ceb5ca86 | 134 | |
a82d818e | 135 | %description -l fr.UTF-8 |
3fe2f194 | 136 | MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et |
75eb20a9 | 137 | multi-taches. Le langage SQL est le langage de bases de donnees le |
138 | plus populaire au monde. MySQL est une implementation client/serveur | |
139 | qui consiste en un serveur (mysqld) et differents | |
140 | programmes/bibliotheques clientes. | |
141 | ||
142 | Les objectifs principaux de MySQL sont: vitesse, robustesse et | |
143 | facilite d'utilisation. MySQL fut originalement developpe parce que | |
144 | nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de | |
145 | tres grandes bases de donnees avec une vitesse d'un ordre de magnitude | |
146 | superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous | |
147 | utilisons MySQL depuis 1996 dans un environnement avec plus de 40 | |
148 | bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7 | |
149 | millions de lignes. Ceci represente environ 50G de donnees critiques. | |
150 | ||
151 | A la base de la conception de MySQL, on retrouve une serie de routines | |
152 | qui ont ete utilisees dans un environnement de production pendant | |
153 | plusieurs annees. Meme si MySQL est encore en developpement, il offre | |
154 | deja une riche et utile serie de fonctions. | |
3fe2f194 | 155 | |
a82d818e JR |
156 | %description -l pl.UTF-8 |
157 | MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych | |
158 | SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz | |
159 | danych. MySQL to implementacja klient/serwer składająca się z demona | |
160 | mysqld i wielu różnych programów i bibliotek klienckich. | |
161 | ||
162 | Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania. | |
163 | MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali | |
164 | serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele | |
165 | większą, niż mogli zaoferować inni producenci baz danych. Używają go | |
166 | od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z | |
167 | których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około | |
d451850c JB |
168 | 50GB krytycznych danych. |
169 | ||
a82d818e JR |
170 | Baza, na której oparty jest MySQL, składa się ze zbioru procedur, |
171 | które były używane w bardzo wymagającym środowisku produkcyjnym przez | |
172 | wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty | |
173 | i użyteczny zbiór funkcji. | |
ceb5ca86 | 174 | |
a82d818e | 175 | %description -l de.UTF-8 |
1c06b825 | 176 | MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu |
177 | Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten | |
a82d818e JR |
178 | werden zwar in zweidimensionalen Tabellen gespeichert und können mit |
179 | einem Primärschlüssel versehen werden. Es ist aber keine Definition | |
180 | eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer | |
181 | MySQL-Datenbank völlig allein für die (referenzielle) Integrität der | |
1c06b825 | 182 | Daten verantwortlich. Allein durch die Nutzung externer |
a82d818e JR |
183 | Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität |
184 | ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten. | |
1c06b825 | 185 | |
a82d818e JR |
186 | %description -l pt_BR.UTF-8 |
187 | O MySQL é um servidor de banco de dados SQL realmente multiusuário e | |
188 | multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de | |
189 | dados no mundo. O MySQL é uma implementação cliente/servidor que | |
75eb20a9 | 190 | consiste de um servidor chamado mysqld e diversos |
a82d818e | 191 | programas/bibliotecas clientes. Os principais objetivos do MySQL são: |
75eb20a9 | 192 | velocidade, robustez e facilidade de uso. O MySQL foi originalmente |
a82d818e | 193 | desenvolvido porque nós na Tcx precisávamos de um servidor SQL que |
75eb20a9 | 194 | pudesse lidar com grandes bases de dados e com uma velocidade muito |
195 | maior do que a que qualquer vendedor podia nos oferecer. Estamos | |
196 | usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados | |
a82d818e JR |
197 | com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de |
198 | linhas. Isto é o equivalente a aproximadamente 50G de dados críticos. | |
199 | A base da construção do MySQL é uma série de rotinas que foram usadas | |
200 | em um ambiente de produção com alta demanda por muitos anos. Mesmo o | |
201 | MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de | |
202 | funções muito ricas e úteis. Veja a documentação para maiores | |
203 | informações. | |
204 | ||
205 | %description -l ru.UTF-8 | |
206 | MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL | |
207 | была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в | |
208 | дистрибутиве на предмет других участников проекта и прочей информации | |
209 | о MySQL. | |
210 | ||
211 | %description -l uk.UTF-8 | |
212 | MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL | |
213 | було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в | |
214 | дистрибутиві для інформації про інших учасників проекту та іншої | |
215 | інформації. | |
bf60a170 | 216 | |
2539bd3a JB |
217 | %package charsets |
218 | Summary: MySQL - character sets definitions | |
fe56cb4d | 219 | Summary(pl.UTF-8): MySQL - definicje kodowań znaków |
2539bd3a JB |
220 | Group: Applications/Databases |
221 | ||
222 | %description charsets | |
223 | This package contains character sets definitions needed by both client | |
224 | and server. | |
225 | ||
a82d818e JR |
226 | %description charsets -l pl.UTF-8 |
227 | Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i | |
2539bd3a JB |
228 | klienta. |
229 | ||
8de1b4ed | 230 | %package extras |
84bd803c | 231 | Summary: MySQL additional utilities |
fe56cb4d | 232 | Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL |
8de1b4ed | 233 | Group: Applications/Databases |
3103a6d7 | 234 | Requires: %{name}-libs = %{version}-%{release} |
8de1b4ed | 235 | |
236 | %description extras | |
8afdedd4 | 237 | MySQL additional utilities except Perl scripts (they may be found in |
73d155ac | 238 | %{name}-extras-perl package). |
8afdedd4 | 239 | |
a82d818e JR |
240 | %description extras -l pl.UTF-8 |
241 | Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w | |
3c7e6ab8 | 242 | pakiecie %{name}-extras-perl). |
84bd803c | 243 | |
8afdedd4 | 244 | %package extras-perl |
245 | Summary: MySQL additional utilities written in Perl | |
fe56cb4d | 246 | Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu |
8afdedd4 | 247 | Group: Applications/Databases |
3103a6d7 | 248 | Requires: %{name}-extras = %{version}-%{release} |
b8f6b666 | 249 | Requires: perl(DBD::mysql) |
250 | ||
8afdedd4 | 251 | %description extras-perl |
252 | MySQL additional utilities written in Perl. | |
8de1b4ed | 253 | |
a82d818e JR |
254 | %description extras-perl -l pl.UTF-8 |
255 | Dodatkowe narzędzia do MySQL napisane w Perlu. | |
84bd803c | 256 | |
ceb5ca86 | 257 | %package client |
ceb5ca86 | 258 | Summary: MySQL - Client |
fe56cb4d ER |
259 | Summary(pl.UTF-8): MySQL - Klient |
260 | Summary(pt.UTF-8): MySQL - Cliente | |
261 | Summary(ru.UTF-8): MySQL клиент | |
262 | Summary(uk.UTF-8): MySQL клієнт | |
ceb5ca86 | 263 | Group: Applications/Databases |
ad0a7267 | 264 | Requires: %{name}-charsets = %{version}-%{release} |
1101e5b7 | 265 | Requires: %{name}-libs = %{version}-%{release} |
c486a119 | 266 | Obsoletes: MySQL-client |
ceb5ca86 AM |
267 | |
268 | %description client | |
75eb20a9 | 269 | This package contains the standard MySQL clients. |
ceb5ca86 | 270 | |
a82d818e | 271 | %description client -l fr.UTF-8 |
3fe2f194 | 272 | Ce package contient les clients MySQL standards. |
273 | ||
a82d818e | 274 | %description client -l pl.UTF-8 |
ceb5ca86 AM |
275 | Standardowe programy klienckie MySQL. |
276 | ||
a82d818e JR |
277 | %description client -l pt_BR.UTF-8 |
278 | Este pacote contém os clientes padrão para o MySQL. | |
ceb5ca86 | 279 | |
a82d818e JR |
280 | %description client -l ru.UTF-8 |
281 | Этот пакет содержит только клиент MySQL. | |
bf60a170 | 282 | |
a82d818e JR |
283 | %description client -l uk.UTF-8 |
284 | Цей пакет містить тільки клієнта MySQL. | |
bf60a170 | 285 | |
3fe2f194 | 286 | %package libs |
287 | Summary: Shared libraries for MySQL | |
fe56cb4d | 288 | Summary(pl.UTF-8): Biblioteki dzielone MySQL |
031565bb | 289 | Group: Libraries |
5c69de9f | 290 | Obsoletes: libmysql10 |
be07ff22 | 291 | Obsoletes: mysql-doc < 4.1.12 |
ceb5ca86 | 292 | |
3fe2f194 | 293 | %description libs |
c2c4112b | 294 | Shared libraries for MySQL. |
ceb5ca86 | 295 | |
a82d818e | 296 | %description libs -l pl.UTF-8 |
84bd803c JB |
297 | Biblioteki dzielone MySQL. |
298 | ||
ceb5ca86 | 299 | %package devel |
ceb5ca86 | 300 | Summary: MySQL - Development header files and libraries |
fe56cb4d ER |
301 | Summary(pl.UTF-8): MySQL - Pliki nagłówkowe i biblioteki dla programistów |
302 | Summary(pt.UTF-8): MySQL - Medições de desempenho | |
303 | Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработчика | |
304 | Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста | |
047122f1 | 305 | Group: Development/Libraries |
3103a6d7 | 306 | Requires: %{name}-libs = %{version}-%{release} |
2e5f696d | 307 | %{?with_ssl:Requires: openssl-devel} |
bbc0ff50 | 308 | Requires: zlib-devel |
c486a119 | 309 | Obsoletes: MySQL-devel |
5c69de9f | 310 | Obsoletes: libmysql10-devel |
ceb5ca86 AM |
311 | |
312 | %description devel | |
313 | This package contains the development header files and libraries | |
314 | necessary to develop MySQL client applications. | |
315 | ||
a82d818e | 316 | %description devel -l fr.UTF-8 |
bf60a170 | 317 | Ce package contient les fichiers entetes et les librairies de |
318 | developpement necessaires pour developper des applications clientes | |
319 | MySQL. | |
320 | ||
a82d818e JR |
321 | %description devel -l pl.UTF-8 |
322 | Pliki nagłówkowe i biblioteki konieczne do kompilacji aplikacji | |
ceb5ca86 | 323 | klienckich MySQL. |
b24ee098 | 324 | |
a82d818e JR |
325 | %description devel -l pt_BR.UTF-8 |
326 | Este pacote contém os arquivos de cabeçalho (header files) e | |
327 | bibliotecas necessárias para desenvolver aplicações clientes do MySQL. | |
b24ee098 | 328 | |
a82d818e JR |
329 | %description devel -l ru.UTF-8 |
330 | Этот пакет содержит хедеры и библиотеки разработчика, необходимые для | |
331 | разработки клиентских приложений. | |
bf60a170 | 332 | |
a82d818e JR |
333 | %description devel -l uk.UTF-8 |
334 | Цей пакет містить хедери та бібліотеки програміста, необхідні для | |
335 | розробки програм-клієнтів. | |
3fe2f194 | 336 | |
337 | %package static | |
01875e6d | 338 | Summary: MySQL static libraries |
fe56cb4d ER |
339 | Summary(pl.UTF-8): Biblioteki statyczne MySQL |
340 | Summary(ru.UTF-8): MySQL - статические библиотеки | |
341 | Summary(uk.UTF-8): MySQL - статичні бібліотеки | |
3fe2f194 | 342 | Group: Development/Libraries |
3103a6d7 | 343 | Requires: %{name}-devel = %{version}-%{release} |
c44d1e10 | 344 | Obsoletes: MySQL-static |
3fe2f194 | 345 | |
346 | %description static | |
73d155ac | 347 | MySQL static libraries. |
3fe2f194 | 348 | |
a82d818e | 349 | %description static -l pl.UTF-8 |
3fe2f194 | 350 | Biblioteki statyczne MySQL. |
351 | ||
a82d818e JR |
352 | %description static -l ru.UTF-8 |
353 | Этот пакет содержит статические библиотеки разработчика, необходимые | |
354 | для разработки клиентских приложений. | |
bf60a170 | 355 | |
a82d818e JR |
356 | %description static -l uk.UTF-8 |
357 | Цей пакет містить статичні бібліотеки програміста, необхідні для | |
358 | розробки програм-клієнтів. | |
bf60a170 | 359 | |
d1e91a2d AM |
360 | %package bench |
361 | Summary: MySQL - Benchmarks | |
fe56cb4d ER |
362 | Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy |
363 | Summary(pt.UTF-8): MySQL - Medições de desempenho | |
364 | Summary(ru.UTF-8): MySQL - бенчмарки | |
365 | Summary(uk.UTF-8): MySQL - бенчмарки | |
d1e91a2d AM |
366 | Group: Applications/Databases |
367 | Requires: %{name} = %{version}-%{release} | |
368 | Requires: %{name}-client | |
369 | Requires: perl(DBD::mysql) | |
370 | Obsoletes: MySQL-bench | |
371 | ||
372 | %description bench | |
373 | This package contains MySQL benchmark scripts and data. | |
374 | ||
a82d818e JR |
375 | %description bench -l pl.UTF-8 |
376 | Programy testujące szybkość serwera MySQL. | |
d1e91a2d | 377 | |
a82d818e JR |
378 | %description bench -l pt_BR.UTF-8 |
379 | Este pacote contém medições de desempenho de scripts e dados do MySQL. | |
d1e91a2d | 380 | |
a82d818e JR |
381 | %description bench -l ru.UTF-8 |
382 | Этот пакет содержит скрипты и данные для оценки производительности | |
d1e91a2d AM |
383 | MySQL. |
384 | ||
a82d818e JR |
385 | %description bench -l uk.UTF-8 |
386 | Цей пакет містить скрипти та дані для оцінки продуктивності MySQL. | |
d1e91a2d AM |
387 | |
388 | %package doc | |
389 | Summary: MySQL manual | |
fe56cb4d | 390 | Summary(pl.UTF-8): Podręcznik użytkownika MySQL |
d1e91a2d AM |
391 | Group: Applications/Databases |
392 | ||
393 | %description doc | |
394 | This package contains manual in HTML format. | |
395 | ||
a82d818e JR |
396 | %description doc -l pl.UTF-8 |
397 | Podręcznik MySQL-a w formacie HTML. | |
d1e91a2d | 398 | |
d72472ee AM |
399 | %package ndb |
400 | Summary: MySQL - NDB Storage Engine Daemon | |
fe56cb4d | 401 | Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB |
d72472ee AM |
402 | Group: Applications/Databases |
403 | Requires: %{name}-libs = %{version}-%{release} | |
404 | ||
405 | %description ndb | |
406 | This package contains the standard MySQL NDB Storage Engine Daemon. | |
407 | ||
a82d818e | 408 | %description ndb -l pl.UTF-8 |
8cdaa5ca ER |
409 | Ten pakiet zawiera standardowego demona silnika przechowywania danych |
410 | NDB. | |
a4fd19f2 | 411 | |
d72472ee AM |
412 | %package ndb-client |
413 | Summary: MySQL - NDB Clients | |
fe56cb4d | 414 | Summary(pl.UTF-8): MySQL - programy klienckie NDB |
d72472ee AM |
415 | Group: Applications/Databases |
416 | Requires: %{name}-libs = %{version}-%{release} | |
417 | ||
418 | %description ndb-client | |
419 | This package contains the standard MySQL NDB Clients. | |
420 | ||
a82d818e | 421 | %description ndb-client -l pl.UTF-8 |
a4fd19f2 JB |
422 | Ten pakiet zawiera standardowe programy klienckie MySQL NDB. |
423 | ||
d72472ee AM |
424 | %package ndb-mgm |
425 | Summary: MySQL - NDB Management Daemon | |
fe56cb4d | 426 | Summary(pl.UTF-8): MySQL - demon zarządzający NDB |
d72472ee AM |
427 | Group: Applications/Databases |
428 | Requires: %{name}-libs = %{version}-%{release} | |
429 | ||
430 | %description ndb-mgm | |
431 | This package contains the standard MySQL NDB Management Daemon. | |
432 | ||
a82d818e JR |
433 | %description ndb-mgm -l pl.UTF-8 |
434 | Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB. | |
a4fd19f2 | 435 | |
d72472ee AM |
436 | %package ndb-cpc |
437 | Summary: MySQL - NDB CPC Daemon | |
fe56cb4d | 438 | Summary(pl.UTF-8): MySQL - demon NDB CPC |
d72472ee AM |
439 | Group: Applications/Databases |
440 | Requires: %{name}-libs = %{version}-%{release} | |
441 | ||
442 | %description ndb-cpc | |
443 | This package contains the standard MySQL NDB CPC Daemon. | |
444 | ||
a82d818e | 445 | %description ndb-cpc -l pl.UTF-8 |
a4fd19f2 JB |
446 | Ten pakiet zawiera standardowego demona MySQL NDB CPC. |
447 | ||
a09e0285 | 448 | %prep |
189f91a4 | 449 | %setup -q -n %{name}-%{version}-rc %{?with_sphinx:-a100} |
e6696823 ER |
450 | %if %{with sphinx} |
451 | mv sphinx-*/mysqlse storage/sphinx | |
452 | %endif | |
d6a01db6 | 453 | %patch0 -p1 |
9cc19375 AM |
454 | #%{?with_tcpd:%patch1 -p1} # WHATS PURPOSE OF THIS PATCH? |
455 | #%patch2 -p1 # NEEDS CHECK, which exact program needs -lc++ | |
13701330 | 456 | %patch3 -p1 |
4910fc31 JB |
457 | %ifarch alpha |
458 | # this is strange: mysqld functions for UDF modules are not explicitly defined, | |
459 | # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables | |
460 | # in objects compiled without -fPIC | |
e94fe593 | 461 | %patch4 -p1 |
2539bd3a | 462 | # gcc 3.3.x ICE |
623893be | 463 | %patch10 -p1 |
4910fc31 | 464 | %endif |
e94fe593 | 465 | %patch5 -p1 |
94fa71d5 | 466 | %patch6 -p1 |
68e8a131 | 467 | |
7df2d935 | 468 | %patch8 -p1 |
1b41566d | 469 | %patch9 -p1 |
3c95d80d | 470 | %patch11 -p1 |
6a2d55d7 | 471 | #%patch12 -p1 # OUTDATED? |
7d3809c7 | 472 | %patch13 -p1 |
4d98b68c | 473 | #%patch14 -p1 # OUTDATED? |
5165e25b ER |
474 | %patch15 -p1 |
475 | %patch16 -p1 | |
b24ee098 | 476 | |
a09e0285 | 477 | %build |
0df00dd3 | 478 | %{__libtoolize} |
8a0f422c | 479 | %{__aclocal} -I config/ac-macros |
4b5554be | 480 | %{__automake} |
481 | %{__autoconf} | |
1b41566d | 482 | |
2e5f696d ER |
483 | # The compiler flags are as per their "official" spec ;) |
484 | CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}" | |
4910fc31 | 485 | CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}" |
55844594 ER |
486 | |
487 | # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux | |
488 | # and therefore do not add BR on these. These are here just to satisfy | |
489 | # configure. | |
1b41566d | 490 | |
4cc3672c | 491 | %configure \ |
7b09eab9 JB |
492 | PS='/bin/ps' \ |
493 | FIND_PROC='/bin/ps p $$PID' \ | |
494 | KILL='/bin/kill' \ | |
495 | CHECK_PID='/bin/kill -0 $$PID' \ | |
88c53601 | 496 | --enable-assembler \ |
a1c2e984 | 497 | --enable-largefile=yes \ |
88c53601 JB |
498 | --enable-shared \ |
499 | --enable-static \ | |
500 | --enable-thread-safe-client \ | |
2e5f696d | 501 | --with%{!?with_innodb:out}-innodb \ |
2e5f696d | 502 | --with%{!?with_raid:out}-raid \ |
9cc19375 | 503 | --with%{!?with_ssl:out}-ssl=/usr \ |
2e5f696d | 504 | --with%{!?with_tcpd:out}-libwrap \ |
720af89b | 505 | %{?with_big_tables:--with-big-tables} \ |
88c53601 | 506 | --with-comment="PLD Linux Distribution MySQL RPM" \ |
9cc19375 | 507 | --with%{!?debug:out}-debug%{?debug:=full} \ |
62b422a2 | 508 | --with%{!?debug:out}-ndb-debug \ |
25233ec0 | 509 | --with-embedded-server \ |
25233ec0 | 510 | --with-extra-charsets=all \ |
88c53601 JB |
511 | --with-low-memory \ |
512 | --with-mysqld-user=mysql \ | |
c44d1e10 | 513 | --with-named-curses-libs="-lncurses" \ |
720af89b | 514 | --with-named-thread-libs="-lpthread" \ |
bd93d020 | 515 | --with-unix-socket-path=/var/lib/mysql/mysql.sock \ |
7e2d18a5 | 516 | --with-archive-storage-engine \ |
54e670e7 | 517 | %{?with_federated:--with-federated-storage-engine} \ |
9cc19375 | 518 | --with-fast-mutexes \ |
88c53601 | 519 | --with-vio \ |
4b72e088 | 520 | --with-ndbcluster \ |
b0f1140a | 521 | --without-readline \ |
720af89b | 522 | --without-libedit \ |
9cc19375 AM |
523 | --with-ndb-docs \ |
524 | --with-docs | |
525 | ||
526 | #--with-error-inject | |
25233ec0 | 527 | |
f08535b8 AM |
528 | # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file |
529 | # (it defaults to first cluster but user may change it to whatever | |
55844594 | 530 | # cluster it wants) |
f08535b8 | 531 | |
25233ec0 | 532 | echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile |
8de1b4ed | 533 | |
d1e91a2d AM |
534 | %{__make} \ |
535 | benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench | |
536 | ||
537 | %{__make} -C Docs mysql.info | |
b24ee098 | 538 | |
7fbcff7e AM |
539 | %{?with_tests:%{__make} test} |
540 | ||
ceb5ca86 | 541 | %install |
3fe2f194 | 542 | rm -rf $RPM_BUILD_ROOT |
57dc818c | 543 | install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql} \ |
92c38d0d | 544 | $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \ |
921dc37c | 545 | $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}} |
b24ee098 | 546 | |
547 | # Make install | |
d451850c JB |
548 | %{__make} install \ |
549 | DESTDIR=$RPM_BUILD_ROOT \ | |
d1e91a2d | 550 | benchdir=%{_datadir}/sql-bench \ |
d451850c JB |
551 | libsdir=/tmp |
552 | # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs | |
553 | ||
8594196c | 554 | install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir} |
b24ee098 | 555 | |
dd6934b4 | 556 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql |
557 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql | |
558 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql | |
dbf4eb6a | 559 | # This is template for configuration file which is created after 'service mysql init' |
2e5f696d | 560 | install %{SOURCE4} mysqld.conf |
1c06b825 | 561 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf |
1b41566d | 562 | touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update} |
b24ee098 | 563 | |
2e5f696d | 564 | # remove innodb directives from mysqld.conf if mysqld is configured without |
9cc19375 | 565 | %if %{without innodb} |
2e5f696d ER |
566 | cp mysqld.conf mysqld.tmp |
567 | awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf | |
568 | %endif | |
569 | ||
570 | # remove berkeley-db directives from mysqld.conf if mysqld is configured without | |
9cc19375 AM |
571 | cp mysqld.conf mysqld.tmp |
572 | awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf | |
2e5f696d ER |
573 | |
574 | install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf | |
9cc19375 | 575 | cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf |
2e5f696d | 576 | |
d72472ee AM |
577 | # NDB |
578 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb | |
579 | install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb | |
580 | install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm | |
581 | install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm | |
582 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc | |
583 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc | |
17dc26d2 | 584 | |
1d74258e | 585 | mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir} |
3434faee | 586 | sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config} |
04497307 | 587 | sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config |
b24ee098 | 588 | |
17dc26d2 | 589 | # remove known unpackaged files |
d4f3faae AM |
590 | rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test |
591 | ||
9cc19375 AM |
592 | # remove .txt variants for .sys messages |
593 | rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt | |
594 | ||
8b2cbaf3 | 595 | # rename not to be so generic name |
8b2cbaf3 | 596 | mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump |
68e8a131 | 597 | mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1 |
17dc26d2 | 598 | |
c0326166 ER |
599 | # not useful without -debug build |
600 | %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump} | |
68e8a131 | 601 | %{!?debug:rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1} |
c0326166 | 602 | # generate symbols file, so one can generate backtrace using it |
77cbc8ff | 603 | # mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack. |
c0326166 ER |
604 | # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html |
605 | %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym} | |
606 | ||
dabd8964 | 607 | # do not clobber users $PATH |
dabd8964 ER |
608 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade |
609 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum | |
610 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk | |
611 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog | |
612 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack | |
613 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables | |
614 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults | |
615 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck | |
616 | ||
17dc26d2 | 617 | # functionality in initscript / rpm |
17dc26d2 | 618 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db |
caa49c83 | 619 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_install_db.1* |
17dc26d2 ER |
620 | rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe |
621 | rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi | |
622 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}* | |
17dc26d2 ER |
623 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate |
624 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server | |
7b9c5252 | 625 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure |
a44a043c | 626 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt |
17dc26d2 | 627 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid |
68e8a131 | 628 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1* |
a62ea18e | 629 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server* |
a44a043c | 630 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1* |
9cc19375 | 631 | rm $RPM_BUILD_ROOT%{_bindir}/resolveip |
68e8a131 ER |
632 | rm $RPM_BUILD_ROOT%{_mandir}/man1/resolveip.1* |
633 | rm $RPM_BUILD_ROOT%{_mandir}/man1/make_win_bin_dist.1* | |
634 | rm $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1* | |
9cc19375 AM |
635 | |
636 | # we don't package those (we have no -test or -testsuite pkg) and some of them just segfault | |
637 | rm $RPM_BUILD_ROOT%{_bindir}/mysql_client_test | |
638 | rm $RPM_BUILD_ROOT%{_datadir}/mysql/mi_test_all | |
639 | rm $RPM_BUILD_ROOT%{_datadir}/mysql/mi_test_all.res | |
be74eb6e | 640 | rm $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld_multi.server |
68e8a131 ER |
641 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1* |
642 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1* | |
643 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1* | |
644 | rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1* | |
17dc26d2 | 645 | |
17dc26d2 | 646 | # in %doc |
8b2cbaf3 | 647 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf} |
17dc26d2 | 648 | |
be74eb6e ER |
649 | # not needed |
650 | rm -f $RPM_BUILD_ROOT%{_libdir}/mysql/ha_{example,blackhole,federated}.{a,la} | |
9cc19375 | 651 | |
f624a76e | 652 | %clean |
1d171524 | 653 | rm -rf $RPM_BUILD_ROOT |
f624a76e | 654 | |
fd32e090 | 655 | %pre |
ff5f125f ER |
656 | %groupadd -g 89 mysql |
657 | %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql | |
fd32e090 | 658 | |
ceb5ca86 | 659 | %post |
054c91be | 660 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
661 | /sbin/chkconfig --add mysql | |
4ebde491 | 662 | %service mysql restart |
dd6934b4 | 663 | |
d5e8c713 | 664 | %preun |
054c91be | 665 | if [ "$1" = "0" ]; then |
579146e7 | 666 | %service -q mysql stop |
054c91be | 667 | /sbin/chkconfig --del mysql |
668 | fi | |
c44d1e10 | 669 | |
670 | %postun | |
054c91be | 671 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
9cc19375 | 672 | |
fd32e090 | 673 | if [ "$1" = "0" ]; then |
c354982f | 674 | %userremove mysql |
675 | %groupremove mysql | |
fd32e090 | 676 | fi |
b24ee098 | 677 | |
d72472ee AM |
678 | %post ndb |
679 | /sbin/chkconfig --add mysql-ndb | |
1101e5b7 | 680 | %service mysql-ndb restart "mysql NDB engine" |
d72472ee AM |
681 | |
682 | %preun ndb | |
683 | if [ "$1" = "0" ]; then | |
1101e5b7 ER |
684 | %service mysql-ndb stop |
685 | /sbin/chkconfig --del mysql-ndb | |
d72472ee AM |
686 | fi |
687 | ||
688 | %post ndb-mgm | |
689 | /sbin/chkconfig --add mysql-ndb-mgm | |
1101e5b7 | 690 | %service mysql-ndb-mgm restart "mysql NDB management node" |
d72472ee AM |
691 | |
692 | %preun ndb-mgm | |
693 | if [ "$1" = "0" ]; then | |
1101e5b7 ER |
694 | %service mysql-ndb-mgm stop |
695 | /sbin/chkconfig --del mysql-ndb-mgm | |
d72472ee AM |
696 | fi |
697 | ||
698 | %post ndb-cpc | |
699 | /sbin/chkconfig --add mysql-ndb-cpc | |
1101e5b7 | 700 | %service mysql-ndb-cpc restart "mysql NDB CPC" |
d72472ee AM |
701 | |
702 | %preun ndb-cpc | |
703 | if [ "$1" = "0" ]; then | |
1101e5b7 ER |
704 | %service mysql-ndb-cpc stop |
705 | /sbin/chkconfig --del mysql-ndb-cpc | |
d72472ee AM |
706 | fi |
707 | ||
3fe2f194 | 708 | %post libs -p /sbin/ldconfig |
709 | %postun libs -p /sbin/ldconfig | |
b24ee098 | 710 | |
be74eb6e ER |
711 | %if 0 |
712 | # rpm 4.4.9 is broken, it invokes the first trigger (4.0.20-2) three times | |
713 | # instead all of them (or only last one if compared to 4.4.2). | |
99e0d1a2 | 714 | %triggerpostun -- mysql <= 4.0.20-2 |
6564e2d6 | 715 | # For clusters in /etc/mysql/clusters.conf |
be74eb6e | 716 | if [ -f /etc/sysconfig/mysql ]; then |
99e0d1a2 | 717 | . /etc/sysconfig/mysql |
4c7c0ef7 | 718 | if [ -n "$MYSQL_DB_CLUSTERS" ]; then |
99e0d1a2 PG |
719 | for i in "$MYSQL_DB_CLUSTERS"; do |
720 | echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf | |
721 | done | |
b545a308 PG |
722 | echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql |
723 | echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql | |
4c7c0ef7 | 724 | echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf." |
453fbc6e | 725 | echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf." |
99e0d1a2 PG |
726 | fi |
727 | fi | |
728 | ||
7f18dfce PG |
729 | %triggerpostun -- mysql <= 4.1.1 |
730 | # For better compatibility with prevoius versions: | |
0e6ae684 | 731 | for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do |
7f18dfce PG |
732 | if echo "$config" | grep -q '^/'; then |
733 | config_file="$config" | |
734 | elif [ -f "/etc/mysql/$config" ]; then | |
735 | config_file=/etc/mysql/$config | |
736 | else | |
6e6b75c9 | 737 | clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf) |
dd25dce8 ER |
738 | if [ -z "$clusterdir" ]; then |
739 | echo >&2 "Can't find cluster dir for $config!" | |
740 | echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf" | |
741 | exit 1 | |
742 | fi | |
7f18dfce PG |
743 | config_file="$clusterdir/mysqld.conf" |
744 | fi | |
0e6ae684 ER |
745 | |
746 | if [ ! -f "$config_file" ]; then | |
747 | echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" | |
748 | exit 1 | |
749 | fi | |
7f18dfce PG |
750 | echo "Adding option old-passwords to config: $config_file" |
751 | echo "If you want to use new, better passwords - remove it" | |
6e6b75c9 ER |
752 | |
753 | # sed magic to add 'old-passwords' to [mysqld] section | |
754 | sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{ | |
755 | a | |
756 | a; Compatibility options: | |
757 | aold-passwords | |
758 | } | |
759 | ' $config_file | |
7f18dfce PG |
760 | done |
761 | ||
a2d3f15b | 762 | %banner -e %{name}-4.1.x <<-EOF |
f1180631 ER |
763 | If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data: |
764 | mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql | |
a2d3f15b ER |
765 | EOF |
766 | #' | |
767 | ||
be74eb6e ER |
768 | %endif |
769 | ||
dc311758 | 770 | %triggerpostun -- mysql < 5.1.0 |
9cc19375 AM |
771 | configs="" |
772 | for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do | |
773 | if echo "$config" | grep -q '^/'; then | |
774 | config_file="$config" | |
775 | elif [ -f "/etc/mysql/$config" ]; then | |
776 | config_file=/etc/mysql/$config | |
777 | else | |
778 | clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf) | |
779 | if [ -z "$clusterdir" ]; then | |
780 | echo >&2 "Can't find cluster dir for $config!" | |
781 | echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf" | |
782 | exit 1 | |
783 | fi | |
784 | config_file="$clusterdir/mysqld.conf" | |
785 | fi | |
786 | ||
787 | if [ ! -f "$config_file" ]; then | |
788 | 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/" | |
789 | continue | |
790 | fi | |
791 | configs="$configs $config_file" | |
792 | done | |
793 | ||
794 | ( | |
795 | echo 'You should run MySQL upgrade scripts for all MySQL clusters.' | |
796 | echo 'Thus, you should invoke:' | |
797 | for config in $configs; do | |
be74eb6e | 798 | datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs) |
9cc19375 AM |
799 | echo "# mysql_upgrade --datadir=$datadir" |
800 | done | |
801 | ) | %banner -e %{name}-5.1 | |
802 | ||
ceb5ca86 | 803 | %files |
a09e0285 | 804 | %defattr(644,root,root,755) |
f1180631 | 805 | %doc support-files/*.cnf support-files/*.ini |
8cdaa5ca | 806 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql |
8de1b4ed | 807 | %attr(754,root,root) /etc/rc.d/init.d/mysql |
8cdaa5ca | 808 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql |
1c06b825 | 809 | %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf |
dabd8964 ER |
810 | %attr(755,root,root) %{_sbindir}/innochecksum |
811 | %attr(755,root,root) %{_sbindir}/myisamchk | |
812 | %attr(755,root,root) %{_sbindir}/myisamlog | |
813 | %attr(755,root,root) %{_sbindir}/myisampack | |
814 | %attr(755,root,root) %{_sbindir}/my_print_defaults | |
815 | %attr(755,root,root) %{_sbindir}/mysqlcheck | |
da28df48 | 816 | %attr(755,root,root) %{_sbindir}/mysqld |
dabd8964 ER |
817 | %attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables |
818 | %attr(755,root,root) %{_sbindir}/mysql_upgrade | |
9cc19375 AM |
819 | %dir %{_libdir}/mysql |
820 | %attr(755,root,root) %{_libdir}/mysql/ha_blackhole.so.*.*.* | |
821 | %attr(755,root,root) %{_libdir}/mysql/ha_example.so.*.*.* | |
be74eb6e | 822 | %{?with_federated:%attr(755,root,root) %{_libdir}/mysql/ha_federated.so.*.*.*} |
68e8a131 | 823 | %{_mandir}/man1/innochecksum.1* |
84628b90 AM |
824 | %{_mandir}/man1/myisamchk.1* |
825 | %{_mandir}/man1/myisamlog.1* | |
826 | %{_mandir}/man1/myisampack.1* | |
68e8a131 ER |
827 | %{_mandir}/man1/my_print_defaults.1* |
828 | %{_mandir}/man1/mysqlcheck.1* | |
77cbc8ff | 829 | %{_mandir}/man1/mysql_fix_privilege_tables.1* |
d0fe1bc5 | 830 | %{_mandir}/man1/mysql_upgrade.1* |
c3389a2d | 831 | %{_mandir}/man8/mysqld.8* |
c486a119 | 832 | |
c27588d8 ER |
833 | %if %{?debug:1}0 |
834 | %attr(755,root,root) %{_bindir}/*resolve_stack_dump | |
835 | %{_datadir}/mysql/mysqld.sym | |
836 | %{_mandir}/man1/*resolve_stack_dump.1* | |
837 | %endif | |
838 | ||
ea2c1c6a | 839 | %attr(700,mysql,mysql) %{_mysqlhome} |
68e8a131 | 840 | # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole |
179f04ff | 841 | %attr(751,root,root) /var/lib/mysql |
8594196c | 842 | %attr(750,mysql,mysql) %dir /var/log/mysql |
ced65266 | 843 | %attr(750,mysql,mysql) %dir /var/log/archive/mysql |
13924afb | 844 | %attr(640,mysql,mysql) %ghost /var/log/mysql/* |
431c9391 | 845 | |
8de1b4ed | 846 | %{_infodir}/mysql.info* |
dbf4eb6a AM |
847 | # This is template for configuration file which is created after 'service mysql init' |
848 | %{_datadir}/mysql/mysqld.conf | |
68e8a131 ER |
849 | %{_datadir}/mysql/mysql_system_tables.sql |
850 | %{_datadir}/mysql/mysql_system_tables_data.sql | |
851 | %{_datadir}/mysql/mysql_test_data_timezone.sql | |
852 | ||
c486a119 | 853 | %{_datadir}/mysql/english |
f1180631 | 854 | %{_datadir}/mysql/fill_help_tables.sql |
8c9ee0ea | 855 | %{_datadir}/mysql/mysql_fix_privilege_tables.sql |
c486a119 AF |
856 | %lang(cs) %{_datadir}/mysql/czech |
857 | %lang(da) %{_datadir}/mysql/danish | |
c486a119 AF |
858 | %lang(de) %{_datadir}/mysql/german |
859 | %lang(el) %{_datadir}/mysql/greek | |
e474e322 | 860 | %lang(es) %{_datadir}/mysql/spanish |
861 | %lang(et) %{_datadir}/mysql/estonian | |
862 | %lang(fr) %{_datadir}/mysql/french | |
c486a119 AF |
863 | %lang(hu) %{_datadir}/mysql/hungarian |
864 | %lang(it) %{_datadir}/mysql/italian | |
865 | %lang(ja) %{_datadir}/mysql/japanese | |
866 | %lang(ko) %{_datadir}/mysql/korean | |
e474e322 | 867 | %lang(nl) %{_datadir}/mysql/dutch |
adff109d | 868 | %lang(nb) %{_datadir}/mysql/norwegian |
e9ea375f | 869 | %lang(nn) %{_datadir}/mysql/norwegian-ny |
c486a119 AF |
870 | %lang(pl) %{_datadir}/mysql/polish |
871 | %lang(pt) %{_datadir}/mysql/portuguese | |
102d5f72 | 872 | %lang(ro) %{_datadir}/mysql/romanian |
c486a119 | 873 | %lang(ru) %{_datadir}/mysql/russian |
fa02fbab | 874 | %lang(sr) %{_datadir}/mysql/serbian |
c486a119 | 875 | %lang(sk) %{_datadir}/mysql/slovak |
c486a119 | 876 | %lang(sv) %{_datadir}/mysql/swedish |
e474e322 | 877 | %lang(uk) %{_datadir}/mysql/ukrainian |
b24ee098 | 878 | |
ad0a7267 JR |
879 | %files charsets |
880 | %defattr(644,root,root,755) | |
2539bd3a | 881 | %dir %{_datadir}/mysql |
ad0a7267 JR |
882 | %{_datadir}/mysql/charsets |
883 | ||
8de1b4ed | 884 | %files extras |
885 | %defattr(644,root,root,755) | |
f261d032 | 886 | %attr(755,root,root) %{_bindir}/msql2mysql |
8b2cbaf3 ER |
887 | %attr(755,root,root) %{_bindir}/myisam_ftdump |
888 | %attr(755,root,root) %{_bindir}/mysql_secure_installation | |
889 | %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql | |
b94ecc67 JB |
890 | %attr(755,root,root) %{_bindir}/perror |
891 | %attr(755,root,root) %{_bindir}/replace | |
b94ecc67 | 892 | %{_mandir}/man1/msql2mysql.1* |
9787b388 | 893 | %{_mandir}/man1/myisam_ftdump.1* |
68e8a131 | 894 | %{_mandir}/man1/mysql_secure_installation.1* |
77cbc8ff | 895 | %{_mandir}/man1/mysql_tzinfo_to_sql.1* |
e474e322 | 896 | %{_mandir}/man1/perror.1* |
897 | %{_mandir}/man1/replace.1* | |
8de1b4ed | 898 | |
8afdedd4 | 899 | %files extras-perl |
900 | %defattr(644,root,root,755) | |
68e8a131 | 901 | %attr(755,root,root) %{_bindir}/mysqlaccess |
8594196c | 902 | %attr(755,root,root) %{_bindir}/mysql_convert_table_format |
68e8a131 | 903 | %attr(755,root,root) %{_bindir}/mysqldumpslow |
8afdedd4 | 904 | %attr(755,root,root) %{_bindir}/mysql_find_rows |
8b2cbaf3 | 905 | %attr(755,root,root) %{_bindir}/mysql_fix_extensions |
68e8a131 | 906 | %attr(755,root,root) %{_bindir}/mysqlhotcopy |
b894e3d4 | 907 | %attr(755,root,root) %{_bindir}/mysql_setpermission |
b894e3d4 | 908 | %attr(755,root,root) %{_bindir}/mysql_zap |
e474e322 | 909 | %{_mandir}/man1/mysqlaccess.1* |
68e8a131 | 910 | %{_mandir}/man1/mysql_convert_table_format.1* |
ffda6e55 | 911 | %{_mandir}/man1/mysql_find_rows.1* |
68e8a131 | 912 | %{_mandir}/man1/mysql_fix_extensions.1* |
84628b90 | 913 | %{_mandir}/man1/mysqlhotcopy.1* |
68e8a131 ER |
914 | %{_mandir}/man1/mysql_setpermission.1* |
915 | %{_mandir}/man1/mysql_zap.1* | |
8afdedd4 | 916 | |
ceb5ca86 | 917 | %files client |
75eb20a9 | 918 | %defattr(644,root,root,755) |
01dea3d5 | 919 | %attr(755,root,root) %{_bindir}/mysql |
9cc19375 AM |
920 | %attr(755,root,root) %{_bindir}/mysqladmin |
921 | %attr(755,root,root) %{_bindir}/mysqlbinlog | |
065b78b5 | 922 | %attr(755,root,root) %{_bindir}/mysqlbug |
01dea3d5 | 923 | %attr(755,root,root) %{_bindir}/mysqldump |
924 | %attr(755,root,root) %{_bindir}/mysqlimport | |
925 | %attr(755,root,root) %{_bindir}/mysqlshow | |
9cc19375 | 926 | %attr(755,root,root) %{_bindir}/mysqlslap |
ffda6e55 | 927 | %attr(755,root,root) %{_sbindir}/mysqlmanager |
75eb20a9 | 928 | %{_mandir}/man1/mysql.1* |
e474e322 | 929 | %{_mandir}/man1/mysqladmin.1* |
84628b90 | 930 | %{_mandir}/man1/mysqlbinlog.1* |
9cc19375 | 931 | %{_mandir}/man1/mysqldump.1* |
84628b90 | 932 | %{_mandir}/man1/mysqlimport.1* |
3f8fcf96 ER |
933 | #%{_mandir}/man1/mysqlmanagerc.1* |
934 | #%{_mandir}/man1/mysqlmanager-pwgen.1* | |
9cc19375 AM |
935 | %{_mandir}/man1/mysqlshow.1* |
936 | %{_mandir}/man1/mysqlslap.1* | |
c3389a2d | 937 | %{_mandir}/man8/mysqlmanager.8* |
b24ee098 | 938 | |
3fe2f194 | 939 | %files libs |
75eb20a9 | 940 | %defattr(644,root,root,755) |
5a944cb3 | 941 | %doc EXCEPTIONS-CLIENT |
3fe2f194 | 942 | %attr(755,root,root) %{_libdir}/lib*.so.*.* |
7df2d935 | 943 | %attr(751,root,root) %dir %{_sysconfdir}/mysql |
2539bd3a | 944 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf |
b24ee098 | 945 | |
ceb5ca86 | 946 | %files devel |
3fe2f194 | 947 | %defattr(644,root,root,755) |
bbc0ff50 | 948 | %attr(755,root,root) %{_bindir}/mysql_config |
3fe2f194 | 949 | %attr(755,root,root) %{_libdir}/lib*.so |
bbc0ff50 JB |
950 | %{_libdir}/lib*.la |
951 | %{_libdir}/lib*[!tr].a | |
3fe2f194 | 952 | %{_includedir}/mysql |
68e8a131 | 953 | %{_aclocaldir}/mysql.m4 |
84628b90 | 954 | %{_mandir}/man1/mysql_config.1* |
3fe2f194 | 955 | |
956 | %files static | |
75eb20a9 | 957 | %defattr(644,root,root,755) |
83eea30f | 958 | %{_libdir}/lib*[tr].a |
ceb5ca86 | 959 | |
d1e91a2d AM |
960 | %files bench |
961 | %defattr(644,root,root,755) | |
962 | %attr(755,root,root) %{_bindir}/mysqltest | |
963 | %dir %{_datadir}/sql-bench | |
964 | %{_datadir}/sql-bench/[CDRl]* | |
965 | %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]* | |
ffda6e55 ER |
966 | %{_mandir}/man1/mysqltest.1* |
967 | %{_mandir}/man1/mysqltest_embedded.1* | |
d1e91a2d | 968 | |
be07ff22 AM |
969 | #%files doc |
970 | #%defattr(644,root,root,755) | |
971 | #%doc Docs/manual.html Docs/manual_toc.html | |
d1e91a2d | 972 | |
d72472ee AM |
973 | %files ndb |
974 | %defattr(644,root,root,755) | |
975 | %attr(755,root,root) %{_sbindir}/ndbd | |
976 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb | |
8cdaa5ca | 977 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb |
68e8a131 | 978 | %{_mandir}/man1/ndbd.1* |
ffda6e55 | 979 | %{_mandir}/man1/ndbd_redo_log_reader.1* |
d72472ee AM |
980 | |
981 | %files ndb-client | |
982 | %defattr(644,root,root,755) | |
e56168f2 ER |
983 | %attr(755,root,root) %{_bindir}/ndb_config |
984 | %attr(755,root,root) %{_bindir}/ndb_delete_all | |
985 | %attr(755,root,root) %{_bindir}/ndb_desc | |
986 | %attr(755,root,root) %{_bindir}/ndb_drop_index | |
987 | %attr(755,root,root) %{_bindir}/ndb_drop_table | |
988 | %attr(755,root,root) %{_bindir}/ndb_error_reporter | |
989 | %attr(755,root,root) %{_bindir}/ndb_mgm | |
990 | %attr(755,root,root) %{_bindir}/ndb_print_backup_file | |
991 | %attr(755,root,root) %{_bindir}/ndb_print_schema_file | |
992 | %attr(755,root,root) %{_bindir}/ndb_print_sys_file | |
993 | %attr(755,root,root) %{_bindir}/ndb_restore | |
994 | %attr(755,root,root) %{_bindir}/ndb_select_all | |
995 | %attr(755,root,root) %{_bindir}/ndb_select_count | |
996 | %attr(755,root,root) %{_bindir}/ndb_show_tables | |
997 | %attr(755,root,root) %{_bindir}/ndb_size.pl | |
998 | %attr(755,root,root) %{_bindir}/ndb_test_platform | |
999 | %attr(755,root,root) %{_bindir}/ndb_waiter | |
e56168f2 ER |
1000 | %{_mandir}/man1/ndb_config.1* |
1001 | %{_mandir}/man1/ndb_delete_all.1* | |
1002 | %{_mandir}/man1/ndb_desc.1* | |
68e8a131 ER |
1003 | %{_mandir}/man1/ndb_drop_index.1* |
1004 | %{_mandir}/man1/ndb_drop_table.1* | |
1005 | %{_mandir}/man1/ndb_error_reporter.1* | |
1006 | %{_mandir}/man1/ndb_mgm.1* | |
1007 | %{_mandir}/man1/ndb_print_backup_file.1* | |
1008 | %{_mandir}/man1/ndb_print_schema_file.1* | |
1009 | %{_mandir}/man1/ndb_print_sys_file.1* | |
1010 | %{_mandir}/man1/ndb_restore.1* | |
1011 | %{_mandir}/man1/ndb_select_all.1* | |
1012 | %{_mandir}/man1/ndb_select_count.1* | |
1013 | %{_mandir}/man1/ndb_show_tables.1* | |
e56168f2 | 1014 | %{_mandir}/man1/ndb_size.pl.1* |
68e8a131 | 1015 | %{_mandir}/man1/ndb_waiter.1* |
d72472ee AM |
1016 | |
1017 | %files ndb-mgm | |
1018 | %defattr(644,root,root,755) | |
1019 | %attr(755,root,root) %{_sbindir}/ndb_mgmd | |
1020 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm | |
8cdaa5ca | 1021 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm |
68e8a131 | 1022 | %{_mandir}/man1/ndb_mgmd.1* |
d72472ee | 1023 | |
d72472ee AM |
1024 | %files ndb-cpc |
1025 | %defattr(644,root,root,755) | |
1026 | %attr(755,root,root) %{_sbindir}/ndb_cpcd | |
1027 | %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc | |
8cdaa5ca | 1028 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc |
68e8a131 | 1029 | %{_mandir}/man1/ndb_cpcd.1* |