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
5 # - what's the libwrapper constistent bcond name? I see in specs 'libwrap', 'tcpd', 'tcp_wrappers'
8 %bcond_with bdb # Berkeley DB support
9 %bcond_without innodb # Without InnoDB support
10 %bcond_without isam # Without ISAM table format (used in mysql 3.22)
11 %bcond_without raid # Without raid
12 %bcond_without ssl # Without OpenSSL
13 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
15 %include /usr/lib/rpm/macros.perl
16 Summary: MySQL: a very fast and reliable SQL database engine
17 Summary(fr): MySQL: un serveur SQL rapide et fiable
18 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
19 Summary(de): MySQL: ist eine SQL-Datenbank
20 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
21 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
22 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
23 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
25 Group: Applications/Databases
28 License: GPL + MySQL FLOSS Exception
29 Source0: http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
30 # Source0-md5: 56a6f5cacd97ae290e07bbe19f279af1
32 Source2: %{name}.sysconfig
33 Source3: %{name}.logrotate
34 Source4: %{name}d.conf
35 Source5: %{name}-clusters.conf
36 Source6: %{name}.monitrc
37 Source7: %{name}-ndb.init
38 Source8: %{name}-ndb.sysconfig
39 Source9: %{name}-ndb-mgm.init
40 Source10: %{name}-ndb-mgm.sysconfig
41 Source11: %{name}-ndb-cpc.init
42 Source12: %{name}-ndb-cpc.sysconfig
43 Patch0: %{name}-libs.patch
44 Patch1: %{name}-libwrap.patch
45 Patch2: %{name}-c++.patch
46 Patch3: %{name}-info.patch
47 Patch4: %{name}-sql-cxx-pic.patch
48 Patch5: %{name}-noproc.patch
49 Patch6: %{name}-fix_privilege_tables.patch
50 #Patch7: %{name}-nptl.patch
51 Patch8: %{name}-align.patch
53 URL: http://www.mysql.com/
54 #BuildRequires: ORBit-devel
55 BuildRequires: /bin/ps
56 BuildRequires: autoconf
57 BuildRequires: automake
58 %{?with_bdb:BuildRequires: db3-devel}
59 BuildRequires: libstdc++-devel >= 5:3.0
60 BuildRequires: libtool
61 %{?with_tcpd:BuildRequires: libwrap-devel}
62 BuildRequires: ncurses-devel >= 4.2
63 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
64 BuildRequires: perl-DBI
65 BuildRequires: perl-devel >= 1:5.6.1
66 BuildRequires: readline-devel >= 4.2
67 BuildRequires: rpm-perlprov >= 4.1-13
68 BuildRequires: rpmbuild(macros) >= 1.202
69 BuildRequires: texinfo
70 BuildRequires: zlib-devel
71 PreReq: rc-scripts >= 0.2.0
72 Requires(pre): /usr/bin/getgid
73 Requires(pre): /bin/id
74 Requires(pre): /usr/sbin/groupadd
75 Requires(pre): /usr/sbin/useradd
76 Requires(postun): /usr/sbin/userdel
77 Requires(postun): /usr/sbin/groupdel
78 Requires(post,preun): /sbin/chkconfig
79 Requires: %{name}-libs = %{version}-%{release}
80 Requires: /usr/bin/setsid
81 Provides: MySQL-server
82 Provides: group(mysql)
86 Obsoletes: mysql-server
87 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 %define _libexecdir %{_sbindir}
90 %define _localstatedir /var/lib/mysql
91 %define _mysqlhome /home/services/mysql
93 %define _noautoreqdep 'perl(DBD::mysql)'
96 MySQL is a true multi-user, multi-threaded SQL (Structured Query
97 Language) database server. SQL is the most popular database language
98 in the world. MySQL is a client/server implementation that consists of
99 a server daemon mysqld and many different client programs/libraries.
101 The main goals of MySQL are speed, robustness and easy to use. MySQL
102 was originally developed because we at Tcx needed a SQL server that
103 could handle very big databases with magnitude higher speed than what
104 any database vendor could offer to us. We have now been using MySQL
105 since 1996 in a environment with more than 40 databases, 10,000
106 tables, of which more than 500 have more than 7 million rows. This is
107 about 50G of mission critical data.
109 The base upon which MySQL is built is a set of routines that have been
110 used in a highly demanding production environment for many years.
111 While MySQL is still in development, it already offers a rich and
112 highly useful function set.
115 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
116 multi-taches. Le langage SQL est le langage de bases de donnees le
117 plus populaire au monde. MySQL est une implementation client/serveur
118 qui consiste en un serveur (mysqld) et differents
119 programmes/bibliotheques clientes.
121 Les objectifs principaux de MySQL sont: vitesse, robustesse et
122 facilite d'utilisation. MySQL fut originalement developpe parce que
123 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
124 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
125 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
126 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
127 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
128 millions de lignes. Ceci represente environ 50G de donnees critiques.
130 A la base de la conception de MySQL, on retrouve une serie de routines
131 qui ont ete utilisees dans un environnement de production pendant
132 plusieurs annees. Meme si MySQL est encore en developpement, il offre
133 deja une riche et utile serie de fonctions.
136 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
137 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
138 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
139 mysqld i wielu ró¿nych programów i bibliotek klienckich.
141 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
142 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
143 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
144 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
145 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
146 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
147 50GB krytycznych danych.
149 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
150 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
151 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
152 i u¿yteczny zbiór funkcji.
155 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
156 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
157 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
158 einem Primärschlüssel versehen werden. Es ist aber keine Definition
159 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
160 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
161 Daten verantwortlich. Allein durch die Nutzung externer
162 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
163 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
165 %description -l pt_BR
166 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
167 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
168 dados no mundo. O MySQL é uma implementação cliente/servidor que
169 consiste de um servidor chamado mysqld e diversos
170 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
171 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
172 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
173 pudesse lidar com grandes bases de dados e com uma velocidade muito
174 maior do que a que qualquer vendedor podia nos oferecer. Estamos
175 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
176 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
177 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
178 A base da construção do MySQL é uma série de rotinas que foram usadas
179 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
180 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
181 funções muito ricas e úteis. Veja a documentação para maiores
185 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
186 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
187 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
191 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
192 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
193 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
197 Summary: MySQL additional utilities
198 Summary(pl): Dodatkowe narzêdzia do MySQL
199 Group: Applications/Databases
200 Requires: %{name}-libs = %{version}-%{release}
203 MySQL additional utilities except Perl scripts (they may be found in
204 %{name}-extras-perl package).
206 %description extras -l pl
207 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
208 pakiecie %{name}-extras-perl).
211 Summary: MySQL additional utilities written in Perl
212 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
213 Group: Applications/Databases
214 Requires: %{name}-extras = %{version}-%{release}
215 Requires: perl(DBD::mysql)
217 %description extras-perl
218 MySQL additional utilities written in Perl.
220 %description extras-perl -l pl
221 Dodatkowe narzêdzia do MySQL napisane w Perlu.
224 Summary: MySQL - Client
225 Summary(pl): MySQL - Klient
226 Summary(pt): MySQL - Cliente
227 Summary(ru): MySQL ËÌÉÅÎÔ
228 Summary(uk): MySQL Ë̦¤ÎÔ
229 Group: Applications/Databases
230 Requires: %{name}-libs = %{version}-%{release}
231 Obsoletes: MySQL-client
234 This package contains the standard MySQL clients.
236 %description client -l fr
237 Ce package contient les clients MySQL standards.
239 %description client -l pl
240 Standardowe programy klienckie MySQL.
242 %description client -l pt_BR
243 Este pacote contém os clientes padrão para o MySQL.
245 %description client -l ru
246 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
248 %description client -l uk
249 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
252 Summary: Shared libraries for MySQL
253 Summary(pl): Biblioteki dzielone MySQL
254 Group: Applications/Databases
255 Obsoletes: libmysql10
258 Shared libraries for MySQL.
260 %description libs -l pl
261 Biblioteki dzielone MySQL.
264 Summary: MySQL - Development header files and libraries
265 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
266 Summary(pt): MySQL - Medições de desempenho
267 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
268 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
269 Group: Development/Libraries
270 Requires: %{name}-libs = %{version}-%{release}
271 %{?with_ssl:Requires: openssl-devel}
273 Obsoletes: MySQL-devel
274 Obsoletes: libmysql10-devel
277 This package contains the development header files and libraries
278 necessary to develop MySQL client applications.
280 %description devel -l fr
281 Ce package contient les fichiers entetes et les librairies de
282 developpement necessaires pour developper des applications clientes
285 %description devel -l pl
286 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
289 %description devel -l pt_BR
290 Este pacote contém os arquivos de cabeçalho (header files) e
291 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
293 %description devel -l ru
294 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
295 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
297 %description devel -l uk
298 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
299 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
302 Summary: MySQL static libraries
303 Summary(pl): Biblioteki statyczne MySQL
304 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
305 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
306 Group: Development/Libraries
307 Requires: %{name}-devel = %{version}-%{release}
308 Obsoletes: MySQL-static
311 MySQL static libraries.
313 %description static -l pl
314 Biblioteki statyczne MySQL.
316 %description static -l ru
317 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
318 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
320 %description static -l uk
321 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
322 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
325 Summary: MySQL - Benchmarks
326 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
327 Summary(pt): MySQL - Medições de desempenho
328 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
329 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
330 Group: Applications/Databases
331 Requires: %{name} = %{version}-%{release}
332 Requires: %{name}-client
333 Requires: perl(DBD::mysql)
334 Obsoletes: MySQL-bench
337 This package contains MySQL benchmark scripts and data.
339 %description bench -l pl
340 Programy testuj±ce szybko¶æ serwera MySQL.
342 %description bench -l pt_BR
343 Este pacote contém medições de desempenho de scripts e dados do MySQL.
345 %description bench -l ru
346 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
349 %description bench -l uk
350 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
353 Summary: MySQL manual
354 Summary(pl): Podrêcznik u¿ytkownika MySQL
355 Group: Applications/Databases
358 This package contains manual in HTML format.
360 %description doc -l pl
361 Podrêcznik MySQL-a w formacie HTML.
364 Summary: MySQL - NDB Storage Engine Daemon
365 Summary(pl): MySQL - demon silnika przechowywania danych NDB
366 Group: Applications/Databases
367 Requires: %{name}-libs = %{version}-%{release}
370 This package contains the standard MySQL NDB Storage Engine Daemon.
372 %description ndb -l pl
373 Ten pakiet zawiera standardowego demona silnika przechowywania danych
377 Summary: MySQL - NDB Clients
378 Summary(pl): MySQL - programy klienckie NDB
379 Group: Applications/Databases
380 Requires: %{name}-libs = %{version}-%{release}
382 %description ndb-client
383 This package contains the standard MySQL NDB Clients.
385 %description ndb-client -l pl
386 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
389 Summary: MySQL - NDB Management Daemon
390 Summary(pl): MySQL - demon zarz±dzaj±cy NDB
391 Group: Applications/Databases
392 Requires: %{name}-libs = %{version}-%{release}
395 This package contains the standard MySQL NDB Management Daemon.
397 %description ndb-mgm -l pl
398 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
401 Summary: MySQL - NDB CPC Daemon
402 Summary(pl): MySQL - demon NDB CPC
403 Group: Applications/Databases
404 Requires: %{name}-libs = %{version}-%{release}
407 This package contains the standard MySQL NDB CPC Daemon.
409 %description ndb-cpc -l pl
410 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
415 %{?with_tcpd:%patch1 -p1}
419 # this is strange: mysqld functions for UDF modules are not explicitly defined,
420 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
421 # in objects compiled without -fPIC
429 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
436 # The compiler flags are as per their "official" spec ;)
437 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
438 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
441 FIND_PROC='/bin/ps p $$PID' \
443 CHECK_PID='/bin/kill -0 $$PID' \
447 --enable-thread-safe-client \
448 --with%{!?with_bdb:out}-berkeley-db \
449 --with%{!?with_innodb:out}-innodb \
450 --with%{!?with_isam:out}-isam \
451 --with%{!?with_raid:out}-raid \
452 --with%{!?with_ssl:out}-openssl \
453 --with%{!?with_tcpd:out}-libwrap \
454 --with-comment="PLD Linux Distribution MySQL RPM" \
455 --with%{!?debug:out}-debug \
456 --with-embedded-server \
457 --with-extra-charsets=all \
459 --with-mysqld-user=mysql \
460 --with-named-curses-libs="-lncurses" \
461 --with-named-thread-libs="-lpthread" --with-pthread \
462 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
469 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
470 # (it defaults to first cluster but user may change it to whatever
473 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
476 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
478 # workaround for missing files
479 (cd Docs; touch Images/cluster-components-1.txt Images/multi-comp-1.txt errmsg-table.texi cl-errmsg-table.texi)
480 %{__make} -C Docs mysql.info
483 rm -rf $RPM_BUILD_ROOT
484 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
485 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
486 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
489 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
494 DESTDIR=$RPM_BUILD_ROOT \
495 benchdir=%{_datadir}/sql-bench \
497 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
499 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
501 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
502 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
503 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
504 # This is template for configuration file which is created after 'service mysql init'
505 install %{SOURCE4} mysqld.conf
506 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
507 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
508 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
510 # remove innodb directives from mysqld.conf if mysqld is configured without
511 %if %{without innodb}
512 cp mysqld.conf mysqld.tmp
513 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
516 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
518 cp mysqld.conf mysqld.tmp
519 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
522 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
525 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
526 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
527 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
528 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
529 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
530 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
532 # remove mysqld's *.po files
533 find . $RPM_BUILD_ROOT%{_datadir}/%{name} -name \*.txt | xargs -n 100 rm -f
534 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
535 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
537 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
540 rm -rf $RPM_BUILD_ROOT
543 %groupadd -g 89 mysql
544 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
547 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
548 /sbin/chkconfig --add mysql
549 if [ -f /var/lock/subsys/mysql ]; then
550 /etc/rc.d/init.d/mysql restart >&2
552 echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
556 if [ "$1" = "0" ]; then
557 if [ -f /var/lock/subsys/mysql ]; then
558 /etc/rc.d/init.d/mysql stop
560 /sbin/chkconfig --del mysql
564 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
565 if [ "$1" = "0" ]; then
571 /sbin/chkconfig --add mysql-ndb
572 if [ -f /var/lock/subsys/mysql-ndb ]; then
573 /etc/rc.d/init.d/mysql-ndb restart >&2
575 echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
579 if [ "$1" = "0" ]; then
580 if [ -f /var/lock/subsys/mysql-ndb ]; then
581 /etc/rc.d/init.d/mysql-ndb stop
583 /sbin/chkconfig --del mysql-ndb
587 /sbin/chkconfig --add mysql-ndb-mgm
588 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
589 /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
591 echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
595 if [ "$1" = "0" ]; then
596 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
597 /etc/rc.d/init.d/mysql-ndb-mgm stop
599 /sbin/chkconfig --del mysql-ndb-mgm
603 /sbin/chkconfig --add mysql-ndb-cpc
604 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
605 /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
607 echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
611 if [ "$1" = "0" ]; then
612 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
613 /etc/rc.d/init.d/mysql-ndb-cpc stop
615 /sbin/chkconfig --del mysql-ndb-cpc
618 %post libs -p /sbin/ldconfig
619 %postun libs -p /sbin/ldconfig
621 %triggerpostun -- mysql <= 4.0.20-2
622 # For clusters in /etc/mysql/clusters.conf
623 if [ -f "/etc/sysconfig/mysql" ]; then
624 . /etc/sysconfig/mysql
625 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
626 for i in "$MYSQL_DB_CLUSTERS"; do
627 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
629 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
630 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
631 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
632 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
636 %triggerpostun -- mysql <= 4.1.1
637 # For better compatibility with prevoius versions:
638 for config in `grep -v "^#" /etc/mysql/clusters.conf | cut -d"=" -f 1`; do
639 if echo "$config" | grep -q '^/'; then
640 config_file="$config"
641 elif [ -f "/etc/mysql/$config" ]; then
642 config_file=/etc/mysql/$config
644 config_file="$clusterdir/mysqld.conf"
646 echo "Adding option old-passwords to config: $config_file"
647 echo "If you want to use new, better passwords - remove it"
648 echo "# Compatibility options:" >> $config_file
649 echo "old-passwords" >> $config_file
653 %defattr(644,root,root,755)
654 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
655 %attr(754,root,root) /etc/rc.d/init.d/mysql
656 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
657 %attr(751,root,root) %dir %{_sysconfdir}/mysql
658 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
659 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
660 %attr(755,root,root) %{_bindir}/isamchk
661 %attr(755,root,root) %{_bindir}/isamlog
662 %attr(755,root,root) %{_bindir}/myisamchk
663 %attr(755,root,root) %{_bindir}/myisamlog
664 %attr(755,root,root) %{_bindir}/myisampack
665 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
666 %attr(755,root,root) %{_bindir}/pack_isam
667 %attr(755,root,root) %{_bindir}/my_print_defaults
668 %attr(755,root,root) %{_sbindir}/mysqld
669 %{_mandir}/man1/isamchk.1*
670 %{_mandir}/man1/isamlog.1*
671 %{_mandir}/man1/mysql_fix_privilege_tables.1*
672 %{_mandir}/man1/mysqld.1*
674 %attr(700,mysql,mysql) %{_mysqlhome}
675 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
676 %attr(751,root,root) /var/lib/mysql
677 %attr(750,mysql,mysql) %dir /var/log/mysql
678 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
679 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
681 %{_infodir}/mysql.info*
682 %dir %{_datadir}/mysql
683 # This is template for configuration file which is created after 'service mysql init'
684 %{_datadir}/mysql/mysqld.conf
685 %{_datadir}/mysql/charsets
686 %{_datadir}/mysql/english
687 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
688 %lang(cs) %{_datadir}/mysql/czech
689 %lang(da) %{_datadir}/mysql/danish
690 %lang(de) %{_datadir}/mysql/german
691 %lang(el) %{_datadir}/mysql/greek
692 %lang(es) %{_datadir}/mysql/spanish
693 %lang(et) %{_datadir}/mysql/estonian
694 %lang(fr) %{_datadir}/mysql/french
695 %lang(hu) %{_datadir}/mysql/hungarian
696 %lang(it) %{_datadir}/mysql/italian
697 %lang(ja) %{_datadir}/mysql/japanese
698 %lang(ko) %{_datadir}/mysql/korean
699 %lang(nl) %{_datadir}/mysql/dutch
700 %lang(nb) %{_datadir}/mysql/norwegian
701 %lang(nn) %{_datadir}/mysql/norwegian-ny
702 %lang(pl) %{_datadir}/mysql/polish
703 %lang(pt) %{_datadir}/mysql/portuguese
704 %lang(ro) %{_datadir}/mysql/romanian
705 %lang(ru) %{_datadir}/mysql/russian
706 %lang(sr) %{_datadir}/mysql/serbian
707 %lang(sk) %{_datadir}/mysql/slovak
708 %lang(sv) %{_datadir}/mysql/swedish
709 %lang(uk) %{_datadir}/mysql/ukrainian
712 %defattr(644,root,root,755)
713 %attr(755,root,root) %{_bindir}/msql2mysql
714 %attr(755,root,root) %{_bindir}/perror
715 %attr(755,root,root) %{_bindir}/replace
716 %attr(755,root,root) %{_bindir}/resolveip
717 %{_mandir}/man1/perror.1*
718 %{_mandir}/man1/replace.1*
721 %defattr(644,root,root,755)
722 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
723 %attr(755,root,root) %{_bindir}/mysqldumpslow
724 %attr(755,root,root) %{_bindir}/mysqlhotcopy
725 %attr(755,root,root) %{_bindir}/mysql_setpermission
726 %attr(755,root,root) %{_bindir}/mysql_zap
727 %attr(755,root,root) %{_bindir}/mysql_find_rows
728 %attr(755,root,root) %{_bindir}/mysqlaccess
729 %{_mandir}/man1/mysql_zap.1*
730 %{_mandir}/man1/mysqlaccess.1*
733 %defattr(644,root,root,755)
734 %attr(755,root,root) %{_bindir}/mysql
735 %attr(755,root,root) %{_bindir}/mysqlbug
736 %attr(755,root,root) %{_bindir}/mysqldump
737 %attr(755,root,root) %{_bindir}/mysqlimport
738 %attr(755,root,root) %{_bindir}/mysqlmanager*
739 %attr(755,root,root) %{_bindir}/mysqlshow
740 %attr(755,root,root) %{_bindir}/mysqlbinlog
741 %attr(755,root,root) %{_bindir}/mysqladmin
742 %attr(755,root,root) %{_bindir}/mysqltest
743 %{_mandir}/man1/mysql.1*
744 %{_mandir}/man1/mysqladmin.1*
745 %{_mandir}/man1/mysqldump.1*
746 %{_mandir}/man1/mysqlshow.1*
749 %defattr(644,root,root,755)
750 %doc EXCEPTIONS-CLIENT
751 %attr(755,root,root) %{_libdir}/lib*.so.*.*
754 %defattr(644,root,root,755)
755 %attr(755,root,root) %{_bindir}/mysql_config
756 %attr(755,root,root) %{_libdir}/lib*.so
758 %{_libdir}/lib*[!tr].a
762 %defattr(644,root,root,755)
763 %{_libdir}/lib*[tr].a
766 %defattr(644,root,root,755)
767 %dir %{_datadir}/sql-bench
768 %{_datadir}/sql-bench/[CDRl]*
769 %attr(755,root,root) %{_datadir}/sql-bench/[bcgrst]*
772 %defattr(644,root,root,755)
773 #%doc Docs/manual.html Docs/manual_toc.html
776 %defattr(644,root,root,755)
777 %attr(755,root,root) %{_sbindir}/ndbd
778 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
779 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
782 %defattr(644,root,root,755)
783 %attr(755,root,root) %{_bindir}/ndb_*
786 %defattr(644,root,root,755)
787 %attr(755,root,root) %{_sbindir}/ndb_mgmd
788 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
789 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
792 %defattr(644,root,root,755)
793 %attr(755,root,root) %{_sbindir}/ndb_cpcd
794 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
795 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc