]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- added bigtables bcond
[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 %bcond_without  innodb  # Without InnoDB support
9 %bcond_without  isam    # Without ISAM table format (used in mysql 3.22)
10 %bcond_without  raid    # Without raid
11 %bcond_without  ssl     # Without OpenSSL
12 %bcond_without  tcpd    # Without libwrap (tcp_wrappers) support
13 %bcond_with             big_tables      # enable '--with-big-tables', some performance loss on 32bit arch, but can do >= 4GB database tables.
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.4
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}-align.patch
51 Icon:           mysql.gif
52 URL:            http://www.mysql.com/
53 #BuildRequires: ORBit-devel
54 BuildRequires:  autoconf
55 BuildRequires:  automake
56 %{?with_bdb:BuildRequires:      db3-devel}
57 BuildRequires:  libstdc++-devel >= 5:3.0
58 BuildRequires:  libtool
59 %{?with_tcpd:BuildRequires:     libwrap-devel}
60 BuildRequires:  ncurses-devel >= 4.2
61 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
62 BuildRequires:  perl-DBI
63 BuildRequires:  perl-devel >= 1:5.6.1
64 BuildRequires:  readline-devel >= 4.2
65 BuildRequires:  rpm-perlprov >= 4.1-13
66 BuildRequires:  rpmbuild(macros) >= 1.202
67 BuildRequires:  texinfo
68 BuildRequires:  zlib-devel
69 PreReq:         rc-scripts >= 0.2.0
70 Requires(pre):  /usr/bin/getgid
71 Requires(pre):  /bin/id
72 Requires(pre):  /usr/sbin/groupadd
73 Requires(pre):  /usr/sbin/useradd
74 Requires(postun):       /usr/sbin/userdel
75 Requires(postun):       /usr/sbin/groupdel
76 Requires(post,preun):   /sbin/chkconfig
77 Requires:       %{name}-libs = %{version}-%{release}
78 Requires:       /usr/bin/setsid
79 Provides:       MySQL-server
80 Provides:       group(mysql)
81 Provides:       msqlormysql
82 Provides:       user(mysql)
83 Obsoletes:      MySQL
84 Obsoletes:      mysql-server
85 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86
87 %define         _libexecdir     %{_sbindir}
88 %define         _localstatedir  /var/lib/mysql
89 %define         _mysqlhome      /home/services/mysql
90
91 %define         _noautoreqdep   'perl(DBD::mysql)'
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, z
144 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 de
153 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
154 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
155 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
156 einem Primärschlüssel versehen werden. Es ist aber keine Definition
157 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
158 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
159 Daten verantwortlich. Allein durch die Nutzung externer
160 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
161 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
162
163 %description -l pt_BR
164 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
165 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
166 dados no mundo. O MySQL é uma implementação cliente/servidor que
167 consiste de um servidor chamado mysqld e diversos
168 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
169 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
170 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
171 pudesse lidar com grandes bases de dados e com uma velocidade muito
172 maior do que a que qualquer vendedor podia nos oferecer. Estamos
173 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
174 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
175 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
176 A base da construção do MySQL é uma série de rotinas que foram usadas
177 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
178 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
179 funções muito ricas e úteis. Veja a documentação para maiores
180 informações.
181
182 %description -l ru
183 MySQL - ÜÔÏ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÙ ÄÁÎÎÙÈ. MySQL
184 ÂÙÌÁ ÎÁÐÉÓÁÎÁ Michael'ÏÍ (monty) Widenius'ÏÍ. óÍ. ÆÁÊÌ CREDITS ×
185 ÄÉÓÔÒÉÂÕÔÉ×Å ÎÁ ÐÒÅÄÍÅÔ ÄÒÕÇÉÈ ÕÞÁÓÔÎÉËÏ× ÐÒÏÅËÔÁ É ÐÒÏÞÅÊ ÉÎÆÏÒÍÁÃÉÉ
186 Ï MySQL.
187
188 %description -l uk
189 MySQL - ÃÅ SQL (Structured Query Language) ÓÅÒ×ÅÒ ÂÁÚÉ ÄÁÎÉÈ. MySQL
190 ÂÕÌÏ ÎÁÐÉÓÁÎÏ Michael'ÏÍ (monty) Widenius'ÏÍ. äÉ×. ÆÁÊÌ CREDITS ×
191 ÄÉÓÔÒÉÂÕÔÉצ ÄÌÑ ¦ÎÆÏÒÍÁ槠ÐÒÏ ¦ÎÛÉÈ ÕÞÁÓÎÉ˦נÐÒÏÅËÔÕ ÔÁ ¦ÎÛϧ
192 ¦ÎÆÏÒÍÁæ§.
193
194 %package extras
195 Summary:        MySQL additional utilities
196 Summary(pl):    Dodatkowe narzêdzia do MySQL
197 Group:          Applications/Databases
198 Requires:       %{name}-libs = %{version}-%{release}
199
200 %description extras
201 MySQL additional utilities except Perl scripts (they may be found in
202 %{name}-extras-perl package).
203
204 %description extras -l pl
205 Dodatkowe narzêdzia do MySQL - z wyj±tkiem skryptów Perla (które s± w
206 pakiecie %{name}-extras-perl).
207
208 %package extras-perl
209 Summary:        MySQL additional utilities written in Perl
210 Summary(pl):    Dodatkowe narzêdzia do MySQL napisane w Perlu
211 Group:          Applications/Databases
212 Requires:       %{name}-extras = %{version}-%{release}
213 Requires:       perl(DBD::mysql)
214
215 %description extras-perl
216 MySQL additional utilities written in Perl.
217
218 %description extras-perl -l pl
219 Dodatkowe narzêdzia do MySQL napisane w Perlu.
220
221 %package client
222 Summary:        MySQL - Client
223 Summary(pl):    MySQL - Klient
224 Summary(pt):    MySQL - Cliente
225 Summary(ru):    MySQL ËÌÉÅÎÔ
226 Summary(uk):    MySQL Ë̦¤ÎÔ
227 Group:          Applications/Databases
228 Requires:       %{name}-libs = %{version}-%{release}
229 Obsoletes:      MySQL-client
230
231 %description client
232 This package contains the standard MySQL clients.
233
234 %description client -l fr
235 Ce package contient les clients MySQL standards.
236
237 %description client -l pl
238 Standardowe programy klienckie MySQL.
239
240 %description client -l pt_BR
241 Este pacote contém os clientes padrão para o MySQL.
242
243 %description client -l ru
244 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ËÌÉÅÎÔ MySQL.
245
246 %description client -l uk
247 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ Ô¦ÌØËÉ Ë̦¤ÎÔÁ MySQL.
248
249 %package libs
250 Summary:        Shared libraries for MySQL
251 Summary(pl):    Biblioteki dzielone MySQL
252 Group:          Applications/Databases
253 Obsoletes:      libmysql10
254
255 %description libs
256 Shared libraries for MySQL.
257
258 %description libs -l pl
259 Biblioteki dzielone MySQL.
260
261 %package devel
262 Summary:        MySQL - Development header files and libraries
263 Summary(pl):    MySQL - Pliki nag³ówkowe i biblioteki dla programistów
264 Summary(pt):    MySQL - Medições de desempenho
265 Summary(ru):    MySQL - ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ
266 Summary(uk):    MySQL - ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
267 Group:          Development/Libraries
268 Requires:       %{name}-libs = %{version}-%{release}
269 %{?with_ssl:Requires:   openssl-devel}
270 Requires:       zlib-devel
271 Obsoletes:      MySQL-devel
272 Obsoletes:      libmysql10-devel
273
274 %description devel
275 This package contains the development header files and libraries
276 necessary to develop MySQL client applications.
277
278 %description devel -l fr
279 Ce package contient les fichiers entetes et les librairies de
280 developpement necessaires pour developper des applications clientes
281 MySQL.
282
283 %description devel -l pl
284 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
285 klienckich MySQL.
286
287 %description devel -l pt_BR
288 Este pacote contém os arquivos de cabeçalho (header files) e
289 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
290
291 %description devel -l ru
292 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
293 ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
294
295 %description devel -l uk
296 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
297 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
298
299 %package static
300 Summary:        MySQL static libraries
301 Summary(pl):    Biblioteki statyczne MySQL
302 Summary(ru):    MySQL - ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ
303 Summary(uk):    MySQL - ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ
304 Group:          Development/Libraries
305 Requires:       %{name}-devel = %{version}-%{release}
306 Obsoletes:      MySQL-static
307
308 %description static
309 MySQL static libraries.
310
311 %description static -l pl
312 Biblioteki statyczne MySQL.
313
314 %description static -l ru
315 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ, ÎÅÏÂÈÏÄÉÍÙÅ
316 ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ËÌÉÅÎÔÓËÉÈ ÐÒÉÌÏÖÅÎÉÊ.
317
318 %description static -l uk
319 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ, ÎÅÏÂȦÄΦ ÄÌÑ
320 ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ-Ë̦¤ÎÔ¦×.
321
322 %package bench
323 Summary:        MySQL - Benchmarks
324 Summary(pl):    MySQL - Programy testuj±ce szybko¶æ dzia³ania bazy
325 Summary(pt):    MySQL - Medições de desempenho
326 Summary(ru):    MySQL - ÂÅÎÞÍÁÒËÉ
327 Summary(uk):    MySQL - ÂÅÎÞÍÁÒËÉ
328 Group:          Applications/Databases
329 Requires:       %{name} = %{version}-%{release}
330 Requires:       %{name}-client
331 Requires:       perl(DBD::mysql)
332 Obsoletes:      MySQL-bench
333
334 %description bench
335 This package contains MySQL benchmark scripts and data.
336
337 %description bench -l pl
338 Programy testuj±ce szybko¶æ serwera MySQL.
339
340 %description bench -l pt_BR
341 Este pacote contém medições de desempenho de scripts e dados do MySQL.
342
343 %description bench -l ru
344 üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓËÒÉÐÔÙ É ÄÁÎÎÙÅ ÄÌÑ ÏÃÅÎËÉ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ
345 MySQL.
346
347 %description bench -l uk
348 ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓËÒÉÐÔÉ ÔÁ ÄÁΦ ÄÌÑ ÏæÎËÉ ÐÒÏÄÕËÔÉ×ÎÏÓÔ¦ MySQL.
349
350 %package doc
351 Summary:        MySQL manual
352 Summary(pl):    Podrêcznik u¿ytkownika MySQL
353 Group:          Applications/Databases
354
355 %description doc
356 This package contains manual in HTML format.
357
358 %description doc -l pl
359 Podrêcznik MySQL-a w formacie HTML.
360
361 %package ndb
362 Summary:        MySQL - NDB Storage Engine Daemon
363 Summary(pl):    MySQL - demon silnika przechowywania danych NDB
364 Group:          Applications/Databases
365 Requires:       %{name}-libs = %{version}-%{release}
366
367 %description ndb
368 This package contains the standard MySQL NDB Storage Engine Daemon.
369
370 %description ndb -l pl
371 Ten pakiet zawiera standardowego demona silnika przechowywania danych
372 NDB.
373
374 %package ndb-client
375 Summary:        MySQL - NDB Clients
376 Summary(pl):    MySQL - programy klienckie NDB
377 Group:          Applications/Databases
378 Requires:       %{name}-libs = %{version}-%{release}
379
380 %description ndb-client
381 This package contains the standard MySQL NDB Clients.
382
383 %description ndb-client -l pl
384 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
385
386 %package ndb-mgm
387 Summary:        MySQL - NDB Management Daemon
388 Summary(pl):    MySQL - demon zarz±dzaj±cy NDB
389 Group:          Applications/Databases
390 Requires:       %{name}-libs = %{version}-%{release}
391
392 %description ndb-mgm
393 This package contains the standard MySQL NDB Management Daemon.
394
395 %description ndb-mgm -l pl
396 Ten pakiet zawiera standardowego demona zarz±dzaj±cego MySQL NDB.
397
398 %package ndb-cpc
399 Summary:        MySQL - NDB CPC Daemon
400 Summary(pl):    MySQL - demon NDB CPC
401 Group:          Applications/Databases
402 Requires:       %{name}-libs = %{version}-%{release}
403
404 %description ndb-cpc
405 This package contains the standard MySQL NDB CPC Daemon.
406
407 %description ndb-cpc -l pl
408 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
409
410 %prep
411 %setup -q
412 %patch0 -p1
413 %{?with_tcpd:%patch1 -p1}
414 %patch2 -p1
415 %patch3 -p1
416 %ifarch alpha
417 # this is strange: mysqld functions for UDF modules are not explicitly defined,
418 # so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
419 # in objects compiled without -fPIC
420 %patch4 -p1
421 %endif
422 %patch5 -p1
423 %patch6 -p1
424 %patch7 -p1
425
426 %{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
427
428 %build
429 %{__libtoolize}
430 %{__aclocal}
431 %{__automake}
432 %{__autoconf}
433 # The compiler flags are as per their "official" spec ;)
434 CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
435 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
436
437 # NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
438 # and therefore do not add BR on these. These are here just to satisfy
439 # configure.
440 %configure \
441         PS='/bin/ps' \
442         FIND_PROC='/bin/ps p $$PID' \
443         KILL='/bin/kill' \
444         CHECK_PID='/bin/kill -0 $$PID' \
445         --enable-assembler \
446         --enable-shared \
447         --enable-static \
448         --enable-thread-safe-client \
449         --with%{!?with_bdb:out}-berkeley-db \
450         --with%{!?with_innodb:out}-innodb \
451         --with%{!?with_isam:out}-isam \
452         --with%{!?with_raid:out}-raid \
453         --with%{!?with_ssl:out}-openssl \
454         --with%{!?with_tcpd:out}-libwrap \
455         %{?with_big_tables:--with-big-tables} \
456         --with-comment="PLD Linux Distribution MySQL RPM" \
457         --with%{!?debug:out}-debug \
458         --with-embedded-server \
459         --with-extra-charsets=all \
460         --with-low-memory \
461         --with-mysqld-user=mysql \
462         --with-named-curses-libs="-lncurses" \
463         --with-named-thread-libs="-lpthread" \
464         --with-unix-socket-path=/var/lib/mysql/mysql.sock \
465         --with-vio \
466         --with-ndbcluster \
467         --without-readline \
468         --without-libedit \
469         --without-docs
470 #       --with-mysqlfs
471 #       --with-ndb-test --with-ndb-docs
472
473 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
474 # (it defaults to first cluster but user may change it to whatever
475 # cluster it wants)
476
477 echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
478
479 %{__make} \
480         benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
481
482 %{__make} -C Docs mysql.info
483
484 %install
485 rm -rf $RPM_BUILD_ROOT
486 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,monit} \
487            $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
488            $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
489
490 %if %{with bdb}
491 install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
492 %endif
493
494 # Make install
495 %{__make} install \
496         DESTDIR=$RPM_BUILD_ROOT \
497         benchdir=%{_datadir}/sql-bench \
498         libsdir=/tmp
499 # libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
500
501 install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
502
503 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
504 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
505 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
506 # This is template for configuration file which is created after 'service mysql init'
507 install %{SOURCE4} mysqld.conf
508 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
509 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/monit
510 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
511
512 # remove innodb directives from mysqld.conf if mysqld is configured without
513 %if %{without innodb}
514         cp mysqld.conf mysqld.tmp
515         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
516 %endif
517
518 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
519 %if %{without bdb}
520         cp mysqld.conf mysqld.tmp
521         awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
522 %endif
523
524 install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
525
526 # NDB
527 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
528 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
529 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
530 install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
531 install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
532 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
533
534 # remove .txt variants for .sys messages
535 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
536
537 mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
538 %{__perl} -pi -e 's,%{_libdir}/mysql,%{_libdir},;' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient.la
539
540 # remove known unpackaged files
541 rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
542
543 # rename not to be so generic name
544 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
545 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
546
547 # not our OS
548 rm $RPM_BUILD_ROOT%{_bindir}/make_win_*_distribution
549 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.plist
550 # unuseful stuff
551 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.spec
552
553 # functionality in initscript / rpm
554 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
555 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
556 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
557 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
558 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
559 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
560 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
561 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
562 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/{pre,post}install
563 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
564
565 # in %doc
566 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
567
568 %clean
569 rm -rf $RPM_BUILD_ROOT
570
571 %pre
572 %groupadd -g 89 mysql
573 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
574
575 %post
576 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
577 /sbin/chkconfig --add mysql
578 if [ -f /var/lock/subsys/mysql ]; then
579         /etc/rc.d/init.d/mysql restart >&2
580 else
581         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
582 fi
583
584 %preun
585 if [ "$1" = "0" ]; then
586         if [ -f /var/lock/subsys/mysql ]; then
587                 /etc/rc.d/init.d/mysql stop
588         fi
589         /sbin/chkconfig --del mysql
590 fi
591
592 %postun
593 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
594 if [ "$1" = "0" ]; then
595         %userremove mysql
596         %groupremove mysql
597 fi
598
599 %post ndb
600 /sbin/chkconfig --add mysql-ndb
601 if [ -f /var/lock/subsys/mysql-ndb ]; then
602         /etc/rc.d/init.d/mysql-ndb restart >&2
603 else
604         echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
605 fi
606
607 %preun ndb
608 if [ "$1" = "0" ]; then
609         if [ -f /var/lock/subsys/mysql-ndb ]; then
610                 /etc/rc.d/init.d/mysql-ndb stop
611         fi
612         /sbin/chkconfig --del mysql-ndb
613 fi
614
615 %post ndb-mgm
616 /sbin/chkconfig --add mysql-ndb-mgm
617 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
618         /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
619 else
620         echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
621 fi
622
623 %preun ndb-mgm
624 if [ "$1" = "0" ]; then
625         if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
626                 /etc/rc.d/init.d/mysql-ndb-mgm stop
627         fi
628         /sbin/chkconfig --del mysql-ndb-mgm
629 fi
630
631 %post ndb-cpc
632 /sbin/chkconfig --add mysql-ndb-cpc
633 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
634         /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
635 else
636         echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
637 fi
638
639 %preun ndb-cpc
640 if [ "$1" = "0" ]; then
641         if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
642                 /etc/rc.d/init.d/mysql-ndb-cpc stop
643         fi
644         /sbin/chkconfig --del mysql-ndb-cpc
645 fi
646
647 %post   libs -p /sbin/ldconfig
648 %postun libs -p /sbin/ldconfig
649
650 %triggerpostun -- mysql <= 4.0.20-2
651 # For clusters in /etc/mysql/clusters.conf
652 if [ -f "/etc/sysconfig/mysql" ]; then
653         . /etc/sysconfig/mysql
654         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
655                 for i in "$MYSQL_DB_CLUSTERS"; do
656                         echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
657                 done
658                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
659                 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
660                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
661                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
662         fi
663 fi
664
665 %triggerpostun -- mysql <= 4.1.1
666 # For better compatibility with prevoius versions:
667 for config in `grep -v "^#" /etc/mysql/clusters.conf | cut -d"=" -f 1`; do
668         if echo "$config" | grep -q '^/'; then
669                 config_file="$config"
670         elif [ -f "/etc/mysql/$config" ]; then
671                 config_file=/etc/mysql/$config
672         else
673                 config_file="$clusterdir/mysqld.conf"
674         fi
675         echo "Adding option old-passwords to config: $config_file"
676         echo "If you want to use new, better passwords - remove it"
677         echo "# Compatibility options:" >> $config_file
678         echo "old-passwords" >> $config_file
679 done
680
681 %files
682 %defattr(644,root,root,755)
683 %doc support-files/*.cnf support-files/*.ini
684 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
685 %attr(754,root,root) /etc/rc.d/init.d/mysql
686 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
687 %attr(751,root,root) %dir %{_sysconfdir}/mysql
688 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
689 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
690 %attr(755,root,root) %{_bindir}/isamchk
691 %attr(755,root,root) %{_bindir}/isamlog
692 %attr(755,root,root) %{_bindir}/myisamchk
693 %attr(755,root,root) %{_bindir}/myisamlog
694 %attr(755,root,root) %{_bindir}/myisampack
695 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
696 %attr(755,root,root) %{_bindir}/pack_isam
697 %attr(755,root,root) %{_bindir}/my_print_defaults
698 %attr(755,root,root) %{_sbindir}/mysqld
699 %{_mandir}/man1/isamchk.1*
700 %{_mandir}/man1/isamlog.1*
701 %{_mandir}/man1/mysql_fix_privilege_tables.1*
702 %{_mandir}/man1/mysqld.1*
703
704 %attr(700,mysql,mysql) %{_mysqlhome}
705 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
706 %attr(751,root,root) /var/lib/mysql
707 %attr(750,mysql,mysql) %dir /var/log/mysql
708 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
709 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
710
711 %{_infodir}/mysql.info*
712 %dir %{_datadir}/mysql
713 # This is template for configuration file which is created after 'service mysql init'
714 %{_datadir}/mysql/mysqld.conf
715 %{_datadir}/mysql/charsets
716 %{_datadir}/mysql/english
717 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
718 %lang(cs) %{_datadir}/mysql/czech
719 %lang(da) %{_datadir}/mysql/danish
720 %lang(de) %{_datadir}/mysql/german
721 %lang(el) %{_datadir}/mysql/greek
722 %lang(es) %{_datadir}/mysql/spanish
723 %lang(et) %{_datadir}/mysql/estonian
724 %lang(fr) %{_datadir}/mysql/french
725 %lang(hu) %{_datadir}/mysql/hungarian
726 %lang(it) %{_datadir}/mysql/italian
727 %lang(ja) %{_datadir}/mysql/japanese
728 %lang(ja) %{_datadir}/mysql/japanese-sjis
729 %lang(ko) %{_datadir}/mysql/korean
730 %lang(nl) %{_datadir}/mysql/dutch
731 %lang(nb) %{_datadir}/mysql/norwegian
732 %lang(nn) %{_datadir}/mysql/norwegian-ny
733 %lang(pl) %{_datadir}/mysql/polish
734 %lang(pt) %{_datadir}/mysql/portuguese
735 %lang(ro) %{_datadir}/mysql/romanian
736 %lang(ru) %{_datadir}/mysql/russian
737 %lang(sr) %{_datadir}/mysql/serbian
738 %lang(sk) %{_datadir}/mysql/slovak
739 %lang(sv) %{_datadir}/mysql/swedish
740 %lang(uk) %{_datadir}/mysql/ukrainian
741
742 %files extras
743 %defattr(644,root,root,755)
744 %attr(755,root,root) %{_bindir}/msql2mysql
745 %attr(755,root,root) %{_bindir}/perror
746 %attr(755,root,root) %{_bindir}/replace
747 %attr(755,root,root) %{_bindir}/resolveip
748 %attr(755,root,root) %{_bindir}/myisam_ftdump
749 %attr(755,root,root) %{_bindir}/mysql_secure_installation
750 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
751 %attr(755,root,root) %{_bindir}/mysqlcheck
752 %{_mandir}/man1/perror.1*
753 %{_mandir}/man1/replace.1*
754
755 %files extras-perl
756 %defattr(644,root,root,755)
757 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
758 %attr(755,root,root) %{_bindir}/mysqldumpslow
759 %attr(755,root,root) %{_bindir}/mysqlhotcopy
760 %attr(755,root,root) %{_bindir}/mysql_setpermission
761 %attr(755,root,root) %{_bindir}/mysql_zap
762 %attr(755,root,root) %{_bindir}/mysql_find_rows
763 %attr(755,root,root) %{_bindir}/mysqlaccess
764 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
765 %attr(755,root,root) %{_bindir}/mysql_explain_log
766 %attr(755,root,root) %{_bindir}/mysql_tableinfo
767 %{_mandir}/man1/mysql_zap.1*
768 %{_mandir}/man1/mysqlaccess.1*
769
770 %files client
771 %defattr(644,root,root,755)
772 %attr(755,root,root) %{_bindir}/mysql
773 %attr(755,root,root) %{_bindir}/mysqlbug
774 %attr(755,root,root) %{_bindir}/mysqldump
775 %attr(755,root,root) %{_bindir}/mysqlimport
776 %attr(755,root,root) %{_bindir}/mysqlmanager*
777 %attr(755,root,root) %{_bindir}/mysqlshow
778 %attr(755,root,root) %{_bindir}/mysqlbinlog
779 %attr(755,root,root) %{_bindir}/mysqladmin
780 %{_mandir}/man1/mysql.1*
781 %{_mandir}/man1/mysqladmin.1*
782 %{_mandir}/man1/mysqldump.1*
783 %{_mandir}/man1/mysqlshow.1*
784
785 %files libs
786 %defattr(644,root,root,755)
787 %doc EXCEPTIONS-CLIENT
788 %attr(755,root,root) %{_libdir}/lib*.so.*.*
789
790 %files devel
791 %defattr(644,root,root,755)
792 %attr(755,root,root) %{_bindir}/mysql_config
793 %attr(755,root,root) %{_libdir}/lib*.so
794 %attr(755,root,root) %{_bindir}/*comp_err
795 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
796 %{_libdir}/lib*.la
797 %{_libdir}/lib*[!tr].a
798 %{_includedir}/mysql
799
800 %files static
801 %defattr(644,root,root,755)
802 %{_libdir}/lib*[tr].a
803
804 %files bench
805 %defattr(644,root,root,755)
806 %attr(755,root,root) %{_bindir}/mysqltest
807 %attr(755,root,root) %{_bindir}/mysql_client_test
808 %dir %{_datadir}/sql-bench
809 %{_datadir}/sql-bench/[CDRl]*
810 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
811 # wrong dir?
812 %{_datadir}/mysql/mi_test_all.res
813 %attr(755,root,root) %{_datadir}/mysql/mi_test_all
814
815 #%files doc
816 #%defattr(644,root,root,755)
817 #%doc Docs/manual.html Docs/manual_toc.html
818
819 %files ndb
820 %defattr(644,root,root,755)
821 %attr(755,root,root) %{_sbindir}/ndbd
822 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
823 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
824
825 %files ndb-client
826 %defattr(644,root,root,755)
827 %attr(755,root,root) %{_bindir}/ndb_*
828
829 %files ndb-mgm
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_sbindir}/ndb_mgmd
832 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
833 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
834
835 %files ndb-cpc
836 %defattr(644,root,root,755)
837 %attr(755,root,root) %{_sbindir}/ndb_cpcd
838 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
839 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
This page took 0.153425 seconds and 3 git commands to generate.