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