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