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