2 # - init/sysconfig for NDB subpackages
3 # - fix ndb linking with static libstdc++
5 # - trigger that prepares system from pre-cluster into cluster
6 # - trigger /etc/mysqld.conf into /etc/mysql/mysqld.conf. Solve possible
7 # conflict with /var/lib/mysql/mysqld.conf
10 %bcond_with bdb # Berkeley DB support
12 %include /usr/lib/rpm/macros.perl
13 Summary: MySQL: a very fast and reliable SQL database engine
14 Summary(fr): MySQL: un serveur SQL rapide et fiable
15 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
16 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
17 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
18 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
19 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
21 Group: Applications/Databases
24 License: GPL + MySQL FLOSS Exception
25 Source0: http://mysql.mirror.anlx.net/Downloads/MySQL-4.1/mysql-%{version}.tar.gz
26 # Source0-md5: 04c08d2a5cc39050d9fa4727f8f197e8
28 Source2: %{name}.sysconfig
29 Source3: %{name}.logrotate
30 Source4: %{name}d.conf
31 Source5: %{name}-clusters.conf
32 Source6: %{name}.monitrc
33 Source7: %{name}-ndb.init
34 Source8: %{name}-ndb.sysconfig
35 Source9: %{name}-ndb-mgm.init
36 Source10: %{name}-ndb-mgm.sysconfig
37 Source11: %{name}-ndb-cpc.init
38 Source12: %{name}-ndb-cpc.sysconfig
39 Patch0: %{name}-libs.patch
40 Patch1: %{name}-libwrap.patch
41 Patch2: %{name}-c++.patch
42 Patch3: %{name}-_r-link.patch
43 Patch4: %{name}-info.patch
44 Patch5: %{name}-dump_quote_db_names.patch
45 Patch7: %{name}-sql-cxx-pic.patch
46 Patch8: %{name}-noproc.patch
47 Patch9: %{name}-fix_privilege_tables.patch
48 Patch10: %{name}-nptl.patch
50 URL: http://www.mysql.com/
51 #BuildRequires: ORBit-devel
52 BuildRequires: /bin/ps
53 BuildRequires: autoconf
54 BuildRequires: automake
55 %{?with_bdb:BuildRequires: db3-devel}
56 BuildRequires: libstdc++-devel >= 5:3.0
57 BuildRequires: libtool
58 BuildRequires: libwrap-devel
59 BuildRequires: ncurses-devel >= 4.2
60 BuildRequires: openssl-devel >= 0.9.7d
61 BuildRequires: perl-DBI
62 BuildRequires: perl-devel >= 1:5.6.1
63 BuildRequires: readline-devel >= 4.2
64 BuildRequires: rpm-perlprov >= 4.1-13
65 BuildRequires: rpmbuild(macros) >= 1.159
66 BuildRequires: texinfo
67 BuildRequires: zlib-devel
68 PreReq: rc-scripts >= 0.2.0
69 Requires(pre): /usr/bin/getgid
70 Requires(pre): /bin/id
71 Requires(pre): /usr/sbin/groupadd
72 Requires(pre): /usr/sbin/useradd
73 Requires(postun): /usr/sbin/userdel
74 Requires(postun): /usr/sbin/groupdel
75 Requires(post,preun): /sbin/chkconfig
76 Requires: %{name}-libs = %{version}-%{release}
77 Requires: /usr/bin/setsid
78 Provides: MySQL-server
79 Provides: group(mysql)
83 Obsoletes: mysql-server
84 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86 %define _libexecdir %{_sbindir}
87 %define _localstatedir /var/lib/mysql
88 %define _mysqlhome /home/services/mysql
90 %define _noautoreqdep 'perl(DBD::mysql)'
91 # workaround for buggy gcc 3.3.1
92 %define specflags_alpha -mno-explicit-relocs
95 MySQL is a true multi-user, multi-threaded SQL (Structured Query
96 Language) database server. SQL is the most popular database language
97 in the world. MySQL is a client/server implementation that consists of
98 a server daemon mysqld and many different client programs/libraries.
100 The main goals of MySQL are speed, robustness and easy to use. MySQL
101 was originally developed because we at Tcx needed a SQL server that
102 could handle very big databases with magnitude higher speed than what
103 any database vendor could offer to us. We have now been using MySQL
104 since 1996 in a environment with more than 40 databases, 10,000
105 tables, of which more than 500 have more than 7 million rows. This is
106 about 50G of mission critical data.
108 The base upon which MySQL is built is a set of routines that have been
109 used in a highly demanding production environment for many years.
110 While MySQL is still in development, it already offers a rich and
111 highly useful function set.
114 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
115 multi-taches. Le langage SQL est le langage de bases de donnees le
116 plus populaire au monde. MySQL est une implementation client/serveur
117 qui consiste en un serveur (mysqld) et differents
118 programmes/bibliotheques clientes.
120 Les objectifs principaux de MySQL sont: vitesse, robustesse et
121 facilite d'utilisation. MySQL fut originalement developpe parce que
122 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
123 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
124 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
125 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
126 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
127 millions de lignes. Ceci represente environ 50G de donnees critiques.
129 A la base de la conception de MySQL, on retrouve une serie de routines
130 qui ont ete utilisees dans un environnement de production pendant
131 plusieurs annees. Meme si MySQL est encore en developpement, il offre
132 deja une riche et utile serie de fonctions.
135 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
136 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
137 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
138 mysqld i wielu ró¿nych programów i bibliotek klienckich.
140 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
141 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
142 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
143 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
144 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel,
145 z których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
146 50GB krytycznych danych.
148 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
149 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
150 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
151 i u¿yteczny zbiór funkcji.
153 %description -l pt_BR
154 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
155 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
156 dados no mundo. O MySQL é uma implementação cliente/servidor que
157 consiste de um servidor chamado mysqld e diversos
158 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
159 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
160 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
161 pudesse lidar com grandes bases de dados e com uma velocidade muito
162 maior do que a que qualquer vendedor podia nos oferecer. Estamos
163 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
164 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
165 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
166 A base da construção do MySQL é uma série de rotinas que foram usadas
167 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
168 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
169 funções muito ricas e úteis. Veja a documentação para maiores
173 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
174 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
175 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
179 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
180 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
181 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
185 Summary: MySQL additional utilities
186 Summary(pl): Dodatkowe narzêdzia do MySQL
187 Group: Applications/Databases
188 Requires: %{name}-libs = %{version}-%{release}
191 MySQL additional utilities except Perl scripts (they may be found in
192 %{name}-extras-perl package).
194 %description extras -l pl
195 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
196 pakiecie %{name}-extras-perl).
199 Summary: MySQL additional utilities written in Perl
200 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
201 Group: Applications/Databases
202 Requires: %{name}-extras = %{version}-%{release}
203 Requires: perl(DBD::mysql)
205 %description extras-perl
206 MySQL additional utilities written in Perl.
208 %description extras-perl -l pl
209 Dodatkowe narzêdzia do MySQL napisane w Perlu.
212 Summary: MySQL - Client
213 Summary(pl): MySQL - Klient
214 Summary(pt): MySQL - Cliente
215 Summary(ru): MySQL ËÌÉÅÎÔ
216 Summary(uk): MySQL Ë̦¤ÎÔ
217 Group: Applications/Databases
218 Requires: %{name}-libs = %{version}-%{release}
219 Obsoletes: MySQL-client
222 This package contains the standard MySQL clients.
224 %description client -l fr
225 Ce package contient les clients MySQL standards.
227 %description client -l pl
228 Standardowe programy klienckie MySQL.
230 %description client -l pt_BR
231 Este pacote contém os clientes padrão para o MySQL.
233 %description client -l ru
234 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
236 %description client -l uk
237 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
240 Summary: Shared libraries for MySQL
241 Summary(pl): Biblioteki dzielone MySQL
242 Group: Applications/Databases
243 Obsoletes: libmysql10
246 Shared libraries for MySQL.
248 %description libs -l pl
249 Biblioteki dzielone MySQL.
252 Summary: MySQL - Development header files and libraries
253 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
254 Summary(pt): MySQL - Medições de desempenho
255 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
256 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
257 Group: Development/Libraries
258 Requires: %{name}-libs = %{version}-%{release}
259 Requires: openssl-devel
261 Obsoletes: MySQL-devel
262 Obsoletes: libmysql10-devel
265 This package contains the development header files and libraries
266 necessary to develop MySQL client applications.
268 %description devel -l fr
269 Ce package contient les fichiers entetes et les librairies de
270 developpement necessaires pour developper des applications clientes
273 %description devel -l pl
274 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
277 %description devel -l pt_BR
278 Este pacote contém os arquivos de cabeçalho (header files) e
279 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
281 %description devel -l ru
282 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
283 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
285 %description devel -l uk
286 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
287 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
290 Summary: MySQL static libraries
291 Summary(pl): Biblioteki statyczne MySQL
292 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
293 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
294 Group: Development/Libraries
295 Requires: %{name}-devel = %{version}-%{release}
296 Obsoletes: MySQL-static
299 MySQL static libraries.
301 %description static -l pl
302 Biblioteki statyczne MySQL.
304 %description static -l ru
305 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
306 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
308 %description static -l uk
309 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
310 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
313 Summary: MySQL - Benchmarks
314 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
315 Summary(pt): MySQL - Medições de desempenho
316 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
317 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
318 Group: Applications/Databases
319 Requires: %{name} = %{version}-%{release}
320 Requires: %{name}-client
321 Requires: perl(DBD::mysql)
322 Obsoletes: MySQL-bench
325 This package contains MySQL benchmark scripts and data.
327 %description bench -l pl
328 Programy testuj±ce szybko¶æ serwera MySQL.
330 %description bench -l pt_BR
331 Este pacote contém medições de desempenho de scripts e dados do MySQL.
333 %description bench -l ru
334 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
337 %description bench -l uk
338 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
341 Summary: MySQL manual
342 Summary(pl): Podrêcznik u¿ytkownika MySQL
343 Group: Applications/Databases
346 This package contains manual in HTML format.
348 %description doc -l pl
349 Podrêcznik MySQL-a w formacie HTML.
352 Summary: MySQL - NDB Storage Engine Daemon
353 Group: Applications/Databases
354 Requires: %{name}-libs = %{version}-%{release}
357 This package contains the standard MySQL NDB Storage Engine Daemon.
360 Summary: MySQL - NDB Clients
361 Group: Applications/Databases
362 Requires: %{name}-libs = %{version}-%{release}
364 %description ndb-client
365 This package contains the standard MySQL NDB Clients.
368 Summary: MySQL - NDB Management Daemon
369 Group: Applications/Databases
370 Requires: %{name}-libs = %{version}-%{release}
373 This package contains the standard MySQL NDB Management Daemon.
376 Summary: MySQL - NDB CPC Daemon
377 Group: Applications/Databases
378 Requires: %{name}-libs = %{version}-%{release}
381 This package contains the standard MySQL NDB CPC Daemon.
392 # this is strange: mysqld functions for UDF modules are not explicitly defined,
393 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
394 # in objects compiled without -fPIC
401 %{__perl} -pi -e 's@/lib/libpthread@/%{_lib}/libpthread@' configure.in
408 CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
409 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
412 FIND_PROC='/bin/ps p $$PID' \
414 CHECK_PID='/bin/kill -0 $$PID' \
418 --enable-thread-safe-client \
419 %{?with_bdb:--with-berkeley-db} \
420 --with-comment="PLD Linux Distribution MySQL RPM" \
421 --with%{!?debug:out}-debug \
422 --with-embedded-server \
423 --with-extra-charsets=all \
426 --with-mysqld-user=mysql \
427 --with-named-curses-libs="-lncurses" \
431 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
438 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
439 # (it defaults to first cluster but user may change it to whatever
442 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
444 %{__make} benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
445 %{__make} -C Docs mysql.info
448 rm -rf $RPM_BUILD_ROOT
449 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
450 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
451 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
454 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
459 DESTDIR=$RPM_BUILD_ROOT \
460 benchdir=%{_datadir}/sql-bench \
462 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
464 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
466 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
467 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
468 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
469 # This is template for configuration file which is created after 'service mysql init'
470 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
471 install %{SOURCE5} $RPM_BUILD_ROOT/etc/mysql/clusters.conf
472 install %{SOURCE6} $RPM_BUILD_ROOT/etc/monit
473 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
476 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
477 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
478 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
479 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
480 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
481 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
483 # remove mysqld's *.po files
484 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
485 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
486 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
488 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
491 rm -rf $RPM_BUILD_ROOT
494 if [ -n "`/usr/bin/getgid mysql`" ]; then
495 if [ "`/usr/bin/getgid mysql`" != "89" ]; then
496 echo "Error: group mysql doesn't have gid=89. Correct this before installing mysql." 1>&2
500 /usr/sbin/groupadd -g 89 mysql
502 if [ -n "`/bin/id -u mysql 2>/dev/null`" ]; then
503 if [ "`/bin/id -u mysql`" != "89" ]; then
504 echo "Error: user mysql doesn't have uid=89. Correct this before installing mysql." 1>&2
508 /usr/sbin/useradd -u 89 \
509 -d %{_mysqlhome} -s /bin/sh -g mysql \
510 -c "MySQL Server" mysql 1>&2
514 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
515 /sbin/chkconfig --add mysql
516 if [ -f /var/lock/subsys/mysql ]; then
517 /etc/rc.d/init.d/mysql restart >&2
519 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
523 if [ "$1" = "0" ]; then
524 if [ -f /var/lock/subsys/mysql ]; then
525 /etc/rc.d/init.d/mysql stop
527 /sbin/chkconfig --del mysql
531 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
532 if [ "$1" = "0" ]; then
538 /sbin/chkconfig --add mysql-ndb
539 if [ -f /var/lock/subsys/mysql-ndb ]; then
540 /etc/rc.d/init.d/mysql-ndb restart >&2
542 echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
546 if [ "$1" = "0" ]; then
547 if [ -f /var/lock/subsys/mysql-ndb ]; then
548 /etc/rc.d/init.d/mysql-ndb stop
550 /sbin/chkconfig --del mysql-ndb
554 /sbin/chkconfig --add mysql-ndb-mgm
555 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
556 /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
558 echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
562 if [ "$1" = "0" ]; then
563 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
564 /etc/rc.d/init.d/mysql-ndb-mgm stop
566 /sbin/chkconfig --del mysql-ndb-mgm
570 /sbin/chkconfig --add mysql-ndb-cpc
571 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
572 /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
574 echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
578 if [ "$1" = "0" ]; then
579 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
580 /etc/rc.d/init.d/mysql-ndb-cpc stop
582 /sbin/chkconfig --del mysql-ndb-cpc
585 %post libs -p /sbin/ldconfig
586 %postun libs -p /sbin/ldconfig
588 %triggerpostun -- mysql <= 4.0.20-2
589 # For clusters in /etc/mysql/clusters.conf
590 if [ -f "/etc/sysconfig/mysql" ]; then
591 . /etc/sysconfig/mysql
592 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
593 for i in "$MYSQL_DB_CLUSTERS"; do
594 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
596 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
597 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
598 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
599 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
604 %defattr(644,root,root,755)
605 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/logrotate.d/mysql
606 %attr(754,root,root) /etc/rc.d/init.d/mysql
607 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql
608 %attr(751,root,root) %dir /etc/mysql
609 %attr(640,root,mysql) %config(noreplace) %verify(not md5 size mtime) /etc/mysql/clusters.conf
610 %attr(750,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/monit/*.monitrc
611 %attr(755,root,root) %{_bindir}/isamchk
612 %attr(755,root,root) %{_bindir}/isamlog
613 %attr(755,root,root) %{_bindir}/myisamchk
614 %attr(755,root,root) %{_bindir}/myisamlog
615 %attr(755,root,root) %{_bindir}/myisampack
616 %attr(755,root,root) %{_bindir}/pack_isam
617 %attr(755,root,root) %{_sbindir}/mysqld
618 %{_mandir}/man1/isamchk.1*
619 %{_mandir}/man1/isamlog.1*
620 %{_mandir}/man1/mysqld.1*
622 %attr(700,mysql,mysql) %{_mysqlhome}
623 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
624 %attr(751,root,root) /var/lib/mysql
625 %attr(750,mysql,mysql) %dir /var/log/mysql
626 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
627 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysql/*
629 %{_infodir}/mysql.info*
630 %dir %{_datadir}/mysql
631 # This is template for configuration file which is created after 'service mysql init'
632 %{_datadir}/mysql/mysqld.conf
633 %{_datadir}/mysql/charsets
634 %{_datadir}/mysql/english
635 %lang(cs) %{_datadir}/mysql/czech
636 %lang(da) %{_datadir}/mysql/danish
637 %lang(de) %{_datadir}/mysql/german
638 %lang(el) %{_datadir}/mysql/greek
639 %lang(es) %{_datadir}/mysql/spanish
640 %lang(et) %{_datadir}/mysql/estonian
641 %lang(fr) %{_datadir}/mysql/french
642 %lang(hu) %{_datadir}/mysql/hungarian
643 %lang(it) %{_datadir}/mysql/italian
644 %lang(ja) %{_datadir}/mysql/japanese
645 %lang(ko) %{_datadir}/mysql/korean
646 %lang(nl) %{_datadir}/mysql/dutch
647 %lang(nb) %{_datadir}/mysql/norwegian
648 %lang(nn) %{_datadir}/mysql/norwegian-ny
649 %lang(pl) %{_datadir}/mysql/polish
650 %lang(pt) %{_datadir}/mysql/portuguese
651 %lang(ro) %{_datadir}/mysql/romanian
652 %lang(ru) %{_datadir}/mysql/russian
653 %lang(yu) %{_datadir}/mysql/serbian
654 %lang(sk) %{_datadir}/mysql/slovak
655 %lang(sv) %{_datadir}/mysql/swedish
656 %lang(uk) %{_datadir}/mysql/ukrainian
659 %defattr(644,root,root,755)
660 %attr(755,root,root) %{_bindir}/msql2mysql
661 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
662 %attr(755,root,root) %{_bindir}/perror
663 %attr(755,root,root) %{_bindir}/my_print_defaults
664 %attr(755,root,root) %{_bindir}/replace
665 %attr(755,root,root) %{_bindir}/resolveip
666 %{_mandir}/man1/mysql_fix_privilege_tables.1*
667 %{_mandir}/man1/perror.1*
668 %{_mandir}/man1/replace.1*
671 %defattr(644,root,root,755)
672 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
673 %attr(755,root,root) %{_bindir}/mysqldumpslow
674 %attr(755,root,root) %{_bindir}/mysqlhotcopy
675 %attr(755,root,root) %{_bindir}/mysql_setpermission
676 %attr(755,root,root) %{_bindir}/mysql_zap
677 %attr(755,root,root) %{_bindir}/mysql_find_rows
678 %attr(755,root,root) %{_bindir}/mysqlaccess
679 %{_mandir}/man1/mysql_zap.1*
680 %{_mandir}/man1/mysqlaccess.1*
683 %defattr(644,root,root,755)
684 %attr(755,root,root) %{_bindir}/mysql
685 %attr(755,root,root) %{_bindir}/mysqlbug
686 %attr(755,root,root) %{_bindir}/mysqldump
687 %attr(755,root,root) %{_bindir}/mysqlimport
688 %attr(755,root,root) %{_bindir}/mysqlmanager*
689 %attr(755,root,root) %{_bindir}/mysqlshow
690 %attr(755,root,root) %{_bindir}/mysqlbinlog
691 %attr(755,root,root) %{_bindir}/mysqladmin
692 %attr(755,root,root) %{_bindir}/mysqltest
693 %{_mandir}/man1/mysql.1*
694 %{_mandir}/man1/mysqladmin.1*
695 %{_mandir}/man1/mysqldump.1*
696 %{_mandir}/man1/mysqlshow.1*
699 %defattr(644,root,root,755)
700 %doc EXCEPTIONS-CLIENT
701 %attr(755,root,root) %{_libdir}/lib*.so.*.*
704 %defattr(644,root,root,755)
705 %attr(755,root,root) %{_bindir}/mysql_config
706 %attr(755,root,root) %{_libdir}/lib*.so
708 %{_libdir}/lib*[!tr].a
712 %defattr(644,root,root,755)
713 %{_libdir}/lib*[tr].a
716 %defattr(644,root,root,755)
717 %dir %{_datadir}/sql-bench
718 %{_datadir}/sql-bench/[CDRl]*
719 %attr(755,root,root) %{_datadir}/sql-bench/[bcgrst]*
722 %defattr(644,root,root,755)
723 %doc Docs/manual.html Docs/manual_toc.html
726 %defattr(644,root,root,755)
727 %attr(755,root,root) %{_sbindir}/ndbd
728 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
729 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql-ndb
732 %defattr(644,root,root,755)
733 %attr(755,root,root) %{_bindir}/ndb_*
736 %defattr(644,root,root,755)
737 %attr(755,root,root) %{_sbindir}/ndb_mgmd
738 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
739 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql-ndb-mgm
743 %defattr(644,root,root,755)
744 %attr(755,root,root) %{_sbindir}/ndb_cpcd
745 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
746 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/mysql-ndb-cpc