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