]> git.pld-linux.org Git - packages/mysql.git/blame - mysql.spec
- convert to utf8
[packages/mysql.git] / mysql.spec
CommitLineData
13ce82d8 1# TODO:
2# - C(XX)FLAGS for innodb subdirs are overriden by ./configure!
3# - http://bugs.mysql.com/bug.php?id=16470
4#
5# Conditional build:
f3b912d8
ER
6%bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
7%bcond_without federated # Federated storage engine support
a78a22c1 8%bcond_without innodb # InnoDB storage engine support
13ce82d8 9%bcond_without raid # Without raid
10%bcond_without ssl # Without OpenSSL
11%bcond_without tcpd # Without libwrap (tcp_wrappers) support
f3b912d8 12%bcond_with bdb # Berkeley DB support
b79f901f 13%bcond_without sphinx # Sphinx storage engine support
13ce82d8 14#
15%include /usr/lib/rpm/macros.perl
16#define _snap 20060111
17Summary: MySQL: a very fast and reliable SQL database engine
89316dd1
ER
18Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank
19Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable
20Summary(pl.UTF-8): MySQL: bardzo szybka i niezawodna baza danych (SQL)
21Summary(pt_BR.UTF-8): MySQL: Um servidor SQL rápido e confiável
22Summary(ru.UTF-8): MySQL - быстрый SQL-сервер
23Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
24Summary(zh_CN.UTF-8): MySQL数据库服务器
13ce82d8 25Name: mysql
e32f1a7b 26Version: 5.0.51a
f22fdf33 27Release: 2
13ce82d8 28License: GPL + MySQL FLOSS Exception
29Group: Applications/Databases
7628f771
ER
30#Source0: ftp://ftp.mysql.com/pub/mysql/src/%{name}-%{version}.tar.gz
31Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
e32f1a7b 32# Source0-md5: a83dbdbb91267daf73d2297a9c283dd1
ff131788
ER
33Source100: http://www.sphinxsearch.com/downloads/sphinx-0.9.7.tar.gz
34# Source100-md5: 32f2b7e98d8485c86108851d52c5cef4
13ce82d8 35Source1: %{name}.init
36Source2: %{name}.sysconfig
37Source3: %{name}.logrotate
38Source4: %{name}d.conf
39Source5: %{name}-clusters.conf
40Source7: %{name}-ndb.init
41Source8: %{name}-ndb.sysconfig
42Source9: %{name}-ndb-mgm.init
43Source10: %{name}-ndb-mgm.sysconfig
44Source11: %{name}-ndb-cpc.init
45Source12: %{name}-ndb-cpc.sysconfig
46Source13: %{name}-client.conf
47Patch0: %{name}-libs.patch
a78a22c1 48Patch1: %{name}-sphinx.patch
13ce82d8 49Patch2: %{name}-c++.patch
50Patch3: %{name}-info.patch
51Patch4: %{name}-sql-cxx-pic.patch
52Patch5: %{name}-noproc.patch
53Patch6: %{name}-fix_privilege_tables.patch
54Patch7: %{name}-align.patch
55Patch8: %{name}-client-config.patch
56Patch9: %{name}-build.patch
57Patch10: %{name}-alpha.patch
58Patch11: %{name}-ndb-ldflags.patch
59Patch12: %{name}-bug-20153.patch
e140e412 60Patch13: %{name}-ssl.patch
f22fdf33 61Patch14: %{name}-bug-34192.patch
f2227d5a 62Patch15: %{name}-bug-29082.patch
45ee89f9 63Patch16: %{name}-bug-16470.patch
d9ae79d4 64Patch17: %{name}-CVE-2007-5925.patch
13ce82d8 65URL: http://www.mysql.com/products/database/mysql/community_edition.html
66BuildRequires: autoconf
67BuildRequires: automake
68%{?with_bdb:BuildRequires: db3-devel}
69BuildRequires: libstdc++-devel >= 5:3.0
70BuildRequires: libtool
71%{?with_tcpd:BuildRequires: libwrap-devel}
72BuildRequires: ncurses-devel >= 4.2
73%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
74BuildRequires: perl-DBI
75BuildRequires: perl-devel >= 1:5.6.1
76BuildRequires: readline-devel >= 4.2
77BuildRequires: rpm-perlprov >= 4.1-13
78BuildRequires: rpmbuild(macros) >= 1.268
79BuildRequires: sed >= 4.0
80BuildRequires: texinfo
81BuildRequires: zlib-devel
82Requires(post,preun): /sbin/chkconfig
83Requires(postun): /usr/sbin/groupdel
84Requires(postun): /usr/sbin/userdel
85Requires(pre): /bin/id
86Requires(pre): /usr/bin/getgid
87Requires(pre): /usr/sbin/groupadd
88Requires(pre): /usr/sbin/useradd
89Requires(triggerpostun): sed >= 4.0
90Requires: %{name}-charsets = %{version}-%{release}
91Requires: /usr/bin/setsid
92Requires: rc-scripts >= 0.2.0
93Provides: MySQL-server
94Provides: group(mysql)
95Provides: msqlormysql
96Provides: user(mysql)
97Obsoletes: MySQL
98Obsoletes: mysql-server
99BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
101%define _libexecdir %{_sbindir}
102%define _localstatedir /var/lib/mysql
103%define _mysqlhome /home/services/mysql
104
105%define _noautoreqdep 'perl(DBD::mysql)'
106# CFLAGS for innodb are altered
107%undefine configure_cache
108
109%description
110MySQL is a true multi-user, multi-threaded SQL (Structured Query
111Language) database server. SQL is the most popular database language
112in the world. MySQL is a client/server implementation that consists of
113a server daemon mysqld and many different client programs/libraries.
114
115The main goals of MySQL are speed, robustness and easy to use. MySQL
116was originally developed because we at Tcx needed a SQL server that
117could handle very big databases with magnitude higher speed than what
118any database vendor could offer to us. We have now been using MySQL
119since 1996 in a environment with more than 40 databases, 10,000
120tables, of which more than 500 have more than 7 million rows. This is
121about 50G of mission critical data.
122
123The base upon which MySQL is built is a set of routines that have been
124used in a highly demanding production environment for many years.
125While MySQL is still in development, it already offers a rich and
126highly useful function set.
127
89316dd1 128%description -l fr.UTF-8
13ce82d8 129MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et
130multi-taches. Le langage SQL est le langage de bases de donnees le
131plus populaire au monde. MySQL est une implementation client/serveur
132qui consiste en un serveur (mysqld) et differents
133programmes/bibliotheques clientes.
134
135Les objectifs principaux de MySQL sont: vitesse, robustesse et
136facilite d'utilisation. MySQL fut originalement developpe parce que
137nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de
138tres grandes bases de donnees avec une vitesse d'un ordre de magnitude
139superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous
140utilisons MySQL depuis 1996 dans un environnement avec plus de 40
141bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7
142millions de lignes. Ceci represente environ 50G de donnees critiques.
143
144A la base de la conception de MySQL, on retrouve une serie de routines
145qui ont ete utilisees dans un environnement de production pendant
146plusieurs annees. Meme si MySQL est encore en developpement, il offre
147deja une riche et utile serie de fonctions.
148
89316dd1
ER
149%description -l pl.UTF-8
150MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych
151SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz
152danych. MySQL to implementacja klient/serwer składająca się z demona
153mysqld i wielu różnych programów i bibliotek klienckich.
154
155Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania.
156MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali
157serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele
158większą, niż mogli zaoferować inni producenci baz danych. Używają go
159od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z
160których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około
13ce82d8 16150GB krytycznych danych.
162
89316dd1
ER
163Baza, na której oparty jest MySQL, składa się ze zbioru procedur,
164które były używane w bardzo wymagającym środowisku produkcyjnym przez
165wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty
166i użyteczny zbiór funkcji.
13ce82d8 167
89316dd1 168%description -l de.UTF-8
13ce82d8 169MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu
170Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten
89316dd1
ER
171werden zwar in zweidimensionalen Tabellen gespeichert und können mit
172einem Primärschlüssel versehen werden. Es ist aber keine Definition
173eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer
174MySQL-Datenbank völlig allein für die (referenzielle) Integrität der
13ce82d8 175Daten verantwortlich. Allein durch die Nutzung externer
89316dd1
ER
176Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität
177ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten.
13ce82d8 178
89316dd1
ER
179%description -l pt_BR.UTF-8
180O MySQL é um servidor de banco de dados SQL realmente multiusuário e
181multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de
182dados no mundo. O MySQL é uma implementação cliente/servidor que
13ce82d8 183consiste de um servidor chamado mysqld e diversos
89316dd1 184programas/bibliotecas clientes. Os principais objetivos do MySQL são:
13ce82d8 185velocidade, robustez e facilidade de uso. O MySQL foi originalmente
89316dd1 186desenvolvido porque nós na Tcx precisávamos de um servidor SQL que
13ce82d8 187pudesse lidar com grandes bases de dados e com uma velocidade muito
188maior do que a que qualquer vendedor podia nos oferecer. Estamos
189usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados
89316dd1
ER
190com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de
191linhas. Isto é o equivalente a aproximadamente 50G de dados críticos.
192A base da construção do MySQL é uma série de rotinas que foram usadas
193em um ambiente de produção com alta demanda por muitos anos. Mesmo o
194MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de
195funções muito ricas e úteis. Veja a documentação para maiores
196informações.
197
198%description -l ru.UTF-8
199MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL
200была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в
201дистрибутиве на предмет других участников проекта и прочей информации
202о MySQL.
203
204%description -l uk.UTF-8
205MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL
206було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в
207дистрибутиві для інформації про інших учасників проекту та іншої
208інформації.
13ce82d8 209
210%package charsets
211Summary: MySQL - character sets definitions
89316dd1 212Summary(pl.UTF-8): MySQL - definicje kodowań znaków
13ce82d8 213Group: Applications/Databases
214
215%description charsets
216This package contains character sets definitions needed by both client
217and server.
218
89316dd1
ER
219%description charsets -l pl.UTF-8
220Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i
13ce82d8 221klienta.
222
223%package extras
224Summary: MySQL additional utilities
89316dd1 225Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL
13ce82d8 226Group: Applications/Databases
227Requires: %{name}-libs = %{version}-%{release}
228
229%description extras
230MySQL additional utilities except Perl scripts (they may be found in
231%{name}-extras-perl package).
232
89316dd1
ER
233%description extras -l pl.UTF-8
234Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w
13ce82d8 235pakiecie %{name}-extras-perl).
236
237%package extras-perl
238Summary: MySQL additional utilities written in Perl
89316dd1 239Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu
13ce82d8 240Group: Applications/Databases
241Requires: %{name}-extras = %{version}-%{release}
242Requires: perl(DBD::mysql)
243
244%description extras-perl
245MySQL additional utilities written in Perl.
246
89316dd1
ER
247%description extras-perl -l pl.UTF-8
248Dodatkowe narzędzia do MySQL napisane w Perlu.
13ce82d8 249
250%package client
251Summary: MySQL - Client
89316dd1
ER
252Summary(pl.UTF-8): MySQL - Klient
253Summary(pt.UTF-8): MySQL - Cliente
254Summary(ru.UTF-8): MySQL клиент
255Summary(uk.UTF-8): MySQL клієнт
13ce82d8 256Group: Applications/Databases
257Requires: %{name}-charsets = %{version}-%{release}
258Requires: %{name}-libs = %{version}-%{release}
259Obsoletes: MySQL-client
260
261%description client
262This package contains the standard MySQL clients.
263
89316dd1 264%description client -l fr.UTF-8
13ce82d8 265Ce package contient les clients MySQL standards.
266
89316dd1 267%description client -l pl.UTF-8
13ce82d8 268Standardowe programy klienckie MySQL.
269
89316dd1
ER
270%description client -l pt_BR.UTF-8
271Este pacote contém os clientes padrão para o MySQL.
13ce82d8 272
89316dd1
ER
273%description client -l ru.UTF-8
274Этот пакет содержит только клиент MySQL.
13ce82d8 275
89316dd1
ER
276%description client -l uk.UTF-8
277Цей пакет містить тільки клієнта MySQL.
13ce82d8 278
279%package libs
280Summary: Shared libraries for MySQL
89316dd1 281Summary(pl.UTF-8): Biblioteki dzielone MySQL
13ce82d8 282Group: Libraries
283Obsoletes: libmysql10
284Obsoletes: mysql-doc < 4.1.12
285
286%description libs
287Shared libraries for MySQL.
288
89316dd1 289%description libs -l pl.UTF-8
13ce82d8 290Biblioteki dzielone MySQL.
291
292%package devel
293Summary: MySQL - Development header files and libraries
89316dd1
ER
294Summary(pl.UTF-8): MySQL - Pliki nagłówkowe i biblioteki dla programistów
295Summary(pt.UTF-8): MySQL - Medições de desempenho
296Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработчика
297Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста
13ce82d8 298Group: Development/Libraries
299Requires: %{name}-libs = %{version}-%{release}
300%{?with_ssl:Requires: openssl-devel}
301Requires: zlib-devel
302Obsoletes: MySQL-devel
303Obsoletes: libmysql10-devel
304
305%description devel
306This package contains the development header files and libraries
307necessary to develop MySQL client applications.
308
89316dd1 309%description devel -l fr.UTF-8
13ce82d8 310Ce package contient les fichiers entetes et les librairies de
311developpement necessaires pour developper des applications clientes
312MySQL.
313
89316dd1
ER
314%description devel -l pl.UTF-8
315Pliki nagłówkowe i biblioteki konieczne do kompilacji aplikacji
13ce82d8 316klienckich MySQL.
317
89316dd1
ER
318%description devel -l pt_BR.UTF-8
319Este pacote contém os arquivos de cabeçalho (header files) e
320bibliotecas necessárias para desenvolver aplicações clientes do MySQL.
13ce82d8 321
89316dd1
ER
322%description devel -l ru.UTF-8
323Этот пакет содержит хедеры и библиотеки разработчика, необходимые для
324разработки клиентских приложений.
13ce82d8 325
89316dd1
ER
326%description devel -l uk.UTF-8
327Цей пакет містить хедери та бібліотеки програміста, необхідні для
328розробки програм-клієнтів.
13ce82d8 329
330%package static
331Summary: MySQL static libraries
89316dd1
ER
332Summary(pl.UTF-8): Biblioteki statyczne MySQL
333Summary(ru.UTF-8): MySQL - статические библиотеки
334Summary(uk.UTF-8): MySQL - статичні бібліотеки
13ce82d8 335Group: Development/Libraries
336Requires: %{name}-devel = %{version}-%{release}
337Obsoletes: MySQL-static
338
339%description static
340MySQL static libraries.
341
89316dd1 342%description static -l pl.UTF-8
13ce82d8 343Biblioteki statyczne MySQL.
344
89316dd1
ER
345%description static -l ru.UTF-8
346Этот пакет содержит статические библиотеки разработчика, необходимые
347для разработки клиентских приложений.
13ce82d8 348
89316dd1
ER
349%description static -l uk.UTF-8
350Цей пакет містить статичні бібліотеки програміста, необхідні для
351розробки програм-клієнтів.
13ce82d8 352
353%package bench
354Summary: MySQL - Benchmarks
89316dd1
ER
355Summary(pl.UTF-8): MySQL - Programy testujące szybkość działania bazy
356Summary(pt.UTF-8): MySQL - Medições de desempenho
357Summary(ru.UTF-8): MySQL - бенчмарки
358Summary(uk.UTF-8): MySQL - бенчмарки
13ce82d8 359Group: Applications/Databases
360Requires: %{name} = %{version}-%{release}
361Requires: %{name}-client
362Requires: perl(DBD::mysql)
363Obsoletes: MySQL-bench
364
365%description bench
366This package contains MySQL benchmark scripts and data.
367
89316dd1
ER
368%description bench -l pl.UTF-8
369Programy testujące szybkość serwera MySQL.
13ce82d8 370
89316dd1
ER
371%description bench -l pt_BR.UTF-8
372Este pacote contém medições de desempenho de scripts e dados do MySQL.
13ce82d8 373
89316dd1
ER
374%description bench -l ru.UTF-8
375Этот пакет содержит скрипты и данные для оценки производительности
13ce82d8 376MySQL.
377
89316dd1
ER
378%description bench -l uk.UTF-8
379Цей пакет містить скрипти та дані для оцінки продуктивності MySQL.
13ce82d8 380
381%package doc
382Summary: MySQL manual
89316dd1 383Summary(pl.UTF-8): Podręcznik użytkownika MySQL
13ce82d8 384Group: Applications/Databases
385
386%description doc
387This package contains manual in HTML format.
388
89316dd1
ER
389%description doc -l pl.UTF-8
390Podręcznik MySQL-a w formacie HTML.
13ce82d8 391
392%package ndb
393Summary: MySQL - NDB Storage Engine Daemon
89316dd1 394Summary(pl.UTF-8): MySQL - demon silnika przechowywania danych NDB
13ce82d8 395Group: Applications/Databases
396Requires: %{name}-libs = %{version}-%{release}
397
398%description ndb
399This package contains the standard MySQL NDB Storage Engine Daemon.
400
89316dd1 401%description ndb -l pl.UTF-8
13ce82d8 402Ten pakiet zawiera standardowego demona silnika przechowywania danych
403NDB.
404
405%package ndb-client
406Summary: MySQL - NDB Clients
89316dd1 407Summary(pl.UTF-8): MySQL - programy klienckie NDB
13ce82d8 408Group: Applications/Databases
409Requires: %{name}-libs = %{version}-%{release}
410
411%description ndb-client
412This package contains the standard MySQL NDB Clients.
413
89316dd1 414%description ndb-client -l pl.UTF-8
13ce82d8 415Ten pakiet zawiera standardowe programy klienckie MySQL NDB.
416
417%package ndb-mgm
418Summary: MySQL - NDB Management Daemon
89316dd1 419Summary(pl.UTF-8): MySQL - demon zarządzający NDB
13ce82d8 420Group: Applications/Databases
421Requires: %{name}-libs = %{version}-%{release}
422
423%description ndb-mgm
424This package contains the standard MySQL NDB Management Daemon.
425
89316dd1
ER
426%description ndb-mgm -l pl.UTF-8
427Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB.
13ce82d8 428
429%package ndb-cpc
430Summary: MySQL - NDB CPC Daemon
89316dd1 431Summary(pl.UTF-8): MySQL - demon NDB CPC
13ce82d8 432Group: Applications/Databases
433Requires: %{name}-libs = %{version}-%{release}
434
435%description ndb-cpc
436This package contains the standard MySQL NDB CPC Daemon.
437
89316dd1 438%description ndb-cpc -l pl.UTF-8
13ce82d8 439Ten pakiet zawiera standardowego demona MySQL NDB CPC.
440
441%prep
a78a22c1 442%setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}} %{?with_sphinx:-a100}
13ce82d8 443%patch0 -p1
a78a22c1
ER
444%if %{with sphinx}
445mv sphinx-*/mysqlse sql/sphinx
446%patch1 -p1
447%endif
13ce82d8 448%patch2 -p1
449%patch3 -p1
450%ifarch alpha
451# this is strange: mysqld functions for UDF modules are not explicitly defined,
452# so -rdynamic is used; in such case gcc3+ld on alpha doesn't like C++ vtables
453# in objects compiled without -fPIC
454%patch4 -p1
455# gcc 3.3.x ICE
456%patch10 -p1
457%endif
458%patch5 -p1
459%patch6 -p1
460%patch7 -p1
461%patch8 -p1
462%patch9 -p1
463%patch11 -p1
464%patch12 -p1
e140e412 465%patch13 -p1
f22fdf33 466%patch14 -p1
f2227d5a 467%patch15 -p1
45ee89f9 468%patch16 -p1
d9ae79d4 469%patch17 -p1
13ce82d8 470
471%build
472%{__libtoolize}
473%{__aclocal}
474%{__automake}
475%{__autoconf}
476
477# The compiler flags are as per their "official" spec ;)
478CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
479CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
480
481# NOTE: the PS, FIND_PROC, KILL, CHECK_PID are not used by PLD Linux
482# and therefore do not add BR on these. These are here just to satisfy
483# configure.
484
485%configure \
486 PS='/bin/ps' \
487 FIND_PROC='/bin/ps p $$PID' \
488 KILL='/bin/kill' \
489 CHECK_PID='/bin/kill -0 $$PID' \
490 --enable-assembler \
491 --enable-largefile=yes \
492 --enable-shared \
493 --enable-static \
494 --enable-thread-safe-client \
495 --with%{!?with_bdb:out}-berkeley-db \
496 --with%{!?with_innodb:out}-innodb \
497 --with%{!?with_raid:out}-raid \
498 --with%{!?with_ssl:out}-openssl \
499 --with%{!?with_tcpd:out}-libwrap \
500 %{?with_big_tables:--with-big-tables} \
501 --with-comment="PLD Linux Distribution MySQL RPM" \
502 --with%{!?debug:out}-debug \
503 --with%{!?debug:out}-ndb-debug \
504 --with-embedded-server \
505 --with-extra-charsets=all \
506 --with-low-memory \
507 --with-mysqld-user=mysql \
508 --with-named-curses-libs="-lncurses" \
509 --with-named-thread-libs="-lpthread" \
510 --with-unix-socket-path=/var/lib/mysql/mysql.sock \
511 --with-archive-storage-engine \
a78a22c1 512 %{?with_sphinx:--with-sphinx-storage-engine} \
f3b912d8 513 %{?with_federated:--with-federated-storage-engine} \
13ce82d8 514 --with-vio \
515 --with-ndbcluster \
516 --without-readline \
517 --without-libedit \
518 --without-docs
519# --with-mysqlfs
520# --with-ndb-test --with-ndb-docs
521
522# NOTE that /var/lib/mysql/mysql.sock is symlink to real sock file
523# (it defaults to first cluster but user may change it to whatever
524# cluster it wants)
525
526echo -e "all:\ninstall:\nclean:\nlink_sources:\n" > libmysqld/examples/Makefile
527
528%{__make} \
529 benchdir=$RPM_BUILD_ROOT%{_datadir}/sql-bench
530
531%{__make} -C Docs mysql.info
532
533%install
534rm -rf $RPM_BUILD_ROOT
535install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql} \
536 $RPM_BUILD_ROOT/var/{log/{archiv,}/mysql,lib/mysql} \
537 $RPM_BUILD_ROOT{%{_infodir},%{_mysqlhome}}
538
539%if %{with bdb}
540install -d $RPM_BUILD_ROOT/var/lib/mysql/bdb/{log,tmp}
541%endif
542
543# Make install
544%{__make} install \
545 DESTDIR=$RPM_BUILD_ROOT \
546 benchdir=%{_datadir}/sql-bench \
547 libsdir=/tmp
548# libsdir is to avoid installing innodb static libs in $RPM_BUILD_ROOT../libs
549
550install Docs/mysql.info $RPM_BUILD_ROOT%{_infodir}
551
552install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
553install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
554install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
555# This is template for configuration file which is created after 'service mysql init'
556install %{SOURCE4} mysqld.conf
557install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/clusters.conf
558touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update}
559
560# remove innodb directives from mysqld.conf if mysqld is configured without
561%if !%{with innodb}
562 echo "BASE_TABLETYPE=MyISAM" >> $RPM_BUILD_ROOT/etc/sysconfig/mysql
563 cp mysqld.conf mysqld.tmp
564 awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
565%endif
566
567# remove berkeley-db directives from mysqld.conf if mysqld is configured without
568%if !%{with bdb}
569 cp mysqld.conf mysqld.tmp
570 awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
571%endif
572
573install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
574install %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/mysql/mysql-client.conf
575
576# NDB
577install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
578install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
579install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm
580install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm
581install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc
582install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
583# remove .txt variants for .sys messages
584rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
585
586mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
587sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config}
588
589# remove known unpackaged files
590rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
591
592# rename not to be so generic name
593mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
594mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
448811bf
ER
595mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1
596mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}comp_err.1
13ce82d8 597
598# not useful without -debug build
599%{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
448811bf 600%{!?debug:rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1}
13ce82d8 601# generate symbols file, so one can generate backtrace using it
602# mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack.
603# http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
604%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
605
448811bf 606# functionality in initscript / rpm / other os
13ce82d8 607rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
608rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
609rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
610rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
611rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
612rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
613rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
614rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt
615rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
616rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
617rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
618rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
a78a22c1
ER
619rm $RPM_BUILD_ROOT%{_mandir}/man1/make_win_bin_dist.1
620rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_install_db.1
2cc8e9c5 621rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1
448811bf 622rm $RPM_BUILD_ROOT%{_mandir}/man1/make_win_src_distribution.1
e32f1a7b 623rm $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld_multi.server
448811bf
ER
624
625# no package for tests
626rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-stress-test.pl.1
627rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql-test-run.pl.1
628rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql_client_test_embedded.1
13ce82d8 629
630# in %doc
631rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
632
633%clean
634rm -rf $RPM_BUILD_ROOT
635
636%pre
637%groupadd -g 89 mysql
638%useradd -u 89 -d %{_mysqlhome} -s /bin/sh -g mysql -c "MySQL Server" mysql
639
640%post
641[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
642/sbin/chkconfig --add mysql
643%service mysql restart
644
645%preun
646if [ "$1" = "0" ]; then
647 %service -q mysql stop
648 /sbin/chkconfig --del mysql
649fi
650
651%postun
652[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
653if [ "$1" = "0" ]; then
654 %userremove mysql
655 %groupremove mysql
656fi
657
658%post ndb
659/sbin/chkconfig --add mysql-ndb
660%service mysql-ndb restart "mysql NDB engine"
661
662%preun ndb
663if [ "$1" = "0" ]; then
664 %service mysql-ndb stop
665 /sbin/chkconfig --del mysql-ndb
666fi
667
668%post ndb-mgm
669/sbin/chkconfig --add mysql-ndb-mgm
670%service mysql-ndb-mgm restart "mysql NDB management node"
671
672%preun ndb-mgm
673if [ "$1" = "0" ]; then
674 %service mysql-ndb-mgm stop
675 /sbin/chkconfig --del mysql-ndb-mgm
676fi
677
678%post ndb-cpc
679/sbin/chkconfig --add mysql-ndb-cpc
680%service mysql-ndb-cpc restart "mysql NDB CPC"
681
682%preun ndb-cpc
683if [ "$1" = "0" ]; then
684 %service mysql-ndb-cpc stop
685 /sbin/chkconfig --del mysql-ndb-cpc
686fi
687
688%post libs -p /sbin/ldconfig
689%postun libs -p /sbin/ldconfig
690
691%triggerpostun -- mysql <= 4.0.20-2
692# For clusters in /etc/mysql/clusters.conf
693if [ -f "/etc/sysconfig/mysql" ]; then
694 . /etc/sysconfig/mysql
695 if [ -n "$MYSQL_DB_CLUSTERS" ]; then
696 for i in "$MYSQL_DB_CLUSTERS"; do
697 echo "$i/mysqld.conf=$i" >> /etc/mysql/clusters.conf
698 done
699 echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql
700 echo "# USE /etc/mysql/clusters.conf instead" >> /etc/sysconfig/mysql
701 echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/mysql/clusters.conf."
702 echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/mysql/clusters.conf."
703 fi
704fi
705
706%triggerpostun -- mysql <= 4.1.1
707# For better compatibility with prevoius versions:
708for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/mysql/clusters.conf); do
709 if echo "$config" | grep -q '^/'; then
710 config_file="$config"
711 elif [ -f "/etc/mysql/$config" ]; then
712 config_file=/etc/mysql/$config
713 else
714 clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
715 if [ -z "$clusterdir" ]; then
716 echo >&2 "Can't find cluster dir for $config!"
717 echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
718 exit 1
719 fi
720 config_file="$clusterdir/mysqld.conf"
721 fi
722
723 if [ ! -f "$config_file" ]; then
724 echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
725 exit 1
726 fi
727 echo "Adding option old-passwords to config: $config_file"
728 echo "If you want to use new, better passwords - remove it"
729
730 # sed magic to add 'old-passwords' to [mysqld] section
731 sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{
732 a
733 a; Compatibility options:
734 aold-passwords
735 }
736 ' $config_file
737done
738
739%banner -e %{name}-4.1.x <<-EOF
740 If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
741 mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
742EOF
743#'
744
745%files
746%defattr(644,root,root,755)
747%doc support-files/*.cnf support-files/*.ini
748%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
749%attr(754,root,root) /etc/rc.d/init.d/mysql
750%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
751%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
752%attr(755,root,root) %{_bindir}/innochecksum
753%attr(755,root,root) %{_bindir}/myisamchk
754%attr(755,root,root) %{_bindir}/myisamlog
755%attr(755,root,root) %{_bindir}/myisampack
756%attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
757%attr(755,root,root) %{_bindir}/my_print_defaults
758%attr(755,root,root) %{_bindir}/mysql_upgrade
759%attr(755,root,root) %{_bindir}/mysql_upgrade_shell
760%attr(755,root,root) %{_sbindir}/mysqld
761%{_mandir}/man1/mysql_fix_privilege_tables.1*
540a650f 762%{_mandir}/man1/my_print_defaults.1*
13ce82d8 763%{_mandir}/man1/myisamchk.1*
764%{_mandir}/man1/myisamlog.1*
765%{_mandir}/man1/myisampack.1*
766%{_mandir}/man1/mysql_upgrade.1*
2cc8e9c5 767%{_mandir}/man1/innochecksum.1*
13ce82d8 768%{_mandir}/man8/mysqld.8*
769
a397d2f1
ER
770%if %{?debug:1}0
771%attr(755,root,root) %{_bindir}/*resolve_stack_dump
772%{_datadir}/mysql/mysqld.sym
773%{_mandir}/man1/*resolve_stack_dump.1*
774%endif
775
13ce82d8 776%attr(700,mysql,mysql) %{_mysqlhome}
777# root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
778%attr(751,root,root) /var/lib/mysql
779%attr(750,mysql,mysql) %dir /var/log/mysql
780%attr(750,mysql,mysql) %dir /var/log/archiv/mysql
781%attr(640,mysql,mysql) %ghost /var/log/mysql/*
782
783%{_infodir}/mysql.info*
784# This is template for configuration file which is created after 'service mysql init'
785%{_datadir}/mysql/mysqld.conf
448811bf 786
13ce82d8 787%{_datadir}/mysql/fill_help_tables.sql
788%{_datadir}/mysql/mysql_fix_privilege_tables.sql
448811bf
ER
789%{_datadir}/mysql/mysql_system_tables.sql
790%{_datadir}/mysql/mysql_system_tables_data.sql
791%{_datadir}/mysql/mysql_test_data_timezone.sql
792
793%{_datadir}/mysql/english
13ce82d8 794%lang(cs) %{_datadir}/mysql/czech
795%lang(da) %{_datadir}/mysql/danish
796%lang(de) %{_datadir}/mysql/german
797%lang(el) %{_datadir}/mysql/greek
798%lang(es) %{_datadir}/mysql/spanish
799%lang(et) %{_datadir}/mysql/estonian
800%lang(fr) %{_datadir}/mysql/french
801%lang(hu) %{_datadir}/mysql/hungarian
802%lang(it) %{_datadir}/mysql/italian
803%lang(ja) %{_datadir}/mysql/japanese
804%lang(ko) %{_datadir}/mysql/korean
805%lang(nl) %{_datadir}/mysql/dutch
806%lang(nb) %{_datadir}/mysql/norwegian
807%lang(nn) %{_datadir}/mysql/norwegian-ny
808%lang(pl) %{_datadir}/mysql/polish
809%lang(pt) %{_datadir}/mysql/portuguese
810%lang(ro) %{_datadir}/mysql/romanian
811%lang(ru) %{_datadir}/mysql/russian
812%lang(sr) %{_datadir}/mysql/serbian
813%lang(sk) %{_datadir}/mysql/slovak
814%lang(sv) %{_datadir}/mysql/swedish
815%lang(uk) %{_datadir}/mysql/ukrainian
816
817%files charsets
818%defattr(644,root,root,755)
819%dir %{_datadir}/mysql
820%{_datadir}/mysql/charsets
821
822%files extras
823%defattr(644,root,root,755)
824%attr(755,root,root) %{_bindir}/msql2mysql
825%attr(755,root,root) %{_bindir}/myisam_ftdump
826%attr(755,root,root) %{_bindir}/mysql_secure_installation
827%attr(755,root,root) %{_bindir}/mysql_tzinfo_to_sql
828%attr(755,root,root) %{_bindir}/mysqlcheck
829%attr(755,root,root) %{_bindir}/perror
830%attr(755,root,root) %{_bindir}/replace
831%attr(755,root,root) %{_bindir}/resolveip
832%{_mandir}/man1/msql2mysql.1*
833%{_mandir}/man1/myisam_ftdump.1*
448811bf 834%{_mandir}/man1/mysql_secure_installation.1*
540a650f 835%{_mandir}/man1/mysql_tzinfo_to_sql.1*
13ce82d8 836%{_mandir}/man1/mysqlcheck.1*
837%{_mandir}/man1/perror.1*
838%{_mandir}/man1/replace.1*
448811bf 839%{_mandir}/man1/resolveip.1*
13ce82d8 840
841%files extras-perl
842%defattr(644,root,root,755)
843%attr(755,root,root) %{_bindir}/mysql_convert_table_format
844%attr(755,root,root) %{_bindir}/mysql_explain_log
845%attr(755,root,root) %{_bindir}/mysql_find_rows
846%attr(755,root,root) %{_bindir}/mysql_fix_extensions
847%attr(755,root,root) %{_bindir}/mysql_setpermission
848%attr(755,root,root) %{_bindir}/mysql_tableinfo
849%attr(755,root,root) %{_bindir}/mysql_zap
850%attr(755,root,root) %{_bindir}/mysqlaccess
851%attr(755,root,root) %{_bindir}/mysqldumpslow
852%attr(755,root,root) %{_bindir}/mysqlhotcopy
853%{_mandir}/man1/mysql_explain_log.1*
854%{_mandir}/man1/mysql_zap.1*
855%{_mandir}/man1/mysqlaccess.1*
856%{_mandir}/man1/mysqlhotcopy.1*
2cc8e9c5
AM
857%{_mandir}/man1/mysql_setpermission.1*
858%{_mandir}/man1/mysql_tableinfo.1*
859%{_mandir}/man1/mysql_fix_extensions.1*
860%{_mandir}/man1/mysql_find_rows.1*
861%{_mandir}/man1/mysql_convert_table_format.1*
13ce82d8 862
863%files client
864%defattr(644,root,root,755)
865%attr(755,root,root) %{_bindir}/mysql
866%attr(755,root,root) %{_bindir}/mysqlbug
867%attr(755,root,root) %{_bindir}/mysqldump
868%attr(755,root,root) %{_bindir}/mysqlimport
869%attr(755,root,root) %{_sbindir}/mysqlmanager*
870%attr(755,root,root) %{_bindir}/mysqlshow
871%attr(755,root,root) %{_bindir}/mysqlbinlog
872%attr(755,root,root) %{_bindir}/mysqladmin
13ce82d8 873%{_mandir}/man1/mysql.1*
874%{_mandir}/man1/mysqladmin.1*
875%{_mandir}/man1/mysqldump.1*
876%{_mandir}/man1/mysqlshow.1*
13ce82d8 877%{_mandir}/man1/mysqlbinlog.1*
878%{_mandir}/man1/mysqlimport.1*
2cc8e9c5 879%{_mandir}/man1/mysqlmanager*.1*
13ce82d8 880%{_mandir}/man8/mysqlmanager.8*
881
882%files libs
883%defattr(644,root,root,755)
884%doc EXCEPTIONS-CLIENT
e32f1a7b
ER
885%attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*
886%attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*
887%attr(755,root,root) %{_libdir}/libndbclient.so.*.*
888%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.15
889%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.15
890%attr(755,root,root) %ghost %{_libdir}/libndbclient.so.2
13ce82d8 891%attr(751,root,root) %dir %{_sysconfdir}/mysql
892%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/mysql-client.conf
893
894%files devel
895%defattr(644,root,root,755)
896%attr(755,root,root) %{_bindir}/mysql_config
897%attr(755,root,root) %{_libdir}/lib*.so
898%attr(755,root,root) %{_bindir}/*comp_err
13ce82d8 899%{_libdir}/lib*.la
900%{_libdir}/lib*[!tr].a
901%{_includedir}/mysql
902%{_mandir}/man1/mysql_config.1*
448811bf 903%{_mandir}/man1/*comp_err.1*
13ce82d8 904
905%files static
906%defattr(644,root,root,755)
907%{_libdir}/lib*[tr].a
908
909%files bench
910%defattr(644,root,root,755)
13ce82d8 911%attr(755,root,root) %{_bindir}/mysql_client_test
e32f1a7b
ER
912%attr(755,root,root) %{_bindir}/mysqltest
913%attr(755,root,root) %{_bindir}/mysqltestmanager
914%attr(755,root,root) %{_bindir}/mysqltestmanager-pwgen
915%attr(755,root,root) %{_bindir}/mysqltestmanagerc
13ce82d8 916%dir %{_datadir}/sql-bench
917%{_datadir}/sql-bench/[CDRl]*
918%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]*
919# wrong dir?
920%{_datadir}/mysql/mi_test_all.res
921%attr(755,root,root) %{_datadir}/mysql/mi_test_all
342fccb0 922%{_mandir}/man1/mysqltest*.1*
2cc8e9c5 923%{_mandir}/man1/mysql_client_test.1*
13ce82d8 924
925#%files doc
926#%defattr(644,root,root,755)
927#%doc Docs/manual.html Docs/manual_toc.html
928
929%files ndb
930%defattr(644,root,root,755)
931%attr(755,root,root) %{_sbindir}/ndbd
932%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb
933%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb
fae2e159 934%{_mandir}/man1/ndbd.1*
13ce82d8 935
936%files ndb-client
937%defattr(644,root,root,755)
938%attr(755,root,root) %{_bindir}/ndb_*
939%attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
fae2e159
AM
940%{_mandir}/man1/ndb_*.1*
941%exclude %{_mandir}/man1/ndb_mgmd.1*
942%exclude %{_mandir}/man1/ndb_cpcd.1*
13ce82d8 943
944%files ndb-mgm
945%defattr(644,root,root,755)
946%attr(755,root,root) %{_sbindir}/ndb_mgmd
947%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm
948%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm
fae2e159 949%{_mandir}/man1/ndb_mgmd.1*
13ce82d8 950
951%files ndb-cpc
952%defattr(644,root,root,755)
953%attr(755,root,root) %{_sbindir}/ndb_cpcd
954%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc
955%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc
fae2e159 956%{_mandir}/man1/ndb_cpcd.1*
This page took 0.139926 seconds and 4 git commands to generate.