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