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