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