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