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