]> git.pld-linux.org Git - packages/mysql.git/blob - mysql.spec
bf6ddf21670a6b175dec78e59fbf7edbff5d7042
[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     1
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
363 %description devel
364 This package contains the development header files and other files
365 necessary to develop MySQL client applications.
366
367 %description devel -l fr.UTF-8
368 Ce package contient les fichiers entetes et les librairies de
369 developpement necessaires pour developper des applications clientes
370 MySQL.
371
372 %description devel -l pl.UTF-8
373 Pliki nagłówkowe i inne pliki konieczne do kompilacji aplikacji
374 klienckich MySQL.
375
376 %description devel -l pt_BR.UTF-8
377 Este pacote contém os arquivos de cabeçalho (header files) e
378 bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
379
380 %description devel -l ru.UTF-8
381 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
382 разработки клиентских приложений.
383
384 %description devel -l uk.UTF-8
385 Цей пакет містить хедери та бібліотеки програміста, необхідні для
386 розробки програм-клієнтів.
387
388 %package static
389 Summary:        MySQL static libraries
390 Summary(pl.UTF-8):      Biblioteki statyczne MySQL
391 Summary(ru.UTF-8):      MySQL - статические библиотеки
392 Summary(uk.UTF-8):      MySQL - статичні бібліотеки
393 Group:          Development/Libraries
394 Requires:       %{name}-devel = %{version}-%{release}
395 Obsoletes:      MySQL-static
396
397 %description static
398 MySQL static libraries.
399
400 %description static -l pl.UTF-8
401 Biblioteki statyczne MySQL.
402
403 %description static -l ru.UTF-8
404 Этот пакет содержит статические библиотеки разработчика, необходимые
405 для разработки клиентских приложений.
406
407 %description static -l uk.UTF-8
408 Цей пакет містить статичні бібліотеки програміста, необхідні для
409 розробки програм-клієнтів.
410
411 %package bench
412 Summary:        MySQL - Benchmarks
413 Summary(pl.UTF-8):      MySQL - Programy testujące szybkość działania bazy
414 Summary(pt.UTF-8):      MySQL - Medições de desempenho
415 Summary(ru.UTF-8):      MySQL - бенчмарки
416 Summary(uk.UTF-8):      MySQL - бенчмарки
417 Group:          Applications/Databases
418 Requires:       %{name} = %{version}-%{release}
419 Requires:       %{name}-client
420 Requires:       perl(DBD::mysql)
421 Obsoletes:      MySQL-bench
422
423 %description bench
424 This package contains MySQL benchmark scripts and data.
425
426 %description bench -l pl.UTF-8
427 Programy testujące szybkość serwera MySQL.
428
429 %description bench -l pt_BR.UTF-8
430 Este pacote contém medições de desempenho de scripts e dados do MySQL.
431
432 %description bench -l ru.UTF-8
433 Этот пакет содержит скрипты и данные для оценки производительности
434 MySQL.
435
436 %description bench -l uk.UTF-8
437 Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
438
439 %package doc
440 Summary:        MySQL manual
441 Summary(pl.UTF-8):      Podręcznik użytkownika MySQL
442 Group:          Applications/Databases
443
444 %description doc
445 This package contains manual in HTML format.
446
447 %description doc -l pl.UTF-8
448 Podręcznik MySQL-a w formacie HTML.
449
450 %package ndb
451 Summary:        MySQL - NDB Storage Engine Daemon
452 Summary(pl.UTF-8):      MySQL - demon silnika przechowywania danych NDB
453 Group:          Applications/Databases
454 Requires:       %{name}-libs = %{version}-%{release}
455
456 %description ndb
457 This package contains the standard MySQL NDB Storage Engine Daemon.
458
459 %description ndb -l pl.UTF-8
460 Ten pakiet zawiera standardowego demona silnika przechowywania danych
461 NDB.
462
463 %package ndb-client
464 Summary:        MySQL - NDB Clients
465 Summary(pl.UTF-8):      MySQL - programy klienckie NDB
466 Group:          Applications/Databases
467 Requires:       %{name}-libs = %{version}-%{release}
468
469 %description ndb-client
470 This package contains the standard MySQL NDB Clients.
471
472 %description ndb-client -l pl.UTF-8
473 Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
474
475 %package ndb-mgm
476 Summary:        MySQL - NDB Management Daemon
477 Summary(pl.UTF-8):      MySQL - demon zarządzający NDB
478 Group:          Applications/Databases
479 Requires:       %{name}-libs = %{version}-%{release}
480
481 %description ndb-mgm
482 This package contains the standard MySQL NDB Management Daemon.
483
484 %description ndb-mgm -l pl.UTF-8
485 Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
486
487 %package ndb-cpc
488 Summary:        MySQL - NDB CPC Daemon
489 Summary(pl.UTF-8):      MySQL - demon NDB CPC
490 Group:          Applications/Databases
491 Requires:       %{name}-libs = %{version}-%{release}
492
493 %description ndb-cpc
494 This package contains the standard MySQL NDB CPC Daemon.
495
496 %description ndb-cpc -l pl.UTF-8
497 Ten pakiet zawiera standardowego demona MySQL NDB CPC.
498
499 %prep
500 %setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100}
501
502 # we want to use old, mysql compatible client library name
503 find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";"
504 sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.*
505
506 %patch0 -p1
507
508 %if %{with sphinx}
509 # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
510 mv sphinx-*/mysqlse storage/sphinx
511 %patch18 -p1
512 %endif
513 %patch1 -p1
514 %patch2 -p1
515 %patch3 -p1
516 %patch4 -p1
517 %patch5 -p1
518 %patch6 -p1
519
520 %patch9 -p1
521 %patch11 -p1
522 %patch12 -p1
523 %patch14 -p0
524 %patch19 -p1
525 %patch20 -p1
526
527 %patch22 -p1
528 %patch23 -p1
529 %patch24 -p1
530
531 %patch26 -p1
532 %patch27 -p1
533
534 # to get these files rebuild
535 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
536 [ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
537
538 # map has more sane versioning that default "global everything" in ver.in
539 cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
540
541 %build
542 install -d build
543 cd build
544 # NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
545 # (it defaults to first cluster but user may change it to whatever
546 # cluster it wants)
547
548 %if "%{pld_release}" == "ac"
549 # add suffix, but allow ccache, etc in ~/.rpmmacros
550 %{expand:%%define       __cc    %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
551 %{expand:%%define       __cxx   %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
552 %{expand:%%define       __cpp   %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
553 %endif
554
555 CPPFLAGS="%{rpmcppflags}" \
556 %cmake .. \
557         -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
558         -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
559         -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
560         -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \
561         -DCURSES_INCLUDE_PATH=/usr/include/ncurses \
562         %{?with_systemtap:-DENABLE_DTRACE=ON} \
563         -DFEATURE_SET="community" \
564         -DINSTALL_LAYOUT=RPM \
565         -DINSTALL_LIBDIR=%{_lib} \
566         -DINSTALL_MYSQLTESTDIR_RPM="" \
567         -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \
568         -DINSTALL_SQLBENCHDIR=%{_datadir} \
569         -DINSTALL_SUPPORTFILESDIR=share/%{_orgname}-support \
570         -DINSTALL_MYSQLSHAREDIR=share/%{_orgname} \
571         -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
572         %{?debug:-DWITH_DEBUG=ON} \
573         -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
574         -DWITH_FAST_MUTEXES=ON \
575         -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \
576         -DWITH_PAM=ON \
577         -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
578         -DWITH_PIC=ON \
579 %if "%{pld_release}" == "ac"
580         -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
581 %else
582         -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
583 %endif
584         -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
585         -DWITH_ZLIB=system \
586         -DWITH_READLINE=system
587
588 %{__make}
589
590 %{?with_tests:%{__make} test}
591
592 %install
593 rm -rf $RPM_BUILD_ROOT
594 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \
595            $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \
596            $RPM_BUILD_ROOT%{_mysqlhome} \
597            $RPM_BUILD_ROOT%{_libdir}
598
599 %{__make} -C build install \
600         DESTDIR=$RPM_BUILD_ROOT
601
602 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
603 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
604 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
605 # This is template for configuration file which is created after 'service mysql init'
606 cp -a %{SOURCE4} mysqld.conf
607 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf
608 touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log
609
610 # remove innodb directives from mysqld.conf if mysqld is configured without
611 %if %{without innodb}
612         cp mysqld.conf mysqld.tmp
613         awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
614 %endif
615
616 # remove berkeley-db directives from mysqld.conf if mysqld is configured without
617 cp mysqld.conf mysqld.tmp
618 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
619
620 cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.conf
621 cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf
622 ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf
623 cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf
624
625 # NDB
626 %if %{with ndb}
627 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
628 cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
629 install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
630 cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
631 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
632 cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
633 %endif
634
635 sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
636 sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
637 sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
638
639 # remove known unpackaged files
640 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{_orgname}-support
641
642 # rename not to be so generic name
643 mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
644 mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
645
646 # move to _sysconfdir
647 mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf
648
649 # not useful without -debug build
650 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
651 %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
652 # generate symbols file, so one can generate backtrace using it
653 # mysql_resolve_stack_dump -s %{_datadir}/%{_orgname}/mysqld.sym -n mysqld.stack.
654 # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
655 %{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.sym}
656
657 # do not clobber users $PATH
658 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin
659 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_upgrade
660 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum
661 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk
662 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog
663 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack
664 #mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables
665 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults
666 sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
667 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck
668
669 # delete - functionality in initscript / rpm
670 # note: mysql_install_db (and thus resolveip) are needed by digikam
671 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
672 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
673 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
674 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql-log-rotate
675 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql.server
676 #rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/binary-configure
677 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/errmsg-utf8.txt
678 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
679 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1*
680 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
681 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
682 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1*
683
684 # we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
685 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_client_test
686 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test.1*
687 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1*
688 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1*
689 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1*
690 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
691 # libmysqld examples
692 %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
693
694 # not needed
695 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/libdaemon_example.*
696 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/daemon_example.ini
697
698 # not an .info file
699 %{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
700
701 %clean
702 rm -rf $RPM_BUILD_ROOT
703
704 %pre
705 %groupadd -g 89 mysql
706 %useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
707
708 %post
709 /sbin/ldconfig
710 /sbin/chkconfig --add mysql
711 %service mysql restart
712
713 %preun
714 if [ "$1" = "0" ]; then
715         %service -q mysql stop
716         /sbin/chkconfig --del mysql
717 fi
718
719 %postun
720 /sbin/ldconfig
721 if [ "$1" = "0" ]; then
722         %userremove mysql
723         %groupremove mysql
724 fi
725
726 %post ndb
727 /sbin/chkconfig --add mysql-ndb
728 %service mysql-ndb restart "mysql NDB engine"
729
730 %preun ndb
731 if [ "$1" = "0" ]; then
732         %service mysql-ndb stop
733         /sbin/chkconfig --del mysql-ndb
734 fi
735
736 %post ndb-mgm
737 /sbin/chkconfig --add mysql-ndb-mgm
738 %service mysql-ndb-mgm restart "mysql NDB management node"
739
740 %preun ndb-mgm
741 if [ "$1" = "0" ]; then
742         %service mysql-ndb-mgm stop
743         /sbin/chkconfig --del mysql-ndb-mgm
744 fi
745
746 %post ndb-cpc
747 /sbin/chkconfig --add mysql-ndb-cpc
748 %service mysql-ndb-cpc restart "mysql NDB CPC"
749
750 %preun ndb-cpc
751 if [ "$1" = "0" ]; then
752         %service mysql-ndb-cpc stop
753         /sbin/chkconfig --del mysql-ndb-cpc
754 fi
755
756 %post   libs -p /sbin/ldconfig
757 %postun libs -p /sbin/ldconfig
758
759 %triggerpostun -- mysql < 4.0.20-2.4
760 # For clusters in /etc/%{name}/clusters.conf
761 if [ -f /etc/sysconfig/mysql ]; then
762         . /etc/sysconfig/mysql
763         if [ -n "$MYSQL_DB_CLUSTERS" ]; then
764                 for i in "$MYSQL_DB_CLUSTERS"; do
765                         echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf
766                 done
767                 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
768                 echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql
769                 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf."
770                 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf."
771         fi
772 fi
773
774 %triggerpostun -- mysql < 4.1.1
775 # For better compatibility with prevoius versions:
776 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
777         if echo "$config" | grep -q '^/'; then
778                 config_file="$config"
779         elif [ -f "/etc/%{name}/$config" ]; then
780                 config_file=/etc/%{name}/$config
781         else
782                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
783                 if [ -z "$clusterdir" ]; then
784                         echo >&2 "Can't find cluster dir for $config!"
785                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
786                         exit 1
787                 fi
788                 config_file="$clusterdir/mysqld.conf"
789         fi
790
791         if [ ! -f "$config_file" ]; then
792                         echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
793                         exit 1
794         fi
795         echo "Adding option old-passwords to config: $config_file"
796         echo "If you want to use new, better passwords - remove it"
797
798         # sed magic to add 'old-passwords' to [mysqld] section
799         sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
800                 a
801                 a; Compatibility options:
802                 aold-passwords
803         }
804         ' $config_file
805 done
806
807 %banner -e %{name}-4.1.x <<-EOF
808         If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
809         mysql -u mysql mysql < %{_datadir}/%{_orgname}/fill_help_tables.sql
810 EOF
811 #'
812
813 %triggerpostun -- mysql < 5.1.0
814 configs=""
815 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
816         if echo "$config" | grep -q '^/'; then
817                 config_file="$config"
818         elif [ -f "/etc/%{name}/$config" ]; then
819                 config_file=/etc/%{name}/$config
820         else
821                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
822                 if [ -z "$clusterdir" ]; then
823                         echo >&2 "Can't find cluster dir for $config!"
824                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
825                         exit 1
826                 fi
827                 config_file="$clusterdir/mysqld.conf"
828         fi
829
830         if [ ! -f "$config_file" ]; then
831                 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/"
832                 continue
833         fi
834         configs="$configs $config_file"
835 done
836
837 (
838 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
839 echo 'Thus, you should invoke:'
840 for config in $configs; do
841         sed -i -e '
842                 s/set-variable\s*=\s* //
843                 # use # as comment in config
844                 s/^;/#/
845         ' $config
846
847         datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs)
848         echo "# mysql_upgrade --datadir=$datadir"
849 done
850 ) | %banner -e %{name}-5.1
851
852 %triggerpostun -- mysql < 5.5.0
853 configs=""
854 for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do
855         if echo "$config" | grep -q '^/'; then
856                 config_file="$config"
857         elif [ -f "/etc/%{name}/$config" ]; then
858                 config_file=/etc/%{name}/$config
859         else
860                 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf)
861                 if [ -z "$clusterdir" ]; then
862                         echo >&2 "Can't find cluster dir for $config!"
863                         echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf"
864                         exit 1
865                 fi
866                 config_file="$clusterdir/mysqld.conf"
867         fi
868
869         if [ ! -f "$config_file" ]; then
870                 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/"
871                 continue
872         fi
873         configs="$configs $config_file"
874 done
875
876 (
877 echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.'
878 echo 'Thus, you should invoke:'
879 for config in $configs; do
880         sed -i -e '
881                 s/^language *= *polish/lc-messages = pl_PL/i
882                 s/set-variable\s*=\s* //
883                 s/^skip-locking/skip-external-locking/
884                 # this is not valid for server. it is client option
885                 s/^default-character-set/# client-config: &/
886                 # use # as comment in config
887                 s/^;/#/
888         ' $config
889
890         socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs)
891         echo "# mysql_upgrade ${socket:+--socket=$socket}"
892 done
893 ) | %banner -e %{name}-5.5
894
895 %files
896 %defattr(644,root,root,755)
897 %doc build/support-files/*.cnf
898 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
899 %attr(754,root,root) /etc/rc.d/init.d/%{name}
900 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
901 %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf
902 %attr(755,root,root) %{_bindir}/ps_tokudb_admin
903 %attr(755,root,root) %{_sbindir}/innochecksum
904 %attr(755,root,root) %{_sbindir}/my_print_defaults
905 %attr(755,root,root) %{_sbindir}/myisamchk
906 %attr(755,root,root) %{_sbindir}/myisamlog
907 %attr(755,root,root) %{_sbindir}/myisampack
908 #%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables
909 %attr(755,root,root) %{_sbindir}/mysql_plugin
910 %attr(755,root,root) %{_sbindir}/mysql_upgrade
911 %attr(755,root,root) %{_sbindir}/mysqlcheck
912 %attr(755,root,root) %{_sbindir}/mysqld
913 %dir %{_libdir}/%{name}
914 %dir %{_libdir}/%{name}/plugin
915 %attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so
916 %attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so
917 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
918 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so
919 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so
920 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
921 %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.so
922 %attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so
923 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so
924 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so
925 #%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so
926 %attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
927 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
928 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
929 %attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
930 %attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
931 %attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
932 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
933 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
934 %attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
935 %attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so
936 %attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so
937 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so
938 %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so
939 %attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so
940 %if %{with sphinx}
941 %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
942 %endif
943 # for plugins
944 %attr(755,root,root) %{_libdir}/libmysqlservices.so
945 %{_mandir}/man1/innochecksum.1*
946 %{_mandir}/man1/my_print_defaults.1*
947 %{_mandir}/man1/myisamchk.1*
948 %{_mandir}/man1/myisamlog.1*
949 %{_mandir}/man1/myisampack.1*
950 #%{_mandir}/man1/mysql_fix_privilege_tables.1*
951 %{_mandir}/man1/mysql_plugin.1*
952 %{_mandir}/man1/mysql_upgrade.1*
953 %{_mandir}/man1/mysqlcheck.1*
954 %{_mandir}/man8/mysqld.8*
955
956 %if %{?debug:1}0
957 %attr(755,root,root) %{_bindir}/*resolve_stack_dump
958 %{_datadir}/%{_orgname}/mysqld.sym
959 %{_mandir}/man1/*resolve_stack_dump.1*
960 %endif
961
962 %attr(700,mysql,mysql) %{_mysqlhome}
963 # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole
964 %attr(751,root,root) /var/lib/mysql
965 %attr(750,mysql,mysql) %dir /var/log/mysql
966 %attr(750,mysql,mysql) %dir /var/log/archive/mysql
967 %attr(640,mysql,mysql) %ghost /var/log/mysql/*
968
969 # This is template for configuration file which is created after 'service mysql init'
970 %{_datadir}/%{_orgname}/mysqld.conf
971 %{_datadir}/%{_orgname}/mysql_security_commands.sql
972 %{_datadir}/%{_orgname}/mysql_system_tables_data.sql
973 %{_datadir}/%{_orgname}/mysql_system_tables.sql
974 %{_datadir}/%{_orgname}/mysql_test_data_timezone.sql
975
976 %{_datadir}/%{_orgname}/english
977 %{_datadir}/%{_orgname}/dictionary.txt
978 %{_datadir}/%{_orgname}/fill_help_tables.sql
979 %{_datadir}/%{_orgname}/innodb_memcached_config.sql
980 #%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql
981 %lang(bg) %{_datadir}/%{_orgname}/bulgarian
982 %lang(cs) %{_datadir}/%{_orgname}/czech
983 %lang(da) %{_datadir}/%{_orgname}/danish
984 %lang(de) %{_datadir}/%{_orgname}/german
985 %lang(el) %{_datadir}/%{_orgname}/greek
986 %lang(es) %{_datadir}/%{_orgname}/spanish
987 %lang(et) %{_datadir}/%{_orgname}/estonian
988 %lang(fr) %{_datadir}/%{_orgname}/french
989 %lang(hu) %{_datadir}/%{_orgname}/hungarian
990 %lang(it) %{_datadir}/%{_orgname}/italian
991 %lang(ja) %{_datadir}/%{_orgname}/japanese
992 %lang(ko) %{_datadir}/%{_orgname}/korean
993 %lang(nl) %{_datadir}/%{_orgname}/dutch
994 %lang(nb) %{_datadir}/%{_orgname}/norwegian
995 %lang(nn) %{_datadir}/%{_orgname}/norwegian-ny
996 %lang(pl) %{_datadir}/%{_orgname}/polish
997 %lang(pt) %{_datadir}/%{_orgname}/portuguese
998 %lang(ro) %{_datadir}/%{_orgname}/romanian
999 %lang(ru) %{_datadir}/%{_orgname}/russian
1000 %lang(sr) %{_datadir}/%{_orgname}/serbian
1001 %lang(sk) %{_datadir}/%{_orgname}/slovak
1002 %lang(sv) %{_datadir}/%{_orgname}/swedish
1003 %lang(uk) %{_datadir}/%{_orgname}/ukrainian
1004
1005 %files charsets
1006 %defattr(644,root,root,755)
1007 %dir %{_datadir}/%{_orgname}
1008 %{_datadir}/%{_orgname}/charsets
1009
1010 %files extras
1011 %defattr(644,root,root,755)
1012 %attr(755,root,root) %{_bindir}/msql2mysql
1013 %attr(755,root,root) %{_bindir}/myisam_ftdump
1014 %attr(755,root,root) %{_bindir}/mysql_install_db
1015 %attr(755,root,root) %{_bindir}/mysql_secure_installation
1016 %attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
1017 %attr(755,root,root) %{_bindir}/perror
1018 %attr(755,root,root) %{_bindir}/replace
1019 %attr(755,root,root) %{_bindir}/resolveip
1020 %{_mandir}/man1/msql2mysql.1*
1021 %{_mandir}/man1/myisam_ftdump.1*
1022 %{_mandir}/man1/mysql_install_db.1*
1023 %{_mandir}/man1/mysql_secure_installation.1*
1024 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
1025 %{_mandir}/man1/perror.1*
1026 %{_mandir}/man1/replace.1*
1027 %{_mandir}/man1/resolveip.1*
1028
1029 %files -n mysqlhotcopy
1030 %defattr(644,root,root,755)
1031 %attr(755,root,root) %{_bindir}/mysqlhotcopy
1032 %{_mandir}/man1/mysqlhotcopy.1*
1033
1034 %files extras-perl
1035 %defattr(644,root,root,755)
1036 %attr(755,root,root) %{_bindir}/mysql_convert_table_format
1037 %attr(755,root,root) %{_bindir}/mysql_find_rows
1038 %attr(755,root,root) %{_bindir}/mysql_fix_extensions
1039 %attr(755,root,root) %{_bindir}/mysql_setpermission
1040 %attr(755,root,root) %{_bindir}/mysql_zap
1041 %attr(755,root,root) %{_bindir}/mysqlaccess
1042 %attr(755,root,root) %{_bindir}/mysqldumpslow
1043 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf
1044 %{_mandir}/man1/mysql_convert_table_format.1*
1045 %{_mandir}/man1/mysql_find_rows.1*
1046 %{_mandir}/man1/mysql_fix_extensions.1*
1047 %{_mandir}/man1/mysql_setpermission.1*
1048 %{_mandir}/man1/mysql_zap.1*
1049 %{_mandir}/man1/mysqlaccess.1*
1050 %{_mandir}/man1/mysqldumpslow.1*
1051
1052 %files client
1053 %defattr(644,root,root,755)
1054 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf
1055 %attr(755,root,root) %{_bindir}/mysql
1056 %attr(755,root,root) %{_bindir}/mysqladmin
1057 %attr(755,root,root) %{_bindir}/mysqlbinlog
1058 %attr(755,root,root) %{_bindir}/mysqlbug
1059 %attr(755,root,root) %{_bindir}/mysql_config_editor
1060 %attr(755,root,root) %{_bindir}/mysqldump
1061 %attr(755,root,root) %{_bindir}/mysqlimport
1062 %attr(755,root,root) %{_bindir}/mysqlshow
1063 %{_mandir}/man1/mysql.1*
1064 %{_mandir}/man1/mysqladmin.1*
1065 %{_mandir}/man1/mysqlbinlog.1*
1066 %{_mandir}/man1/mysqlbug.1*
1067 %{_mandir}/man1/mysql_config_editor.1*
1068 %{_mandir}/man1/mysqldump.1*
1069 %{_mandir}/man1/mysqlimport.1*
1070 %{_mandir}/man1/mysqlshow.1*
1071
1072 %files libs
1073 %defattr(644,root,root,755)
1074 %attr(751,root,root) %dir %{_sysconfdir}/mysql
1075 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
1076 %{_sysconfdir}/%{name}/my.cnf
1077 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
1078 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
1079 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
1080 %attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
1081 %if %{with ndb}
1082 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
1083 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
1084 %endif
1085
1086 %files devel
1087 %defattr(644,root,root,755)
1088 %attr(755,root,root) %{_bindir}/mysql_config
1089 %attr(755,root,root) %{_libdir}/libmysqlclient.so
1090 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so
1091 %if %{with ndb}
1092 %attr(755,root,root) %{_libdir}/libndbclient.so
1093 %endif
1094 # static-only so far
1095 %{_libdir}/libmysqld.a
1096 %{_includedir}/mysql
1097 %{_aclocaldir}/mysql.m4
1098 %{_mandir}/man1/mysql_config.1*
1099
1100 %files static
1101 %defattr(644,root,root,755)
1102 %{_libdir}/libmysqlclient.a
1103 %{_libdir}/libmysqlclient_r.a
1104 %if %{with ndb}
1105 %{_libdir}/libndbclient.a
1106 %endif
1107
1108 %files bench
1109 %defattr(644,root,root,755)
1110 %attr(755,root,root) %{_bindir}/mysqlslap
1111 %attr(755,root,root) %{_bindir}/mysqltest
1112 %dir %{_datadir}/sql-bench
1113 %{_datadir}/sql-bench/[CDRl]*
1114 %attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
1115 %{_mandir}/man1/mysqlslap.1*
1116 %{_mandir}/man1/mysqltest.1*
1117 %{_mandir}/man1/mysqltest_embedded.1*
1118
1119 #%files doc
1120 #%defattr(644,root,root,755)
1121 #%doc Docs/manual.html Docs/manual_toc.html
1122
1123 %if %{with ndb}
1124 %files ndb
1125 %defattr(644,root,root,755)
1126 %attr(755,root,root) %{_sbindir}/ndbd
1127 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
1128 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
1129 %{_mandir}/man1/ndbd_redo_log_reader.1*
1130 %{_mandir}/man8/ndbd.8*
1131
1132 %files ndb-client
1133 %defattr(644,root,root,755)
1134 %attr(755,root,root) %{_bindir}/ndb_config
1135 %attr(755,root,root) %{_bindir}/ndb_delete_all
1136 %attr(755,root,root) %{_bindir}/ndb_desc
1137 %attr(755,root,root) %{_bindir}/ndb_drop_index
1138 %attr(755,root,root) %{_bindir}/ndb_drop_table
1139 %attr(755,root,root) %{_bindir}/ndb_error_reporter
1140 %attr(755,root,root) %{_bindir}/ndb_mgm
1141 %attr(755,root,root) %{_bindir}/ndb_print_backup_file
1142 %attr(755,root,root) %{_bindir}/ndb_print_schema_file
1143 %attr(755,root,root) %{_bindir}/ndb_print_sys_file
1144 %attr(755,root,root) %{_bindir}/ndb_restore
1145 %attr(755,root,root) %{_bindir}/ndb_select_all
1146 %attr(755,root,root) %{_bindir}/ndb_select_count
1147 %attr(755,root,root) %{_bindir}/ndb_show_tables
1148 %attr(755,root,root) %{_bindir}/ndb_size.pl
1149 %attr(755,root,root) %{_bindir}/ndb_test_platform
1150 %attr(755,root,root) %{_bindir}/ndb_waiter
1151 %{_mandir}/man1/ndb_config.1*
1152 %{_mandir}/man1/ndb_delete_all.1*
1153 %{_mandir}/man1/ndb_desc.1*
1154 %{_mandir}/man1/ndb_drop_index.1*
1155 %{_mandir}/man1/ndb_drop_table.1*
1156 %{_mandir}/man1/ndb_error_reporter.1*
1157 %{_mandir}/man1/ndb_mgm.1*
1158 %{_mandir}/man1/ndb_print_backup_file.1*
1159 %{_mandir}/man1/ndb_print_schema_file.1*
1160 %{_mandir}/man1/ndb_print_sys_file.1*
1161 %{_mandir}/man1/ndb_restore.1*
1162 %{_mandir}/man1/ndb_select_all.1*
1163 %{_mandir}/man1/ndb_select_count.1*
1164 %{_mandir}/man1/ndb_show_tables.1*
1165 %{_mandir}/man1/ndb_size.pl.1*
1166 %{_mandir}/man1/ndb_waiter.1*
1167
1168 %files ndb-mgm
1169 %defattr(644,root,root,755)
1170 %attr(755,root,root) %{_sbindir}/ndb_mgmd
1171 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
1172 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
1173 %{_mandir}/man8/ndb_mgmd.8*
1174
1175 %files ndb-cpc
1176 %defattr(644,root,root,755)
1177 %attr(755,root,root) %{_sbindir}/ndb_cpcd
1178 %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
1179 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
1180 %{_mandir}/man1/ndb_cpcd.1*
1181 %endif
This page took 0.1284 seconds and 2 git commands to generate.