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 # - C(XX)FLAGS for innodb subdirs are overriden by ./configre!
6 # - http://bugs.mysql.com/bug.php?id=16470
9 %bcond_with bdb # Berkeley DB support
10 %bcond_without innodb # Without InnoDB support
11 %bcond_without raid # Without raid
12 %bcond_without ssl # Without OpenSSL
13 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
14 %bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
16 %include /usr/lib/rpm/macros.perl
17 #define _snap 20060111
18 Summary: MySQL: a very fast and reliable SQL database engine
19 Summary(de): MySQL: ist eine SQL-Datenbank
20 Summary(fr): MySQL: un serveur SQL rapide et fiable
21 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
22 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
23 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
24 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
25 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
29 License: GPL + MySQL FLOSS Exception
30 Group: Applications/Databases
31 Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
32 # Source0-md5: f18153b0239aaa03fc5a751f2d82cb71
33 #Source0: http://downloads.mysql.com/snapshots/mysql-5.0/%{name}-%{version}-nightly-%{_snap}.tar.gz
35 Source2: %{name}.sysconfig
36 Source3: %{name}.logrotate
37 Source4: %{name}d.conf
38 Source5: %{name}-clusters.conf
39 Source6: %{name}.monitrc
40 Source7: %{name}-ndb.init
41 Source8: %{name}-ndb.sysconfig
42 Source9: %{name}-ndb-mgm.init
43 Source10: %{name}-ndb-mgm.sysconfig
44 Source11: %{name}-ndb-cpc.init
45 Source12: %{name}-ndb-cpc.sysconfig
46 Source13: %{name}-client.conf
47 Patch0: %{name}-libs.patch
48 Patch1: %{name}-libwrap.patch
49 Patch2: %{name}-c++.patch
50 Patch3: %{name}-info.patch
51 Patch4: %{name}-sql-cxx-pic.patch
52 Patch5: %{name}-noproc.patch
53 Patch6: %{name}-fix_privilege_tables.patch
54 Patch7: %{name}-align.patch
55 Patch8: %{name}-client-config.patch
56 Patch9: %{name}-build.patch
57 Patch10: %{name}-alpha.patch
58 URL: http://www.mysql.com/
59 BuildRequires: autoconf
60 BuildRequires: automake
61 %{?with_bdb:BuildRequires: db3-devel}
62 BuildRequires: libstdc++-devel >= 5:3.0
63 BuildRequires: libtool
64 %{?with_tcpd:BuildRequires: libwrap-devel}
65 BuildRequires: ncurses-devel >= 4.2
66 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
67 BuildRequires: perl-DBI
68 BuildRequires: perl-devel >= 1:5.6.1
69 BuildRequires: readline-devel >= 4.2
70 BuildRequires: rpm-perlprov >= 4.1-13
71 BuildRequires: rpmbuild(macros) >= 1.228
72 BuildRequires: sed >= 4.0
73 BuildRequires: texinfo
74 BuildRequires: zlib-devel
75 Requires(post,preun): /sbin/chkconfig
76 Requires(postun): /usr/sbin/groupdel
77 Requires(postun): /usr/sbin/userdel
78 Requires(pre): /bin/id
79 Requires(pre): /usr/bin/getgid
80 Requires(pre): /usr/sbin/groupadd
81 Requires(pre): /usr/sbin/useradd
82 Requires(triggerpostun): sed >= 4.0
83 Requires: %{name}-charsets = %{version}-%{release}
84 Requires: /usr/bin/setsid
85 Requires: rc-scripts >= 0.2.0
86 Provides: MySQL-server
87 Provides: group(mysql)
91 Obsoletes: mysql-server
92 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94 %define _libexecdir %{_sbindir}
95 %define _localstatedir /var/lib/mysql
96 %define _mysqlhome /home/services/mysql
98 %define _noautoreqdep 'perl(DBD::mysql)'
101 MySQL is a true multi-user, multi-threaded SQL (Structured Query
102 Language) database server. SQL is the most popular database language
103 in the world. MySQL is a client/server implementation that consists of
104 a server daemon mysqld and many different client programs/libraries.
106 The main goals of MySQL are speed, robustness and easy to use. MySQL
107 was originally developed because we at Tcx needed a SQL server that
108 could handle very big databases with magnitude higher speed than what
109 any database vendor could offer to us. We have now been using MySQL
110 since 1996 in a environment with more than 40 databases, 10,000
111 tables, of which more than 500 have more than 7 million rows. This is
112 about 50G of mission critical data.
114 The base upon which MySQL is built is a set of routines that have been
115 used in a highly demanding production environment for many years.
116 While MySQL is still in development, it already offers a rich and
117 highly useful function set.
120 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
121 multi-taches. Le langage SQL est le langage de bases de donnees le
122 plus populaire au monde. MySQL est une implementation client/serveur
123 qui consiste en un serveur (mysqld) et differents
124 programmes/bibliotheques clientes.
126 Les objectifs principaux de MySQL sont: vitesse, robustesse et
127 facilite d'utilisation. MySQL fut originalement developpe parce que
128 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
129 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
130 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
131 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
132 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
133 millions de lignes. Ceci represente environ 50G de donnees critiques.
135 A la base de la conception de MySQL, on retrouve une serie de routines
136 qui ont ete utilisees dans un environnement de production pendant
137 plusieurs annees. Meme si MySQL est encore en developpement, il offre
138 deja une riche et utile serie de fonctions.
141 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
142 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
143 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
144 mysqld i wielu ró¿nych programów i bibliotek klienckich.
146 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
147 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
148 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
149 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
150 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
151 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
152 50GB krytycznych danych.
154 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
155 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
156 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
157 i u¿yteczny zbiór funkcji.
160 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
161 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
162 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
163 einem Primärschlüssel versehen werden. Es ist aber keine Definition
164 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
165 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
166 Daten verantwortlich. Allein durch die Nutzung externer
167 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
168 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
170 %description -l pt_BR
171 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
172 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
173 dados no mundo. O MySQL é uma implementação cliente/servidor que
174 consiste de um servidor chamado mysqld e diversos
175 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
176 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
177 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
178 pudesse lidar com grandes bases de dados e com uma velocidade muito
179 maior do que a que qualquer vendedor podia nos oferecer. Estamos
180 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
181 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
182 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
183 A base da construção do MySQL é uma série de rotinas que foram usadas
184 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
185 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
186 funções muito ricas e úteis. Veja a documentação para maiores
190 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
191 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
192 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
196 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
197 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
198 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
202 Summary: MySQL - character sets definitions
203 Summary(pl): MySQL - definicje kodowañ znaków
204 Group: Applications/Databases
206 %description charsets
207 This package contains character sets definitions needed by both client
210 %description charsets -l pl
211 Ten pakiet zawiera definicje kodowañ znaków potrzebne dla serwera i
215 Summary: MySQL additional utilities
216 Summary(pl): Dodatkowe narzêdzia do MySQL
217 Group: Applications/Databases
218 Requires: %{name}-libs = %{version}-%{release}
221 MySQL additional utilities except Perl scripts (they may be found in
222 %{name}-extras-perl package).
224 %description extras -l pl
225 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
226 pakiecie %{name}-extras-perl).
229 Summary: MySQL additional utilities written in Perl
230 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
231 Group: Applications/Databases
232 Requires: %{name}-extras = %{version}-%{release}
233 Requires: perl(DBD::mysql)
235 %description extras-perl
236 MySQL additional utilities written in Perl.
238 %description extras-perl -l pl
239 Dodatkowe narzêdzia do MySQL napisane w Perlu.
242 Summary: MySQL - Client
243 Summary(pl): MySQL - Klient
244 Summary(pt): MySQL - Cliente
245 Summary(ru): MySQL ËÌÉÅÎÔ
246 Summary(uk): MySQL Ë̦¤ÎÔ
247 Group: Applications/Databases
248 Requires: %{name}-libs = %{version}-%{release}
249 Requires: %{name}-charsets = %{version}-%{release}
250 Obsoletes: MySQL-client
253 This package contains the standard MySQL clients.
255 %description client -l fr
256 Ce package contient les clients MySQL standards.
258 %description client -l pl
259 Standardowe programy klienckie MySQL.
261 %description client -l pt_BR
262 Este pacote contém os clientes padrão para o MySQL.
264 %description client -l ru
265 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
267 %description client -l uk
268 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
271 Summary: Shared libraries for MySQL
272 Summary(pl): Biblioteki dzielone MySQL
273 Group: Applications/Databases
274 Obsoletes: libmysql10
275 Obsoletes: mysql-doc < 4.1.12
278 Shared libraries for MySQL.
280 %description libs -l pl
281 Biblioteki dzielone MySQL.
284 Summary: MySQL - Development header files and libraries
285 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
286 Summary(pt): MySQL - Medições de desempenho
287 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
288 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
289 Group: Development/Libraries
290 Requires: %{name}-libs = %{version}-%{release}
291 %{?with_ssl:Requires: openssl-devel}
293 Obsoletes: MySQL-devel
294 Obsoletes: libmysql10-devel
297 This package contains the development header files and libraries
298 necessary to develop MySQL client applications.
300 %description devel -l fr
301 Ce package contient les fichiers entetes et les librairies de
302 developpement necessaires pour developper des applications clientes
305 %description devel -l pl
306 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
309 %description devel -l pt_BR
310 Este pacote contém os arquivos de cabeçalho (header files) e
311 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
313 %description devel -l ru
314 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
315 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
317 %description devel -l uk
318 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
319 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
322 Summary: MySQL static libraries
323 Summary(pl): Biblioteki statyczne MySQL
324 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
325 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
326 Group: Development/Libraries
327 Requires: %{name}-devel = %{version}-%{release}
328 Obsoletes: MySQL-static
331 MySQL static libraries.
333 %description static -l pl
334 Biblioteki statyczne MySQL.
336 %description static -l ru
337 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
338 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
340 %description static -l uk
341 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
342 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
345 Summary: MySQL - Benchmarks
346 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
347 Summary(pt): MySQL - Medições de desempenho
348 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
349 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
350 Group: Applications/Databases
351 Requires: %{name} = %{version}-%{release}
352 Requires: %{name}-client
353 Requires: perl(DBD::mysql)
354 Obsoletes: MySQL-bench
357 This package contains MySQL benchmark scripts and data.
359 %description bench -l pl
360 Programy testuj±ce szybko¶æ serwera MySQL.
362 %description bench -l pt_BR
363 Este pacote contém medições de desempenho de scripts e dados do MySQL.
365 %description bench -l ru
366 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
369 %description bench -l uk
370 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
373 Summary: MySQL manual
374 Summary(pl): Podrêcznik u¿ytkownika MySQL
375 Group: Applications/Databases
378 This package contains manual in HTML format.
380 %description doc -l pl
381 Podrêcznik MySQL-a w formacie HTML.
384 Summary: MySQL - NDB Storage Engine Daemon
385 Summary(pl): MySQL - demon silnika przechowywania danych NDB
386 Group: Applications/Databases
387 Requires: %{name}-libs = %{version}-%{release}
390 This package contains the standard MySQL NDB Storage Engine Daemon.
392 %description ndb -l pl
393 Ten pakiet zawiera standardowego demona silnika przechowywania danych
397 Summary: MySQL - NDB Clients
398 Summary(pl): MySQL - programy klienckie NDB
399 Group: Applications/Databases
400 Requires: %{name}-libs = %{version}-%{release}
402 %description ndb-client
403 This package contains the standard MySQL NDB Clients.
405 %description ndb-client -l pl
406 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
409 Summary: MySQL - NDB Management Daemon
410 Summary(pl): MySQL - demon zarz±dzaj±cy NDB
411 Group: Applications/Databases
412 Requires: %{name}-libs = %{version}-%{release}
415 This package contains the standard MySQL NDB Management Daemon.
417 %description ndb-mgm -l pl
418 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
421 Summary: MySQL - NDB CPC Daemon
422 Summary(pl): MySQL - demon NDB CPC
423 Group: Applications/Databases
424 Requires: %{name}-libs = %{version}-%{release}
427 This package contains the standard MySQL NDB CPC Daemon.
429 %description ndb-cpc -l pl
430 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
433 %setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}}
435 %{?with_tcpd:%patch1 -p1}
439 # this is strange: mysqld functions for UDF modules are not explicitly defined,
440 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
441 # in objects compiled without -fPIC
452 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
460 # The compiler flags are as per their "official" spec ;)
461 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
462 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
464 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
465 # and therefore do not add BR on these. These are here just to satisfy
470 FIND_PROC='/bin/ps p $$PID' \
472 CHECK_PID='/bin/kill -0 $$PID' \
474 --enable-largefile=yes \
477 --enable-thread-safe-client \
478 --with%{!?with_bdb:out}-berkeley-db \
479 --with%{!?with_innodb:out}-innodb \
480 --with%{!?with_raid:out}-raid \
481 --with%{!?with_ssl:out}-openssl \
482 --with%{!?with_tcpd:out}-libwrap \
483 %{?with_big_tables:--with-big-tables} \
484 --with-comment="PLD Linux Distribution MySQL RPM" \
485 --with%{!?debug:out}-debug \
486 --with%{!?debug:out}-ndb-debug \
487 --with-embedded-server \
488 --with-extra-charsets=all \
490 --with-mysqld-user=mysql \
491 --with-named-curses-libs="-lncurses" \
492 --with-named-thread-libs="-lpthread" \
493 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
494 --with-archive-storage-engine \
501 # --with-ndb-test --with-ndb-docs
503 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
504 # (it defaults to first cluster but user may change it to whatever
507 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
510 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
512 %{__make} -C Docs mysql.info
515 rm -rf $RPM_BUILD_ROOT
516 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
517 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
518 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
521 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
526 DESTDIR=$RPM_BUILD_ROOT \
527 benchdir=%{_datadir}/sql-bench \
529 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
531 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
533 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
534 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
535 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
536 # This is template for configuration file which is created after 'service mysql init'
537 install %{SOURCE4} mysqld.conf
538 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
539 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
540 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update}
542 # remove innodb directives from mysqld.conf if mysqld is configured without
543 %if %{without innodb}
544 cp mysqld.conf mysqld.tmp
545 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
548 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
550 cp mysqld.conf mysqld.tmp
551 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
554 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
555 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
558 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
559 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
560 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
561 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
562 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
563 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
564 # remove .txt variants for .sys messages
565 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
567 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
568 sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient{,_r}.la
570 # remove known unpackaged files
571 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
573 # rename not to be so generic name
574 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
575 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
577 # not useful without -debug build
578 %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
579 # generate symbols file, so one can generate backtrace using it
580 # mysql_resolve_stack_dump -s /usr/share/mysql/mysqld.sym -n mysqld.stack.
581 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
582 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
584 # functionality in initscript / rpm
585 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
586 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
587 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
588 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
589 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
590 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
591 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
592 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
593 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
594 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
595 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
596 rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
599 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
602 rm -rf $RPM_BUILD_ROOT
605 %groupadd -g 89 mysql
606 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
609 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
610 /sbin/chkconfig --add mysql
612 if [ "$1" = 1 ]; then
613 %banner -e %{name}-4.1.x <<-EOF
614 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
615 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
620 %service mysql restart
624 if [ "$1" = "0" ]; then
625 %service -q mysql stop
626 /sbin/chkconfig --del mysql
630 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
631 if [ "$1" = "0" ]; then
637 /sbin/chkconfig --add mysql-ndb
638 if [ -f /var/lock/subsys/mysql-ndb ]; then
639 /etc/rc.d/init.d/mysql-ndb restart >&2
641 echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
645 if [ "$1" = "0" ]; then
646 if [ -f /var/lock/subsys/mysql-ndb ]; then
647 /etc/rc.d/init.d/mysql-ndb stop
649 /sbin/chkconfig --del mysql-ndb
653 /sbin/chkconfig --add mysql-ndb-mgm
654 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
655 /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
657 echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
661 if [ "$1" = "0" ]; then
662 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
663 /etc/rc.d/init.d/mysql-ndb-mgm stop
665 /sbin/chkconfig --del mysql-ndb-mgm
669 /sbin/chkconfig --add mysql-ndb-cpc
670 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
671 /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
673 echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
677 if [ "$1" = "0" ]; then
678 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
679 /etc/rc.d/init.d/mysql-ndb-cpc stop
681 /sbin/chkconfig --del mysql-ndb-cpc
684 %post libs -p /sbin/ldconfig
685 %postun libs -p /sbin/ldconfig
687 %triggerpostun -- mysql <= 4.0.20-2
688 # For clusters in /etc/mysql/clusters.conf
689 if [ -f "/etc/sysconfig/mysql" ]; then
690 . /etc/sysconfig/mysql
691 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
692 for i in "$MYSQL_DB_CLUSTERS"; do
693 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
695 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
696 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
697 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
698 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
702 %triggerpostun -- mysql <= 4.1.1
703 # For better compatibility with prevoius versions:
704 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
705 if echo "$config" | grep -q '^/'; then
706 config_file="$config"
707 elif [ -f "/etc/mysql/$config" ]; then
708 config_file=/etc/mysql/$config
710 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
711 if [ -z "$clusterdir" ]; then
712 echo >&2 "Can't find cluster dir for $config!"
713 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
716 config_file="$clusterdir/mysqld.conf"
719 if [ ! -f "$config_file" ]; then
720 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
723 echo "Adding option old-passwords to config: $config_file"
724 echo "If you want to use new, better passwords - remove it"
726 # sed magic to add 'old-passwords' to [mysqld] section
727 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
729 a; Compatibility options:
735 %banner -e %{name}-4.1.x <<-EOF
736 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
737 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
742 %defattr(644,root,root,755)
743 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
744 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
745 %attr(754,root,root) /etc/rc.d/init.d/mysql
746 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
747 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
748 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
749 %attr(755,root,root) %{_bindir}/innochecksum
750 %attr(755,root,root) %{_bindir}/myisamchk
751 %attr(755,root,root) %{_bindir}/myisamlog
752 %attr(755,root,root) %{_bindir}/myisampack
753 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
754 %attr(755,root,root) %{_bindir}/my_print_defaults
755 %attr(755,root,root) %{_sbindir}/mysqld
756 %{_mandir}/man1/mysql_fix_privilege_tables.1*
757 %{_mandir}/man1/mysqld.1*
758 %{_mandir}/man1/myisamchk.1*
759 %{_mandir}/man1/myisamlog.1*
760 %{_mandir}/man1/myisampack.1*
762 %attr(700,mysql,mysql) %{_mysqlhome}
763 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
764 %attr(751,root,root) /var/lib/mysql
765 %attr(750,mysql,mysql) %dir /var/log/mysql
766 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
767 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
769 %{_infodir}/mysql.info*
770 # This is template for configuration file which is created after 'service mysql init'
771 %{_datadir}/mysql/mysqld.conf
772 %{_datadir}/mysql/english
773 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
774 %lang(cs) %{_datadir}/mysql/czech
775 %lang(da) %{_datadir}/mysql/danish
776 %lang(de) %{_datadir}/mysql/german
777 %lang(el) %{_datadir}/mysql/greek
778 %lang(es) %{_datadir}/mysql/spanish
779 %lang(et) %{_datadir}/mysql/estonian
780 %lang(fr) %{_datadir}/mysql/french
781 %lang(hu) %{_datadir}/mysql/hungarian
782 %lang(it) %{_datadir}/mysql/italian
783 %lang(ja) %{_datadir}/mysql/japanese
784 %lang(ko) %{_datadir}/mysql/korean
785 %lang(nl) %{_datadir}/mysql/dutch
786 %lang(nb) %{_datadir}/mysql/norwegian
787 %lang(nn) %{_datadir}/mysql/norwegian-ny
788 %lang(pl) %{_datadir}/mysql/polish
789 %lang(pt) %{_datadir}/mysql/portuguese
790 %lang(ro) %{_datadir}/mysql/romanian
791 %lang(ru) %{_datadir}/mysql/russian
792 %lang(sr) %{_datadir}/mysql/serbian
793 %lang(sk) %{_datadir}/mysql/slovak
794 %lang(sv) %{_datadir}/mysql/swedish
795 %lang(uk) %{_datadir}/mysql/ukrainian
798 %defattr(644,root,root,755)
799 %dir %{_datadir}/mysql
800 %{_datadir}/mysql/charsets
803 %defattr(644,root,root,755)
804 %attr(755,root,root) %{_bindir}/msql2mysql
805 %attr(755,root,root) %{_bindir}/myisam_ftdump
806 %attr(755,root,root) %{_bindir}/mysql_secure_installation
807 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
808 %attr(755,root,root) %{_bindir}/mysqlcheck
809 %attr(755,root,root) %{_bindir}/perror
810 %attr(755,root,root) %{_bindir}/replace
811 %attr(755,root,root) %{_bindir}/resolveip
812 %{_mandir}/man1/msql2mysql.1*
813 %{_mandir}/man1/mysqlcheck.1*
814 %{_mandir}/man1/perror.1*
815 %{_mandir}/man1/replace.1*
818 %defattr(644,root,root,755)
819 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
820 %attr(755,root,root) %{_bindir}/mysqldumpslow
821 %attr(755,root,root) %{_bindir}/mysqlhotcopy
822 %attr(755,root,root) %{_bindir}/mysql_setpermission
823 %attr(755,root,root) %{_bindir}/mysql_zap
824 %attr(755,root,root) %{_bindir}/mysql_find_rows
825 %attr(755,root,root) %{_bindir}/mysqlaccess
826 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
827 %attr(755,root,root) %{_bindir}/mysql_explain_log
828 %attr(755,root,root) %{_bindir}/mysql_tableinfo
829 %{_mandir}/man1/mysql_zap.1*
830 %{_mandir}/man1/mysqlaccess.1*
831 %{_mandir}/man1/mysqlhotcopy.1*
834 %defattr(644,root,root,755)
835 %attr(755,root,root) %{_bindir}/mysql
836 %attr(755,root,root) %{_bindir}/mysqlbug
837 %attr(755,root,root) %{_bindir}/mysqldump
838 %attr(755,root,root) %{_bindir}/mysqlimport
839 %attr(755,root,root) %{_sbindir}/mysqlmanager*
840 %attr(755,root,root) %{_bindir}/mysqlshow
841 %attr(755,root,root) %{_bindir}/mysqlbinlog
842 %attr(755,root,root) %{_bindir}/mysqladmin
843 %attr(755,root,root) %{_bindir}/mysqltest*
844 %{_mandir}/man1/mysql.1*
845 %{_mandir}/man1/mysqladmin.1*
846 %{_mandir}/man1/mysqldump.1*
847 %{_mandir}/man1/mysqlshow.1*
848 %{_mandir}/man1/mysqlmanager.1*
849 %{_mandir}/man1/mysqlbinlog.1*
850 %{_mandir}/man1/mysqlimport.1*
853 %defattr(644,root,root,755)
854 %doc EXCEPTIONS-CLIENT
855 %attr(755,root,root) %{_libdir}/lib*.so.*.*
856 %attr(751,root,root) %dir %{_sysconfdir}/mysql
857 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
860 %defattr(644,root,root,755)
861 %attr(755,root,root) %{_bindir}/mysql_config
862 %attr(755,root,root) %{_libdir}/lib*.so
863 %attr(755,root,root) %{_bindir}/*comp_err
864 %{?debug:%attr(755,root,root) %{_bindir}/*resolve_stack_dump}
865 %{?debug:%{_datadir}/mysql/mysqld.sym}
867 %{_libdir}/lib*[!tr].a
869 %{_mandir}/man1/mysql_config.1*
872 %defattr(644,root,root,755)
873 %{_libdir}/lib*[tr].a
876 %defattr(644,root,root,755)
877 %attr(755,root,root) %{_bindir}/mysqltest
878 %attr(755,root,root) %{_bindir}/mysql_client_test
879 %dir %{_datadir}/sql-bench
880 %{_datadir}/sql-bench/[CDRl]*
881 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
883 %{_datadir}/mysql/mi_test_all.res
884 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
887 #%defattr(644,root,root,755)
888 #%doc Docs/manual.html Docs/manual_toc.html
891 %defattr(644,root,root,755)
892 %attr(755,root,root) %{_sbindir}/ndbd
893 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
894 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
897 %defattr(644,root,root,755)
898 %attr(755,root,root) %{_bindir}/ndb_*
901 %defattr(644,root,root,755)
902 %attr(755,root,root) %{_sbindir}/ndb_mgmd
903 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
904 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
907 %defattr(644,root,root,755)
908 %attr(755,root,root) %{_sbindir}/ndb_cpcd
909 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
910 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc