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 # - package man1/mysqlman.1, and make programs without manpage '.so mysqlman'
6 # - generate and package man pages from svn
9 %bcond_with bdb # Berkeley DB support
10 %bcond_without innodb # Without InnoDB support
11 %bcond_without isam # Without ISAM table format (used in mysql 3.22)
12 %bcond_without raid # Without raid
13 %bcond_without ssl # Without OpenSSL
14 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
15 %bcond_with big_tables # enable '--with-big-tables', some performance loss on 32bit arch, but can do >= 4GB database tables.
18 %include /usr/lib/rpm/macros.perl
19 Summary: MySQL: a very fast and reliable SQL database engine
20 Summary(de): MySQL: ist eine SQL-Datenbank
21 Summary(fr): MySQL: un serveur SQL rapide et fiable
22 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
23 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
24 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
25 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
26 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
30 License: GPL + MySQL FLOSS Exception
31 Group: Applications/Databases
32 # Newer releases from bk only, see how to fetch mysql from bk repo tag:
33 # http://dev.mysql.com/doc/refman/4.1/en/installing-source-tree.html .
34 # Manual pages are at http://svn.mysql.com/svnpublic/mysqldoc/refman-4.1/ .
35 Source0: http://download.snake.de/dist/%{name}-%{version}.tar.gz
36 # Source0-md5: 8a83f3024667f2b83e394107d4ef3269
37 Source100: %{name}-4.1.22-man.tar.bz2
38 # Source100-md5: 6d79b8bdbf65feb68a84c1e350675473
40 Source2: %{name}.sysconfig
41 Source3: %{name}.logrotate
42 Source4: %{name}d.conf
43 Source5: %{name}-clusters.conf
44 Source6: %{name}.monitrc
45 Source7: %{name}-ndb.init
46 Source8: %{name}-ndb.sysconfig
47 Source9: %{name}-ndb-mgm.init
48 Source10: %{name}-ndb-mgm.sysconfig
49 Source11: %{name}-ndb-cpc.init
50 Source12: %{name}-ndb-cpc.sysconfig
51 Source13: %{name}-client.conf
52 Patch0: %{name}-libs.patch
53 Patch1: %{name}-libwrap.patch
54 Patch2: %{name}-c++.patch
55 Patch3: %{name}-info.patch
56 Patch4: %{name}-sql-cxx-pic.patch
57 Patch5: %{name}-noproc.patch
58 Patch6: %{name}-fix_privilege_tables.patch
59 Patch7: %{name}-align.patch
60 Patch8: %{name}-client-config.patch
61 Patch9: %{name}-alpha.patch
62 URL: http://www.mysql.com/
63 #BuildRequires: ORBit-devel
64 BuildRequires: autoconf
65 BuildRequires: automake
66 %{?with_bdb:BuildRequires: db3-devel}
67 BuildRequires: libstdc++-devel >= 5:3.0
68 BuildRequires: libtool
69 %{?with_tcpd:BuildRequires: libwrap-devel}
70 BuildRequires: ncurses-devel >= 4.2
71 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
72 BuildRequires: perl-DBI
73 BuildRequires: perl-devel >= 1:5.6.1
74 BuildRequires: readline-devel >= 4.2
75 BuildRequires: rpm-perlprov >= 4.1-13
76 BuildRequires: rpmbuild(macros) >= 1.228
77 BuildRequires: texinfo
78 BuildRequires: zlib-devel
79 Requires(post,preun): /sbin/chkconfig
80 Requires(postun): /usr/sbin/groupdel
81 Requires(postun): /usr/sbin/userdel
82 Requires(pre): /bin/id
83 Requires(pre): /usr/bin/getgid
84 Requires(pre): /usr/sbin/groupadd
85 Requires(pre): /usr/sbin/useradd
86 Requires(triggerpostun): sed >= 4.0
87 Requires: /usr/bin/setsid
88 Requires: rc-scripts >= 0.2.0
89 Provides: MySQL-server
90 Provides: group(mysql)
94 Obsoletes: mysql-server
95 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 %define _libexecdir %{_sbindir}
98 %define _localstatedir /var/lib/mysql
99 %define _mysqlhome /home/services/mysql
101 %define _noautoreqdep 'perl(DBD::mysql)'
103 # innodb confcache has different CFLAGS
104 %undefine configure_cache
107 MySQL is a true multi-user, multi-threaded SQL (Structured Query
108 Language) database server. SQL is the most popular database language
109 in the world. MySQL is a client/server implementation that consists of
110 a server daemon mysqld and many different client programs/libraries.
112 The main goals of MySQL are speed, robustness and easy to use. MySQL
113 was originally developed because we at Tcx needed a SQL server that
114 could handle very big databases with magnitude higher speed than what
115 any database vendor could offer to us. We have now been using MySQL
116 since 1996 in a environment with more than 40 databases, 10,000
117 tables, of which more than 500 have more than 7 million rows. This is
118 about 50G of mission critical data.
120 The base upon which MySQL is built is a set of routines that have been
121 used in a highly demanding production environment for many years.
122 While MySQL is still in development, it already offers a rich and
123 highly useful function set.
126 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
127 multi-taches. Le langage SQL est le langage de bases de donnees le
128 plus populaire au monde. MySQL est une implementation client/serveur
129 qui consiste en un serveur (mysqld) et differents
130 programmes/bibliotheques clientes.
132 Les objectifs principaux de MySQL sont: vitesse, robustesse et
133 facilite d'utilisation. MySQL fut originalement developpe parce que
134 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
135 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
136 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
137 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
138 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
139 millions de lignes. Ceci represente environ 50G de donnees critiques.
141 A la base de la conception de MySQL, on retrouve une serie de routines
142 qui ont ete utilisees dans un environnement de production pendant
143 plusieurs annees. Meme si MySQL est encore en developpement, il offre
144 deja une riche et utile serie de fonctions.
147 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
148 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
149 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
150 mysqld i wielu ró¿nych programów i bibliotek klienckich.
152 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
153 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
154 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
155 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
156 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
157 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
158 50GB krytycznych danych.
160 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
161 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
162 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
163 i u¿yteczny zbiór funkcji.
166 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
167 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
168 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
169 einem Primärschlüssel versehen werden. Es ist aber keine Definition
170 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
171 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
172 Daten verantwortlich. Allein durch die Nutzung externer
173 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
174 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
176 %description -l pt_BR
177 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
178 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
179 dados no mundo. O MySQL é uma implementação cliente/servidor que
180 consiste de um servidor chamado mysqld e diversos
181 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
182 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
183 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
184 pudesse lidar com grandes bases de dados e com uma velocidade muito
185 maior do que a que qualquer vendedor podia nos oferecer. Estamos
186 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
187 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
188 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
189 A base da construção do MySQL é uma série de rotinas que foram usadas
190 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
191 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
192 funções muito ricas e úteis. Veja a documentação para maiores
196 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
197 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
198 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
202 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
203 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
204 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
208 Summary: MySQL additional utilities
209 Summary(pl): Dodatkowe narzêdzia do MySQL
210 Group: Applications/Databases
211 Requires: %{name}-libs = %{version}-%{release}
214 MySQL additional utilities except Perl scripts (they may be found in
215 %{name}-extras-perl package).
217 %description extras -l pl
218 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
219 pakiecie %{name}-extras-perl).
222 Summary: MySQL additional utilities written in Perl
223 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
224 Group: Applications/Databases
225 Requires: %{name}-extras = %{version}-%{release}
226 Requires: perl(DBD::mysql)
228 %description extras-perl
229 MySQL additional utilities written in Perl.
231 %description extras-perl -l pl
232 Dodatkowe narzêdzia do MySQL napisane w Perlu.
235 Summary: MySQL - Client
236 Summary(pl): MySQL - Klient
237 Summary(pt): MySQL - Cliente
238 Summary(ru): MySQL ËÌÉÅÎÔ
239 Summary(uk): MySQL Ë̦¤ÎÔ
240 Group: Applications/Databases
241 Requires: %{name}-libs = %{version}-%{release}
242 Obsoletes: MySQL-client
245 This package contains the standard MySQL clients.
247 %description client -l fr
248 Ce package contient les clients MySQL standards.
250 %description client -l pl
251 Standardowe programy klienckie MySQL.
253 %description client -l pt_BR
254 Este pacote contém os clientes padrão para o MySQL.
256 %description client -l ru
257 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
259 %description client -l uk
260 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
263 Summary: Shared libraries for MySQL
264 Summary(pl): Biblioteki dzielone MySQL
265 Group: Applications/Databases
266 Obsoletes: libmysql10
267 Obsoletes: mysql-doc < 4.1.12
270 Shared libraries for MySQL.
272 %description libs -l pl
273 Biblioteki dzielone MySQL.
276 Summary: MySQL - Development header files and libraries
277 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
278 Summary(pt): MySQL - Medições de desempenho
279 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
280 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
281 Group: Development/Libraries
282 Requires: %{name}-libs = %{version}-%{release}
283 %{?with_ssl:Requires: openssl-devel}
285 Obsoletes: MySQL-devel
286 Obsoletes: libmysql10-devel
289 This package contains the development header files and libraries
290 necessary to develop MySQL client applications.
292 %description devel -l fr
293 Ce package contient les fichiers entetes et les librairies de
294 developpement necessaires pour developper des applications clientes
297 %description devel -l pl
298 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
301 %description devel -l pt_BR
302 Este pacote contém os arquivos de cabeçalho (header files) e
303 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
305 %description devel -l ru
306 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
307 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
309 %description devel -l uk
310 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
311 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
314 Summary: MySQL static libraries
315 Summary(pl): Biblioteki statyczne MySQL
316 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
317 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
318 Group: Development/Libraries
319 Requires: %{name}-devel = %{version}-%{release}
320 Obsoletes: MySQL-static
323 MySQL static libraries.
325 %description static -l pl
326 Biblioteki statyczne MySQL.
328 %description static -l ru
329 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
330 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
332 %description static -l uk
333 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
334 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
337 Summary: MySQL - Benchmarks
338 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
339 Summary(pt): MySQL - Medições de desempenho
340 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
341 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
342 Group: Applications/Databases
343 Requires: %{name} = %{version}-%{release}
344 Requires: %{name}-client
345 Requires: perl(DBD::mysql)
346 Obsoletes: MySQL-bench
349 This package contains MySQL benchmark scripts and data.
351 %description bench -l pl
352 Programy testuj±ce szybko¶æ serwera MySQL.
354 %description bench -l pt_BR
355 Este pacote contém medições de desempenho de scripts e dados do MySQL.
357 %description bench -l ru
358 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
361 %description bench -l uk
362 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
365 Summary: MySQL manual
366 Summary(pl): Podrêcznik u¿ytkownika MySQL
367 Group: Applications/Databases
370 This package contains manual in HTML format.
372 %description doc -l pl
373 Podrêcznik MySQL-a w formacie HTML.
376 Summary: MySQL - NDB Storage Engine Daemon
377 Summary(pl): MySQL - demon silnika przechowywania danych NDB
378 Group: Applications/Databases
379 Requires: %{name}-libs = %{version}-%{release}
382 This package contains the standard MySQL NDB Storage Engine Daemon.
384 %description ndb -l pl
385 Ten pakiet zawiera standardowego demona silnika przechowywania danych
389 Summary: MySQL - NDB Clients
390 Summary(pl): MySQL - programy klienckie NDB
391 Group: Applications/Databases
392 Requires: %{name}-libs = %{version}-%{release}
394 %description ndb-client
395 This package contains the standard MySQL NDB Clients.
397 %description ndb-client -l pl
398 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
401 Summary: MySQL - NDB Management Daemon
402 Summary(pl): MySQL - demon zarz±dzaj±cy NDB
403 Group: Applications/Databases
404 Requires: %{name}-libs = %{version}-%{release}
407 This package contains the standard MySQL NDB Management Daemon.
409 %description ndb-mgm -l pl
410 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
413 Summary: MySQL - NDB CPC Daemon
414 Summary(pl): MySQL - demon NDB CPC
415 Group: Applications/Databases
416 Requires: %{name}-libs = %{version}-%{release}
419 This package contains the standard MySQL NDB CPC Daemon.
421 %description ndb-cpc -l pl
422 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
427 %{?with_tcpd:%patch1 -p1}
429 %{?with_doc:%patch3 -p1}
431 # this is strange: mysqld functions for UDF modules are not explicitly defined,
432 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
433 # in objects compiled without -fPIC
444 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
464 # The compiler flags are as per their "official" spec ;)
465 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
466 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
468 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
469 # 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' \
479 --enable-thread-safe-client \
480 --with%{!?with_bdb:out}-berkeley-db \
481 --with%{!?with_innodb:out}-innodb \
482 --with%{!?with_isam:out}-isam \
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-embedded-server \
490 --with-extra-charsets=all \
492 --with-mysqld-user=mysql \
493 --with-named-curses-libs="-lncurses" \
494 --with-named-thread-libs="-lpthread" \
495 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
496 --with-archive-storage-engine \
503 # --with-ndb-test --with-ndb-docs
505 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
506 # (it defaults to first cluster but user may change it to whatever
509 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
512 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
514 %{?with_doc:%{__make} -C Docs mysql.info}
517 rm -rf $RPM_BUILD_ROOT
518 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
519 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
520 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
523 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
528 DESTDIR=$RPM_BUILD_ROOT \
529 benchdir=%{_datadir}/sql-bench \
531 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
533 %{?with_doc:install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}}
535 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
536 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
537 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
538 # This is template for configuration file which is created after 'service mysql init'
539 install %{SOURCE4} mysqld.conf
540 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
541 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
542 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
544 # remove innodb directives from mysqld.conf if mysqld is configured without
545 %if %{without innodb}
546 cp mysqld.conf mysqld.tmp
547 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
550 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
552 cp mysqld.conf mysqld.tmp
553 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
556 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
557 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
560 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
561 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
562 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
563 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
564 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
565 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 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
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 # functionality in initscript / rpm
581 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
582 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
583 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
584 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
585 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
586 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
587 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
588 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
589 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
590 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
591 rm $RPM_BUILD_ROOT%{_mandir}/man1/{mysql.server,safe_mysqld}*
594 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
597 rm -rf $RPM_BUILD_ROOT
600 %groupadd -g 89 mysql
601 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
604 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
605 /sbin/chkconfig --add mysql
607 if [ "$1" = 1 ]; then
608 %banner -e %{name}-4.1.x <<-EOF
609 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
610 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
615 %service mysql restart || :
618 if [ "$1" = "0" ]; then
619 %service -q mysql stop
620 /sbin/chkconfig --del mysql
624 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
625 if [ "$1" = "0" ]; then
631 /sbin/chkconfig --add mysql-ndb
632 if [ -f /var/lock/subsys/mysql-ndb ]; then
633 /etc/rc.d/init.d/mysql-ndb restart >&2
635 echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
639 if [ "$1" = "0" ]; then
640 if [ -f /var/lock/subsys/mysql-ndb ]; then
641 /etc/rc.d/init.d/mysql-ndb stop
643 /sbin/chkconfig --del mysql-ndb
647 /sbin/chkconfig --add mysql-ndb-mgm
648 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
649 /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
651 echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
655 if [ "$1" = "0" ]; then
656 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
657 /etc/rc.d/init.d/mysql-ndb-mgm stop
659 /sbin/chkconfig --del mysql-ndb-mgm
663 /sbin/chkconfig --add mysql-ndb-cpc
664 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
665 /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
667 echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
671 if [ "$1" = "0" ]; then
672 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
673 /etc/rc.d/init.d/mysql-ndb-cpc stop
675 /sbin/chkconfig --del mysql-ndb-cpc
678 %post libs -p /sbin/ldconfig
679 %postun libs -p /sbin/ldconfig
681 %triggerpostun -- mysql <= 4.0.20-2
682 # For clusters in /etc/mysql/clusters.conf
683 if [ -f "/etc/sysconfig/mysql" ]; then
684 . /etc/sysconfig/mysql
685 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
686 for i in "$MYSQL_DB_CLUSTERS"; do
687 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
689 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
690 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
691 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
692 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
696 %triggerpostun -- mysql <= 4.1.1
697 # For better compatibility with prevoius versions:
698 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
699 if echo "$config" | grep -q '^/'; then
700 config_file="$config"
701 elif [ -f "/etc/mysql/$config" ]; then
702 config_file=/etc/mysql/$config
704 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
705 if [ -z "$clusterdir" ]; then
706 echo >&2 "Can't find cluster dir for $config!"
707 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
710 config_file="$clusterdir/mysqld.conf"
713 if [ ! -f "$config_file" ]; then
714 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
717 echo "Adding option old-passwords to config: $config_file"
718 echo "If you want to use new, better passwords - remove it"
720 # sed magic to add 'old-passwords' to [mysqld] section
721 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
723 a; Compatibility options:
729 %banner -e %{name}-4.1.x <<-EOF
730 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
731 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
736 %defattr(644,root,root,755)
737 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
738 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
739 %attr(754,root,root) /etc/rc.d/init.d/mysql
740 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
741 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
742 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
743 %attr(755,root,root) %{_bindir}/isamchk
744 %attr(755,root,root) %{_bindir}/isamlog
745 %attr(755,root,root) %{_bindir}/myisamchk
746 %attr(755,root,root) %{_bindir}/myisamlog
747 %attr(755,root,root) %{_bindir}/myisampack
748 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
749 %attr(755,root,root) %{_bindir}/pack_isam
750 %attr(755,root,root) %{_bindir}/my_print_defaults
751 %attr(755,root,root) %{_sbindir}/mysqld
752 %{_mandir}/man1/isamchk.1*
753 %{_mandir}/man1/isamlog.1*
754 %{_mandir}/man1/mysql_fix_privilege_tables.1*
755 %{_mandir}/man1/mysqld.1*
756 %{_mandir}/man1/myisamchk.1*
757 %{_mandir}/man1/myisamlog.1*
758 %{_mandir}/man1/myisampack.1*
759 %{_mandir}/man1/pack_isam.1*
760 %{_mandir}/man8/mysqld.8*
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 %{?with_doc:%{_infodir}/mysql.info*}
770 %dir %{_datadir}/mysql
771 # This is template for configuration file which is created after 'service mysql init'
772 %{_datadir}/mysql/mysqld.conf
773 %{_datadir}/mysql/charsets
774 %{_datadir}/mysql/english
775 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
776 %lang(cs) %{_datadir}/mysql/czech
777 %lang(da) %{_datadir}/mysql/danish
778 %lang(de) %{_datadir}/mysql/german
779 %lang(el) %{_datadir}/mysql/greek
780 %lang(es) %{_datadir}/mysql/spanish
781 %lang(et) %{_datadir}/mysql/estonian
782 %lang(fr) %{_datadir}/mysql/french
783 %lang(hu) %{_datadir}/mysql/hungarian
784 %lang(it) %{_datadir}/mysql/italian
785 %lang(ja) %{_datadir}/mysql/japanese
786 %lang(ja) %{_datadir}/mysql/japanese-sjis
787 %lang(ko) %{_datadir}/mysql/korean
788 %lang(nl) %{_datadir}/mysql/dutch
789 %lang(nb) %{_datadir}/mysql/norwegian
790 %lang(nn) %{_datadir}/mysql/norwegian-ny
791 %lang(pl) %{_datadir}/mysql/polish
792 %lang(pt) %{_datadir}/mysql/portuguese
793 %lang(ro) %{_datadir}/mysql/romanian
794 %lang(ru) %{_datadir}/mysql/russian
795 %lang(sr) %{_datadir}/mysql/serbian
796 %lang(sk) %{_datadir}/mysql/slovak
797 %lang(sv) %{_datadir}/mysql/swedish
798 %lang(uk) %{_datadir}/mysql/ukrainian
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_bindir}/msql2mysql
803 %attr(755,root,root) %{_bindir}/perror
804 %attr(755,root,root) %{_bindir}/replace
805 %attr(755,root,root) %{_bindir}/resolveip
806 %attr(755,root,root) %{_bindir}/myisam_ftdump
807 %attr(755,root,root) %{_bindir}/mysql_secure_installation
808 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
809 %attr(755,root,root) %{_bindir}/mysqlcheck
810 %{_mandir}/man1/perror.1*
811 %{_mandir}/man1/replace.1*
812 %{_mandir}/man1/msql2mysql*
813 %{_mandir}/man1/myisam_ftdump.1*
814 %{_mandir}/man1/mysqlcheck.1*
817 %defattr(644,root,root,755)
818 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
819 %attr(755,root,root) %{_bindir}/mysqldumpslow
820 %attr(755,root,root) %{_bindir}/mysqlhotcopy
821 %attr(755,root,root) %{_bindir}/mysql_setpermission
822 %attr(755,root,root) %{_bindir}/mysql_zap
823 %attr(755,root,root) %{_bindir}/mysql_find_rows
824 %attr(755,root,root) %{_bindir}/mysqlaccess
825 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
826 %attr(755,root,root) %{_bindir}/mysql_explain_log
827 %attr(755,root,root) %{_bindir}/mysql_tableinfo
828 %{_mandir}/man1/mysql_zap.1*
829 %{_mandir}/man1/mysqlaccess.1*
830 %{_mandir}/man1/mysqlhotcopy.1*
831 %{_mandir}/man1/mysql_explain_log.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) %{_bindir}/mysqlmanager*
840 %attr(755,root,root) %{_bindir}/mysqlshow
841 %attr(755,root,root) %{_bindir}/mysqlbinlog
842 %attr(755,root,root) %{_bindir}/mysqladmin
843 %{_mandir}/man1/mysql.1*
844 %{_mandir}/man1/mysqlman.1*
845 %{_mandir}/man1/mysqladmin.1*
846 %{_mandir}/man1/mysqldump.1*
847 %{_mandir}/man1/mysqlshow.1*
848 %{_mandir}/man1/mysqlbinlog.1*
849 %{_mandir}/man1/mysqlimport.1*
852 %defattr(644,root,root,755)
853 %doc EXCEPTIONS-CLIENT
854 %attr(755,root,root) %{_libdir}/lib*.so.*.*
855 %attr(751,root,root) %dir %{_sysconfdir}/mysql
856 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
859 %defattr(644,root,root,755)
860 %attr(755,root,root) %{_bindir}/mysql_config
861 %attr(755,root,root) %{_libdir}/lib*.so
862 %attr(755,root,root) %{_bindir}/*comp_err
863 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
865 %{_libdir}/lib*[!tr].a
867 %{_mandir}/man1/mysql_config.1*
870 %defattr(644,root,root,755)
871 %{_libdir}/lib*[tr].a
874 %defattr(644,root,root,755)
875 %attr(755,root,root) %{_bindir}/mysqltest
876 %attr(755,root,root) %{_bindir}/mysql_client_test
877 %dir %{_datadir}/sql-bench
878 %{_datadir}/sql-bench/[CDRl]*
879 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
881 %{_datadir}/mysql/mi_test_all.res
882 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
885 #%defattr(644,root,root,755)
886 #%doc Docs/manual.html Docs/manual_toc.html
889 %defattr(644,root,root,755)
890 %attr(755,root,root) %{_sbindir}/ndbd
891 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
892 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
895 %defattr(644,root,root,755)
896 %attr(755,root,root) %{_bindir}/ndb_*
897 %attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
900 %defattr(644,root,root,755)
901 %attr(755,root,root) %{_sbindir}/ndb_mgmd
902 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
903 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
906 %defattr(644,root,root,755)
907 %attr(755,root,root) %{_sbindir}/ndb_cpcd
908 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
909 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc