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