2 # - C(XX)FLAGS for innodb subdirs are overriden by ./configure!
3 # - http://bugs.mysql.com/bug.php?id=16470
6 %bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
7 %bcond_without federated # Federated storage engine support
8 %bcond_without innodb # InnoDB storage engine support
9 %bcond_without raid # Without raid
10 %bcond_without ssl # Without OpenSSL
11 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
12 %bcond_with bdb # Berkeley DB support
13 %bcond_without sphinx # Sphinx storage engine support
15 %include /usr/lib/rpm/macros.perl
16 #define _snap 20060111
17 Summary: MySQL: a very fast and reliable SQL database engine
18 Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank
19 Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable
20 Summary(pl.UTF-8): MySQL: bardzo szybka i niezawodna baza danych (SQL)
21 Summary(pt_BR.UTF-8): MySQL: Um servidor SQL rápido e confiável
22 Summary(ru.UTF-8): MySQL - быстрый SQL-сервер
23 Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
24 Summary(zh_CN.UTF-8): MySQL数据库服务器
28 License: GPL + MySQL FLOSS Exception
29 Group: Applications/Databases
30 #Source0: ftp://ftp.mysql.com/pub/mysql/src/%{name}-%{version}.tar.gz
31 #Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
32 #Source0: http://mysql.he.net/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
33 Source0: http://mirror.provenscaling.com/mysql/enterprise/source/5.0/%{name}-%{version}.tar.gz
34 # Source0-md5: b3351d755bd62fd203bae777a77ccfef
35 Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.8.tar.gz
36 # Source100-md5: 347e547b79b733778d7553ede34e0aac
38 Source2: %{name}.sysconfig
39 Source3: %{name}.logrotate
40 Source4: %{name}d.conf
41 Source5: %{name}-clusters.conf
42 Source7: %{name}-ndb.init
43 Source8: %{name}-ndb.sysconfig
44 Source9: %{name}-ndb-mgm.init
45 Source10: %{name}-ndb-mgm.sysconfig
46 Source11: %{name}-ndb-cpc.init
47 Source12: %{name}-ndb-cpc.sysconfig
48 Source13: %{name}-client.conf
49 Patch0: %{name}-libs.patch
50 Patch1: %{name}-sphinx.patch
51 Patch2: %{name}-c++.patch
52 Patch3: %{name}-info.patch
53 Patch4: %{name}-sql-cxx-pic.patch
54 Patch5: %{name}-noproc.patch
55 Patch6: %{name}-fix_privilege_tables.patch
56 Patch7: %{name}-align.patch
57 Patch8: %{name}-client-config.patch
58 Patch9: %{name}-build.patch
59 Patch10: %{name}-alpha.patch
60 Patch11: %{name}-ndb-ldflags.patch
61 Patch12: %{name}-bug-20153.patch
62 Patch13: %{name}-bug-34192.patch
63 Patch14: %{name}-bug-16470.patch
64 Patch15: %{name}-system-users.patch
65 Patch16: %{name}-bug-39021.patch
66 # Percona patches, http://www.percona.com/percona-lab.html
67 Patch17: %{name}-control_flush_and_merge_and_read.patch
68 Patch18: %{name}-control_io-threads.patch
69 Patch19: %{name}-microslow_innodb.patch
70 Patch21: %{name}-show_patches.patch
71 Patch22: %{name}-split_buf_pool_mutex_fixed_optimistic_safe.patch
72 Patch23: %{name}-userstats-testsuite.patch
73 Patch24: %{name}-userstats.patch
74 #Patch25: %{name}-acc-pslist.patch
75 URL: http://www.mysql.com/products/database/mysql/community_edition.html
76 BuildRequires: autoconf
77 BuildRequires: automake
79 %{?with_bdb:BuildRequires: db3-devel}
81 BuildRequires: libstdc++-devel >= 5:3.0
82 BuildRequires: libtool
83 %{?with_tcpd:BuildRequires: libwrap-devel}
84 BuildRequires: ncurses-devel >= 4.2
85 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
86 BuildRequires: perl-DBI
87 BuildRequires: perl-devel >= 1:5.6.1
88 BuildRequires: readline-devel >= 4.2
89 BuildRequires: rpm-perlprov >= 4.1-13
90 BuildRequires: rpmbuild(macros) >= 1.268
91 BuildRequires: sed >= 4.0
92 BuildRequires: texinfo
93 BuildRequires: zlib-devel
94 Requires(post,preun): /sbin/chkconfig
95 Requires(postun): /usr/sbin/groupdel
96 Requires(postun): /usr/sbin/userdel
97 Requires(pre): /bin/id
98 Requires(pre): /usr/bin/getgid
99 Requires(pre): /usr/sbin/groupadd
100 Requires(pre): /usr/sbin/useradd
101 Requires(triggerpostun): sed >= 4.0
102 Requires: %{name}-charsets = %{version}-%{release}
103 Requires: /usr/bin/setsid
104 Requires: rc-scripts >= 0.2.0
105 Provides: MySQL-server
106 Provides: group(mysql)
107 Provides: msqlormysql
108 Provides: user(mysql)
110 Obsoletes: mysql-server
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
113 %define _libexecdir %{_sbindir}
114 %define _localstatedir /var/lib/mysql
115 %define _mysqlhome /home/services/mysql
117 %define _noautoreqdep 'perl(DBD::mysql)'
118 # CFLAGS for innodb are altered
119 %undefine configure_cache
122 MySQL is a true multi-user, multi-threaded SQL (Structured Query
123 Language) database server. SQL is the most popular database language
124 in the world. MySQL is a client/server implementation that consists of
125 a server daemon mysqld and many different client programs/libraries.
127 The main goals of MySQL are speed, robustness and easy to use. MySQL
128 was originally developed because we at Tcx needed a SQL server that
129 could handle very big databases with magnitude higher speed than what
130 any database vendor could offer to us. We have now been using MySQL
131 since 1996 in a environment with more than 40 databases, 10,000
132 tables, of which more than 500 have more than 7 million rows. This is
133 about 50G of mission critical data.
135 The base upon which MySQL is built is a set of routines that have been
136 used in a highly demanding production environment for many years.
137 While MySQL is still in development, it already offers a rich and
138 highly useful function set.
140 %description -l fr.UTF-8
141 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
142 multi-taches. Le langage SQL est le langage de bases de donnees le
143 plus populaire au monde. MySQL est une implementation client/serveur
144 qui consiste en un serveur (mysqld) et differents
145 programmes/bibliotheques clientes.
147 Les objectifs principaux de MySQL sont: vitesse, robustesse et
148 facilite d'utilisation. MySQL fut originalement developpe parce que
149 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
150 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
151 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
152 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
153 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
154 millions de lignes. Ceci represente environ 50G de donnees critiques.
156 A la base de la conception de MySQL, on retrouve une serie de routines
157 qui ont ete utilisees dans un environnement de production pendant
158 plusieurs annees. Meme si MySQL est encore en developpement, il offre
159 deja une riche et utile serie de fonctions.
161 %description -l pl.UTF-8
162 MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych
163 SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz
164 danych. MySQL to implementacja klient/serwer składająca się z demona
165 mysqld i wielu różnych programów i bibliotek klienckich.
167 Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania.
168 MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali
169 serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele
170 większą, niż mogli zaoferować inni producenci baz danych. Używają go
171 od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z
172 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około
173 50GB krytycznych danych.
175 Baza, na której oparty jest MySQL, składa się ze zbioru procedur,
176 które były używane w bardzo wymagającym środowisku produkcyjnym przez
177 wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty
178 i użyteczny zbiór funkcji.
180 %description -l de.UTF-8
181 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
182 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
183 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
184 einem Primärschlüssel versehen werden. Es ist aber keine Definition
185 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
186 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
187 Daten verantwortlich. Allein durch die Nutzung externer
188 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
189 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
191 %description -l pt_BR.UTF-8
192 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
193 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
194 dados no mundo. O MySQL é uma implementação cliente/servidor que
195 consiste de um servidor chamado mysqld e diversos
196 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
197 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
198 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
199 pudesse lidar com grandes bases de dados e com uma velocidade muito
200 maior do que a que qualquer vendedor podia nos oferecer. Estamos
201 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
202 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
203 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
204 A base da construção do MySQL é uma série de rotinas que foram usadas
205 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
206 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
207 funções muito ricas e úteis. Veja a documentação para maiores
210 %description -l ru.UTF-8
211 MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL
212 была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в
213 дистрибутиве на предмет других участников проекта и прочей информации
216 %description -l uk.UTF-8
217 MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL
218 було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в
219 дистрибутиві для інформації про інших учасників проекту та іншої
223 Summary: MySQL - character sets definitions
224 Summary(pl.UTF-8): MySQL - definicje kodowań znaków
225 Group: Applications/Databases
227 %description charsets
228 This package contains character sets definitions needed by both client
231 %description charsets -l pl.UTF-8
232 Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
236 Summary: MySQL additional utilities
237 Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL
238 Group: Applications/Databases
239 Requires: %{name}-libs = %{version}-%{release}
242 MySQL additional utilities except Perl scripts (they may be found in
243 %{name}-extras-perl package).
245 %description extras -l pl.UTF-8
246 Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w
247 pakiecie %{name}-extras-perl).
250 Summary: MySQL additional utilities written in Perl
251 Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu
252 Group: Applications/Databases
253 Requires: %{name}-extras = %{version}-%{release}
254 Requires: perl(DBD::mysql)
256 %description extras-perl
257 MySQL additional utilities written in Perl.
259 %description extras-perl -l pl.UTF-8
260 Dodatkowe narzędzia do MySQL napisane w Perlu.
263 Summary: MySQL - Client
264 Summary(pl.UTF-8): MySQL - Klient
265 Summary(pt.UTF-8): MySQL - Cliente
266 Summary(ru.UTF-8): MySQL клиент
267 Summary(uk.UTF-8): MySQL клієнт
268 Group: Applications/Databases
269 Requires: %{name}-charsets = %{version}-%{release}
270 Requires: %{name}-libs = %{version}-%{release}
271 Obsoletes: MySQL-client
274 This package contains the standard MySQL clients.
276 %description client -l fr.UTF-8
277 Ce package contient les clients MySQL standards.
279 %description client -l pl.UTF-8
280 Standardowe programy klienckie MySQL.
282 %description client -l pt_BR.UTF-8
283 Este pacote contém os clientes padrão para o MySQL.
285 %description client -l ru.UTF-8
286 Этот пакет содержит только клиент MySQL.
288 %description client -l uk.UTF-8
289 Цей пакет містить тільки клієнта MySQL.
292 Summary: Shared libraries for MySQL
293 Summary(pl.UTF-8): Biblioteki dzielone MySQL
295 Obsoletes: libmysql10
296 Obsoletes: mysql-doc < 4.1.12
299 Shared libraries for MySQL.
301 %description libs -l pl.UTF-8
302 Biblioteki dzielone MySQL.
305 Summary: MySQL - Development header files and libraries
306 Summary(pl.UTF-8): MySQL - Pliki nagłówkowe i biblioteki dla programistów
307 Summary(pt.UTF-8): MySQL - Medições de desempenho
308 Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработчика
309 Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста
310 Group: Development/Libraries
311 Requires: %{name}-libs = %{version}-%{release}
312 %{?with_ssl:Requires: openssl-devel}
314 Obsoletes: MySQL-devel
315 Obsoletes: libmysql10-devel
318 This package contains the development header files and libraries
319 necessary to develop MySQL client applications.
321 %description devel -l fr.UTF-8
322 Ce package contient les fichiers entetes et les librairies de
323 developpement necessaires pour developper des applications clientes
326 %description devel -l pl.UTF-8
327 Pliki nagłówkowe i biblioteki konieczne do kompilacji aplikacji
330 %description devel -l pt_BR.UTF-8
331 Este pacote contém os arquivos de cabeçalho (header files) e
332 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
334 %description devel -l ru.UTF-8
335 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
336 разработки клиентских приложений.
338 %description devel -l uk.UTF-8
339 Цей пакет містить хедери та бібліотеки програміста, необхідні для
340 розробки програм-клієнтів.
343 Summary: MySQL static libraries
344 Summary(pl.UTF-8): Biblioteki statyczne MySQL
345 Summary(ru.UTF-8): MySQL - статические библиотеки
346 Summary(uk.UTF-8): MySQL - статичні бібліотеки
347 Group: Development/Libraries
348 Requires: %{name}-devel = %{version}-%{release}
349 Obsoletes: MySQL-static
352 MySQL static libraries.
354 %description static -l pl.UTF-8
355 Biblioteki statyczne MySQL.
357 %description static -l ru.UTF-8
358 Этот пакет содержит статические библиотеки разработчика, необходимые
359 для разработки клиентских приложений.
361 %description static -l uk.UTF-8
362 Цей пакет містить статичні бібліотеки програміста, необхідні для
363 розробки програм-клієнтів.
366 Summary: MySQL - Benchmarks
367 Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy
368 Summary(pt.UTF-8): MySQL - Medições de desempenho
369 Summary(ru.UTF-8): MySQL - бенчмарки
370 Summary(uk.UTF-8): MySQL - бенчмарки
371 Group: Applications/Databases
372 Requires: %{name} = %{version}-%{release}
373 Requires: %{name}-client
374 Requires: perl(DBD::mysql)
375 Obsoletes: MySQL-bench
378 This package contains MySQL benchmark scripts and data.
380 %description bench -l pl.UTF-8
381 Programy testujące szybkość serwera MySQL.
383 %description bench -l pt_BR.UTF-8
384 Este pacote contém medições de desempenho de scripts e dados do MySQL.
386 %description bench -l ru.UTF-8
387 Этот пакет содержит скрипты и данные для оценки производительности
390 %description bench -l uk.UTF-8
391 Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
394 Summary: MySQL manual
395 Summary(pl.UTF-8): Podręcznik użytkownika MySQL
396 Group: Applications/Databases
399 This package contains manual in HTML format.
401 %description doc -l pl.UTF-8
402 Podręcznik MySQL-a w formacie HTML.
405 Summary: MySQL - NDB Storage Engine Daemon
406 Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB
407 Group: Applications/Databases
408 Requires: %{name}-libs = %{version}-%{release}
411 This package contains the standard MySQL NDB Storage Engine Daemon.
413 %description ndb -l pl.UTF-8
414 Ten pakiet zawiera standardowego demona silnika przechowywania danych
418 Summary: MySQL - NDB Clients
419 Summary(pl.UTF-8): MySQL - programy klienckie NDB
420 Group: Applications/Databases
421 Requires: %{name}-libs = %{version}-%{release}
423 %description ndb-client
424 This package contains the standard MySQL NDB Clients.
426 %description ndb-client -l pl.UTF-8
427 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
430 Summary: MySQL - NDB Management Daemon
431 Summary(pl.UTF-8): MySQL - demon zarządzający NDB
432 Group: Applications/Databases
433 Requires: %{name}-libs = %{version}-%{release}
436 This package contains the standard MySQL NDB Management Daemon.
438 %description ndb-mgm -l pl.UTF-8
439 Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
442 Summary: MySQL - NDB CPC Daemon
443 Summary(pl.UTF-8): MySQL - demon NDB CPC
444 Group: Applications/Databases
445 Requires: %{name}-libs = %{version}-%{release}
448 This package contains the standard MySQL NDB CPC Daemon.
450 %description ndb-cpc -l pl.UTF-8
451 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
454 %setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}} %{?with_sphinx:-a100}
457 mv sphinx-*/mysqlse sql/sphinx
463 # this is strange: mysqld functions for UDF modules are not explicitly defined,
464 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
465 # in objects compiled without -fPIC
496 # The compiler flags are as per their "official" spec ;)
497 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
498 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
500 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
501 # and therefore do not add BR on these. These are here just to satisfy
506 FIND_PROC='/bin/ps p $$PID' \
508 CHECK_PID='/bin/kill -0 $$PID' \
510 --enable-largefile=yes \
513 --enable-thread-safe-client \
514 --with%{!?with_bdb:out}-berkeley-db \
515 --with%{!?with_innodb:out}-innodb \
516 --with%{!?with_raid:out}-raid \
517 --with%{!?with_ssl:out}-openssl \
518 --with%{!?with_tcpd:out}-libwrap \
519 %{?with_big_tables:--with-big-tables} \
520 --with-comment="PLD Linux Distribution MySQL RPM" \
521 --with%{!?debug:out}-debug \
522 --with%{!?debug:out}-ndb-debug \
523 --with-embedded-server \
524 --with-extra-charsets=all \
526 --with-mysqld-user=mysql \
527 --with-named-curses-libs="-lncurses" \
528 --with-named-thread-libs="-lpthread" \
529 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
530 --with-archive-storage-engine \
531 %{?with_sphinx:--with-sphinx-storage-engine} \
532 %{?with_federated:--with-federated-storage-engine} \
539 # --with-ndb-test --with-ndb-docs
541 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
542 # (it defaults to first cluster but user may change it to whatever
545 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
548 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
550 %{__make} -C Docs mysql.info
553 rm -rf $RPM_BUILD_ROOT
554 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,pki/mysql} \
555 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
556 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
559 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
564 DESTDIR=$RPM_BUILD_ROOT \
565 benchdir=%{_datadir}/sql-bench \
567 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
569 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
571 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
572 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
573 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
574 # This is template for configuration file which is created after 'service mysql init'
575 install %{SOURCE4} mysqld.conf
576 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
577 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update}
579 # remove innodb directives from mysqld.conf if mysqld is configured without
581 echo "BASE_TABLETYPE=MyISAM" >> $RPM_BUILD_ROOT/etc/sysconfig/mysql
582 cp mysqld.conf mysqld.tmp
583 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
586 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
588 cp mysqld.conf mysqld.tmp
589 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
592 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
593 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
596 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
597 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
598 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
599 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
600 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
601 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
602 # remove .txt variants for .sys messages
603 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
605 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
606 sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config}
608 # remove known unpackaged files
609 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
611 # rename not to be so generic name
612 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
613 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
614 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
615 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}comp_err.1
617 # not useful without -debug build
618 %{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
619 %{!?debug:rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
620 # generate symbols file, so one can generate backtrace using it
621 # mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack.
622 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
623 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
625 # functionality in initscript / rpm / other os
626 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
627 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
628 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
629 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
630 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
631 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
632 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
633 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt
634 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
635 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
636 rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
637 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
638 rm $RPM_BUILD_ROOT%{_mandir}/man1/make_win_bin_dist.1
639 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_install_db.1
640 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1
641 rm $RPM_BUILD_ROOT%{_mandir}/man1/make_win_src_distribution.1
642 rm $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld_multi.server
644 # no package for tests
645 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1
646 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1
647 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1
650 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
653 rm -rf $RPM_BUILD_ROOT
656 %groupadd -g 89 mysql
657 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
660 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
661 /sbin/chkconfig --add mysql
662 %service mysql restart
665 if [ "$1" = "0" ]; then
666 %service -q mysql stop
667 /sbin/chkconfig --del mysql
671 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
672 if [ "$1" = "0" ]; then
678 /sbin/chkconfig --add mysql-ndb
679 %service mysql-ndb restart "mysql NDB engine"
682 if [ "$1" = "0" ]; then
683 %service mysql-ndb stop
684 /sbin/chkconfig --del mysql-ndb
688 /sbin/chkconfig --add mysql-ndb-mgm
689 %service mysql-ndb-mgm restart "mysql NDB management node"
692 if [ "$1" = "0" ]; then
693 %service mysql-ndb-mgm stop
694 /sbin/chkconfig --del mysql-ndb-mgm
698 /sbin/chkconfig --add mysql-ndb-cpc
699 %service mysql-ndb-cpc restart "mysql NDB CPC"
702 if [ "$1" = "0" ]; then
703 %service mysql-ndb-cpc stop
704 /sbin/chkconfig --del mysql-ndb-cpc
707 %post libs -p /sbin/ldconfig
708 %postun libs -p /sbin/ldconfig
710 %triggerpostun -- mysql < 4.0.20-2.4
711 # For clusters in /etc/mysql/clusters.conf
712 if [ -f /etc/sysconfig/mysql ]; then
713 . /etc/sysconfig/mysql
714 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
715 for i in "$MYSQL_DB_CLUSTERS"; do
716 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
718 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
719 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
720 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
721 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
725 %triggerpostun -- mysql < 4.1.1
726 # For better compatibility with prevoius versions:
727 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
728 if echo "$config" | grep -q '^/'; then
729 config_file="$config"
730 elif [ -f "/etc/mysql/$config" ]; then
731 config_file=/etc/mysql/$config
733 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
734 if [ -z "$clusterdir" ]; then
735 echo >&2 "Can't find cluster dir for $config!"
736 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
739 config_file="$clusterdir/mysqld.conf"
742 if [ ! -f "$config_file" ]; then
743 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
746 echo "Adding option old-passwords to config: $config_file"
747 echo "If you want to use new, better passwords - remove it"
749 # sed magic to add 'old-passwords' to [mysqld] section
750 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
752 a; Compatibility options:
758 %banner -e %{name}-4.1.x <<-EOF
759 If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
760 mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
765 %defattr(644,root,root,755)
766 %doc support-files/*.cnf support-files/*.ini ChangeLog
767 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
768 %attr(754,root,root) /etc/rc.d/init.d/mysql
769 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
771 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
772 %attr(755,root,root) %{_bindir}/innochecksum
773 %attr(755,root,root) %{_bindir}/myisamchk
774 %attr(755,root,root) %{_bindir}/myisamlog
775 %attr(755,root,root) %{_bindir}/myisampack
776 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
777 %attr(755,root,root) %{_bindir}/my_print_defaults
778 %attr(755,root,root) %{_bindir}/mysql_upgrade
779 %attr(755,root,root) %{_bindir}/mysql_upgrade_shell
780 %attr(755,root,root) %{_sbindir}/mysqld
781 %{_mandir}/man1/mysql_fix_privilege_tables.1*
782 %{_mandir}/man1/my_print_defaults.1*
783 %{_mandir}/man1/myisamchk.1*
784 %{_mandir}/man1/myisamlog.1*
785 %{_mandir}/man1/myisampack.1*
786 %{_mandir}/man1/mysql_upgrade.1*
787 %{_mandir}/man1/innochecksum.1*
788 %{_mandir}/man8/mysqld.8*
791 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
792 %{_datadir}/mysql/mysqld.sym
793 %{_mandir}/man1/*resolve_stack_dump.1*
796 %attr(700,mysql,mysql) %{_mysqlhome}
797 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
798 %attr(751,root,root) /var/lib/mysql
799 %attr(750,mysql,mysql) %dir /var/log/mysql
800 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
801 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
803 %{_infodir}/mysql.info*
804 # This is template for configuration file which is created after 'service mysql init'
805 %{_datadir}/mysql/mysqld.conf
807 %{_datadir}/mysql/fill_help_tables.sql
808 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
809 %{_datadir}/mysql/mysql_system_tables.sql
810 %{_datadir}/mysql/mysql_system_tables_data.sql
811 %{_datadir}/mysql/mysql_test_data_timezone.sql
813 %{_datadir}/mysql/english
814 %lang(cs) %{_datadir}/mysql/czech
815 %lang(da) %{_datadir}/mysql/danish
816 %lang(de) %{_datadir}/mysql/german
817 %lang(el) %{_datadir}/mysql/greek
818 %lang(es) %{_datadir}/mysql/spanish
819 %lang(et) %{_datadir}/mysql/estonian
820 %lang(fr) %{_datadir}/mysql/french
821 %lang(hu) %{_datadir}/mysql/hungarian
822 %lang(it) %{_datadir}/mysql/italian
823 %lang(ja) %{_datadir}/mysql/japanese
824 %lang(ko) %{_datadir}/mysql/korean
825 %lang(nl) %{_datadir}/mysql/dutch
826 %lang(nb) %{_datadir}/mysql/norwegian
827 %lang(nn) %{_datadir}/mysql/norwegian-ny
828 %lang(pl) %{_datadir}/mysql/polish
829 %lang(pt) %{_datadir}/mysql/portuguese
830 %lang(ro) %{_datadir}/mysql/romanian
831 %lang(ru) %{_datadir}/mysql/russian
832 %lang(sr) %{_datadir}/mysql/serbian
833 %lang(sk) %{_datadir}/mysql/slovak
834 %lang(sv) %{_datadir}/mysql/swedish
835 %lang(uk) %{_datadir}/mysql/ukrainian
838 %defattr(644,root,root,755)
839 %dir %{_datadir}/mysql
840 %{_datadir}/mysql/charsets
843 %defattr(644,root,root,755)
844 %attr(755,root,root) %{_bindir}/msql2mysql
845 %attr(755,root,root) %{_bindir}/myisam_ftdump
846 %attr(755,root,root) %{_bindir}/mysql_secure_installation
847 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
848 %attr(755,root,root) %{_bindir}/mysqlcheck
849 %attr(755,root,root) %{_bindir}/perror
850 %attr(755,root,root) %{_bindir}/replace
851 %attr(755,root,root) %{_bindir}/resolveip
852 %{_mandir}/man1/msql2mysql.1*
853 %{_mandir}/man1/myisam_ftdump.1*
854 %{_mandir}/man1/mysql_secure_installation.1*
855 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
856 %{_mandir}/man1/mysqlcheck.1*
857 %{_mandir}/man1/perror.1*
858 %{_mandir}/man1/replace.1*
859 %{_mandir}/man1/resolveip.1*
862 %defattr(644,root,root,755)
863 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
864 %attr(755,root,root) %{_bindir}/mysql_explain_log
865 %attr(755,root,root) %{_bindir}/mysql_find_rows
866 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
867 %attr(755,root,root) %{_bindir}/mysql_setpermission
868 %attr(755,root,root) %{_bindir}/mysql_tableinfo
869 %attr(755,root,root) %{_bindir}/mysql_zap
870 %attr(755,root,root) %{_bindir}/mysqlaccess
871 %attr(755,root,root) %{_bindir}/mysqldumpslow
872 %attr(755,root,root) %{_bindir}/mysqlhotcopy
873 %{_mandir}/man1/mysql_explain_log.1*
874 %{_mandir}/man1/mysql_zap.1*
875 %{_mandir}/man1/mysqlaccess.1*
876 %{_mandir}/man1/mysqlhotcopy.1*
877 %{_mandir}/man1/mysql_setpermission.1*
878 %{_mandir}/man1/mysql_tableinfo.1*
879 %{_mandir}/man1/mysql_fix_extensions.1*
880 %{_mandir}/man1/mysql_find_rows.1*
881 %{_mandir}/man1/mysql_convert_table_format.1*
884 %defattr(644,root,root,755)
885 %attr(755,root,root) %{_bindir}/mysql
886 %attr(755,root,root) %{_bindir}/mysqlbug
887 %attr(755,root,root) %{_bindir}/mysqldump
888 %attr(755,root,root) %{_bindir}/mysqlimport
889 %attr(755,root,root) %{_sbindir}/mysqlmanager*
890 %attr(755,root,root) %{_bindir}/mysqlshow
891 %attr(755,root,root) %{_bindir}/mysqlbinlog
892 %attr(755,root,root) %{_bindir}/mysqladmin
893 %{_mandir}/man1/mysql.1*
894 %{_mandir}/man1/mysqladmin.1*
895 %{_mandir}/man1/mysqldump.1*
896 %{_mandir}/man1/mysqlshow.1*
897 %{_mandir}/man1/mysqlbinlog.1*
898 %{_mandir}/man1/mysqlimport.1*
899 %{_mandir}/man1/mysqlmanager*.1*
900 %{_mandir}/man8/mysqlmanager.8*
903 %defattr(644,root,root,755)
904 %doc EXCEPTIONS-CLIENT
905 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*
906 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*
907 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*
908 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.15
909 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.15
910 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.2
911 %attr(751,root,root) %dir %{_sysconfdir}/mysql
912 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
915 %defattr(644,root,root,755)
916 %attr(755,root,root) %{_bindir}/mysql_config
917 %attr(755,root,root) %{_libdir}/lib*.so
918 %attr(755,root,root) %{_bindir}/*comp_err
920 %{_libdir}/lib*[!tr].a
922 %{_mandir}/man1/mysql_config.1*
923 %{_mandir}/man1/*comp_err.1*
926 %defattr(644,root,root,755)
927 %{_libdir}/lib*[tr].a
930 %defattr(644,root,root,755)
931 %attr(755,root,root) %{_bindir}/mysql_client_test
932 %attr(755,root,root) %{_bindir}/mysqltest
933 %attr(755,root,root) %{_bindir}/mysqltestmanager
934 %attr(755,root,root) %{_bindir}/mysqltestmanager-pwgen
935 %attr(755,root,root) %{_bindir}/mysqltestmanagerc
936 %dir %{_datadir}/sql-bench
937 %{_datadir}/sql-bench/[CDRl]*
938 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
940 %{_datadir}/mysql/mi_test_all.res
941 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
942 %{_mandir}/man1/mysqlbug.1*
943 %{_mandir}/man1/mysqltest*.1*
944 %{_mandir}/man1/mysql_client_test.1*
947 #%defattr(644,root,root,755)
948 #%doc Docs/manual.html Docs/manual_toc.html
951 %defattr(644,root,root,755)
952 %attr(755,root,root) %{_sbindir}/ndbd
953 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
954 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
955 %{_mandir}/man8/ndbd.8*
958 %defattr(644,root,root,755)
959 %attr(755,root,root) %{_bindir}/ndb_*
960 %attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
961 %{_mandir}/man1/ndb_*.1*
962 %exclude %{_mandir}/man8/ndb_mgmd.8*
965 %defattr(644,root,root,755)
966 %attr(755,root,root) %{_sbindir}/ndb_mgmd
967 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
968 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
969 %{_mandir}/man8/ndb_mgmd.8*
972 %defattr(644,root,root,755)
973 %attr(755,root,root) %{_sbindir}/ndb_cpcd
974 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
975 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
976 %{_mandir}/man1/ndb_cpcd.1*