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