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