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
7 %bcond_with bdb # Berkeley DB support
8 %bcond_without innodb # Without InnoDB support
9 %bcond_without isam # Without ISAM table format (used in mysql 3.22)
10 %bcond_without raid # Without raid
11 %bcond_without ssl # Without OpenSSL
12 %bcond_without tcpd # Without libwrap (tcp_wrappers) support
13 %bcond_with big_tables # enable '--with-big-tables', some performance loss on 32bit arch, but can do >= 4GB database tables.
15 %include /usr/lib/rpm/macros.perl
16 Summary: MySQL: a very fast and reliable SQL database engine
17 Summary(fr): MySQL: un serveur SQL rapide et fiable
18 Summary(pl): MySQL: bardzo szybka i niezawodna baza danych (SQL)
19 Summary(de): MySQL: ist eine SQL-Datenbank
20 Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável
21 Summary(ru): MySQL - ÂÙÓÔÒÙÊ SQL-ÓÅÒ×ÅÒ
22 Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
23 Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
25 Group: Applications/Databases
28 License: GPL + MySQL FLOSS Exception
29 Source0: http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
30 # Source0-md5: 65a0841e592641b8816f9212aaa40176
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
45 Patch1: %{name}-libwrap.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
54 URL: http://www.mysql.com/
55 #BuildRequires: ORBit-devel
56 BuildRequires: autoconf
57 BuildRequires: automake
58 %{?with_bdb:BuildRequires: db3-devel}
59 BuildRequires: libstdc++-devel >= 5:3.0
60 BuildRequires: libtool
61 %{?with_tcpd:BuildRequires: libwrap-devel}
62 BuildRequires: ncurses-devel >= 4.2
63 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
64 BuildRequires: perl-DBI
65 BuildRequires: perl-devel >= 1:5.6.1
66 BuildRequires: readline-devel >= 4.2
67 BuildRequires: rpm-perlprov >= 4.1-13
68 BuildRequires: rpmbuild(macros) >= 1.228
69 BuildRequires: texinfo
70 BuildRequires: zlib-devel
71 PreReq: rc-scripts >= 0.2.0
72 Requires(pre): /usr/bin/getgid
73 Requires(pre): /bin/id
74 Requires(pre): /usr/sbin/groupadd
75 Requires(pre): /usr/sbin/useradd
76 Requires(postun): /usr/sbin/userdel
77 Requires(postun): /usr/sbin/groupdel
78 Requires(post,preun): /sbin/chkconfig
79 Requires(triggerpostun): sed >= 4.0
80 Requires: %{name}-libs = %{version}-%{release}
81 Requires: /usr/bin/setsid
82 Provides: MySQL-server
83 Provides: group(mysql)
87 Obsoletes: mysql-server
88 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
90 %define _libexecdir %{_sbindir}
91 %define _localstatedir /var/lib/mysql
92 %define _mysqlhome /home/services/mysql
94 %define _noautoreqdep 'perl(DBD::mysql)'
97 MySQL is a true multi-user, multi-threaded SQL (Structured Query
98 Language) database server. SQL is the most popular database language
99 in the world. MySQL is a client/server implementation that consists of
100 a server daemon mysqld and many different client programs/libraries.
102 The main goals of MySQL are speed, robustness and easy to use. MySQL
103 was originally developed because we at Tcx needed a SQL server that
104 could handle very big databases with magnitude higher speed than what
105 any database vendor could offer to us. We have now been using MySQL
106 since 1996 in a environment with more than 40 databases, 10,000
107 tables, of which more than 500 have more than 7 million rows. This is
108 about 50G of mission critical data.
110 The base upon which MySQL is built is a set of routines that have been
111 used in a highly demanding production environment for many years.
112 While MySQL is still in development, it already offers a rich and
113 highly useful function set.
116 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
117 multi-taches. Le langage SQL est le langage de bases de donnees le
118 plus populaire au monde. MySQL est une implementation client/serveur
119 qui consiste en un serveur (mysqld) et differents
120 programmes/bibliotheques clientes.
122 Les objectifs principaux de MySQL sont: vitesse, robustesse et
123 facilite d'utilisation. MySQL fut originalement developpe parce que
124 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
125 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
126 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
127 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
128 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
129 millions de lignes. Ceci represente environ 50G de donnees critiques.
131 A la base de la conception de MySQL, on retrouve une serie de routines
132 qui ont ete utilisees dans un environnement de production pendant
133 plusieurs annees. Meme si MySQL est encore en developpement, il offre
134 deja une riche et utile serie de fonctions.
137 MySQL to prawdziwie wielou¿ytkownikowy, wielow±tkowy serwer baz danych
138 SQL. SQL jest najpopularniejszym na ¶wiecie jêzykiem u¿ywanym do baz
139 danych. MySQL to implementacja klient/serwer sk³adaj±ca siê z demona
140 mysqld i wielu ró¿nych programów i bibliotek klienckich.
142 G³ównymi celami MySQL-a s± szybko¶æ, potêga i ³atwo¶æ u¿ytkowania.
143 MySQL oryginalnie by³ tworzony, poniewa¿ autorzy w Tcx potrzebowali
144 serwera SQL do obs³ugi bardzo du¿ych baz danych z szybko¶ci± o wiele
145 wiêksz±, ni¿ mogli zaoferowaæ inni producenci baz danych. U¿ywaj± go
146 od 1996 roku w ¶rodowisku z ponad 40 bazami danych, 10 000 tabel, z
147 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie oko³o
148 50GB krytycznych danych.
150 Baza, na której oparty jest MySQL, sk³ada siê ze zbioru procedur,
151 które by³y u¿ywane w bardzo wymagaj±cym ¶rodowisku produkcyjnym przez
152 wiele lat. Pomimo, ¿e MySQL jest ci±gle rozwijany, ju¿ oferuje bogaty
153 i u¿yteczny zbiór funkcji.
156 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
157 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
158 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
159 einem Primärschlüssel versehen werden. Es ist aber keine Definition
160 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
161 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
162 Daten verantwortlich. Allein durch die Nutzung externer
163 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
164 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
166 %description -l pt_BR
167 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
168 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
169 dados no mundo. O MySQL é uma implementação cliente/servidor que
170 consiste de um servidor chamado mysqld e diversos
171 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
172 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
173 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
174 pudesse lidar com grandes bases de dados e com uma velocidade muito
175 maior do que a que qualquer vendedor podia nos oferecer. Estamos
176 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
177 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
178 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
179 A base da construção do MySQL é uma série de rotinas que foram usadas
180 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
181 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
182 funções muito ricas e úteis. Veja a documentação para maiores
186 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
187 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
188 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
192 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
193 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
194 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉË¦× ÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
198 Summary: MySQL additional utilities
199 Summary(pl): Dodatkowe narzêdzia do MySQL
200 Group: Applications/Databases
201 Requires: %{name}-libs = %{version}-%{release}
204 MySQL additional utilities except Perl scripts (they may be found in
205 %{name}-extras-perl package).
207 %description extras -l pl
208 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
209 pakiecie %{name}-extras-perl).
212 Summary: MySQL additional utilities written in Perl
213 Summary(pl): Dodatkowe narzêdzia do MySQL napisane w Perlu
214 Group: Applications/Databases
215 Requires: %{name}-extras = %{version}-%{release}
216 Requires: perl(DBD::mysql)
218 %description extras-perl
219 MySQL additional utilities written in Perl.
221 %description extras-perl -l pl
222 Dodatkowe narzêdzia do MySQL napisane w Perlu.
225 Summary: MySQL - Client
226 Summary(pl): MySQL - Klient
227 Summary(pt): MySQL - Cliente
228 Summary(ru): MySQL ËÌÉÅÎÔ
229 Summary(uk): MySQL Ë̦¤ÎÔ
230 Group: Applications/Databases
231 Requires: %{name}-libs = %{version}-%{release}
232 Obsoletes: MySQL-client
235 This package contains the standard MySQL clients.
237 %description client -l fr
238 Ce package contient les clients MySQL standards.
240 %description client -l pl
241 Standardowe programy klienckie MySQL.
243 %description client -l pt_BR
244 Este pacote contém os clientes padrão para o MySQL.
246 %description client -l ru
247 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
249 %description client -l uk
250 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
253 Summary: Shared libraries for MySQL
254 Summary(pl): Biblioteki dzielone MySQL
255 Group: Applications/Databases
256 Obsoletes: libmysql10
257 Obsoletes: mysql-doc < 4.1.12
260 Shared libraries for MySQL.
262 %description libs -l pl
263 Biblioteki dzielone MySQL.
266 Summary: MySQL - Development header files and libraries
267 Summary(pl): MySQL - Pliki nag³ówkowe i biblioteki dla programistów
268 Summary(pt): MySQL - Medições de desempenho
269 Summary(ru): MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
270 Summary(uk): MySQL - ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
271 Group: Development/Libraries
272 Requires: %{name}-libs = %{version}-%{release}
273 %{?with_ssl:Requires: openssl-devel}
275 Obsoletes: MySQL-devel
276 Obsoletes: libmysql10-devel
279 This package contains the development header files and libraries
280 necessary to develop MySQL client applications.
282 %description devel -l fr
283 Ce package contient les fichiers entetes et les librairies de
284 developpement necessaires pour developper des applications clientes
287 %description devel -l pl
288 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
291 %description devel -l pt_BR
292 Este pacote contém os arquivos de cabeçalho (header files) e
293 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
295 %description devel -l ru
296 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
297 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
299 %description devel -l uk
300 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
301 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
304 Summary: MySQL static libraries
305 Summary(pl): Biblioteki statyczne MySQL
306 Summary(ru): MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
307 Summary(uk): MySQL - ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ
308 Group: Development/Libraries
309 Requires: %{name}-devel = %{version}-%{release}
310 Obsoletes: MySQL-static
313 MySQL static libraries.
315 %description static -l pl
316 Biblioteki statyczne MySQL.
318 %description static -l ru
319 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
320 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
322 %description static -l uk
323 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
324 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
327 Summary: MySQL - Benchmarks
328 Summary(pl): MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
329 Summary(pt): MySQL - Medições de desempenho
330 Summary(ru): MySQL - ÂÅÎÞÍÁÒËÉ
331 Summary(uk): MySQL - ÂÅÎÞÍÁÒËÉ
332 Group: Applications/Databases
333 Requires: %{name} = %{version}-%{release}
334 Requires: %{name}-client
335 Requires: perl(DBD::mysql)
336 Obsoletes: MySQL-bench
339 This package contains MySQL benchmark scripts and data.
341 %description bench -l pl
342 Programy testuj±ce szybko¶æ serwera MySQL.
344 %description bench -l pt_BR
345 Este pacote contém medições de desempenho de scripts e dados do MySQL.
347 %description bench -l ru
348 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
351 %description bench -l uk
352 ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
355 Summary: MySQL manual
356 Summary(pl): Podrêcznik u¿ytkownika MySQL
357 Group: Applications/Databases
360 This package contains manual in HTML format.
362 %description doc -l pl
363 Podrêcznik MySQL-a w formacie HTML.
366 Summary: MySQL - NDB Storage Engine Daemon
367 Summary(pl): MySQL - demon silnika przechowywania danych NDB
368 Group: Applications/Databases
369 Requires: %{name}-libs = %{version}-%{release}
372 This package contains the standard MySQL NDB Storage Engine Daemon.
374 %description ndb -l pl
375 Ten pakiet zawiera standardowego demona silnika przechowywania danych
379 Summary: MySQL - NDB Clients
380 Summary(pl): MySQL - programy klienckie NDB
381 Group: Applications/Databases
382 Requires: %{name}-libs = %{version}-%{release}
384 %description ndb-client
385 This package contains the standard MySQL NDB Clients.
387 %description ndb-client -l pl
388 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
391 Summary: MySQL - NDB Management Daemon
392 Summary(pl): MySQL - demon zarz±dzaj±cy NDB
393 Group: Applications/Databases
394 Requires: %{name}-libs = %{version}-%{release}
397 This package contains the standard MySQL NDB Management Daemon.
399 %description ndb-mgm -l pl
400 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
403 Summary: MySQL - NDB CPC Daemon
404 Summary(pl): MySQL - demon NDB CPC
405 Group: Applications/Databases
406 Requires: %{name}-libs = %{version}-%{release}
409 This package contains the standard MySQL NDB CPC Daemon.
411 %description ndb-cpc -l pl
412 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
417 %{?with_tcpd:%patch1 -p1}
421 # this is strange: mysqld functions for UDF modules are not explicitly defined,
422 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
423 # in objects compiled without -fPIC
431 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
438 # The compiler flags are as per their "official" spec ;)
439 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
440 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
442 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
443 # and therefore do not add BR on these. These are here just to satisfy
447 FIND_PROC='/bin/ps p $$PID' \
449 CHECK_PID='/bin/kill -0 $$PID' \
453 --enable-thread-safe-client \
454 --with%{!?with_bdb:out}-berkeley-db \
455 --with%{!?with_innodb:out}-innodb \
456 --with%{!?with_isam:out}-isam \
457 --with%{!?with_raid:out}-raid \
458 --with%{!?with_ssl:out}-openssl \
459 --with%{!?with_tcpd:out}-libwrap \
460 %{?with_big_tables:--with-big-tables} \
461 --with-comment="PLD Linux Distribution MySQL RPM" \
462 --with%{!?debug:out}-debug \
463 --with-embedded-server \
464 --with-extra-charsets=all \
466 --with-mysqld-user=mysql \
467 --with-named-curses-libs="-lncurses" \
468 --with-named-thread-libs="-lpthread" \
469 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
470 --with-archive-storage-engine \
477 # --with-ndb-test --with-ndb-docs
479 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
480 # (it defaults to first cluster but user may change it to whatever
483 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
486 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
488 %{__make} -C Docs mysql.info
491 rm -rf $RPM_BUILD_ROOT
492 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
493 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
494 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
497 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
502 DESTDIR=$RPM_BUILD_ROOT \
503 benchdir=%{_datadir}/sql-bench \
505 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
507 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
509 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
510 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
511 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
512 # This is template for configuration file which is created after 'service mysql init'
513 install %{SOURCE4} mysqld.conf
514 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
515 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
516 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
518 # remove innodb directives from mysqld.conf if mysqld is configured without
519 %if %{without innodb}
520 cp mysqld.conf mysqld.tmp
521 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
524 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
526 cp mysqld.conf mysqld.tmp
527 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
530 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
531 install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
534 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
535 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
536 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
537 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
538 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
539 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
541 # remove .txt variants for .sys messages
542 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
544 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
545 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
547 # remove known unpackaged files
548 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
550 # rename not to be so generic name
551 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
552 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
554 # functionality in initscript / rpm
555 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
556 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
557 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
558 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
559 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
560 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
561 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
562 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
563 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
564 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
567 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
570 rm -rf $RPM_BUILD_ROOT
573 %groupadd -g 89 mysql
574 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
577 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
578 /sbin/chkconfig --add mysql
580 if [ "$1" = 1 ]; then
581 %banner -e %{name}-4.1.x <<-EOF
582 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
583 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
588 %service mysql restart || :
591 if [ "$1" = "0" ]; then
592 %service -q mysql stop
593 /sbin/chkconfig --del mysql
597 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
598 if [ "$1" = "0" ]; then
604 /sbin/chkconfig --add mysql-ndb
605 if [ -f /var/lock/subsys/mysql-ndb ]; then
606 /etc/rc.d/init.d/mysql-ndb restart >&2
608 echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
612 if [ "$1" = "0" ]; then
613 if [ -f /var/lock/subsys/mysql-ndb ]; then
614 /etc/rc.d/init.d/mysql-ndb stop
616 /sbin/chkconfig --del mysql-ndb
620 /sbin/chkconfig --add mysql-ndb-mgm
621 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
622 /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
624 echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
628 if [ "$1" = "0" ]; then
629 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
630 /etc/rc.d/init.d/mysql-ndb-mgm stop
632 /sbin/chkconfig --del mysql-ndb-mgm
636 /sbin/chkconfig --add mysql-ndb-cpc
637 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
638 /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
640 echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
644 if [ "$1" = "0" ]; then
645 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
646 /etc/rc.d/init.d/mysql-ndb-cpc stop
648 /sbin/chkconfig --del mysql-ndb-cpc
651 %post libs -p /sbin/ldconfig
652 %postun libs -p /sbin/ldconfig
654 %triggerpostun -- mysql <= 4.0.20-2
655 # For clusters in /etc/mysql/clusters.conf
656 if [ -f "/etc/sysconfig/mysql" ]; then
657 . /etc/sysconfig/mysql
658 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
659 for i in "$MYSQL_DB_CLUSTERS"; do
660 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
662 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
663 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
664 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
665 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
669 %triggerpostun -- mysql <= 4.1.1
670 # For better compatibility with prevoius versions:
671 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
672 if echo "$config" | grep -q '^/'; then
673 config_file="$config"
674 elif [ -f "/etc/mysql/$config" ]; then
675 config_file=/etc/mysql/$config
677 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
678 if [ -z "$clusterdir" ]; then
679 echo >&2 "Can't find cluster dir for $config!"
680 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
683 config_file="$clusterdir/mysqld.conf"
686 if [ ! -f "$config_file" ]; then
687 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
690 echo "Adding option old-passwords to config: $config_file"
691 echo "If you want to use new, better passwords - remove it"
693 # sed magic to add 'old-passwords' to [mysqld] section
694 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
696 a; Compatibility options:
702 %banner -e %{name}-4.1.x <<-EOF
703 If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
704 zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
709 %defattr(644,root,root,755)
710 %doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
711 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
712 %attr(754,root,root) /etc/rc.d/init.d/mysql
713 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
714 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
715 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
716 %attr(755,root,root) %{_bindir}/isamchk
717 %attr(755,root,root) %{_bindir}/isamlog
718 %attr(755,root,root) %{_bindir}/myisamchk
719 %attr(755,root,root) %{_bindir}/myisamlog
720 %attr(755,root,root) %{_bindir}/myisampack
721 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
722 %attr(755,root,root) %{_bindir}/pack_isam
723 %attr(755,root,root) %{_bindir}/my_print_defaults
724 %attr(755,root,root) %{_sbindir}/mysqld
725 %{_mandir}/man1/isamchk.1*
726 %{_mandir}/man1/isamlog.1*
727 %{_mandir}/man1/mysql_fix_privilege_tables.1*
728 %{_mandir}/man1/mysqld.1*
730 %attr(700,mysql,mysql) %{_mysqlhome}
731 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
732 %attr(751,root,root) /var/lib/mysql
733 %attr(750,mysql,mysql) %dir /var/log/mysql
734 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
735 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
737 %{_infodir}/mysql.info*
738 %dir %{_datadir}/mysql
739 # This is template for configuration file which is created after 'service mysql init'
740 %{_datadir}/mysql/mysqld.conf
741 %{_datadir}/mysql/charsets
742 %{_datadir}/mysql/english
743 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
744 %lang(cs) %{_datadir}/mysql/czech
745 %lang(da) %{_datadir}/mysql/danish
746 %lang(de) %{_datadir}/mysql/german
747 %lang(el) %{_datadir}/mysql/greek
748 %lang(es) %{_datadir}/mysql/spanish
749 %lang(et) %{_datadir}/mysql/estonian
750 %lang(fr) %{_datadir}/mysql/french
751 %lang(hu) %{_datadir}/mysql/hungarian
752 %lang(it) %{_datadir}/mysql/italian
753 %lang(ja) %{_datadir}/mysql/japanese
754 %lang(ja) %{_datadir}/mysql/japanese-sjis
755 %lang(ko) %{_datadir}/mysql/korean
756 %lang(nl) %{_datadir}/mysql/dutch
757 %lang(nb) %{_datadir}/mysql/norwegian
758 %lang(nn) %{_datadir}/mysql/norwegian-ny
759 %lang(pl) %{_datadir}/mysql/polish
760 %lang(pt) %{_datadir}/mysql/portuguese
761 %lang(ro) %{_datadir}/mysql/romanian
762 %lang(ru) %{_datadir}/mysql/russian
763 %lang(sr) %{_datadir}/mysql/serbian
764 %lang(sk) %{_datadir}/mysql/slovak
765 %lang(sv) %{_datadir}/mysql/swedish
766 %lang(uk) %{_datadir}/mysql/ukrainian
769 %defattr(644,root,root,755)
770 %attr(755,root,root) %{_bindir}/msql2mysql
771 %attr(755,root,root) %{_bindir}/perror
772 %attr(755,root,root) %{_bindir}/replace
773 %attr(755,root,root) %{_bindir}/resolveip
774 %attr(755,root,root) %{_bindir}/myisam_ftdump
775 %attr(755,root,root) %{_bindir}/mysql_secure_installation
776 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
777 %attr(755,root,root) %{_bindir}/mysqlcheck
778 %{_mandir}/man1/perror.1*
779 %{_mandir}/man1/replace.1*
782 %defattr(644,root,root,755)
783 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
784 %attr(755,root,root) %{_bindir}/mysqldumpslow
785 %attr(755,root,root) %{_bindir}/mysqlhotcopy
786 %attr(755,root,root) %{_bindir}/mysql_setpermission
787 %attr(755,root,root) %{_bindir}/mysql_zap
788 %attr(755,root,root) %{_bindir}/mysql_find_rows
789 %attr(755,root,root) %{_bindir}/mysqlaccess
790 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
791 %attr(755,root,root) %{_bindir}/mysql_explain_log
792 %attr(755,root,root) %{_bindir}/mysql_tableinfo
793 %{_mandir}/man1/mysql_zap.1*
794 %{_mandir}/man1/mysqlaccess.1*
797 %defattr(644,root,root,755)
798 %attr(755,root,root) %{_bindir}/mysql
799 %attr(755,root,root) %{_bindir}/mysqlbug
800 %attr(755,root,root) %{_bindir}/mysqldump
801 %attr(755,root,root) %{_bindir}/mysqlimport
802 %attr(755,root,root) %{_bindir}/mysqlmanager*
803 %attr(755,root,root) %{_bindir}/mysqlshow
804 %attr(755,root,root) %{_bindir}/mysqlbinlog
805 %attr(755,root,root) %{_bindir}/mysqladmin
806 %{_mandir}/man1/mysql.1*
807 %{_mandir}/man1/mysqladmin.1*
808 %{_mandir}/man1/mysqldump.1*
809 %{_mandir}/man1/mysqlshow.1*
812 %defattr(644,root,root,755)
813 %doc EXCEPTIONS-CLIENT
814 %attr(755,root,root) %{_libdir}/lib*.so.*.*
815 %attr(751,root,root) %dir %{_sysconfdir}/mysql
816 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_bindir}/mysql_config
821 %attr(755,root,root) %{_libdir}/lib*.so
822 %attr(755,root,root) %{_bindir}/*comp_err
823 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
825 %{_libdir}/lib*[!tr].a
829 %defattr(644,root,root,755)
830 %{_libdir}/lib*[tr].a
833 %defattr(644,root,root,755)
834 %attr(755,root,root) %{_bindir}/mysqltest
835 %attr(755,root,root) %{_bindir}/mysql_client_test
836 %dir %{_datadir}/sql-bench
837 %{_datadir}/sql-bench/[CDRl]*
838 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
840 %{_datadir}/mysql/mi_test_all.res
841 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
844 #%defattr(644,root,root,755)
845 #%doc Docs/manual.html Docs/manual_toc.html
848 %defattr(644,root,root,755)
849 %attr(755,root,root) %{_sbindir}/ndbd
850 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
851 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
854 %defattr(644,root,root,755)
855 %attr(755,root,root) %{_bindir}/ndb_*
858 %defattr(644,root,root,755)
859 %attr(755,root,root) %{_sbindir}/ndb_mgmd
860 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
861 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
864 %defattr(644,root,root,755)
865 %attr(755,root,root) %{_sbindir}/ndb_cpcd
866 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
867 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc