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