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