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