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