]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- package the new files into appropriate subpackages instead of just removing them
[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 # rename not to be so generic name
543 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
544 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}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 # functionality in initscript / rpm
553 rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
554 rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
555 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
556 rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
557 rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
558 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
559 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
560 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
561 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/{pre,post}install
562 rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
563
564 # in %doc
565 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
566
567 %clean
568 #rm -rf $RPM_BUILD_ROOT
569
570 %pre
571 %groupadd -g 89 mysql
572 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
573
574 %post
575 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
576 /sbin/chkconfig --add mysql
577 if [ -f /var/lock/subsys/mysql ]; then
578         /etc/rc.d/init.d/mysql restart >&2
579 else
580         echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
581 fi
582
583 %preun
584 if [ "$1" = "0" ]; then
585         if [ -f /var/lock/subsys/mysql ]; then
586                 /etc/rc.d/init.d/mysql stop
587         fi
588         /sbin/chkconfig --del mysql
589 fi
590
591 %postun
592 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
593 if [ "$1" = "0" ]; then
594         %userremove mysql
595         %groupremove mysql
596 fi
597
598 %post ndb
599 /sbin/chkconfig --add mysql-ndb
600 if [ -f /var/lock/subsys/mysql-ndb ]; then
601         /etc/rc.d/init.d/mysql-ndb restart >&2
602 else
603         echo "Run \"/etc/rc.d/init.d/mysql-ndb start\" to start mysql NDB engine." >&2
604 fi
605
606 %preun ndb
607 if [ "$1" = "0" ]; then
608         if [ -f /var/lock/subsys/mysql-ndb ]; then
609                 /etc/rc.d/init.d/mysql-ndb stop
610         fi
611         /sbin/chkconfig --del mysql-ndb
612 fi
613
614 %post ndb-mgm
615 /sbin/chkconfig --add mysql-ndb-mgm
616 if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
617         /etc/rc.d/init.d/mysql-ndb-mgm restart >&2
618 else
619         echo "Run \"/etc/rc.d/init.d/mysql-ndb-mgm start\" to start mysql NDB management node." >&2
620 fi
621
622 %preun ndb-mgm
623 if [ "$1" = "0" ]; then
624         if [ -f /var/lock/subsys/mysql-ndb-mgm ]; then
625                 /etc/rc.d/init.d/mysql-ndb-mgm stop
626         fi
627         /sbin/chkconfig --del mysql-ndb-mgm
628 fi
629
630 %post ndb-cpc
631 /sbin/chkconfig --add mysql-ndb-cpc
632 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
633         /etc/rc.d/init.d/mysql-ndb-cpc restart >&2
634 else
635         echo "Run \"/etc/rc.d/init.d/mysql-ndb-cpc start\" to start mysql NDB CPC." >&2
636 fi
637
638 %preun ndb-cpc
639 if [ "$1" = "0" ]; then
640         if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
641                 /etc/rc.d/init.d/mysql-ndb-cpc stop
642         fi
643         /sbin/chkconfig --del mysql-ndb-cpc
644 fi
645
646 %post   libs -p /sbin/ldconfig
647 %postun libs -p /sbin/ldconfig
648
649 %triggerpostun -- mysql <= 4.0.20-2
650 # For clusters in /etc/mysql/clusters.conf
651 if [ -f "/etc/sysconfig/mysql" ]; then
652         . /etc/sysconfig/mysql
653         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
654                 for i in "$MYSQL_DB_CLUSTERS"; do
655                         echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
656                 done
657                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
658                 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
659                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
660                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
661         fi
662 fi
663
664 %triggerpostun -- mysql <= 4.1.1
665 # For better compatibility with prevoius versions:
666 for config in `grep -v "^#" /etc/mysql/clusters.conf | cut -d"=" -f 1`; do
667         if echo "$config" | grep -q '^/'; then
668                 config_file="$config"
669         elif [ -f "/etc/mysql/$config" ]; then
670                 config_file=/etc/mysql/$config
671         else
672                 config_file="$clusterdir/mysqld.conf"
673         fi
674         echo "Adding option old-passwords to config: $config_file"
675         echo "If you want to use new, better passwords - remove it"
676         echo "# Compatibility options:" >> $config_file
677         echo "old-passwords" >> $config_file
678 done
679
680 %files
681 %defattr(644,root,root,755)
682 %doc support-files/*.cnf support-files/*.ini
683 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
684 %attr(754,root,root) /etc/rc.d/init.d/mysql
685 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
686 %attr(751,root,root) %dir %{_sysconfdir}/mysql
687 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
688 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
689 %attr(755,root,root) %{_bindir}/isamchk
690 %attr(755,root,root) %{_bindir}/isamlog
691 %attr(755,root,root) %{_bindir}/myisamchk
692 %attr(755,root,root) %{_bindir}/myisamlog
693 %attr(755,root,root) %{_bindir}/myisampack
694 %attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
695 %attr(755,root,root) %{_bindir}/pack_isam
696 %attr(755,root,root) %{_bindir}/my_print_defaults
697 %attr(755,root,root) %{_sbindir}/mysqld
698 %{_mandir}/man1/isamchk.1*
699 %{_mandir}/man1/isamlog.1*
700 %{_mandir}/man1/mysql_fix_privilege_tables.1*
701 %{_mandir}/man1/mysqld.1*
702
703 %attr(700,mysql,mysql) %{_mysqlhome}
704 # root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
705 %attr(751,root,root) /var/lib/mysql
706 %attr(750,mysql,mysql) %dir /var/log/mysql
707 %attr(750,mysql,mysql) %dir /var/log/archiv/mysql
708 %attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
709
710 %{_infodir}/mysql.info*
711 %dir %{_datadir}/mysql
712 # This is template for configuration file which is created after 'service mysql init'
713 %{_datadir}/mysql/mysqld.conf
714 %{_datadir}/mysql/charsets
715 %{_datadir}/mysql/english
716 %{_datadir}/mysql/mysql_fix_privilege_tables.sql
717 %lang(cs) %{_datadir}/mysql/czech
718 %lang(da) %{_datadir}/mysql/danish
719 %lang(de) %{_datadir}/mysql/german
720 %lang(el) %{_datadir}/mysql/greek
721 %lang(es) %{_datadir}/mysql/spanish
722 %lang(et) %{_datadir}/mysql/estonian
723 %lang(fr) %{_datadir}/mysql/french
724 %lang(hu) %{_datadir}/mysql/hungarian
725 %lang(it) %{_datadir}/mysql/italian
726 %lang(ja) %{_datadir}/mysql/japanese
727 # FIXME: correct locale!
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}/mysql_client_test
752 %attr(755,root,root) %{_bindir}/mysqlcheck
753 %{_mandir}/man1/perror.1*
754 %{_mandir}/man1/replace.1*
755
756 %files extras-perl
757 %defattr(644,root,root,755)
758 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
759 %attr(755,root,root) %{_bindir}/mysqldumpslow
760 %attr(755,root,root) %{_bindir}/mysqlhotcopy
761 %attr(755,root,root) %{_bindir}/mysql_setpermission
762 %attr(755,root,root) %{_bindir}/mysql_zap
763 %attr(755,root,root) %{_bindir}/mysql_find_rows
764 %attr(755,root,root) %{_bindir}/mysqlaccess
765 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
766 %attr(755,root,root) %{_bindir}/mysql_explain_log
767 %attr(755,root,root) %{_bindir}/mysql_tableinfo
768 %{_mandir}/man1/mysql_zap.1*
769 %{_mandir}/man1/mysqlaccess.1*
770
771 %files client
772 %defattr(644,root,root,755)
773 %attr(755,root,root) %{_bindir}/mysql
774 %attr(755,root,root) %{_bindir}/mysqlbug
775 %attr(755,root,root) %{_bindir}/mysqldump
776 %attr(755,root,root) %{_bindir}/mysqlimport
777 %attr(755,root,root) %{_bindir}/mysqlmanager*
778 %attr(755,root,root) %{_bindir}/mysqlshow
779 %attr(755,root,root) %{_bindir}/mysqlbinlog
780 %attr(755,root,root) %{_bindir}/mysqladmin
781 %attr(755,root,root) %{_bindir}/mysqltest
782 %{_mandir}/man1/mysql.1*
783 %{_mandir}/man1/mysqladmin.1*
784 %{_mandir}/man1/mysqldump.1*
785 %{_mandir}/man1/mysqlshow.1*
786
787 %files libs
788 %defattr(644,root,root,755)
789 %doc EXCEPTIONS-CLIENT
790 %attr(755,root,root) %{_libdir}/lib*.so.*.*
791
792 %files devel
793 %defattr(644,root,root,755)
794 %attr(755,root,root) %{_bindir}/mysql_config
795 %attr(755,root,root) %{_libdir}/lib*.so
796 %attr(755,root,root) %{_bindir}/*comp_err
797 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
798 %{_libdir}/lib*.la
799 %{_libdir}/lib*[!tr].a
800 %{_includedir}/mysql
801
802 %files static
803 %defattr(644,root,root,755)
804 %{_libdir}/lib*[tr].a
805
806 %files bench
807 %defattr(644,root,root,755)
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.09446 seconds and 4 git commands to generate.