2 # - C(XX)FLAGS for innodb subdirs are overriden by ./configure!
3 # - http://bugs.mysql.com/bug.php?id=16470
6 %bcond_with bdb # Berkeley DB support
7 %bcond_without innodb # Without InnoDB support
8 %bcond_without raid # Without raid
9 %bcond_without ssl # Without OpenSSL
10 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
11 %bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
13 %include /usr/lib/rpm/macros.perl
14 #define _snap 20060111
15 Summary: MySQL: a very fast and reliable SQL database engine
16 Summary(de): MySQL: ist eine SQL-Datenbank
17 Summary(fr): MySQL: un serveur SQL rapide et fiable
18 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
19 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
20 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
21 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
22 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
26 License: GPL + MySQL FLOSS Exception
27 Group: Applications/Databases
28 Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
29 # Source0-md5: 6b07546389f75c52611adb7af38c3667
30 #Source0: http://downloads.mysql.com/snapshots/mysql-5.0/%{name}-%{version}-nightly-%{_snap}.tar.gz
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 Source13: %{name}-client.conf
44 Patch0: %{name}-libs.patch
46 Patch2: %{name}-c++.patch
47 Patch3: %{name}-info.patch
48 Patch4: %{name}-sql-cxx-pic.patch
49 Patch5: %{name}-noproc.patch
50 Patch6: %{name}-fix_privilege_tables.patch
51 Patch7: %{name}-align.patch
52 Patch8: %{name}-client-config.patch
53 Patch9: %{name}-build.patch
54 Patch10: %{name}-alpha.patch
55 Patch11: %{name}-ndb-ldflags.patch
56 Patch12: %{name}-bug-20153.patch
57 Patch13: %{name}-test_bug17667.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.268
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)'
99 # CFLAGS for innodb are altered
100 %undefine configure_cache
103 MySQL is a true multi-user, multi-threaded SQL (Structured Query
104 Language) database server. SQL is the most popular database language
105 in the world. MySQL is a client/server implementation that consists of
106 a server daemon mysqld and many different client programs/libraries.
108 The main goals of MySQL are speed, robustness and easy to use. MySQL
109 was originally developed because we at Tcx needed a SQL server that
110 could handle very big databases with magnitude higher speed than what
111 any database vendor could offer to us. We have now been using MySQL
112 since 1996 in a environment with more than 40 databases, 10,000
113 tables, of which more than 500 have more than 7 million rows. This is
114 about 50G of mission critical data.
116 The base upon which MySQL is built is a set of routines that have been
117 used in a highly demanding production environment for many years.
118 While MySQL is still in development, it already offers a rich and
119 highly useful function set.
122 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
123 multi-taches. Le langage SQL est le langage de bases de donnees le
124 plus populaire au monde. MySQL est une implementation client/serveur
125 qui consiste en un serveur (mysqld) et differents
126 programmes/bibliotheques clientes.
128 Les objectifs principaux de MySQL sont: vitesse, robustesse et
129 facilite d'utilisation. MySQL fut originalement developpe parce que
130 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
131 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
132 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
133 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
134 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
135 millions de lignes. Ceci represente environ 50G de donnees critiques.
137 A la base de la conception de MySQL, on retrouve une serie de routines
138 qui ont ete utilisees dans un environnement de production pendant
139 plusieurs annees. Meme si MySQL est encore en developpement, il offre
140 deja une riche et utile serie de fonctions.
143 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
144 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
145 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
146 mysqld i wielu ró¿nych programów i bibliotek klienckich.
148 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
149 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
150 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
151 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
152 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
153 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
154 50GB krytycznych danych.
156 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
157 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
158 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
159 i u¿yteczny zbiór funkcji.
162 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
163 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
164 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
165 einem Primärschlüssel versehen werden. Es ist aber keine Definition
166 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
167 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
168 Daten verantwortlich. Allein durch die Nutzung externer
169 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
170 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
172 %description -l pt_BR
173 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
174 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
175 dados no mundo. O MySQL é uma implementação cliente/servidor que
176 consiste de um servidor chamado mysqld e diversos
177 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
178 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
179 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
180 pudesse lidar com grandes bases de dados e com uma velocidade muito
181 maior do que a que qualquer vendedor podia nos oferecer. Estamos
182 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
183 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
184 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
185 A base da construção do MySQL é uma série de rotinas que foram usadas
186 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
187 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
188 funções muito ricas e úteis. Veja a documentação para maiores
192 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
193 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
194 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
198 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
199 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
200 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
204 Summary: MySQL - character sets definitions
205 Summary(pl): MySQL - definicje kodowañ znaków
206 Group: Applications/Databases
208 %description charsets
209 This package contains character sets definitions needed by both client
212 %description charsets -l pl
213 Ten pakiet zawiera definicje kodowañ znaków potrzebne dla serwera i
217 Summary: MySQL additional utilities
218 Summary(pl): Dodatkowe narzêdzia do MySQL
219 Group: Applications/Databases
220 Requires: %{name}-libs = %{version}-%{release}
223 MySQL additional utilities except Perl scripts (they may be found in
224 %{name}-extras-perl package).
226 %description extras -l pl
227 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
228 pakiecie %{name}-extras-perl).
231 Summary: MySQL additional utilities written in Perl
232 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
233 Group: Applications/Databases
234 Requires: %{name}-extras = %{version}-%{release}
235 Requires: perl(DBD::mysql)
237 %description extras-perl
238 MySQL additional utilities written in Perl.
240 %description extras-perl -l pl
241 Dodatkowe narzêdzia do MySQL napisane w Perlu.
244 Summary: MySQL - Client
245 Summary(pl): MySQL - Klient
246 Summary(pt): MySQL - Cliente
247 Summary(ru): MySQL ËÌÉÅÎÔ
248 Summary(uk): MySQL Ë̦¤ÎÔ
249 Group: Applications/Databases
250 Requires: %{name}-charsets = %{version}-%{release}
251 Requires: %{name}-libs = %{version}-%{release}
252 Obsoletes: MySQL-client
255 This package contains the standard MySQL clients.
257 %description client -l fr
258 Ce package contient les clients MySQL standards.
260 %description client -l pl
261 Standardowe programy klienckie MySQL.
263 %description client -l pt_BR
264 Este pacote contém os clientes padrão para o MySQL.
266 %description client -l ru
267 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
269 %description client -l uk
270 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
273 Summary: Shared libraries for MySQL
274 Summary(pl): Biblioteki dzielone MySQL
276 Obsoletes: libmysql10
277 Obsoletes: mysql-doc < 4.1.12
280 Shared libraries for MySQL.
282 %description libs -l pl
283 Biblioteki dzielone MySQL.
286 Summary: MySQL - Development header files and libraries
287 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
288 Summary(pt): MySQL - Medições de desempenho
289 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
290 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
291 Group: Development/Libraries
292 Requires: %{name}-libs = %{version}-%{release}
293 %{?with_ssl:Requires: openssl-devel}
295 Obsoletes: MySQL-devel
296 Obsoletes: libmysql10-devel
299 This package contains the development header files and libraries
300 necessary to develop MySQL client applications.
302 %description devel -l fr
303 Ce package contient les fichiers entetes et les librairies de
304 developpement necessaires pour developper des applications clientes
307 %description devel -l pl
308 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
311 %description devel -l pt_BR
312 Este pacote contém os arquivos de cabeçalho (header files) e
313 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
315 %description devel -l ru
316 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
317 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
319 %description devel -l uk
320 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
321 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
324 Summary: MySQL static libraries
325 Summary(pl): Biblioteki statyczne MySQL
326 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
327 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
328 Group: Development/Libraries
329 Requires: %{name}-devel = %{version}-%{release}
330 Obsoletes: MySQL-static
333 MySQL static libraries.
335 %description static -l pl
336 Biblioteki statyczne MySQL.
338 %description static -l ru
339 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
340 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
342 %description static -l uk
343 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
344 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
347 Summary: MySQL - Benchmarks
348 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
349 Summary(pt): MySQL - Medições de desempenho
350 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
351 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
352 Group: Applications/Databases
353 Requires: %{name} = %{version}-%{release}
354 Requires: %{name}-client
355 Requires: perl(DBD::mysql)
356 Obsoletes: MySQL-bench
359 This package contains MySQL benchmark scripts and data.
361 %description bench -l pl
362 Programy testuj±ce szybko¶æ serwera MySQL.
364 %description bench -l pt_BR
365 Este pacote contém medições de desempenho de scripts e dados do MySQL.
367 %description bench -l ru
368 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
371 %description bench -l uk
372 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
375 Summary: MySQL manual
376 Summary(pl): Podrêcznik u¿ytkownika MySQL
377 Group: Applications/Databases
380 This package contains manual in HTML format.
382 %description doc -l pl
383 Podrêcznik MySQL-a w formacie HTML.
386 Summary: MySQL - NDB Storage Engine Daemon
387 Summary(pl): MySQL - demon silnika przechowywania danych NDB
388 Group: Applications/Databases
389 Requires: %{name}-libs = %{version}-%{release}
392 This package contains the standard MySQL NDB Storage Engine Daemon.
394 %description ndb -l pl
395 Ten pakiet zawiera standardowego demona silnika przechowywania danych
399 Summary: MySQL - NDB Clients
400 Summary(pl): MySQL - programy klienckie NDB
401 Group: Applications/Databases
402 Requires: %{name}-libs = %{version}-%{release}
404 %description ndb-client
405 This package contains the standard MySQL NDB Clients.
407 %description ndb-client -l pl
408 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
411 Summary: MySQL - NDB Management Daemon
412 Summary(pl): MySQL - demon zarz±dzaj±cy NDB
413 Group: Applications/Databases
414 Requires: %{name}-libs = %{version}-%{release}
417 This package contains the standard MySQL NDB Management Daemon.
419 %description ndb-mgm -l pl
420 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
423 Summary: MySQL - NDB CPC Daemon
424 Summary(pl): MySQL - demon NDB CPC
425 Group: Applications/Databases
426 Requires: %{name}-libs = %{version}-%{release}
429 This package contains the standard MySQL NDB CPC Daemon.
431 %description ndb-cpc -l pl
432 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
435 %setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}}
441 # this is strange: mysqld functions for UDF modules are not explicitly defined,
442 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
443 # in objects compiled without -fPIC
463 # The compiler flags are as per their "official" spec ;)
464 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
465 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
467 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
468 # and therefore do not add BR on these. These are here just to satisfy
473 FIND_PROC='/bin/ps p $$PID' \
475 CHECK_PID='/bin/kill -0 $$PID' \
477 --enable-largefile=yes \
480 --enable-thread-safe-client \
481 --with%{!?with_bdb:out}-berkeley-db \
482 --with%{!?with_innodb:out}-innodb \
483 --with%{!?with_raid:out}-raid \
484 --with%{!?with_ssl:out}-openssl \
485 --with%{!?with_tcpd:out}-libwrap \
486 %{?with_big_tables:--with-big-tables} \
487 --with-comment="PLD Linux Distribution MySQL RPM" \
488 --with%{!?debug:out}-debug \
489 --with%{!?debug:out}-ndb-debug \
490 --with-embedded-server \
491 --with-extra-charsets=all \
493 --with-mysqld-user=mysql \
494 --with-named-curses-libs="-lncurses" \
495 --with-named-thread-libs="-lpthread" \
496 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
497 --with-archive-storage-engine \
504 # --with-ndb-test --with-ndb-docs
506 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
507 # (it defaults to first cluster but user may change it to whatever
510 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
513 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
515 %{__make} -C Docs mysql.info
518 rm -rf $RPM_BUILD_ROOT
519 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
520 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
521 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
524 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
529 DESTDIR=$RPM_BUILD_ROOT \
530 benchdir=%{_datadir}/sql-bench \
532 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
534 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
536 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
537 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
538 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
539 # This is template for configuration file which is created after 'service mysql init'
540 install %{SOURCE4} mysqld.conf
541 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
542 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
543 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update}
545 # remove innodb directives from mysqld.conf if mysqld is configured without
546 %if %{without innodb}
547 cp mysqld.conf mysqld.tmp
548 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
551 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
553 cp mysqld.conf mysqld.tmp
554 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
557 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
558 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
561 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
562 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
563 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
564 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
565 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
566 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
567 # remove .txt variants for .sys messages
568 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
570 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
571 sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config}
573 # remove known unpackaged files
574 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
576 # rename not to be so generic name
577 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
578 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
580 # not useful without -debug build
581 %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
582 # generate symbols file, so one can generate backtrace using it
583 # mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack.
584 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
585 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
587 # functionality in initscript / rpm
588 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
589 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
590 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
591 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
592 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
593 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
594 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
595 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
596 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
597 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt
598 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
599 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
600 rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
601 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
604 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
607 rm -rf $RPM_BUILD_ROOT
610 %groupadd -g 89 mysql
611 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
614 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
615 /sbin/chkconfig --add mysql
617 if [ "$1" = 1 ]; then
618 %banner -e %{name}-4.1.x <<-EOF
619 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
620 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
625 %service mysql restart
628 if [ "$1" = "0" ]; then
629 %service -q mysql stop
630 /sbin/chkconfig --del mysql
634 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
635 if [ "$1" = "0" ]; then
641 /sbin/chkconfig --add mysql-ndb
642 %service mysql-ndb restart "mysql NDB engine"
645 if [ "$1" = "0" ]; then
646 %service mysql-ndb stop
647 /sbin/chkconfig --del mysql-ndb
651 /sbin/chkconfig --add mysql-ndb-mgm
652 %service mysql-ndb-mgm restart "mysql NDB management node"
655 if [ "$1" = "0" ]; then
656 %service mysql-ndb-mgm stop
657 /sbin/chkconfig --del mysql-ndb-mgm
661 /sbin/chkconfig --add mysql-ndb-cpc
662 %service mysql-ndb-cpc restart "mysql NDB CPC"
665 if [ "$1" = "0" ]; then
666 %service mysql-ndb-cpc stop
667 /sbin/chkconfig --del mysql-ndb-cpc
670 %post libs -p /sbin/ldconfig
671 %postun libs -p /sbin/ldconfig
673 %triggerpostun -- mysql <= 4.0.20-2
674 # For clusters in /etc/mysql/clusters.conf
675 if [ -f "/etc/sysconfig/mysql" ]; then
676 . /etc/sysconfig/mysql
677 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
678 for i in "$MYSQL_DB_CLUSTERS"; do
679 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
681 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
682 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
683 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
684 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
688 %triggerpostun -- mysql <= 4.1.1
689 # For better compatibility with prevoius versions:
690 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
691 if echo "$config" | grep -q '^/'; then
692 config_file="$config"
693 elif [ -f "/etc/mysql/$config" ]; then
694 config_file=/etc/mysql/$config
696 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
697 if [ -z "$clusterdir" ]; then
698 echo >&2 "Can't find cluster dir for $config!"
699 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
702 config_file="$clusterdir/mysqld.conf"
705 if [ ! -f "$config_file" ]; then
706 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
709 echo "Adding option old-passwords to config: $config_file"
710 echo "If you want to use new, better passwords - remove it"
712 # sed magic to add 'old-passwords' to [mysqld] section
713 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
715 a; Compatibility options:
721 %banner -e %{name}-4.1.x <<-EOF
722 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
723 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
728 %defattr(644,root,root,755)
729 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
730 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
731 %attr(754,root,root) /etc/rc.d/init.d/mysql
732 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
733 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
734 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
735 %attr(755,root,root) %{_bindir}/innochecksum
736 %attr(755,root,root) %{_bindir}/myisamchk
737 %attr(755,root,root) %{_bindir}/myisamlog
738 %attr(755,root,root) %{_bindir}/myisampack
739 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
740 %attr(755,root,root) %{_bindir}/my_print_defaults
741 %attr(755,root,root) %{_bindir}/mysql_upgrade
742 %attr(755,root,root) %{_bindir}/mysql_upgrade_shell
743 %attr(755,root,root) %{_sbindir}/mysqld
744 %{_mandir}/man1/mysql_fix_privilege_tables.1*
745 %{_mandir}/man1/mysqld.1*
746 %{_mandir}/man1/myisamchk.1*
747 %{_mandir}/man1/myisamlog.1*
748 %{_mandir}/man1/myisampack.1*
749 %{_mandir}/man1/mysql_upgrade.1*
751 %attr(700,mysql,mysql) %{_mysqlhome}
752 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
753 %attr(751,root,root) /var/lib/mysql
754 %attr(750,mysql,mysql) %dir /var/log/mysql
755 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
756 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
758 %{_infodir}/mysql.info*
759 # This is template for configuration file which is created after 'service mysql init'
760 %{_datadir}/mysql/mysqld.conf
761 %{_datadir}/mysql/english
762 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
763 %lang(cs) %{_datadir}/mysql/czech
764 %lang(da) %{_datadir}/mysql/danish
765 %lang(de) %{_datadir}/mysql/german
766 %lang(el) %{_datadir}/mysql/greek
767 %lang(es) %{_datadir}/mysql/spanish
768 %lang(et) %{_datadir}/mysql/estonian
769 %lang(fr) %{_datadir}/mysql/french
770 %lang(hu) %{_datadir}/mysql/hungarian
771 %lang(it) %{_datadir}/mysql/italian
772 %lang(ja) %{_datadir}/mysql/japanese
773 %lang(ko) %{_datadir}/mysql/korean
774 %lang(nl) %{_datadir}/mysql/dutch
775 %lang(nb) %{_datadir}/mysql/norwegian
776 %lang(nn) %{_datadir}/mysql/norwegian-ny
777 %lang(pl) %{_datadir}/mysql/polish
778 %lang(pt) %{_datadir}/mysql/portuguese
779 %lang(ro) %{_datadir}/mysql/romanian
780 %lang(ru) %{_datadir}/mysql/russian
781 %lang(sr) %{_datadir}/mysql/serbian
782 %lang(sk) %{_datadir}/mysql/slovak
783 %lang(sv) %{_datadir}/mysql/swedish
784 %lang(uk) %{_datadir}/mysql/ukrainian
787 %defattr(644,root,root,755)
788 %dir %{_datadir}/mysql
789 %{_datadir}/mysql/charsets
792 %defattr(644,root,root,755)
793 %attr(755,root,root) %{_bindir}/msql2mysql
794 %attr(755,root,root) %{_bindir}/myisam_ftdump
795 %attr(755,root,root) %{_bindir}/mysql_secure_installation
796 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
797 %attr(755,root,root) %{_bindir}/mysqlcheck
798 %attr(755,root,root) %{_bindir}/perror
799 %attr(755,root,root) %{_bindir}/replace
800 %attr(755,root,root) %{_bindir}/resolveip
801 %{_mandir}/man1/msql2mysql.1*
802 %{_mandir}/man1/myisam_ftdump.1*
803 %{_mandir}/man1/mysqlcheck.1*
804 %{_mandir}/man1/perror.1*
805 %{_mandir}/man1/replace.1*
808 %defattr(644,root,root,755)
809 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
810 %attr(755,root,root) %{_bindir}/mysql_explain_log
811 %attr(755,root,root) %{_bindir}/mysql_find_rows
812 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
813 %attr(755,root,root) %{_bindir}/mysql_setpermission
814 %attr(755,root,root) %{_bindir}/mysql_tableinfo
815 %attr(755,root,root) %{_bindir}/mysql_zap
816 %attr(755,root,root) %{_bindir}/mysqlaccess
817 %attr(755,root,root) %{_bindir}/mysqldumpslow
818 %attr(755,root,root) %{_bindir}/mysqlhotcopy
819 %{_mandir}/man1/mysql_explain_log.1*
820 %{_mandir}/man1/mysql_zap.1*
821 %{_mandir}/man1/mysqlaccess.1*
822 %{_mandir}/man1/mysqlhotcopy.1*
825 %defattr(644,root,root,755)
826 %attr(755,root,root) %{_bindir}/mysql
827 %attr(755,root,root) %{_bindir}/mysqlbug
828 %attr(755,root,root) %{_bindir}/mysqldump
829 %attr(755,root,root) %{_bindir}/mysqlimport
830 %attr(755,root,root) %{_sbindir}/mysqlmanager*
831 %attr(755,root,root) %{_bindir}/mysqlshow
832 %attr(755,root,root) %{_bindir}/mysqlbinlog
833 %attr(755,root,root) %{_bindir}/mysqladmin
834 %attr(755,root,root) %{_bindir}/mysqltest*
835 %{_mandir}/man1/mysql.1*
836 %{_mandir}/man1/mysqladmin.1*
837 %{_mandir}/man1/mysqldump.1*
838 %{_mandir}/man1/mysqlshow.1*
839 %{_mandir}/man1/mysqlmanager.1*
840 %{_mandir}/man1/mysqlbinlog.1*
841 %{_mandir}/man1/mysqlimport.1*
844 %defattr(644,root,root,755)
845 %doc EXCEPTIONS-CLIENT
846 %attr(755,root,root) %{_libdir}/lib*.so.*.*
847 %attr(751,root,root) %dir %{_sysconfdir}/mysql
848 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
851 %defattr(644,root,root,755)
852 %attr(755,root,root) %{_bindir}/mysql_config
853 %attr(755,root,root) %{_libdir}/lib*.so
854 %attr(755,root,root) %{_bindir}/*comp_err
855 %{?debug:%attr(755,root,root) %{_bindir}/*resolve_stack_dump}
856 %{?debug:%{_datadir}/mysql/mysqld.sym}
858 %{_libdir}/lib*[!tr].a
860 %{_mandir}/man1/mysql_config.1*
863 %defattr(644,root,root,755)
864 %{_libdir}/lib*[tr].a
867 %defattr(644,root,root,755)
868 %attr(755,root,root) %{_bindir}/mysqltest
869 %attr(755,root,root) %{_bindir}/mysql_client_test
870 %dir %{_datadir}/sql-bench
871 %{_datadir}/sql-bench/[CDRl]*
872 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
874 %{_datadir}/mysql/mi_test_all.res
875 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
878 #%defattr(644,root,root,755)
879 #%doc Docs/manual.html Docs/manual_toc.html
882 %defattr(644,root,root,755)
883 %attr(755,root,root) %{_sbindir}/ndbd
884 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
885 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
888 %defattr(644,root,root,755)
889 %attr(755,root,root) %{_bindir}/ndb_*
890 %attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
893 %defattr(644,root,root,755)
894 %attr(755,root,root) %{_sbindir}/ndb_mgmd
895 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
896 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
899 %defattr(644,root,root,755)
900 %attr(755,root,root) %{_sbindir}/ndb_cpcd
901 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
902 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc