]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
- rel 2; make internal libhsclient static
[packages/mysql.git] / mysql.spec
1 # TODO:
2 # - mysqldump ... (invalid usage) prints to stdout not stderr (idiotic if you want to create dump and get usage in .sql)
3 # - http://bugs.mysql.com/bug.php?id=16470
4 # - innodb are dynamic (= as plugins) ?
5 # - missing have_archive, have_merge
6 # - is plugin_dir lib64 safe?
7 # - Using NDB Cluster... could not find sci transporter in /{include, lib}
8 # - !!! Makefiles for libmysqld.so !!!
9 # - segfaults on select from non-mysql user (caused by builder environment):
10 #     https://bugs.launchpad.net/pld-linux/+bug/381904
11 #     (profiling disabled temporaily to workaround this)
12 #
13 # Conditional build:
14 %bcond_with     autodeps        # BR packages needed only for resolving deps
15 %bcond_without  innodb          # InnoDB storage engine support
16 %bcond_without  big_tables      # Support tables with more than 4G rows even on 32 bit platforms
17 %bcond_without  federated       # Federated storage engine support
18 %bcond_without  raid            # RAID support
19 %bcond_without  ssl             # OpenSSL support
20 %bcond_without  systemtap       # systemtap/dtrace probes
21 %bcond_without  tcpd            # libwrap (tcp_wrappers) support
22 %bcond_without  sphinx          # Sphinx storage engine support
23 %bcond_without  tokudb          # TokuDB
24 %bcond_with     tests           # FIXME: don't run correctly
25 %bcond_with     ndb             # NDB is now a separate product, this here is broken, so disable it
26 %bcond_with     system_hsclient # breaks builds with percona >= 5.6.33
27
28 # tokudb is only supported on x86_64
29 %ifnarch %{x8664}
30 %undefine       with_tokudb
31 %endif
32
33 %define         rel     2
34 %define         percona_rel     79.1
35 %include        /usr/lib/rpm/macros.perl
36 Summary:        MySQL: a very fast and reliable SQL database engine
37 Summary(de.UTF-8):      MySQL: ist eine SQL-Datenbank
38 Summary(fr.UTF-8):      MySQL: un serveur SQL rapide et fiable
39 Summary(pl.UTF-8):      MySQL: bardzo szybka i niezawodna baza danych (SQL)
40 Summary(pt_BR.UTF-8):   MySQL: Um servidor SQL rápido e confiável
41 Summary(ru.UTF-8):      MySQL - быстрый SQL-сервер
42 Summary(uk.UTF-8):      MySQL - швидкий SQL-сервер
43 Summary(zh_CN.UTF-8):   MySQL数据库服务器
44 Name:           mysql
45 Version:        5.6.34
46 Release:        %{percona_rel}.%{rel}
47 License:        GPL + MySQL FLOSS Exception
48 Group:          Applications/Databases
49 # Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads
50 # Source0:      http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz
51 Source0:        http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz
52 # Source0-md5:  23dff9d6fcb47b8d0ae9168a637a0e98
53 Source100:      http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
54 # Source100-md5:        5cac34f3d78a9d612ca4301abfcbd666
55 Source1:        %{name}.init
56 Source2:        %{name}.sysconfig
57 Source3:        %{name}.logrotate
58 Source4:        %{name}d.conf
59 Source5:        %{name}-clusters.conf
60 Source7:        %{name}-ndb.init
61 Source8:        %{name}-ndb.sysconfig
62 Source9:        %{name}-ndb-mgm.init
63 Source10:       %{name}-ndb-mgm.sysconfig
64 Source11:       %{name}-ndb-cpc.init
65 Source12:       %{name}-ndb-cpc.sysconfig
66 Source13:       %{name}-client.conf
67 Source14:       my.cnf
68 Patch0:         %{name}-opt.patch
69 Patch1:         %{name}-versioning.patch
70 Patch2:         %{name}hotcopy-5.0-5.5.patch
71 Patch3:         bug-67402.patch
72 Patch4:         %{name}-no-default-secure-auth.patch
73 Patch5:         %{name}-system-libhsclient.patch
74 # from fedora
75 Patch6:         %{name}-system-users.patch
76 Patch7:         mysql-nosystem-libhsclient.patch
77
78 Patch9:         %{name}-build.patch
79 Patch11:        %{name}-upgrade.patch
80 Patch12:        %{name}-config.patch
81 Patch14:        %{name}-bug-43594.patch
82 Patch18:        %{name}-sphinx.patch
83 Patch19:        %{name}-chain-certs.patch
84 # from fedora
85 Patch20:        %{name}-dubious-exports.patch
86
87 Patch22:        bug-66589.patch
88 Patch23:        bug-44278.patch
89 Patch24:        %{name}-cmake.patch
90
91 Patch26:        mysqldumpslow-clusters.patch
92 Patch27:        x32.patch
93 URL:            http://www.mysql.com/products/community/
94 BuildRequires:  bison >= 1.875
95 BuildRequires:  cmake >= 2.6
96 BuildRequires:  readline-devel >= 6.2
97 %if "%{pld_release}" == "ac"
98 BuildRequires:  libstdc++4-devel >= 5:4.0
99 %else
100 BuildRequires:  libstdc++-devel >= 5:4.0
101 %endif
102 BuildRequires:  automake
103 %{?with_system_hsclient:BuildRequires:  libhsclient-devel}
104 %{?with_tcpd:BuildRequires:     libwrap-devel}
105 BuildRequires:  ncurses-devel >= 4.2
106 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
107 BuildRequires:  pam-devel
108 %{?with_autodeps:BuildRequires: perl-DBI}
109 BuildRequires:  perl-devel >= 1:5.6.1
110 BuildRequires:  python-modules
111 BuildRequires:  rpm-perlprov >= 4.1-13
112 BuildRequires:  rpmbuild(macros) >= 1.597
113 BuildRequires:  sed >= 4.0
114 %{?with_systemtap:BuildRequires:        systemtap-sdt-devel}
115 BuildRequires:  zlib-devel
116 Requires(post,preun):   /sbin/chkconfig
117 Requires(postun):       /usr/sbin/groupdel
118 Requires(postun):       /usr/sbin/userdel
119 Requires(pre):  /bin/id
120 Requires(pre):  /usr/bin/getgid
121 Requires(pre):  /usr/sbin/groupadd
122 Requires(pre):  /usr/sbin/useradd
123 Requires(triggerpostun):        sed >= 4.0
124 Requires:       %{name}-charsets = %{version}-%{release}
125 Requires:       %{name}-libs = %{version}-%{release}
126 Requires:       /usr/bin/setsid
127 Requires:       rc-scripts >= 0.2.0
128 Suggests:       mysql-client
129 %{?with_tcpd:Suggests:  tcp_wrappers}
130 Suggests:       vim-syntax-mycnf
131 Provides:       MySQL-server
132 Provides:       group(mysql)
133 Provides:       msqlormysql
134 Provides:       user(mysql)
135 Obsoletes:      MySQL
136 Obsoletes:      mysql-server
137 Conflicts:      logrotate < 3.8.0
138 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
139
140 %define         _orgname        percona-server
141 %define         _libexecdir     %{_sbindir}
142 %define         _localstatedir  /var/lib/mysql
143 %define         _mysqlhome      /home/services/mysql
144
145 %description
146 MySQL is a true multi-user, multi-threaded SQL (Structured Query
147 Language) database server. SQL is the most popular database language
148 in the world. MySQL is a client/server implementation that consists of
149 a server daemon mysqld and many different client programs/libraries.
150
151 The main goals of MySQL are speed, robustness and easy to use. MySQL
152 was originally developed because we at Tcx needed a SQL server that
153 could handle very big databases with magnitude higher speed than what
154 any database vendor could offer to us. We have now been using MySQL
155 since 1996 in a environment with more than 40 databases, 10,000
156 tables, of which more than 500 have more than 7 million rows. This is
157 about 50G of mission critical data.
158
159 The base upon which MySQL is built is a set of routines that have been
160 used in a highly demanding production environment for many years.
161 While MySQL is still in development, it already offers a rich and
162 highly useful function set.
163
164 %description -l fr.UTF-8
165 MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
166 multi-taches. Le langage SQL est le langage de bases de donnees le
167 plus populaire au monde. MySQL est une implementation client/serveur
168 qui consiste en un serveur (mysqld) et differents
169 programmes/bibliotheques clientes.
170
171 Les objectifs principaux de MySQL sont: vitesse, robustesse et
172 facilite d'utilisation. MySQL fut originalement developpe parce que
173 nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
174 tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
175 superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
176 utilisons MySQL depuis 1996 dans un environnement avec plus de 40
177 bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
178 millions de lignes. Ceci represente environ 50G de donnees critiques.
179
180 A la base de la conception de MySQL, on retrouve une serie de routines
181 qui ont ete utilisees dans un environnement de production pendant
182 plusieurs annees. Meme si MySQL est encore en developpement, il offre
183 deja une riche et utile serie de fonctions.
184
185 %description -l pl.UTF-8
186 MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych
187 SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz
188 danych. MySQL to implementacja klient/serwer składająca się z demona
189 mysqld i wielu różnych programów i bibliotek klienckich.
190
191 Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania.
192 MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali
193 serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele
194 większą, niż mogli zaoferować inni producenci baz danych. Używają go
195 od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z
196 których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około
197 50GB krytycznych danych.
198
199 Baza, na której oparty jest MySQL, składa się ze zbioru procedur,
200 które były używane w bardzo wymagającym środowisku produkcyjnym przez
201 wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty
202 i użyteczny zbiór funkcji.
203
204 %description -l de.UTF-8
205 MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
206 Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
207 werden zwar in zweidimensionalen Tabellen gespeichert und können mit
208 einem Primärschlüssel versehen werden. Es ist aber keine Definition
209 eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
210 MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
211 Daten verantwortlich. Allein durch die Nutzung externer
212 Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
213 ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
214
215 %description -l pt_BR.UTF-8
216 O MySQL é um servidor de banco de dados SQL realmente multiusuário e
217 multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
218 dados no mundo. O MySQL é uma implementação cliente/servidor que
219 consiste de um servidor chamado mysqld e diversos
220 programas/bibliotecas clientes. Os principais objetivos do MySQL são:
221 velocidade, robustez e facilidade de uso. O MySQL foi originalmente
222 desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
223 pudesse lidar com grandes bases de dados e com uma velocidade muito
224 maior do que a que qualquer vendedor podia nos oferecer. Estamos
225 usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
226 com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
227 linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
228 A base da construção do MySQL é uma série de rotinas que foram usadas
229 em um ambiente de produção com alta demanda por muitos anos. Mesmo o
230 MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
231 funções muito ricas e úteis. Veja a documentação para maiores
232 informações.
233
234 %description -l ru.UTF-8
235 MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL
236 была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в
237 дистрибутиве на предмет других участников проекта и прочей информации
238 о MySQL.
239
240 %description -l uk.UTF-8
241 MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL
242 було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в
243 дистрибутиві для інформації про інших учасників проекту та іншої
244 інформації.
245
246 %package charsets
247 Summary:        MySQL - character sets definitions
248 Summary(pl.UTF-8):      MySQL - definicje kodowań znaków
249 Group:          Applications/Databases
250 %if "%{_rpmversion}" >= "5"
251 BuildArch:      noarch
252 %endif
253
254 %description charsets
255 This package contains character sets definitions needed by both client
256 and server.
257
258 %description charsets -l pl.UTF-8
259 Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
260 klienta.
261
262 %package -n mysqlhotcopy
263 Summary:        mysqlhotcopy - A MySQL database backup program
264 Summary(pl.UTF-8):      mysqlhotcopy - program do tworzenia kopii zapasowych baz MySQL
265 Group:          Applications/Databases
266 Requires:       perl-DBD-mysql
267
268 %description -n mysqlhotcopy
269 mysqlhotcopy uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a
270 database backup quickly. It is the fastest way to make a backup of the
271 database or single tables, but it can be run only on the same machine
272 where the database directories are located. mysqlhotcopy works only
273 for backing up MyISAM and ARCHIVE tables.
274
275 See innobackup package to backup InnoDB tables.
276
277 %description -n mysqlhotcopy -l pl.UTF-8
278 mysqlhotcopy wykorzystuje LOCK TABLES, FLUSH TABLES oraz cp i scp do
279 szybkiego tworzenia kopii zapasowych baz danych. Jest to najszybszy
280 sposób wykonania kopii zapasowej bazy danych lub pojedynczych tabel,
281 ale może działać tylko na maszynie, na której znajdują się katalogi z
282 bazą danych. mysqlhotcopy działa tylko dla tabel typu MyISAM i
283 ARCHIVE.
284
285 Narzędzie do tworzenia kopii tabel InnoDB znajduje się w pakiecie
286 innobackup.
287
288 %package extras
289 Summary:        MySQL additional utilities
290 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL
291 Group:          Applications/Databases
292 Requires:       %{name}-client = %{version}-%{release}
293 Requires:       %{name}-libs = %{version}-%{release}
294
295 %description extras
296 MySQL additional utilities except Perl scripts (they may be found in
297 %{name}-extras-perl package).
298
299 %description extras -l pl.UTF-8
300 Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w
301 pakiecie %{name}-extras-perl).
302
303 %package extras-perl
304 Summary:        MySQL additional utilities written in Perl
305 Summary(pl.UTF-8):      Dodatkowe narzędzia do MySQL napisane w Perlu
306 Group:          Applications/Databases
307 Requires:       %{name}-extras = %{version}-%{release}
308 # this is just for the sake of smooth upgrade, not to break systems
309 Requires:       mysqlhotcopy = %{version}-%{release}
310 Requires:       perl(DBD::mysql)
311
312 %description extras-perl
313 MySQL additional utilities written in Perl.
314
315 %description extras-perl -l pl.UTF-8
316 Dodatkowe narzędzia do MySQL napisane w Perlu.
317
318 %package client
319 Summary:        MySQL - Client
320 Summary(pl.UTF-8):      MySQL - Klient
321 Summary(pt.UTF-8):      MySQL - Cliente
322 Summary(ru.UTF-8):      MySQL клиент
323 Summary(uk.UTF-8):      MySQL клієнт
324 Group:          Applications/Databases
325 Requires:       %{name}-charsets = %{version}-%{release}
326 Requires:       %{name}-libs = %{version}-%{release}
327 Requires:       readline >= 6.2
328 Obsoletes:      MySQL-client
329
330 %description client
331 This package contains the standard MySQL clients.
332
333 %description client -l fr.UTF-8
334 Ce package contient les clients MySQL standards.
335
336 %description client -l pl.UTF-8
337 Standardowe programy klienckie MySQL.
338
339 %description client -l pt_BR.UTF-8
340 Este pacote contém os clientes padrão para o MySQL.
341
342 %description client -l ru.UTF-8
343 Этот пакет содержит только клиент MySQL.
344
345 %description client -l uk.UTF-8
346 Цей пакет містить тільки клієнта MySQL.
347
348 %package libs
349 Summary:        Shared libraries for MySQL
350 Summary(pl.UTF-8):      Biblioteki współdzielone MySQL
351 Group:          Libraries
352 Obsoletes:      libmysql10
353 Obsoletes:      mysql-doc < 4.1.12
354
355 %description libs
356 Shared libraries for MySQL.
357
358 %description libs -l pl.UTF-8
359 Biblioteki współdzielone MySQL.
360
361 %package devel
362 Summary:        MySQL - development header files and other files
363 Summary(pl.UTF-8):      MySQL - Pliki nagłówkowe i inne dla programistów
364 Summary(pt.UTF-8):      MySQL - Medições de desempenho
365 Summary(ru.UTF-8):      MySQL - хедеры и библиотеки разработчика
366 Summary(uk.UTF-8):      MySQL - хедери та бібліотеки програміста
367 Group:          Development/Libraries
368 Requires:       %{name}-libs = %{version}-%{release}
369 %{?with_ssl:Requires:   openssl-devel}
370 Requires:       zlib-devel
371 Obsoletes:      MySQL-devel
372 Obsoletes:      libmysql10-devel
373 Obsoletes:      webscalesql-devel
374
375 %description devel
376 This package contains the development header files and other files
377 necessary to develop MySQL client applications.
378
379 %description devel -l fr.UTF-8
380 Ce package contient les fichiers entetes et les librairies de
381 developpement necessaires pour developper des applications clientes
382 MySQL.
383
384 %description devel -l pl.UTF-8
385 Pliki nagłówkowe i inne pliki konieczne do kompilacji aplikacji
386 klienckich MySQL.
387
388 %description devel -l pt_BR.UTF-8
389 Este pacote contém os arquivos de cabeçalho (header files) e
390 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
391
392 %description devel -l ru.UTF-8
393 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
394 разработки клиентских приложений.
395
396 %description devel -l uk.UTF-8
397 Цей пакет містить хедери та бібліотеки програміста, необхідні для
398 розробки програм-клієнтів.
399
400 %package static
401 Summary:        MySQL static libraries
402 Summary(pl.UTF-8):      Biblioteki statyczne MySQL
403 Summary(ru.UTF-8):      MySQL - статические библиотеки
404 Summary(uk.UTF-8):      MySQL - статичні бібліотеки
405 Group:          Development/Libraries
406 Requires:       %{name}-devel = %{version}-%{release}
407 Obsoletes:      MySQL-static
408
409 %description static
410 MySQL static libraries.
411
412 %description static -l pl.UTF-8
413 Biblioteki statyczne MySQL.
414
415 %description static -l ru.UTF-8
416 Этот пакет содержит статические библиотеки разработчика, необходимые
417 для разработки клиентских приложений.
418
419 %description static -l uk.UTF-8
420 Цей пакет містить статичні бібліотеки програміста, необхідні для
421 розробки програм-клієнтів.
422
423 %package bench
424 Summary:        MySQL - Benchmarks
425 Summary(pl.UTF-8):      MySQL - Programy testujące szybkość działania bazy
426 Summary(pt.UTF-8):      MySQL - Medições de desempenho
427 Summary(ru.UTF-8):      MySQL - бенчмарки
428 Summary(uk.UTF-8):      MySQL - бенчмарки
429 Group:          Applications/Databases
430 Requires:       %{name} = %{version}-%{release}
431 Requires:       %{name}-client
432 Requires:       perl(DBD::mysql)
433 Obsoletes:      MySQL-bench
434
435 %description bench
436 This package contains MySQL benchmark scripts and data.
437
438 %description bench -l pl.UTF-8
439 Programy testujące szybkość serwera MySQL.
440
441 %description bench -l pt_BR.UTF-8
442 Este pacote contém medições de desempenho de scripts e dados do MySQL.
443
444 %description bench -l ru.UTF-8
445 Этот пакет содержит скрипты и данные для оценки производительности
446 MySQL.
447
448 %description bench -l uk.UTF-8
449 Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
450
451 %package doc
452 Summary:        MySQL manual
453 Summary(pl.UTF-8):      Podręcznik użytkownika MySQL
454 Group:          Applications/Databases
455
456 %description doc
457 This package contains manual in HTML format.
458
459 %description doc -l pl.UTF-8
460 Podręcznik MySQL-a w formacie HTML.
461
462 %package ndb
463 Summary:        MySQL - NDB Storage Engine Daemon
464 Summary(pl.UTF-8):      MySQL - demon silnika przechowywania danych NDB
465 Group:          Applications/Databases
466 Requires:       %{name}-libs = %{version}-%{release}
467
468 %description ndb
469 This package contains the standard MySQL NDB Storage Engine Daemon.
470
471 %description ndb -l pl.UTF-8
472 Ten pakiet zawiera standardowego demona silnika przechowywania danych
473 NDB.
474
475 %package ndb-client
476 Summary:        MySQL - NDB Clients
477 Summary(pl.UTF-8):      MySQL - programy klienckie NDB
478 Group:          Applications/Databases
479 Requires:       %{name}-libs = %{version}-%{release}
480
481 %description ndb-client
482 This package contains the standard MySQL NDB Clients.
483
484 %description ndb-client -l pl.UTF-8
485 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
486
487 %package ndb-mgm
488 Summary:        MySQL - NDB Management Daemon
489 Summary(pl.UTF-8):      MySQL - demon zarządzający NDB
490 Group:          Applications/Databases
491 Requires:       %{name}-libs = %{version}-%{release}
492
493 %description ndb-mgm
494 This package contains the standard MySQL NDB Management Daemon.
495
496 %description ndb-mgm -l pl.UTF-8
497 Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
498
499 %package ndb-cpc
500 Summary:        MySQL - NDB CPC Daemon
501 Summary(pl.UTF-8):      MySQL - demon NDB CPC
502 Group:          Applications/Databases
503 Requires:       %{name}-libs = %{version}-%{release}
504
505 %description ndb-cpc
506 This package contains the standard MySQL NDB CPC Daemon.
507
508 %description ndb-cpc -l pl.UTF-8
509 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
510
511 %prep
512 %setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100}
513
514 # we want to use old, mysql compatible client library name
515 find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";"
516 sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.*
517
518 %patch0 -p1
519
520 %if %{with sphinx}
521 # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
522 mv sphinx-*/mysqlse storage/sphinx
523 %patch18 -p1
524 %endif
525 %patch1 -p1
526 %patch2 -p1
527 %patch3 -p1
528 %patch4 -p1
529 %{?with_system_hsclient:%patch5 -p1}
530 %patch6 -p1
531 %patch7 -p1
532
533 %patch9 -p1
534 %patch11 -p1
535 %patch12 -p1
536 %patch14 -p0
537 %patch19 -p1
538 %patch20 -p1
539
540 %patch22 -p1
541 %patch23 -p1
542 %patch24 -p1
543
544 # not compatible with percona server at this point, see content
545 # of scripts/mysqldumpslow.sh
546 #%patch26 -p1
547 %patch27 -p1
548
549 # to get these files rebuild
550 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
551 [ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
552
553 # map has more sane versioning that default "global everything" in ver.in
554 cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
555
556 %build
557 install -d build
558 cd build
559 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
560 # (it defaults to first cluster but user may change it to whatever
561 # cluster it wants)
562
563 %if "%{pld_release}" == "ac"
564 # add suffix, but allow ccache, etc in ~/.rpmmacros
565 %{expand:%%define       __cc    %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
566 %{expand:%%define       __cxx   %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
567 %{expand:%%define       __cpp   %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
568 %endif
569
570 CPPFLAGS="%{rpmcppflags}" \
571 %cmake .. \
572         -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
573         -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
574         -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
575         -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
576         -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
577         %{?with_systemtap:-DENABLE_DTRACE=ON} \
578         -DFEATURE_SET="community" \
579         -DINSTALL_LAYOUT=RPM \
580         -DINSTALL_LIBDIR=%{_lib} \
581         -DINSTALL_MYSQLTESTDIR_RPM="" \
582         -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \
583         -DINSTALL_SQLBENCHDIR=%{_datadir} \
584         -DINSTALL_SUPPORTFILESDIR=share/%{_orgname}-support \
585         -DINSTALL_MYSQLSHAREDIR=share/%{_orgname} \
586         -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
587         %{?debug:-DWITH_DEBUG=ON} \
588         -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
589         -DWITH_FAST_MUTEXES=ON \
590         -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
591         -DWITH_PAM=ON \
592         -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
593         -DWITH_PIC=ON \
594         -DWITH_SCALABILITY_METRICS=ON \
595 %if "%{pld_release}" == "ac"
596         -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
597 %else
598         -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
599 %endif
600         -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
601         -DWITH_ZLIB=system \
602         -DWITH_READLINE=system
603
604 %{__make}
605
606 %{?with_tests:%{__make} test}
607
608 %install
609 rm -rf $RPM_BUILD_ROOT
610 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
611            $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
612            $RPM_BUILD_ROOT%{_mysqlhome} \
613            $RPM_BUILD_ROOT%{_libdir}
614
615 %{__make} -C build install \
616         DESTDIR=$RPM_BUILD_ROOT
617
618 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
619 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
620 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
621 # This is template for configuration file which is created after 'service mysql init'
622 cp -a %{SOURCE4} mysqld.conf
623 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
624 touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
625
626 # remove innodb directives from mysqld.conf if mysqld is configured without
627 %if %{without innodb}
628         cp mysqld.conf mysqld.tmp
629         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
630 %endif
631
632 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
633 cp mysqld.conf mysqld.tmp
634 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
635
636 cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.conf
637 cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
638 ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
639 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
640
641 # NDB
642 %if %{with ndb}
643 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
644 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
645 install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
646 cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
647 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
648 cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
649 %endif
650
651 sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
652 sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
653 sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
654
655 # remove known unpackaged files
656 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{_orgname}-support
657
658 # rename not to be so generic name
659 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
660 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
661
662 # move to _sysconfdir
663 mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
664
665 # not useful without -debug build
666 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
667 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
668 # generate symbols file, so one can generate backtrace using it
669 # mysql_resolve_stack_dump -s %{_datadir}/%{_orgname}/mysqld.sym -n mysqld.stack.
670 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
671 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.sym}
672
673 # do not clobber users $PATH
674 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
675 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
676 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
677 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
678 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
679 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
680 #mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
681 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
682 sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
683 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
684
685 # delete - functionality in initscript / rpm
686 # note: mysql_install_db (and thus resolveip) are needed by digikam
687 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
688 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
689 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
690 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql-log-rotate
691 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql.server
692 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/binary-configure
693 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/errmsg-utf8.txt
694 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
695 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
696 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
697 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
698 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
699
700 # we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
701 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
702 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
703 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
704 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
705 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
706 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
707 # libmysqld examples
708 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
709
710 # not needed
711 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
712 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
713
714 # not an .info file
715 %{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
716
717 %clean
718 rm -rf $RPM_BUILD_ROOT
719
720 %pre
721 %groupadd -g 89 mysql
722 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
723
724 %post
725 /sbin/ldconfig
726 /sbin/chkconfig --add mysql
727 %service mysql restart
728
729 %preun
730 if [ "$1" = "0" ]; then
731         %service -q mysql stop
732         /sbin/chkconfig --del mysql
733 fi
734
735 %postun
736 /sbin/ldconfig
737 if [ "$1" = "0" ]; then
738         %userremove mysql
739         %groupremove mysql
740 fi
741
742 %post ndb
743 /sbin/chkconfig --add mysql-ndb
744 %service mysql-ndb restart "mysql NDB engine"
745
746 %preun ndb
747 if [ "$1" = "0" ]; then
748         %service mysql-ndb stop
749         /sbin/chkconfig --del mysql-ndb
750 fi
751
752 %post ndb-mgm
753 /sbin/chkconfig --add mysql-ndb-mgm
754 %service mysql-ndb-mgm restart "mysql NDB management node"
755
756 %preun ndb-mgm
757 if [ "$1" = "0" ]; then
758         %service mysql-ndb-mgm stop
759         /sbin/chkconfig --del mysql-ndb-mgm
760 fi
761
762 %post ndb-cpc
763 /sbin/chkconfig --add mysql-ndb-cpc
764 %service mysql-ndb-cpc restart "mysql NDB CPC"
765
766 %preun ndb-cpc
767 if [ "$1" = "0" ]; then
768         %service mysql-ndb-cpc stop
769         /sbin/chkconfig --del mysql-ndb-cpc
770 fi
771
772 %post   libs -p /sbin/ldconfig
773 %postun libs -p /sbin/ldconfig
774
775 %triggerpostun -- mysql < 4.0.20-2.4
776 # For clusters in /etc/%{name}/clusters.conf
777 if [ -f /etc/sysconfig/mysql ]; then
778         . /etc/sysconfig/mysql
779         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
780                 for i in "$MYSQL_DB_CLUSTERS"; do
781                         echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
782                 done
783                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
784                 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
785                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
786                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
787         fi
788 fi
789
790 %triggerpostun -- mysql < 4.1.1
791 # For better compatibility with prevoius versions:
792 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
793         if echo "$config" | grep -q '^/'; then
794                 config_file="$config"
795         elif [ -f "/etc/%{name}/$config" ]; then
796                 config_file=/etc/%{name}/$config
797         else
798                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
799                 if [ -z "$clusterdir" ]; then
800                         echo >&2 "Can't find cluster dir for $config!"
801                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
802                         exit 1
803                 fi
804                 config_file="$clusterdir/mysqld.conf"
805         fi
806
807         if [ ! -f "$config_file" ]; then
808                         echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
809                         exit 1
810         fi
811         echo "Adding option old-passwords to config: $config_file"
812         echo "If you want to use new, better passwords - remove it"
813
814         # sed magic to add 'old-passwords' to [mysqld] section
815         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
816                 a
817                 a; Compatibility options:
818                 aold-passwords
819         }
820         ' $config_file
821 done
822
823 %banner -e %{name}-4.1.x <<-EOF
824         If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
825         mysql -u mysql mysql < %{_datadir}/%{_orgname}/fill_help_tables.sql
826 EOF
827 #'
828
829 %triggerpostun -- mysql < 5.1.0
830 configs=""
831 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
832         if echo "$config" | grep -q '^/'; then
833                 config_file="$config"
834         elif [ -f "/etc/%{name}/$config" ]; then
835                 config_file=/etc/%{name}/$config
836         else
837                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
838                 if [ -z "$clusterdir" ]; then
839                         echo >&2 "Can't find cluster dir for $config!"
840                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
841                         exit 1
842                 fi
843                 config_file="$clusterdir/mysqld.conf"
844         fi
845
846         if [ ! -f "$config_file" ]; then
847                 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
848                 continue
849         fi
850         configs="$configs $config_file"
851 done
852
853 (
854 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
855 echo 'Thus, you should invoke:'
856 for config in $configs; do
857         sed -i -e '
858                 s/set-variable\s*=\s* //
859                 # use # as comment in config
860                 s/^;/#/
861         ' $config
862
863         datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
864         echo "# mysql_upgrade --datadir=$datadir"
865 done
866 ) | %banner -e %{name}-5.1
867
868 %triggerpostun -- mysql < 5.5.0
869 configs=""
870 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
871         if echo "$config" | grep -q '^/'; then
872                 config_file="$config"
873         elif [ -f "/etc/%{name}/$config" ]; then
874                 config_file=/etc/%{name}/$config
875         else
876                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
877                 if [ -z "$clusterdir" ]; then
878                         echo >&2 "Can't find cluster dir for $config!"
879                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
880                         exit 1
881                 fi
882                 config_file="$clusterdir/mysqld.conf"
883         fi
884
885         if [ ! -f "$config_file" ]; then
886                 echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
887                 continue
888         fi
889         configs="$configs $config_file"
890 done
891
892 (
893 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
894 echo 'Thus, you should invoke:'
895 for config in $configs; do
896         sed -i -e '
897                 s/^language *= *polish/lc-messages = pl_PL/i
898                 s/set-variable\s*=\s* //
899                 s/^skip-locking/skip-external-locking/
900                 # this is not valid for server. it is client option
901                 s/^default-character-set/# client-config: &/
902                 # use # as comment in config
903                 s/^;/#/
904         ' $config
905
906         socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs)
907         echo "# mysql_upgrade ${socket:+--socket=$socket}"
908 done
909 ) | %banner -e %{name}-5.5
910
911 %files
912 %defattr(644,root,root,755)
913 %doc build/support-files/*.cnf
914 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
915 %attr(754,root,root) /etc/rc.d/init.d/%{name}
916 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
917 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
918 %attr(755,root,root) %{_bindir}/ps_tokudb_admin
919 %attr(755,root,root) %{_sbindir}/innochecksum
920 %attr(755,root,root) %{_sbindir}/my_print_defaults
921 %attr(755,root,root) %{_sbindir}/myisamchk
922 %attr(755,root,root) %{_sbindir}/myisamlog
923 %attr(755,root,root) %{_sbindir}/myisampack
924 #%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables
925 %attr(755,root,root) %{_sbindir}/mysql_plugin
926 %attr(755,root,root) %{_sbindir}/mysql_upgrade
927 %attr(755,root,root) %{_sbindir}/mysqlcheck
928 %attr(755,root,root) %{_sbindir}/mysqld
929 %dir %{_libdir}/%{name}
930 %dir %{_libdir}/%{name}/plugin
931 %attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
932 %attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
933 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
934 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
935 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
936 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
937 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
938 %attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
939 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
940 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
941 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so
942 %attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
943 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
944 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
945 %attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
946 %attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
947 %attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
948 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
949 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
950 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
951 %attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
952 %attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so
953 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
954 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
955 %attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
956 %if %{with sphinx}
957 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
958 %endif
959 %if %{with tokudb}
960 %attr(755,root,root) %{_bindir}/tokuft_logprint
961 %attr(755,root,root) %{_bindir}/tokuftdump
962 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_tokudb.so
963 %attr(755,root,root) %{_libdir}/%{name}/plugin/tokudb_backup.so
964 %attr(755,root,root) %{_libdir}/libHotBackup.so
965 %endif
966 # for plugins
967 %attr(755,root,root) %{_libdir}/libmysqlservices.so
968 %{_mandir}/man1/innochecksum.1*
969 %{_mandir}/man1/my_print_defaults.1*
970 %{_mandir}/man1/myisamchk.1*
971 %{_mandir}/man1/myisamlog.1*
972 %{_mandir}/man1/myisampack.1*
973 #%{_mandir}/man1/mysql_fix_privilege_tables.1*
974 %{_mandir}/man1/mysql_plugin.1*
975 %{_mandir}/man1/mysql_upgrade.1*
976 %{_mandir}/man1/mysqlcheck.1*
977 %{_mandir}/man8/mysqld.8*
978
979 %if %{?debug:1}0
980 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
981 %{_datadir}/%{_orgname}/mysqld.sym
982 %{_mandir}/man1/*resolve_stack_dump.1*
983 %endif
984
985 %attr(700,mysql,mysql) %{_mysqlhome}
986 # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
987 %attr(751,root,root) /var/lib/mysql
988 %attr(750,mysql,mysql) %dir /var/log/mysql
989 %attr(750,mysql,mysql) %dir /var/log/archive/mysql
990 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
991
992 # This is template for configuration file which is created after 'service mysql init'
993 %{_datadir}/%{_orgname}/mysqld.conf
994 %{_datadir}/%{_orgname}/mysql_security_commands.sql
995 %{_datadir}/%{_orgname}/mysql_system_tables_data.sql
996 %{_datadir}/%{_orgname}/mysql_system_tables.sql
997 %{_datadir}/%{_orgname}/mysql_test_data_timezone.sql
998
999 %{_datadir}/%{_orgname}/english
1000 %{_datadir}/%{_orgname}/dictionary.txt
1001 %{_datadir}/%{_orgname}/fill_help_tables.sql
1002 %{_datadir}/%{_orgname}/innodb_memcached_config.sql
1003 #%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql
1004 # Don't mark these with %%lang. These are used depending
1005 # on database client settings.
1006 %{_datadir}/%{_orgname}/bulgarian
1007 %{_datadir}/%{_orgname}/czech
1008 %{_datadir}/%{_orgname}/danish
1009 %{_datadir}/%{_orgname}/german
1010 %{_datadir}/%{_orgname}/greek
1011 %{_datadir}/%{_orgname}/spanish
1012 %{_datadir}/%{_orgname}/estonian
1013 %{_datadir}/%{_orgname}/french
1014 %{_datadir}/%{_orgname}/hungarian
1015 %{_datadir}/%{_orgname}/italian
1016 %{_datadir}/%{_orgname}/japanese
1017 %{_datadir}/%{_orgname}/korean
1018 %{_datadir}/%{_orgname}/dutch
1019 %{_datadir}/%{_orgname}/norwegian
1020 %{_datadir}/%{_orgname}/norwegian-ny
1021 %{_datadir}/%{_orgname}/polish
1022 %{_datadir}/%{_orgname}/portuguese
1023 %{_datadir}/%{_orgname}/romanian
1024 %{_datadir}/%{_orgname}/russian
1025 %{_datadir}/%{_orgname}/serbian
1026 %{_datadir}/%{_orgname}/slovak
1027 %{_datadir}/%{_orgname}/swedish
1028 %{_datadir}/%{_orgname}/ukrainian
1029
1030 %files charsets
1031 %defattr(644,root,root,755)
1032 %dir %{_datadir}/%{_orgname}
1033 %{_datadir}/%{_orgname}/charsets
1034
1035 %files extras
1036 %defattr(644,root,root,755)
1037 %attr(755,root,root) %{_bindir}/msql2mysql
1038 %attr(755,root,root) %{_bindir}/myisam_ftdump
1039 %attr(755,root,root) %{_bindir}/mysql_install_db
1040 %attr(755,root,root) %{_bindir}/mysql_secure_installation
1041 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
1042 %attr(755,root,root) %{_bindir}/perror
1043 %attr(755,root,root) %{_bindir}/replace
1044 %attr(755,root,root) %{_bindir}/resolveip
1045 %{_mandir}/man1/msql2mysql.1*
1046 %{_mandir}/man1/myisam_ftdump.1*
1047 %{_mandir}/man1/mysql_install_db.1*
1048 %{_mandir}/man1/mysql_secure_installation.1*
1049 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
1050 %{_mandir}/man1/perror.1*
1051 %{_mandir}/man1/replace.1*
1052 %{_mandir}/man1/resolveip.1*
1053
1054 %files -n mysqlhotcopy
1055 %defattr(644,root,root,755)
1056 %attr(755,root,root) %{_bindir}/mysqlhotcopy
1057 %{_mandir}/man1/mysqlhotcopy.1*
1058
1059 %files extras-perl
1060 %defattr(644,root,root,755)
1061 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
1062 %attr(755,root,root) %{_bindir}/mysql_find_rows
1063 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
1064 %attr(755,root,root) %{_bindir}/mysql_setpermission
1065 %attr(755,root,root) %{_bindir}/mysql_zap
1066 %attr(755,root,root) %{_bindir}/mysqlaccess
1067 %attr(755,root,root) %{_bindir}/mysqldumpslow
1068 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf
1069 %{_mandir}/man1/mysql_convert_table_format.1*
1070 %{_mandir}/man1/mysql_find_rows.1*
1071 %{_mandir}/man1/mysql_fix_extensions.1*
1072 %{_mandir}/man1/mysql_setpermission.1*
1073 %{_mandir}/man1/mysql_zap.1*
1074 %{_mandir}/man1/mysqlaccess.1*
1075 %{_mandir}/man1/mysqldumpslow.1*
1076
1077 %files client
1078 %defattr(644,root,root,755)
1079 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
1080 %attr(755,root,root) %{_bindir}/mysql
1081 %attr(755,root,root) %{_bindir}/mysqladmin
1082 %attr(755,root,root) %{_bindir}/mysqlbinlog
1083 %attr(755,root,root) %{_bindir}/mysqlbug
1084 %attr(755,root,root) %{_bindir}/mysql_config_editor
1085 %attr(755,root,root) %{_bindir}/mysqldump
1086 %attr(755,root,root) %{_bindir}/mysqlimport
1087 %attr(755,root,root) %{_bindir}/mysqlshow
1088 %{_mandir}/man1/mysql.1*
1089 %{_mandir}/man1/mysqladmin.1*
1090 %{_mandir}/man1/mysqlbinlog.1*
1091 %{_mandir}/man1/mysqlbug.1*
1092 %{_mandir}/man1/mysql_config_editor.1*
1093 %{_mandir}/man1/mysqldump.1*
1094 %{_mandir}/man1/mysqlimport.1*
1095 %{_mandir}/man1/mysqlshow.1*
1096
1097 %files libs
1098 %defattr(644,root,root,755)
1099 %attr(751,root,root) %dir %{_sysconfdir}/mysql
1100 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
1101 %{_sysconfdir}/%{name}/my.cnf
1102 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
1103 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
1104 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
1105 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
1106 %if %{with ndb}
1107 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
1108 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
1109 %endif
1110
1111 %files devel
1112 %defattr(644,root,root,755)
1113 %attr(755,root,root) %{_bindir}/mysql_config
1114 %attr(755,root,root) %{_libdir}/libmysqlclient.so
1115 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so
1116 %if %{with ndb}
1117 %attr(755,root,root) %{_libdir}/libndbclient.so
1118 %endif
1119 # static-only so far
1120 %{_libdir}/libmysqld.a
1121 %{_includedir}/mysql
1122 %{_aclocaldir}/mysql.m4
1123 %{_mandir}/man1/mysql_config.1*
1124
1125 %files static
1126 %defattr(644,root,root,755)
1127 %{_libdir}/libmysqlclient.a
1128 %{_libdir}/libmysqlclient_r.a
1129 %if %{with ndb}
1130 %{_libdir}/libndbclient.a
1131 %endif
1132
1133 %files bench
1134 %defattr(644,root,root,755)
1135 %attr(755,root,root) %{_bindir}/mysqlslap
1136 %attr(755,root,root) %{_bindir}/mysqltest
1137 %dir %{_datadir}/sql-bench
1138 %{_datadir}/sql-bench/[CDRl]*
1139 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
1140 %{_mandir}/man1/mysqlslap.1*
1141 %{_mandir}/man1/mysqltest.1*
1142 %{_mandir}/man1/mysqltest_embedded.1*
1143
1144 #%files doc
1145 #%defattr(644,root,root,755)
1146 #%doc Docs/manual.html Docs/manual_toc.html
1147
1148 %if %{with ndb}
1149 %files ndb
1150 %defattr(644,root,root,755)
1151 %attr(755,root,root) %{_sbindir}/ndbd
1152 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
1153 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
1154 %{_mandir}/man1/ndbd_redo_log_reader.1*
1155 %{_mandir}/man8/ndbd.8*
1156
1157 %files ndb-client
1158 %defattr(644,root,root,755)
1159 %attr(755,root,root) %{_bindir}/ndb_config
1160 %attr(755,root,root) %{_bindir}/ndb_delete_all
1161 %attr(755,root,root) %{_bindir}/ndb_desc
1162 %attr(755,root,root) %{_bindir}/ndb_drop_index
1163 %attr(755,root,root) %{_bindir}/ndb_drop_table
1164 %attr(755,root,root) %{_bindir}/ndb_error_reporter
1165 %attr(755,root,root) %{_bindir}/ndb_mgm
1166 %attr(755,root,root) %{_bindir}/ndb_print_backup_file
1167 %attr(755,root,root) %{_bindir}/ndb_print_schema_file
1168 %attr(755,root,root) %{_bindir}/ndb_print_sys_file
1169 %attr(755,root,root) %{_bindir}/ndb_restore
1170 %attr(755,root,root) %{_bindir}/ndb_select_all
1171 %attr(755,root,root) %{_bindir}/ndb_select_count
1172 %attr(755,root,root) %{_bindir}/ndb_show_tables
1173 %attr(755,root,root) %{_bindir}/ndb_size.pl
1174 %attr(755,root,root) %{_bindir}/ndb_test_platform
1175 %attr(755,root,root) %{_bindir}/ndb_waiter
1176 %{_mandir}/man1/ndb_config.1*
1177 %{_mandir}/man1/ndb_delete_all.1*
1178 %{_mandir}/man1/ndb_desc.1*
1179 %{_mandir}/man1/ndb_drop_index.1*
1180 %{_mandir}/man1/ndb_drop_table.1*
1181 %{_mandir}/man1/ndb_error_reporter.1*
1182 %{_mandir}/man1/ndb_mgm.1*
1183 %{_mandir}/man1/ndb_print_backup_file.1*
1184 %{_mandir}/man1/ndb_print_schema_file.1*
1185 %{_mandir}/man1/ndb_print_sys_file.1*
1186 %{_mandir}/man1/ndb_restore.1*
1187 %{_mandir}/man1/ndb_select_all.1*
1188 %{_mandir}/man1/ndb_select_count.1*
1189 %{_mandir}/man1/ndb_show_tables.1*
1190 %{_mandir}/man1/ndb_size.pl.1*
1191 %{_mandir}/man1/ndb_waiter.1*
1192
1193 %files ndb-mgm
1194 %defattr(644,root,root,755)
1195 %attr(755,root,root) %{_sbindir}/ndb_mgmd
1196 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
1197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
1198 %{_mandir}/man8/ndb_mgmd.8*
1199
1200 %files ndb-cpc
1201 %defattr(644,root,root,755)
1202 %attr(755,root,root) %{_sbindir}/ndb_cpcd
1203 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
1204 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
1205 %{_mandir}/man1/ndb_cpcd.1*
1206 %endif
This page took 0.117415 seconds and 4 git commands to generate.