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