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