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