1# Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License, version 2.0,
5# as published by the Free Software Foundation.
6#
7# This program is also distributed with certain software (including
8# but not limited to OpenSSL) that is licensed under separate terms,
9# as designated in a particular file or component or in included license
10# documentation.  The authors of MySQL hereby grant you an additional
11# permission to link the program and your derivative works with the
12# separately licensed software that they have included with MySQL.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License, version 2.0, for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; see the file COPYING. If not, write to the
21# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
22# MA  02110-1301  USA.
23
24##############################################################################
25# Some common macro definitions
26##############################################################################
27
28# NOTE: "vendor" is used in upgrade/downgrade check, so you can't
29# change these, has to be exactly as is.
30%global mysql_old_vendor        MySQL AB
31%global mysql_vendor_2          Sun Microsystems, Inc.
32%global mysql_vendor            Oracle and/or its affiliates
33
34%global mysql_version   @VERSION@
35%global wsrep_version   @WSREP_VERSION@
36%global wsrep_revision  @WSREP_REVISION@
37
38%global mysqld_user     mysql
39%global mysqld_group    mysql
40%global mysqldatadir    /var/lib/mysql
41
42%global release         %{wsrep_version}
43%global short_product_tag 5.6
44%global previous_tag      5.5
45
46#
47# Macros we use which are not available in all supported versions of RPM
48#
49# - defined/undefined are missing on RHEL4
50#
51%if %{expand:%{?defined:0}%{!?defined:1}}
52%define defined()       %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
53%endif
54%if %{expand:%{?undefined:0}%{!?undefined:1}}
55%define undefined()     %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
56%endif
57
58# ----------------------------------------------------------------------------
59# RPM build tools now automatically detect Perl module dependencies.  This
60# detection causes problems as it is broken in some versions, and it also
61# provides unwanted dependencies from mandatory scripts in our package.
62# It might not be possible to disable this in all versions of RPM, but here we
63# try anyway.  We keep the "AutoReqProv: no" for the "test" sub package, as
64# disabling here might fail, and that package has the most problems.
65# See:
66#  http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides
67#  http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html
68# ----------------------------------------------------------------------------
69%undefine __perl_provides
70%undefine __perl_requires
71
72##############################################################################
73# Command line handling
74##############################################################################
75#
76# To set options:
77#
78#   $ rpmbuild --define="option <x>" ...
79#
80
81# ----------------------------------------------------------------------------
82# Commercial builds
83# ----------------------------------------------------------------------------
84%if %{undefined commercial}
85%define commercial 0
86%endif
87
88# ----------------------------------------------------------------------------
89# Source name
90# ----------------------------------------------------------------------------
91%if %{undefined src_base}
92%define src_base mysql-wsrep
93%endif
94%define src_dir %{src_base}-%{mysql_version}-%{wsrep_version}
95
96# ----------------------------------------------------------------------------
97# Feature set (storage engines, options).  Default to community (everything)
98# ----------------------------------------------------------------------------
99%if %{undefined feature_set}
100%define feature_set community
101%endif
102
103# ----------------------------------------------------------------------------
104# Server comment strings
105# ----------------------------------------------------------------------------
106%if %{undefined compilation_comment_debug}
107%define compilation_comment_debug       MySQL Community Server - Debug (GPL)
108%endif
109%if %{undefined compilation_comment_release}
110%define compilation_comment_release     MySQL Community Server (GPL)
111%endif
112
113# ----------------------------------------------------------------------------
114# Product and server suffixes
115# ----------------------------------------------------------------------------
116%if %{undefined product_suffix}
117  %if %{defined short_product_tag}
118    %define product_suffix      -%{short_product_tag}
119    %define previous_suffix     -%{previous_tag}
120  %else
121    %define product_suffix      %{nil}
122  %endif
123%endif
124
125%if %{undefined server_suffix}
126%define server_suffix   %{nil}
127%endif
128
129# ----------------------------------------------------------------------------
130# Distribution support
131# ----------------------------------------------------------------------------
132
133# Disable post build checks for time being.
134BuildConflicts: post-build-checks
135
136BuildRequires: gcc-c++ ncurses-devel perl zlib-devel cmake libaio-devel bison flex pam-devel
137
138%if 0%{?rhel} == 6 || 0%{?rhel} == 7 || 0%{?fedora} == 20 || 0%{?fedora} == 21
139BuildRequires: time openssl-devel
140%endif
141%if 0%{?rhel} == 7
142BuildRequires: perl(Time::HiRes) perl(Env)
143%endif
144
145%if 0%{?suse_version}
146%if 0%{?suse_version} == 1110
147BuildRequires: gdbm-devel gperf openldap2-client procps pwdutils libopenssl-devel
148%else
149BuildRequires: libopenssl-devel
150%endif
151%if 0%{?suse_version} == 1310 || 0%{?suse_version} == 1315 || 0%{?suse_version} == 1320
152BuildRequires: gperf procps time
153%endif
154%endif
155
156# Define dist tag if not given by platform
157# In case of problems, check "/etc/rpm/macros.dist"
158%if %{undefined dist}
159  # For suse versions see:
160  # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
161  %if 0%{?suse_version} == 1110
162    %define dist .sle11
163  %endif
164  %if 0%{?suse_version} == 1310
165    %define dist .suse13.1
166  %endif
167  %if 0%{?suse_version} == 1315
168    %define dist .sle12
169  %endif
170  %if 0%{?suse_version} == 1320
171    %define dist .suse13.2
172  %endif
173  # Still missing?
174  %if %{undefined dist}
175    %define dist .DIST
176  %endif
177%endif
178# CentOS 7 would force ".el7.centos", we want to avoid that.
179%if 0%{?rhel} == 7
180  %define dist .el7
181%endif
182
183# Avoid debuginfo RPMs, leaves binaries unstripped
184%define debug_package   %{nil}
185
186# ----------------------------------------------------------------------------
187# Support optional "tcmalloc" library (experimental)
188# ----------------------------------------------------------------------------
189%if %{defined malloc_lib_target}
190%define WITH_TCMALLOC 1
191%else
192%define WITH_TCMALLOC 0
193%endif
194# Hack to work around bug in RHEL5 __os_install_post macro, wrong inverted
195# test for __debug_package
196%define __strip         /bin/true
197
198##############################################################################
199# Settings for the "compatibility libs", the version depends on the target platform
200##############################################################################
201
202# To differ between current main version and libs-compat:
203%global currentlib            18
204
205%if 0%{?rhel} == 6
206%global compatver             5.1.73
207%global compatlib             16
208%global compatsrc             https://cdn.mysql.com/Downloads/MySQL-5.1/mysql-%{compatver}.tar.gz
209%global compatch              mysql-5173-charset-dir.patch
210%endif
211
212# mysql-wsrep-5.5 has libmysqlclient.so.18, as has 5.6;
213# same as preinstalled mariadb-libs, so we currently need no libs-compat on RHEL 7.
214# This becomes relevant with a MySQL 5.7 (or higher) that has a libmysqlclient.so.20 or higher.
215#
216# %%if 0%%{?rhel} == 7
217# %%global compatver             5.5.45
218# %%global compatlib             18
219# %%global compatsrc             https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%%{compatver}.tar.gz
220# %%global compatch              mysql-5545-charset-dir.patch
221# # By default, a build will include the bundeled "yaSSL" library for SSL.
222# %%{?with_ssl:                  %%global ssl_option -DWITH_SSL=%%{with_ssl}}
223# %%endif
224
225%if 0%{?compatlib}
226# Attention: "compat_src_dir" is the old version (e.g. 5.1.73), depends on platform
227%global compat_src_dir               mysql-%{compatver}
228%endif
229
230##############################################################################
231# Configuration based upon above user input, not to be set directly
232##############################################################################
233
234%define license_files_server    %{src_dir}/LICENSE %{src_dir}/README
235%if 0%{?commercial}
236%define license_type            Commercial
237%else
238%define license_type            GPL
239%define compat_license_files_server   %{compat_src_dir}/COPYING %{compat_src_dir}/README
240%endif
241
242##############################################################################
243# Main spec file section
244##############################################################################
245
246Name:           mysql-wsrep%{product_suffix}
247Summary:        MySQL: a very fast and reliable SQL database server
248Group:          Applications/Databases
249Version:        @MYSQL_RPM_VERSION@
250Release:        %{release}%{dist}
251# Distribution:   %{distro_description}
252License:        Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field.
253Source:         %{src_dir}.tar.gz
254%if 0%{?compatlib}
255Source7:        %{compatsrc}
256%endif
257Source99:       mysql-rpmlintrc
258Patch0:          cmake-no-wix.patch
259%if 0%{?compatlib}
260Patch7:         %{compatch}
261%if 0%{?compatlib} == 18
262Patch8:         mysql-5.5-libmysqlclient-symbols.patch
263%endif
264%endif
265URL:            http://www.mysql.com/
266Packager:       Codership Oy <info@galeracluster.com>
267Vendor:         %{mysql_vendor}
268# BuildRequires:  %{distro_buildreq}
269#wsrep_patch_tag
270
271Requires:       mysql-wsrep-server%{product_suffix}
272Requires:       mysql-wsrep-client%{product_suffix}
273
274%if %{defined previous_suffix}
275Obsoletes:      mysql-wsrep%{previous_suffix}
276%endif
277
278# Regression tests may take a long time, override the default to skip them
279%{!?runselftest:%global runselftest 0}
280
281# Think about what you use here since the first step is to
282# run a rm -rf
283BuildRoot:    %{_tmppath}/%{name}-%{version}-build
284
285# From the manual
286%description
287The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
288and robust SQL (Structured Query Language) database server. MySQL Server
289is intended for mission-critical, heavy-load production systems as well
290as for embedding into mass-deployed software. MySQL is a trademark of
291%{mysql_vendor}
292
293The MySQL software has Dual Licensing, which means you can use the MySQL
294software free of charge under the GNU General Public License
295(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
296licenses from %{mysql_vendor} if you do not wish to be bound by the terms of
297the GPL. See the chapter "Licensing and Support" in the manual for
298further info.
299
300The MySQL web site (http://www.mysql.com/) provides the latest
301news and information about the MySQL software. Also please see the
302documentation and the manual for more information.
303
304This is a meta package of the MySQL software combined with the "wsrep plugin"
305aka "Galera Cluster", all governed by the GPL.
306It causes the installation of both the server and the client subpackages
307so that the machine can be used both as a local database server and as a node
308in a MySQL Galera Cluster.
309
310##############################################################################
311# Sub package definition
312##############################################################################
313
314%package -n mysql-wsrep-server%{product_suffix}
315Summary:        MySQL: a very fast and reliable SQL database server
316Group:          Applications/Databases
317# Distro requirements
318# RedHat
319%if 0%{?fedora} || 0%{?rhel}
320Requires:       chkconfig coreutils grep procps shadow-utils net-tools rsync lsof
321%if 0%{?rhel} == 7 || 0%{?fedora} >= 20
322Requires: perl-Data-Dumper
323%endif
324%endif
325# SUSE
326%if 0%{?suse_version}
327Requires: aaa_base coreutils grep procps rsync lsof
328%if 0%{suse_version} == 1110
329Requires: pwdutils
330%endif
331%endif
332
333%if %{defined previous_suffix}
334Obsoletes:      mysql-wsrep-server%{previous_suffix}
335%endif
336%if 0%{?commercial}
337Obsoletes:      MySQL-server
338%else
339Obsoletes:      MySQL-server-advanced
340%endif
341Obsoletes:      mysql-server < %{version}-%{release}
342Obsoletes:      mysql-server-advanced mysql-community-server
343Obsoletes:      MySQL-server-classic MySQL-server-community MySQL-server-enterprise
344Obsoletes:      MySQL-server-advanced-gpl MySQL-server-enterprise-gpl
345%if 0%{?rhel}
346# RedHat has /usr/share/mysql/* in a separate package
347Obsoletes:      mysql-common mysql-community-common
348%endif
349Provides:       mysql-server = %{version}-%{release}
350Provides:       mysql-server%{?_isa} = %{version}-%{release}
351
352%description -n mysql-wsrep-server%{product_suffix}
353The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
354and robust SQL (Structured Query Language) database server. MySQL Server
355is intended for mission-critical, heavy-load production systems as well
356as for embedding into mass-deployed software. MySQL is a trademark of
357%{mysql_vendor}
358
359The MySQL software has Dual Licensing, which means you can use the MySQL
360software free of charge under the GNU General Public License
361(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
362licenses from %{mysql_vendor} if you do not wish to be bound by the terms of
363the GPL. See the chapter "Licensing and Support" in the manual for
364further info.
365
366The MySQL web site (http://www.mysql.com/) provides the latest news and
367information about the MySQL software.  Also please see the documentation
368and the manual for more information.
369
370This package includes the MySQL server binary as well as related utilities
371to run and administer a MySQL server.
372
373Built with wsrep patch %{wsrep_version}, to be a node in a Galera cluster.
374
375If you want to access and work with the database locally, you have to install
376package "mysql-wsrep-client%{product_suffix}" as well!
377
378# ----------------------------------------------------------------------------
379%package -n mysql-wsrep-client%{product_suffix}
380Summary:        MySQL - Client
381Group:          Applications/Databases
382
383%if %{defined previous_suffix}
384Obsoletes:      mysql-wsrep-client%{previous_suffix}
385%endif
386%if 0%{?commercial}
387Obsoletes:      MySQL-client
388%else
389Obsoletes:      MySQL-client-advanced
390%endif
391Obsoletes:      mysql < %{version}-%{release}
392Obsoletes:      mysql-advanced < %{version}-%{release}
393Obsoletes:      mysql-community-client
394Obsoletes:      MySQL-client-classic MySQL-client-community MySQL-client-enterprise
395Obsoletes:      MySQL-client-advanced-gpl MySQL-client-enterprise-gpl
396Provides:       mysql = %{version}-%{release}
397Provides:       mysql%{?_isa} = %{version}-%{release}
398Provides:       mysql-client = %{version}
399Provides:       MySQL-client = %{version}
400
401%description -n mysql-wsrep-client%{product_suffix}
402This package contains the standard MySQL clients and administration tools.
403
404For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
405
406# ----------------------------------------------------------------------------
407%package -n mysql-wsrep-test%{product_suffix}
408Summary:        MySQL - Test suite
409Group:          Applications/Databases
410
411%if %{defined previous_suffix}
412Obsoletes:      mysql-wsrep-test%{previous_suffix}
413%endif
414%if 0%{?commercial}
415Requires:       MySQL-client-advanced perl
416Obsoletes:      MySQL-test
417%else
418Requires:       MySQL-client perl
419Obsoletes:      MySQL-test-advanced
420%endif
421Obsoletes:      mysql-test < %{version}-%{release}
422Obsoletes:      mysql-test-advanced mysql-community-test
423Obsoletes:      MySQL-test-classic MySQL-test-community MySQL-test-enterprise
424Obsoletes:      MySQL-test-advanced-gpl MySQL-test-enterprise-gpl
425Obsoletes:      mysql-bench mysql-community-bench
426Obsoletes:      MySQL-bench
427Provides:       mysql-test = %{version}-%{release}
428Provides:       mysql-test%{?_isa} = %{version}-%{release}
429Requires:       perl(Data::Dumper)
430AutoReqProv:    no
431
432%description -n mysql-wsrep-test%{product_suffix}
433This package contains the MySQL regression test suite.
434
435For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
436
437# ----------------------------------------------------------------------------
438%package -n mysql-wsrep-devel%{product_suffix}
439Summary:        MySQL - Development header files and libraries
440Group:          Applications/Databases
441
442%if %{defined previous_suffix}
443Obsoletes:      mysql-wsrep-devel%{previous_suffix}
444%endif
445%if 0%{?commercial}
446Obsoletes:      MySQL-devel
447%else
448Obsoletes:      MySQL-devel-advanced
449%endif
450Obsoletes:      mysql-devel < %{version}-%{release}
451Obsoletes:      mysql-embedded-devel mysql-devel-advanced mysql-embedded-devel-advanced
452Obsoletes:      mysql-community-devel
453Obsoletes:      MySQL-devel-classic MySQL-devel-community MySQL-devel-enterprise
454Obsoletes:      MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl
455Provides:       mysql-devel = %{version}-%{release}
456Provides:       mysql-devel%{?_isa} = %{version}-%{release}
457
458%description -n mysql-wsrep-devel%{product_suffix}
459This package contains the development header files and libraries necessary
460to develop MySQL client applications.
461
462For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
463
464# ----------------------------------------------------------------------------
465%package -n mysql-wsrep-shared%{product_suffix}
466Summary:        MySQL - Shared libraries
467Group:          Applications/Databases
468
469%if %{defined previous_suffix}
470Obsoletes:      mysql-wsrep-shared%{previous_suffix}
471%endif
472%if 0%{?commercial}
473Obsoletes:      MySQL-shared
474%else
475Obsoletes:      MySQL-shared-advanced
476%endif
477Obsoletes:      MySQL-shared-standard MySQL-shared-pro
478Obsoletes:      MySQL-shared-pro-cert MySQL-shared-pro-gpl
479Obsoletes:      MySQL-shared-pro-gpl-cert
480Obsoletes:      MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise
481Obsoletes:      MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl
482# RHEL uses other names:
483Obsoletes:      mysql-libs mysql-community-libs
484Provides:      mysql-libs mysql-community-libs
485# Necessary on RHEL 7, no harm on other platforms:
486Provides:      mariadb-libs
487Obsoletes:     mariadb-libs
488
489%description -n mysql-wsrep-shared%{product_suffix}
490This package contains the shared libraries (*.so*) which certain languages
491and applications need to dynamically load and use MySQL.
492
493# ----------------------------------------------------------------------------
494%if 0%{?compatlib}
495%package -n mysql-wsrep-libs-compat%{product_suffix}
496Summary:        Shared libraries for MySQL %{compatver} database client applications
497Group:          Applications/Databases
498
499%if %{defined previous_suffix}
500Obsoletes:      mysql-wsrep-libs-compat%{previous_suffix}
501%endif
502Provides:       mysql-libs-compat = %{version}
503Provides:       mysql-libs-compat%{?_isa} = %{version}
504Obsoletes:      mysql-libs-compat < %{version}
505Obsoletes:      mysql-community-libs-compat
506Provides:       MySQL-shared-compat%{?_isa} = %{version}
507Obsoletes:      MySQL-shared-compat < %{version}
508
509# Dealing with RHEL 6 and upwards (and compatible ...)
510# Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs"
511Provides:       mysql-libs = %{compatver}
512Obsoletes:      mysql-libs < %{version}
513Obsoletes:      mysql-community-libs
514
515%if 0%{?rhel} > 6
516# Dealing with RHEL 7 and upwards (and compatible ...)
517# Above general section for RHEL also applies, it deals with "mysql" packages.
518# But with RHEL 7, we also get "mariadb" ...
519Obsoletes:      mariadb-libs
520%endif
521
522%description -n mysql-wsrep-libs-compat%{product_suffix}
523The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
524and robust SQL (Structured Query Language) database server.
525See the MySQL web site (http://www.mysql.com/) for further information,
526including its dual licensing (GNU GPL or commercial licenses).
527
528This package contains the shared libraries for (old) MySQL %{compatver} client
529applications.
530It is intended for RHEL %{?rhel} and compatible distributions,
531to satisfy the dependencies of several applications shipping with that distro
532while the MySQL software on the machine is updated to a newer release series.
533
534%endif
535
536# ----------------------------------------------------------------------------
537%package -n MySQL-embedded%{product_suffix}
538Summary:        MySQL - Embedded library
539Group:          Applications/Databases
540%if 0%{?commercial}
541Requires:       MySQL-devel-advanced
542Obsoletes:      MySQL-embedded
543%else
544Requires:       MySQL-devel
545Obsoletes:      MySQL-embedded-advanced
546%endif
547Obsoletes:      mysql-embedded < %{version}-%{release}
548Obsoletes:      mysql-embedded-advanced mysql-community-embedded
549Obsoletes:      MySQL-embedded-pro
550Obsoletes:      MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise
551Obsoletes:      MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl
552Provides:       mysql-embedded = %{version}-%{release}
553Provides:       mysql-embedded%{?_isa} = %{version}-%{release}
554
555%description -n MySQL-embedded%{product_suffix}
556This package contains the MySQL server as an embedded library.
557
558The embedded MySQL server library makes it possible to run a full-featured
559MySQL server inside the client application. The main benefits are increased
560speed and more simple management for embedded applications.
561
562The API is identical for the embedded MySQL version and the
563client/server version.
564
565For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
566
567##############################################################################
568%prep
569%if 0%{?compatlib}
570%setup -q -T -a 0 -a 7 -c -n %{name}
571# -q = quiet,  -T = no default unpack,  -n = source dir name,  -c = create,  -a = unpack after cd
572# https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html
573# http://rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html
574pushd %{compat_src_dir}
575%patch7 -p 1
576%if 0%{?compatlib} == 18
577%patch8 -p 1
578%endif
579popd
580%else
581%setup -q -T -a 0      -c -n %{name}
582%endif # 0%{?compatlib}
583
584# That patch is needed with old cmake only, on SLES 11, but it won't do any harm
585# outside Windows, so it may be used in all RPM builds.
586pushd %{src_dir}
587%patch0 -p1
588#wsrep_apply_patch_tag
589popd
590
591##############################################################################
592%build
593
594# Build compat libs
595%if 0%{?compatlib}
596(
597%if 0%{?compatlib} == 16
598# RHEL 6: MySQL 5.1, using traditional "configure ; make"
599export CC="gcc" CXX="g++"
600export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv"
601export CXXFLAGS="$CFLAGS %{?el6:-felide-constructors} -fno-rtti -fno-exceptions"
602pushd %{compat_src_dir}
603%configure \
604    --with-readline \
605    --without-debug \
606    --enable-shared \
607    --localstatedir=/var/lib/mysql \
608    --with-unix-socket-path=/var/lib/mysql/mysql.sock \
609    --with-mysqld-user="mysql" \
610    --with-extra-charsets=all \
611    --enable-local-infile \
612    --enable-largefile \
613    --enable-thread-safe-client \
614    --with-ssl=%{_prefix} \
615    --with-embedded-server \
616    --with-big-tables \
617    --with-pic \
618    --with-plugin-innobase \
619    --with-plugin-innodb_plugin \
620    --with-plugin-partition \
621    --disable-dependency-tracking
622make %{?_smp_mflags}
623popd
624%endif
625#####
626%if 0%{?compatlib} == 18
627# RHEL 7: MySQL 5.5, using "cmake ; make"
628mkdir release
629cd release
630cmake ../%{compat_src_dir} \
631         -DBUILD_CONFIG=mysql_release \
632         -DINSTALL_LAYOUT=RPM \
633         -DCMAKE_BUILD_TYPE=RelWithDebInfo \
634         -DENABLE_DTRACE=OFF \
635         -DCMAKE_C_FLAGS="%{optflags}" \
636         -DCMAKE_CXX_FLAGS="%{optflags}" \
637         -DINSTALL_LIBDIR="%{_lib}/mysql" \
638         -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \
639         -DINSTALL_SQLBENCHDIR=share \
640         -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
641         -DFEATURE_SET="%{feature_set}" \
642         -DWITH_EMBEDDED_SERVER=1 \
643         -DWITH_EMBEDDED_SHARED_LIBRARY=1 \
644         %{?ssl_option} \
645         -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
646         -DMYSQL_SERVER_SUFFIX="%{?server_suffix}"
647echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
648make %{?_smp_mflags} VERBOSE=1
649cd ..
650%endif
651)
652%endif
653
654pushd %{src_dir}
655
656# Fail quickly and obviously if user tries to build as root
657%if %runselftest
658    if [ x"`id -u`" = x0 ]; then
659        echo "The MySQL regression tests may fail if run as root."
660        echo "If you really need to build the RPM as root, use"
661        echo "--define='runselftest 0' to skip the regression tests."
662        exit 1
663    fi
664%endif
665
666# Be strict about variables, bail at earliest opportunity, etc.
667set -eu
668
669# Optional package files
670touch optional-files-devel
671
672#
673# Set environment in order of preference, MYSQL_BUILD_* first, then variable
674# name, finally a default.  RPM_OPT_FLAGS is assumed to be a part of the
675# default RPM build environment.
676#
677
678# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break
679# the compile in cmd-line-utils/libedit - needs investigation, but for now
680# we simply unset it and use those specified directly in cmake.
681%if "%{_arch}" == "ia64"
682RPM_OPT_FLAGS=
683%endif
684
685export PATH=${MYSQL_BUILD_PATH:-$PATH}
686export CC=${MYSQL_BUILD_CC:-${CC:-gcc}}
687export CXX=${MYSQL_BUILD_CXX:-${CXX:-g++}}
688export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}}
689export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors}}
690export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}}
691export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}}
692export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:--j$(ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) && echo $(($ncpu > 4 ? 4 : $ncpu)))}
693
694# By default, a build will include the system library for SSL.
695# However, there may be a need to override.
696# Protect against undefined variables if there is no override option.
697%if %{undefined with_ssl}
698%define ssl_option   -DWITH_SSL=system
699%else
700%define ssl_option   -DWITH_SSL=%{with_ssl}
701%endif
702
703# Build debug mysqld and libmysqld.a
704mkdir debug
705(
706  cd debug
707  # Attempt to remove any optimisation flags from the debug build
708  CFLAGS=`echo " ${CFLAGS} " | \
709            sed -e 's/ -O[0-9]* / /' \
710                -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
711                -e 's/-D_FORTIFY_SOURCE=2/ /' \
712                -e 's/ -unroll2 / /' \
713                -e 's/ -ip / /' \
714                -e 's/^ //' \
715                -e 's/ $//'`
716  CXXFLAGS=`echo " ${CXXFLAGS} " | \
717              sed -e 's/ -O[0-9]* / /' \
718                  -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
719                  -e 's/-D_FORTIFY_SOURCE=2/ /' \
720                  -e 's/ -unroll2 / /' \
721                  -e 's/ -ip / /' \
722                  -e 's/^ //' \
723                  -e 's/ $//'`
724  # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
725  # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
726  ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
727           -DCMAKE_BUILD_TYPE=Debug \
728           -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
729           -DFEATURE_SET="%{feature_set}" \
730           %{ssl_option} \
731           -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
732           -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \
733           -DWITH_WSREP=1 \
734           -DWSREP_VERSION="%{wsrep_version}" \
735           -DWSREP_REVISION="%{wsrep_revision}"
736  echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG
737  make ${MAKE_JFLAG} VERBOSE=1
738)
739# Build full release
740mkdir release
741(
742  cd release
743  # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
744  # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
745  ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
746           -DCMAKE_BUILD_TYPE=RelWithDebInfo \
747           -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
748           -DFEATURE_SET="%{feature_set}" \
749           %{ssl_option} \
750           -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
751           -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \
752           -DWITH_WSREP=1 \
753           -DWSREP_VERSION="%{wsrep_version}" \
754           -DWSREP_REVISION="%{wsrep_revision}"
755  echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
756  make ${MAKE_JFLAG} VERBOSE=1
757)
758
759%if %runselftest
760  MTR_BUILD_THREAD=auto
761  export MTR_BUILD_THREAD
762
763  (cd release && make test-bt-fast || true)
764%endif
765popd
766
767##############################################################################
768%install
769%if 0%{?compatlib}
770(
771cd $RPM_BUILD_DIR/%{name}
772
773# Install compat libs
774# This must be done *before* the current libs are installed, for the "rm *.{a,la,so}"
775%if 0%{?compatlib} == 16
776for dir in mysql-%{compatver}/libmysql mysql-%{compatver}/libmysql_r ; do
777%else
778for dir in            release/libmysql            ; do
779%endif
780    pushd $dir
781    make DESTDIR=%{buildroot} install
782    popd
783done
784rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so}
785
786# "charsets/"
787install -d -m 0755 %{buildroot}/usr/share/mysql/charsets-%{compatver}/
788install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql/charsets-%{compatver}/
789
790# Add libdir to linker
791install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d
792echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
793)
794%endif
795
796RBR=$RPM_BUILD_ROOT
797MBD=$RPM_BUILD_DIR/%{name}/%{src_dir}
798cd $MBD
799
800# Ensure that needed directories exists
801install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
802install -d $RBR%{mysqldatadir}/mysql
803install -d $RBR%{_datadir}/mysql-test
804install -d $RBR%{_datadir}/mysql/SELinux/RHEL4
805install -d $RBR%{_includedir}
806install -d $RBR%{_libdir}
807install -d $RBR%{_mandir}
808install -d $RBR%{_sbindir}
809install -d $RBR/var/lib/mysql-files
810
811mkdir -p $RBR%{_sysconfdir}/my.cnf.d
812
813# Install all binaries
814(
815  cd $MBD/release
816  make DESTDIR=$RBR install
817)
818
819# FIXME: at some point we should stop doing this and just install everything
820# FIXME: directly into %%{_libdir}/mysql - perhaps at the same time as renaming
821# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
822mv -v $RBR/%{_libdir}/*.a $RBR/%{_libdir}/mysql/
823
824# Install logrotate and autostart
825install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql
826install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
827
828# Create a symlink "rcmysql", pointing to the init.script. SuSE users
829# will appreciate that, as all services usually offer this.
830ln -sf %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql
831
832# Create a wsrep_sst_rsync_wan symlink.
833install -d $RBR%{_bindir}
834ln -sf wsrep_sst_rsync $RBR%{_bindir}/wsrep_sst_rsync_wan
835
836# Touch the place where the my.cnf config file might be located
837# Just to make sure it's in the file list and marked as a config file
838touch $RBR%{_sysconfdir}/my.cnf
839touch $RBR%{_sysconfdir}/wsrep.cnf
840
841
842# Install SELinux files in datadir
843install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
844  $RBR%{_datadir}/mysql/SELinux/RHEL4
845
846# Get the list of "_datadir" files, remove those that go into "libs-compat"
847find $RBR%{_datadir}/mysql -type f -print | sed -e "s=$RBR==" \
848  | fgrep -v "charsets-%{compatver}" | sort >> $MBD/release/support-files/plugins.files
849
850%if %{WITH_TCMALLOC}
851# Even though this is a shared library, put it under /usr/lib*/mysql, so it
852# doesn't conflict with possible shared lib by the same name in /usr/lib*.  See
853# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used.
854install -m 644 "%{malloc_lib_source}" \
855  "$RBR%{_libdir}/mysql/%{malloc_lib_target}"
856%endif
857
858# Remove man pages we explicitly do not want to package, avoids 'unpackaged
859# files' warning.
860# This has become obsolete:  rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1*
861
862%check
863
864##############################################################################
865#  Post processing actions, i.e. when installed
866##############################################################################
867
868%pre -n mysql-wsrep-server%{product_suffix}
869# This is the code running at the beginning of a RPM upgrade action,
870# before replacing the old files with the new ones.
871
872# ATTENTION: Parts of this are duplicated in the "triggerpostun" !
873
874# There are users who deviate from the default file system layout.
875# Check local settings to support them.
876if [ -x %{_bindir}/my_print_defaults ]
877then
878  mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'`
879  PID_FILE_PATT=`%{_bindir}/my_print_defaults server mysqld | grep '^--pid-file=' | sed -n 's/--pid-file=//p'`
880fi
881if [ -z "$mysql_datadir" ]
882then
883  mysql_datadir=%{mysqldatadir}
884fi
885if [ -z "$PID_FILE_PATT" ]
886then
887  PID_FILE_PATT="$mysql_datadir/*.pid"
888fi
889
890# Check if we can safely upgrade.  An upgrade is only safe if it's from one
891# of our RPMs in the same version family.
892
893# Handle both ways of spelling the capability.
894installed=`rpm -q --whatprovides mysql-server 2> /dev/null`
895if [ $? -ne 0 -o -z "$installed" ]; then
896  installed=`rpm -q --whatprovides MySQL-server 2> /dev/null`
897fi
898if [ $? -eq 0 -a -n "$installed" ]; then
899  installed=`echo $installed | sed 's/\([^ ]*\) .*/\1/'` # Tests have shown duplicated package names
900  vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1`
901  version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1`
902  myoldvendor='%{mysql_old_vendor}'
903  myvendor_2='%{mysql_vendor_2}'
904  myvendor='%{mysql_vendor}'
905  myversion='%{mysql_version}'
906
907  old_family=`echo $version \
908    | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'`
909  new_family=`echo $myversion \
910    | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'`
911
912  [ -z "$vendor" ] && vendor='<unknown>'
913  [ -z "$old_family" ] && old_family="<unrecognized version $version>"
914  [ -z "$new_family" ] && new_family="<bad package specification: version $myversion>"
915
916  error_text=
917  if [ "$vendor" != "$myoldvendor" \
918    -a "$vendor" != "$myvendor_2" \
919    -a "$vendor" != "$myvendor" ]; then
920    error_text="$error_text
921The current MySQL server package is provided by a different
922vendor ($vendor) than $myoldvendor, $myvendor_2, or $myvendor.
923Some files may be installed to different locations, including log
924files and the service startup script in %{_sysconfdir}/init.d/.
925"
926  fi
927
928  if [ "$old_family" != "$new_family" ]; then
929    error_text="$error_text
930Upgrading directly from MySQL $old_family to MySQL $new_family may not
931be safe in all cases.  A manual dump and restore using mysqldump is
932recommended.  It is important to review the MySQL manual's Upgrading
933section for version-specific incompatibilities.
934"
935  fi
936
937  if [ -n "$error_text" ]; then
938    cat <<HERE >&2
939
940******************************************************************
941A MySQL server package ($installed) is installed.
942$error_text
943A manual upgrade is required.
944
945- Ensure that you have a complete, working backup of your data and my.cnf
946  files
947- Shut down the MySQL server cleanly
948- Remove the existing MySQL packages.  Usually this command will
949  list the packages you should remove:
950  rpm -qa | grep -i '^mysql-'
951
952  You may choose to use 'rpm --nodeps -ev <package-name>' to remove
953  the package which contains the mysqlclient shared library.  The
954  library will be reinstalled by the MySQL-shared-compat package.
955- Install the new MySQL packages supplied by $myvendor
956- Ensure that the MySQL server is started
957- Run the 'mysql_upgrade' program
958
959This is a brief description of the upgrade process.  Important details
960can be found in the MySQL manual, in the Upgrading section.
961******************************************************************
962HERE
963    exit 1
964  fi
965fi
966
967# We assume that if there is exactly one ".pid" file,
968# it contains the valid PID of a running MySQL server.
969NR_PID_FILES=`ls -1 $PID_FILE_PATT 2>/dev/null | wc -l`
970case $NR_PID_FILES in
971	0 ) SERVER_TO_START=''  ;;  # No "*.pid" file == no running server
972	1 ) SERVER_TO_START='true' ;;
973	* ) SERVER_TO_START=''      # Situation not clear
974	    SEVERAL_PID_FILES=true ;;
975esac
976# That logic may be debated: We might check whether it is non-empty,
977# contains exactly one number (possibly a PID), and whether "ps" finds it.
978# OTOH, if there is no such process, it means a crash without a cleanup -
979# is that a reason not to start a new server after upgrade?
980
981STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER
982
983if [ -f "$STATUS_FILE" ]; then
984	echo "Some previous upgrade was not finished:"
985	ls -ld $STATUS_FILE
986	echo "Please check its status, then do"
987	echo "    rm $STATUS_FILE"
988	echo "before repeating the MySQL upgrade."
989	exit 1
990elif [ -n "$SEVERAL_PID_FILES" ] ; then
991	echo "You have more than one PID file:"
992	ls -ld $PID_FILE_PATT
993	echo "Please check which one (if any) corresponds to a running server"
994	echo "and delete all others before repeating the MySQL upgrade."
995	exit 1
996fi
997
998NEW_VERSION=%{mysql_version}-%{release}
999
1000# The "pre" section code is also run on a first installation,
1001# when there  is no data directory yet. Protect against error messages.
1002# Check for the existence of subdirectory "mysql/", the database of system
1003# tables like "mysql.user".
1004if [ -d $mysql_datadir/mysql ] ; then
1005        echo "MySQL RPM upgrade to version $NEW_VERSION"  > $STATUS_FILE
1006        echo "'pre' step running at `date`"          >> $STATUS_FILE
1007        echo                                         >> $STATUS_FILE
1008        fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l`
1009        if [ $fcount -gt 0 ] ; then
1010             echo "ERR file(s):"                          >> $STATUS_FILE
1011             ls -ltr $mysql_datadir/*.err                 >> $STATUS_FILE
1012             echo                                         >> $STATUS_FILE
1013             echo "Latest 'Version' line in latest file:" >> $STATUS_FILE
1014             grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \
1015                tail -1                              >> $STATUS_FILE
1016             echo                                         >> $STATUS_FILE
1017        fi
1018
1019	if [ -n "$SERVER_TO_START" ] ; then
1020		# There is only one PID file, race possibility ignored
1021		echo "PID file:"                           >> $STATUS_FILE
1022		ls -l   $PID_FILE_PATT                     >> $STATUS_FILE
1023		cat     $PID_FILE_PATT                     >> $STATUS_FILE
1024		echo                                       >> $STATUS_FILE
1025		echo "Server process:"                     >> $STATUS_FILE
1026		ps -fp `cat $PID_FILE_PATT`                >> $STATUS_FILE
1027		echo                                       >> $STATUS_FILE
1028		echo "SERVER_TO_START=$SERVER_TO_START"    >> $STATUS_FILE
1029	else
1030		# Take a note we checked it ...
1031		echo "PID file:"                           >> $STATUS_FILE
1032		ls -l   $PID_FILE_PATT                     >> $STATUS_FILE 2>&1
1033	fi
1034fi
1035
1036# Shut down a previously installed server first
1037# Note we *could* make that depend on $SERVER_TO_START, but we rather don't,
1038# so a "stop" is attempted even if there is no PID file.
1039# (Maybe the "stop" doesn't work then, but we might fix that in itself.)
1040if [ -x %{_sysconfdir}/init.d/mysql ] ; then
1041        %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
1042        echo "Giving mysqld 5 seconds to exit nicely"
1043        sleep 5
1044fi
1045
1046%post -n mysql-wsrep-server%{product_suffix}
1047# This is the code running at the end of a RPM install or upgrade action,
1048# after the (new) files have been written.
1049
1050# ATTENTION: Parts of this are duplicated in the "triggerpostun" !
1051
1052# There are users who deviate from the default file system layout.
1053# Check local settings to support them.
1054if [ -x %{_bindir}/my_print_defaults ]
1055then
1056  mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'`
1057fi
1058if [ -z "$mysql_datadir" ]
1059then
1060  mysql_datadir=%{mysqldatadir}
1061fi
1062
1063NEW_VERSION=%{mysql_version}-%{release}
1064STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER
1065
1066# ----------------------------------------------------------------------
1067# Create data directory if needed, check whether upgrade or install
1068# ----------------------------------------------------------------------
1069if [ ! -d "$mysql_datadir" ] ; then mkdir -m 755 "$mysql_datadir" ; fi
1070if [ -f "$STATUS_FILE" ] ; then
1071	SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-`
1072else
1073	SERVER_TO_START=''
1074fi
1075# echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"
1076if [ ! -d $mysql_datadir/mysql ] ; then
1077	mkdir $mysql_datadir/mysql $mysql_datadir/test
1078	echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE
1079else
1080	# If the directory exists, we may assume it is an upgrade.
1081	echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE
1082fi
1083
1084# ----------------------------------------------------------------------
1085# Make MySQL start/shutdown automatically when the machine does it.
1086# ----------------------------------------------------------------------
1087# NOTE: This still needs to be debated. Should we check whether these links
1088# for the other run levels exist(ed) before the upgrade?
1089# use chkconfig on Enterprise Linux and newer SuSE releases
1090if [ -x /sbin/chkconfig ] ; then
1091        /sbin/chkconfig --add mysql
1092# use insserv for older SuSE Linux versions
1093elif [ -x /sbin/insserv ] ; then
1094        /sbin/insserv %{_sysconfdir}/init.d/mysql
1095fi
1096
1097# ----------------------------------------------------------------------
1098# Create a MySQL user and group. Do not report any problems if it already
1099# exists.
1100# ----------------------------------------------------------------------
1101groupadd -r %{mysqld_group} 2> /dev/null || true
1102useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \
1103  -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
1104# The user may already exist, make sure it has the proper group nevertheless
1105# (BUG#12823)
1106usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
1107
1108# ----------------------------------------------------------------------
1109# Change permissions so that the user that will run the MySQL daemon
1110# owns all database files.
1111# ----------------------------------------------------------------------
1112chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
1113
1114# ----------------------------------------------------------------------
1115# Initiate databases if needed
1116# ----------------------------------------------------------------------
1117if ! grep '^MySQL RPM upgrade' $STATUS_FILE >/dev/null 2>&1 ; then
1118	# Fix bug#45415: no "mysql_install_db" on an upgrade
1119	# Do this as a negative to err towards more "install" runs
1120	# rather than to miss one.
1121	%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} --random-passwords
1122
1123	# Attention: Now 'root' is the only database user,
1124	# its password is a random value found in ~/.mysql_secret,
1125	# and the "password expired" flag is set:
1126	# Any client needs that password, and the first command
1127	# executed must be a new "set password"!
1128fi
1129
1130# ----------------------------------------------------------------------
1131# Upgrade databases if needed would go here - but it cannot be automated yet
1132# ----------------------------------------------------------------------
1133
1134# ----------------------------------------------------------------------
1135# Change permissions again to fix any new files.
1136# ----------------------------------------------------------------------
1137chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
1138
1139# ----------------------------------------------------------------------
1140# Fix permissions for the permission database so that only the user
1141# can read them.
1142# ----------------------------------------------------------------------
1143chmod -R og-rw $mysql_datadir/mysql
1144
1145# ----------------------------------------------------------------------
1146# install SELinux files - but don't override existing ones
1147# ----------------------------------------------------------------------
1148SETARGETDIR=/etc/selinux/targeted/src/policy
1149SEDOMPROG=$SETARGETDIR/domains/program
1150SECONPROG=$SETARGETDIR/file_contexts/program
1151if [ -f /etc/redhat-release ] \
1152 && (grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \
1153 || grep -q "CentOS release 4" /etc/redhat-release) ; then
1154  echo
1155  echo
1156  echo 'Notes regarding SELinux on this platform:'
1157  echo '========================================='
1158  echo
1159  echo 'The default policy might cause server startup to fail because it is'
1160  echo 'not allowed to access critical files.  In this case, please update'
1161  echo 'your installation.'
1162  echo
1163  echo 'The default policy might also cause inavailability of SSL related'
1164  echo 'features because the server is not allowed to access /dev/random'
1165  echo 'and /dev/urandom. If this is a problem, please do the following:'
1166  echo
1167  echo '  1) install selinux-policy-targeted-sources from your OS vendor'
1168  echo '  2) add the following two lines to '$SEDOMPROG/mysqld.te':'
1169  echo '       allow mysqld_t random_device_t:chr_file read;'
1170  echo '       allow mysqld_t urandom_device_t:chr_file read;'
1171  echo '  3) cd to '$SETARGETDIR' and issue the following command:'
1172  echo '       make load'
1173  echo
1174  echo
1175fi
1176
1177if [ -x sbin/restorecon ] ; then
1178  sbin/restorecon -R var/lib/mysql
1179fi
1180
1181# Was the server running before the upgrade? If so, restart the new one.
1182if [ "$SERVER_TO_START" = "true" ] ; then
1183	# Restart in the same way that mysqld will be started normally.
1184	if [ -x %{_sysconfdir}/init.d/mysql ] ; then
1185		%{_sysconfdir}/init.d/mysql start
1186		echo "Giving mysqld 5 seconds to start"
1187		sleep 5
1188	fi
1189fi
1190
1191# Collect an upgrade history ...
1192echo "Upgrade/install finished at `date`"        >> $STATUS_FILE
1193echo                                             >> $STATUS_FILE
1194echo "====="                                     >> $STATUS_FILE
1195STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY
1196cat $STATUS_FILE >> $STATUS_HISTORY
1197mv -f  $STATUS_FILE ${STATUS_FILE}-LAST  # for "triggerpostun"
1198
1199
1200#echo "Thank you for installing the MySQL Community Server! For Production
1201#systems, we recommend MySQL Enterprise, which contains enterprise-ready
1202#software, intelligent advisory services, and full production support with
1203#scheduled service packs and more.  Visit www.mysql.com/enterprise for more
1204#information."
1205
1206%preun -n mysql-wsrep-server%{product_suffix}
1207
1208# Which '$1' does this refer to?  Fedora docs have info:
1209# " ... a count of the number of versions of the package that are installed.
1210#   Action                           Count
1211#   Install the first time           1
1212#   Upgrade                          2 or higher (depending on the number of versions installed)
1213#   Remove last version of package   0 "
1214#
1215#  http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html
1216
1217if [ $1 = 0 ] ; then
1218        # Stop MySQL before uninstalling it
1219        if [ -x %{_sysconfdir}/init.d/mysql ] ; then
1220                %{_sysconfdir}/init.d/mysql stop > /dev/null
1221                # Remove autostart of MySQL
1222                # use chkconfig on Enterprise Linux and newer SuSE releases
1223                if [ -x /sbin/chkconfig ] ; then
1224                        /sbin/chkconfig --del mysql
1225                # For older SuSE Linux versions
1226                elif [ -x /sbin/insserv ] ; then
1227                        /sbin/insserv -r %{_sysconfdir}/init.d/mysql
1228                fi
1229        fi
1230fi
1231
1232# We do not remove the mysql user since it may still own a lot of
1233# database files.
1234
1235%triggerpostun -n mysql-wsrep-server%{product_suffix} --MySQL-server-community
1236
1237# Setup: We renamed this package, so any existing "server-community"
1238#   package will be removed when this "server" is installed.
1239# Problem: RPM will first run the "pre" and "post" sections of this script,
1240#   and only then the "preun" of that old community server.
1241#   But this "preun" includes stopping the server and uninstalling the service,
1242#   "chkconfig --del mysql" which removes the symlinks to the start script.
1243# Solution: *After* the community server got removed, restart this server
1244#   and re-install the service.
1245#
1246# For information about triggers in spec files, see the Fedora docs:
1247#   http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s02.html
1248# For all details of this code, see the "pre" and "post" sections.
1249
1250# There are users who deviate from the default file system layout.
1251# Check local settings to support them.
1252if [ -x %{_bindir}/my_print_defaults ]
1253then
1254  mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'`
1255fi
1256if [ -z "$mysql_datadir" ]
1257then
1258  mysql_datadir=%{mysqldatadir}
1259fi
1260
1261NEW_VERSION=%{mysql_version}-%{release}
1262STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST  # Note the difference!
1263STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY
1264
1265if [ -f "$STATUS_FILE" ] ; then
1266	SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-`
1267else
1268	# This should never happen, but let's be prepared
1269	SERVER_TO_START=''
1270fi
1271echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"
1272
1273if [ -x /sbin/chkconfig ] ; then
1274        /sbin/chkconfig --add mysql
1275# use insserv for older SuSE Linux versions
1276elif [ -x /sbin/insserv ] ; then
1277        /sbin/insserv %{_sysconfdir}/init.d/mysql
1278fi
1279
1280# Was the server running before the upgrade? If so, restart the new one.
1281if [ "$SERVER_TO_START" = "true" ] ; then
1282	# Restart in the same way that mysqld will be started normally.
1283	if [ -x %{_sysconfdir}/init.d/mysql ] ; then
1284		%{_sysconfdir}/init.d/mysql start
1285		echo "Giving mysqld 5 seconds to start"
1286		sleep 5
1287	fi
1288fi
1289
1290echo "Trigger 'postun --community' finished at `date`"        >> $STATUS_HISTORY
1291echo                                             >> $STATUS_HISTORY
1292echo "====="                                     >> $STATUS_HISTORY
1293
1294
1295# ----------------------------------------------------------------------
1296# Clean up the BuildRoot after build is done
1297# ----------------------------------------------------------------------
1298%clean
1299[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
1300  && rm -rf $RPM_BUILD_ROOT;
1301
1302##############################################################################
1303#  Files section
1304##############################################################################
1305
1306%files -n mysql-wsrep%{product_suffix}
1307# Intentionally empty - this is a pure meta package.
1308
1309# ----------------------------------------------------------------------------
1310%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files
1311%defattr(-,root,root,0755)
1312%if %{defined license_files_server}
1313%doc %{license_files_server}
1314%endif
1315%doc %{src_dir}/Docs/ChangeLog
1316%doc %{src_dir}/release/Docs/INFO_SRC*
1317%doc %{src_dir}/release/Docs/INFO_BIN*
1318%doc %{src_dir}/release/support-files/my-default.cnf
1319%doc %{src_dir}/Docs/README-wsrep
1320%doc %{src_dir}/release/support-files/wsrep.cnf
1321%doc %{src_dir}/release/support-files/wsrep_notify
1322
1323%if 0%{?commercial}
1324%doc %attr(644, root, root) %{_infodir}/mysql.info*
1325%endif
1326
1327%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1*
1328%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
1329%doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1*
1330%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
1331%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1*
1332%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1*
1333%doc %attr(644, root, man) %{_mandir}/man1/mysql_convert_table_format.1*
1334%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_extensions.1*
1335%doc %attr(644, root, man) %{_mandir}/man8/mysqld.8*
1336%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1*
1337%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1*
1338%doc %attr(644, root, man) %{_mandir}/man1/mysqldumpslow.1*
1339%doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1*
1340%doc %attr(644, root, man) %{_mandir}/man1/mysql_plugin.1*
1341%doc %attr(644, root, man) %{_mandir}/man1/mysql_secure_installation.1*
1342%doc %attr(644, root, man) %{_mandir}/man1/mysql_setpermission.1*
1343%doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1*
1344%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1*
1345%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1*
1346%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1*
1347%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
1348%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
1349%doc %attr(644, root, man) %{_mandir}/man1/mysqlbug.1*
1350%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
1351%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
1352%doc %attr(644, root, man) %{_mandir}/man1/resolve_stack_dump.1*
1353%doc %attr(644, root, man) %{_mandir}/man1/resolveip.1*
1354
1355%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
1356%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf
1357%dir %{_sysconfdir}/my.cnf.d
1358
1359%attr(755, root, root) %{_bindir}/innochecksum
1360%attr(755, root, root) %{_bindir}/my_print_defaults
1361%attr(755, root, root) %{_bindir}/myisam_ftdump
1362%attr(755, root, root) %{_bindir}/myisamchk
1363%attr(755, root, root) %{_bindir}/myisamlog
1364%attr(755, root, root) %{_bindir}/myisampack
1365%attr(755, root, root) %{_bindir}/mysql_convert_table_format
1366%attr(755, root, root) %{_bindir}/mysql_fix_extensions
1367%attr(755, root, root) %{_bindir}/mysql_install_db
1368%attr(755, root, root) %{_bindir}/mysql_plugin
1369%attr(755, root, root) %{_bindir}/mysql_secure_installation
1370%attr(755, root, root) %{_bindir}/mysql_setpermission
1371%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql
1372%attr(755, root, root) %{_bindir}/mysql_upgrade
1373%attr(755, root, root) %{_bindir}/mysql_zap
1374%attr(755, root, root) %{_bindir}/mysqlbug
1375%attr(755, root, root) %{_bindir}/mysqld_multi
1376%attr(755, root, root) %{_bindir}/mysqld_safe
1377%attr(755, root, root) %{_bindir}/mysqldumpslow
1378%attr(755, root, root) %{_bindir}/mysqlhotcopy
1379%attr(755, root, root) %{_bindir}/mysqltest
1380%attr(755, root, root) %{_bindir}/perror
1381%attr(755, root, root) %{_bindir}/replace
1382%attr(755, root, root) %{_bindir}/resolve_stack_dump
1383%attr(755, root, root) %{_bindir}/resolveip
1384%attr(755, root, root) %{_bindir}/wsrep_sst_common
1385%attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump
1386%attr(755, root, root) %{_bindir}/wsrep_sst_rsync
1387%attr(755, root, root) %{_bindir}/wsrep_sst_rsync_wan
1388%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup
1389%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2
1390
1391%attr(755, root, root) %{_sbindir}/mysqld
1392%attr(755, root, root) %{_sbindir}/mysqld-debug
1393%attr(755, root, root) %{_sbindir}/rcmysql
1394%dir %{_libdir}/mysql/plugin
1395%dir %{_libdir}/mysql/plugin/debug
1396%attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
1397
1398%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
1399%attr(755, root, root) %{_sysconfdir}/init.d/mysql
1400# %%attr(755, root, root) %%{_datadir}/mysql/  ## Contained in "plugins.files", see "%%install" code
1401%dir %attr(755, mysql, mysql) /var/lib/mysql
1402%dir %attr(750, mysql, mysql) /var/lib/mysql-files
1403
1404# ----------------------------------------------------------------------------
1405%files -n mysql-wsrep-client%{product_suffix}
1406
1407%defattr(-, root, root, 0755)
1408%if %{defined license_files_server}
1409%doc %{license_files_server}
1410%endif
1411%attr(755, root, root) %{_bindir}/msql2mysql
1412%attr(755, root, root) %{_bindir}/mysql
1413%attr(755, root, root) %{_bindir}/mysql_find_rows
1414%attr(755, root, root) %{_bindir}/mysql_waitpid
1415%attr(755, root, root) %{_bindir}/mysqlaccess
1416# XXX: This should be moved to %%{_sysconfdir}
1417%attr(644, root, root) %{_bindir}/mysqlaccess.conf
1418%attr(755, root, root) %{_bindir}/mysqladmin
1419%attr(755, root, root) %{_bindir}/mysqlbinlog
1420%attr(755, root, root) %{_bindir}/mysqlcheck
1421%attr(755, root, root) %{_bindir}/mysqldump
1422%attr(755, root, root) %{_bindir}/mysqlimport
1423%attr(755, root, root) %{_bindir}/mysqlshow
1424%attr(755, root, root) %{_bindir}/mysqlslap
1425%attr(755, root, root) %{_bindir}/mysql_config_editor
1426
1427%doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1*
1428%doc %attr(644, root, man) %{_mandir}/man1/mysql.1*
1429%doc %attr(644, root, man) %{_mandir}/man1/mysql_find_rows.1*
1430%doc %attr(644, root, man) %{_mandir}/man1/mysql_waitpid.1*
1431%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1*
1432%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1*
1433%doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1*
1434%doc %attr(644, root, man) %{_mandir}/man1/mysqlcheck.1*
1435%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1*
1436%doc %attr(644, root, man) %{_mandir}/man1/mysqlimport.1*
1437%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1*
1438%doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1*
1439%doc %attr(644, root, man) %{_mandir}/man1/mysql_config_editor.1*
1440
1441# ----------------------------------------------------------------------------
1442%files -n mysql-wsrep-devel%{product_suffix} -f %{src_dir}/optional-files-devel
1443%defattr(-, root, root, 0755)
1444%if %{defined license_files_server}
1445%doc %{license_files_server}
1446%endif
1447%doc %attr(644, root, man) %{_mandir}/man1/comp_err.1*
1448%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1*
1449%attr(755, root, root) %{_bindir}/mysql_config
1450%dir %attr(755, root, root) %{_includedir}/mysql
1451%dir %attr(755, root, root) %{_libdir}/mysql
1452%{_includedir}/mysql/*
1453%{_datadir}/aclocal/mysql.m4
1454%{_libdir}/mysql/libmysqlclient.a
1455%{_libdir}/mysql/libmysqlclient_r.a
1456%{_libdir}/mysql/libmysqlservices.a
1457
1458# ----------------------------------------------------------------------------
1459%files -n mysql-wsrep-shared%{product_suffix}
1460%defattr(-, root, root, 0755)
1461%if %{defined license_files_server}
1462%doc %{license_files_server}
1463%endif
1464# Shared libraries (omit for architectures that don't support them)
1465%{_libdir}/libmysql*.so
1466%{_libdir}/libmysql*.so.%{currentlib}*
1467
1468%post -n mysql-wsrep-shared%{product_suffix}
1469/sbin/ldconfig
1470
1471%postun -n mysql-wsrep-shared%{product_suffix}
1472/sbin/ldconfig
1473
1474# ----------------------------------------------------------------------------
1475%if 0%{?compatlib}
1476%files -n mysql-wsrep-libs-compat%{product_suffix}
1477%defattr(-, root, root, -)
1478%doc %{?compat_license_files_server}
1479%dir %attr(755, root, root) %{_libdir}/mysql
1480%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
1481%{_libdir}/mysql/libmysqlclient.so.%{compatlib}
1482%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.0.0
1483%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}
1484%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.0.0
1485%dir %attr(755, root, root) %{_datadir}/mysql/
1486%dir %attr(755, root, root) %{_datadir}/mysql/charsets-%{compatver}/
1487%attr(644, root, root) %{_datadir}/mysql/charsets-%{compatver}/*
1488
1489%post -n mysql-wsrep-libs-compat%{product_suffix}
1490/sbin/ldconfig
1491
1492%postun -n mysql-wsrep-libs-compat%{product_suffix}
1493/sbin/ldconfig
1494%endif
1495
1496# ----------------------------------------------------------------------------
1497%files -n mysql-wsrep-test%{product_suffix}
1498%defattr(-, root, root, 0755)
1499%if %{defined license_files_server}
1500%doc %{license_files_server}
1501%endif
1502%attr(-, root, root) %{_datadir}/mysql-test
1503%attr(755, root, root) %{_bindir}/mysql_client_test
1504
1505##############################################################################
1506# The spec file changelog only includes changes made to the spec file
1507# itself - note that they must be ordered by date (important when
1508# merging BK trees)
1509##############################################################################
1510%changelog
1511* Thu Sep 05 2019 Bjorn Munch <bjorn.munch@oracle.com>
1512- Add License Book, remove COPYING
1513
1514* Wed Jan 10 2018 Bjorn Munch <bjorn.munch@oracle.com>
1515- No longer need to remove obsoleted mysqltest man pages
1516
1517* Tue Oct 31 2017 Bjorn Munch <bjorn.munch@oracle.com>
1518- Remove obsoleted mysqltest man pages
1519
1520* Fri Jun 10 2016 Joerg Bruehe <joerg.bruehe@fromdual.com>
1521- Add missing "obsoletes" directives to handle Oracle's yum repository.
1522- Fix comment about SO version of libmysqlclient.so.
1523- Modify some changelog dates to match Oracle's (reduce differences).
1524
1525* Fri Oct 30 2015 Joerg Bruehe <joerg.bruehe@fromdual.com>
1526- Combine "plugins.files" and "datadir.files" into one, it seems rpmbuild 4.4
1527  (used on SLES 11) cannot handle two "-f" directives for one "%%files" section.
1528  This solves issue Github-223.
1529- Introduce a macro "previous_suffix" and set it to "-5.5", so that installing a
1530  "mysql-wsrep-*-5.6" package will "obsolete" the corresponding "mysql-wsrep-*-5.5"
1531  package. This solves issue Github-224.
1532- Fix dependency: There is no "libopenssl1-devel", just "libopenssl-devel".
1533
1534* Tue Oct 27 2015 Joerg Bruehe <joerg.bruehe@fromdual.com>
1535- Add the spec file changes coded in mysql-wsrep 5.5 to create "libs-compat",
1536  visible and documented (Sep 11 - 17) in the 5.5 spec file.
1537
1538* Thu Jan 29 2015 Joerg Bruehe <joerg.bruehe@fromdual.com>
1539- Add a meta-package "mysql-wsrep" that requires both "server" and "client".
1540- Fix the fall-back definition of "dist", it must start with a period.
1541
1542* Mon Jan 26 2015 Joerg Bruehe <joerg.bruehe@fromdual.com>
1543- Allow "rpmlint", but suppress "post-build-checks" (fail on SuSE 12 + 13).
1544- Improve handling of undefined "%%{dist}".
1545- Fix wrong changelog dates, to get rid of warnings about "bogus date".
1546- Escape percent signs in changelog, to get rid of "rpmlint" warnings.
1547
1548* Tue Jan 20 2015 Teemu Ollakka <teemu.ollakka@galeracluster.com>
1549
1550- Reworked to build wsrep patched packages exclusively
1551- OBS compatible
1552
1553* Mon Oct 06 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1554- Add license info in each subpackage
1555
1556* Wed May 28 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1557- Updated usergroup to mysql on datadir
1558
1559* Wed Oct 30 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1560- Removed non gpl file docs/mysql.info from community packages
1561
1562* Mon Sep 09 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1563- Updated logic to get the correct count of PID files
1564
1565* Fri Aug 16 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1566- Added provides lowercase mysql tags
1567
1568* Wed Jun 26 2013 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
1569- Cleaned up spec file to resolve rpm dependencies.
1570
1571* Mon Nov 05 2012 Joerg Bruehe <joerg.bruehe@oracle.com>
1572
1573- Allow to override the default to use the bundled yaSSL by an option like
1574      --define="with_ssl /path/to/ssl"
1575
1576* Wed Oct 10 2012 Bjorn Munch <bjorn.munch@oracle.com>
1577
1578- Replace old my-*.cnf config file examples with template my-default.cnf
1579
1580* Fri Oct 05 2012 Joerg Bruehe <joerg.bruehe@oracle.com>
1581
1582- Let the installation use the new option "--random-passwords" of "mysql_install_db".
1583  (Bug# 12794345 Ensure root password)
1584- Fix an inconsistency: "new install" vs "upgrade" are told from the (non)existence
1585  of "$mysql_datadir/mysql" (holding table "mysql.user" and other system stuff).
1586
1587* Tue Jul 24 2012 Joerg Bruehe <joerg.bruehe@oracle.com>
1588
1589- Add a macro "runselftest":
1590  if set to 1 (default), the test suite will be run during the RPM build;
1591  this can be oveeridden via the command line by adding
1592      --define "runselftest 0"
1593  Failures of the test suite will NOT make the RPM build fail!
1594
1595* Mon Jul 16 2012 Joerg Bruehe <joerg.bruehe@oracle.com>
1596
1597- Add the man page for the "mysql_config_editor".
1598
1599* Mon Jun 11 2012 Joerg Bruehe <joerg.bruehe@oracle.com>
1600
1601- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging.
1602
1603* Wed Feb 29 2012 Brajmohan Saxena <brajmohan.saxena@oracle.com>
1604
1605- Removal all traces of the readline library from mysql (BUG 13738013)
1606
1607* Wed Sep 28 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1608
1609- Fix duplicate mentioning of "mysql_plugin" and its manual page,
1610  it is better to keep alphabetic order in the files list (merging!).
1611
1612* Wed Sep 14 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1613
1614- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace
1615  the RPMs of any configuration (of the current or the preceding release series)
1616  by the new ones. This is done by not using the implicitly generated capabilities
1617  (which include the configuration name) and relying on more generic ones which
1618  just list the function ("server", "client", ...).
1619  The implicit generation cannot be prevented, so all these capabilities must be
1620  explicitly listed in "Obsoletes:"
1621
1622* Tue Sep 13 2011 Jonathan Perkin <jonathan.perkin@oracle.com>
1623
1624- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6.  Due to
1625  changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install)
1626  this necessitated a move of the libmygcc.a installation to the install
1627  phase, which is probably where it belonged in the first place.
1628
1629* Tue Sep 13 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1630
1631- "make_win_bin_dist" and its manual are dropped, cmake does it different.
1632
1633* Thu Sep 08 2011 Daniel Fischer <daniel.fischer@oracle.com>
1634
1635- Add mysql_plugin man page.
1636
1637* Tue Aug 30 2011 Tor Didriksen <tor.didriksen@oracle.com>
1638
1639- Set CXX=g++ by default to add a dependency on libgcc/libstdc++.
1640  Also, remove the use of the -fno-exceptions and -fno-rtti flags.
1641  TODO: update distro_buildreq/distro_requires
1642
1643* Tue Aug 30 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1644
1645- Add the manual page for "mysql_plugin" to the server package.
1646
1647* Fri Aug 19 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1648
1649- Null-upmerge the fix of bug#37165: This spec file is not affected.
1650- Replace "/var/lib/mysql" by the spec file variable "%%{mysqldatadir}".
1651
1652* Fri Aug 12 2011 Daniel Fischer <daniel.fischer@oracle.com>
1653
1654- Source plugin library files list from cmake-generated file.
1655
1656* Mon Jul 25 2011 Chuck Bell <chuck.bell@oracle.com>
1657
1658- Added the mysql_plugin client - enables or disables plugins.
1659
1660* Thu Jul 21 2011 Sunanda Menon <sunanda.menon@oracle.com>
1661
1662- Fix bug#12561297: Added the MySQL embedded binary
1663
1664* Thu Jul 07 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1665
1666- Fix bug#45415: "rpm upgrade recreates test database"
1667  Let the creation of the "test" database happen only during a new installation,
1668  not in an RPM upgrade.
1669  This affects both the "mkdir" and the call of "mysql_install_db".
1670
1671* Wed Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1672
1673- Fix bug#56581: If an installation deviates from the default file locations
1674  ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade)
1675  should still work, and use these locations.
1676  The problem was that the fix for bug#27072 did not check for local settings.
1677
1678* Mon Jan 31 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
1679
1680- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN".
1681
1682* Tue Nov 23 2010 Jonathan Perkin <jonathan.perkin@oracle.com>
1683
1684- EXCEPTIONS-CLIENT has been deleted, remove it from here too
1685- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing
1686  a '-j' argument to make.
1687
1688* Mon Nov 1 2010 Georgi Kodinov <georgi.godinov@oracle.com>
1689
1690- Added test authentication (WL#1054) plugin binaries
1691
1692* Wed Oct 6 2010 Georgi Kodinov <georgi.godinov@oracle.com>
1693
1694- Added example external authentication (WL#1054) plugin binaries
1695
1696* Wed Aug 11 2010 Joerg Bruehe <joerg.bruehe@oracle.com>
1697
1698- With a recent spec file cleanup, names have changed: A "-community" part was dropped.
1699  Reflect that in the "Obsoletes" specifications.
1700- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM.
1701- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade".
1702
1703* Tue Jun 15 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1704
1705- Change the behaviour on installation and upgrade:
1706  On installation, do not autostart the server.
1707  *Iff* the server was stopped before the upgrade is started, this is taken as a
1708  sign the administrator is handling that manually, and so the new server will
1709  not be started automatically at the end of the upgrade.
1710  The start/stop scripts will still be installed, so the server will be started
1711  on the next machine boot.
1712  This is the 5.5 version of fixing bug#27072 (RPM autostarting the server).
1713
1714* Tue Jun 1 2010 Jonathan Perkin <jonathan.perkin@oracle.com>
1715
1716- Implement SELinux checks from distribution-specific spec file.
1717
1718* Wed May 12 2010 Jonathan Perkin <jonathan.perkin@oracle.com>
1719
1720- Large number of changes to build using CMake
1721- Introduce distribution-specific RPMs
1722- Drop debuginfo, build all binaries with debug/symbols
1723- Remove __os_install_post, use native macro
1724- Remove _unpackaged_files_terminate_build, make it an error to have
1725  unpackaged files
1726- Remove cluster RPMs
1727
1728* Wed Mar 24 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1729
1730- Add "--with-perfschema" to the configure options.
1731
1732* Mon Mar 22 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1733
1734- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64",
1735  mask "rmdir" return code 1.
1736- Remove "ha_example.*" files from the list, they aren't built.
1737
1738* Wed Mar 17 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1739
1740- Fix a wrong path name in handling the debug plugins.
1741
1742* Wed Mar 10 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1743
1744- Take the result of the debug plugin build and put it into the optimized tree,
1745  so that it becomes part of the final installation;
1746  include the files in the packlist. Part of the fixes for bug#49022.
1747
1748* Mon Mar 01 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1749
1750- Set "Oracle and/or its affiliates" as the vendor and copyright owner,
1751  accept upgrading from packages showing MySQL or Sun as vendor.
1752
1753* Fri Feb 12 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1754
1755- Formatting changes:
1756  Have a consistent structure of separator lines and of indentation
1757  (8 leading blanks => tab).
1758- Introduce the variable "src_dir".
1759- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence
1760  over "CC" ("CXX").
1761- Drop the old "with_static" argument analysis, this is not supported
1762  in 5.1 since ages.
1763- Introduce variables to control the handlers individually, as well
1764  as other options.
1765- Use the new "--with-plugin" notation for the table handlers.
1766- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql"
1767  was done back in 2002 already.
1768- Make "--with-zlib-dir=bundled" the default, add an option to disable it.
1769- Add missing manual pages to the file list.
1770- Improve the runtime check for "libgcc.a", protect it against being tried
1771  with the Intel compiler "icc".
1772
1773* Mon Jan 11 2010 Joerg Bruehe <joerg.bruehe@sun.com>
1774
1775- Change RPM file naming:
1776  - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc".
1777  - Release counts from 1, not 0.
1778
1779* Wed Dec 23 2009 Joerg Bruehe <joerg.bruehe@sun.com>
1780
1781- The "semisync" plugin file name has lost its introductory "lib",
1782  adapt the file lists for the subpackages.
1783  This is a part missing from the fix for bug#48351.
1784- Remove the "fix_privilege_tables" manual, it does not exist in 5.5
1785  (and likely, the whole script will go, too).
1786
1787* Mon Nov 16 2009 Joerg Bruehe <joerg.bruehe@sun.com>
1788
1789- remove erroneous traces of the InnoDB plugin (that is 5.1 only).
1790
1791* Tue Oct 06 2009 Magnus Blaudd <mvensson@mysql.com>
1792
1793- Removed mysql_fix_privilege_tables
1794
1795* Fri Oct 02 2009 Alexander Nozdrin <alexander.nozdrin@sun.com>
1796
1797- "mysqlmanager" got removed from version 5.4, all references deleted.
1798
1799* Fri Aug 28 2009 Joerg Bruehe <joerg.bruehe@sun.com>
1800
1801- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin.
1802
1803* Thu Aug 27 2009 Joerg Bruehe <joerg.bruehe@sun.com>
1804
1805- This version does not contain the "Instance manager", "mysqlmanager":
1806  Remove it from the spec file so that packaging succeeds.
1807
1808* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com>
1809
1810- Add conditionals for bundled zlib and innodb plugin
1811
1812* Fri Aug 21 2009 Jonathan Perkin <jperkin@sun.com>
1813
1814- Install plugin libraries in appropriate packages.
1815- Disable libdaemon_example and ftexample plugins.
1816
1817* Thu Aug 20 2009 Jonathan Perkin <jperkin@sun.com>
1818
1819- Update variable used for mysql-test suite location to match source.
1820
1821* Fri Nov 07 2008 Joerg Bruehe <joerg@mysql.com>
1822
1823- Correct yesterday's fix, so that it also works for the last flag,
1824  and fix a wrong quoting: un-quoted quote marks must not be escaped.
1825
1826* Thu Nov 06 2008 Kent Boortz <kent.boortz@sun.com>
1827
1828- Removed "mysql_upgrade_shell"
1829- Removed some copy/paste between debug and normal build
1830
1831* Thu Nov 06 2008 Joerg Bruehe <joerg@mysql.com>
1832
1833- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized.
1834  This should cover both gcc and icc flags.  Fixes bug#40546.
1835
1836* Fri Aug 29 2008 Kent Boortz <kent@mysql.com>
1837
1838- Removed the "Federated" storage engine option, and enabled in all
1839
1840* Tue Aug 26 2008 Joerg Bruehe <joerg@mysql.com>
1841
1842- Get rid of the "warning: Installed (but unpackaged) file(s) found:"
1843  Some generated files aren't needed in RPMs:
1844  - the "sql-bench/" subdirectory
1845  Some files were missing:
1846  - /usr/share/aclocal/mysql.m4  ("devel" subpackage)
1847  - Manual "mysqlbug" ("server" subpackage)
1848  - Program "innochecksum" and its manual ("server" subpackage)
1849  - Manual "mysql_find_rows" ("client" subpackage)
1850  - Script "mysql_upgrade_shell" ("client" subpackage)
1851  - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage)
1852  - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage)
1853
1854* Mon Mar 31 2008 Kent Boortz <kent@mysql.com>
1855
1856- Made the "Federated" storage engine an option
1857- Made the "Cluster" storage engine and sub packages an option
1858
1859* Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com>
1860
1861- Add the man pages for "ndbd" and "ndb_mgmd".
1862
1863* Mon Feb 18 2008 Timothy Smith <tim@mysql.com>
1864
1865- Require a manual upgrade if the alread-installed mysql-server is
1866  from another vendor, or is of a different major version.
1867
1868* Wed May 02 2007 Joerg Bruehe <joerg@mysql.com>
1869
1870- "ndb_size.tmpl" is not needed any more,
1871  "man1/mysql_install_db.1" lacked the trailing '*'.
1872
1873* Sat Apr 07 2007 Kent Boortz <kent@mysql.com>
1874
1875- Removed man page for "mysql_create_system_tables"
1876
1877* Wed Mar 21 2007 Daniel Fischer <df@mysql.com>
1878
1879- Add debug server.
1880
1881* Mon Mar 19 2007 Daniel Fischer <df@mysql.com>
1882
1883- Remove Max RPMs; the server RPMs contain a mysqld compiled with all
1884  features that previously only were built into Max.
1885
1886* Fri Mar 02 2007 Joerg Bruehe <joerg@mysql.com>
1887
1888- Add several man pages for NDB which are now created.
1889
1890* Fri Jan 05 2007 Kent Boortz <kent@mysql.com>
1891
1892- Put back "libmygcc.a", found no real reason it was removed.
1893
1894- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the
1895  correct "libgcc.a" path is returned for the 32/64 bit architecture.
1896
1897* Mon Dec 18 2006 Joerg Bruehe <joerg@mysql.com>
1898
1899- Fix the move of "mysqlmanager" to section 8: Directory name was wrong.
1900
1901* Thu Dec 14 2006 Joerg Bruehe <joerg@mysql.com>
1902
1903- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql"
1904  in the server RPM.
1905- The "mysqlmanager" man page got moved from section 1 to 8.
1906
1907* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
1908
1909- Call "make install" using "benchdir_root=%%{_datadir}",
1910  because that is affecting the regression test suite as well.
1911
1912* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
1913
1914- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
1915  replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading
1916  (bug#22081).
1917
1918* Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com>
1919
1920- Add "--with-partition" to all server builds.
1921
1922- Use "--report-features" in one test run per server build.
1923
1924* Tue Aug 15 2006 Joerg Bruehe <joerg@mysql.com>
1925
1926- The "max" server is removed from packages, effective from 5.1.12-beta.
1927  Delete all steps to build, package, or install it.
1928
1929* Mon Jul 10 2006 Joerg Bruehe <joerg@mysql.com>
1930
1931- Fix a typing error in the "make" target for the Perl script to run the tests.
1932
1933* Tue Jul 04 2006 Joerg Bruehe <joerg@mysql.com>
1934
1935- Use the Perl script to run the tests, because it will automatically check
1936  whether the server is configured with SSL.
1937
1938* Tue Jun 27 2006 Joerg Bruehe <joerg@mysql.com>
1939
1940- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216)
1941
1942- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade,
1943  there are some more aspects which need to be solved before this is possible.
1944  For now, just ensure the binary "mysql_upgrade" is delivered and installed.
1945
1946* Thu Jun 22 2006 Joerg Bruehe <joerg@mysql.com>
1947
1948- Close a gap of the previous version by explicitly using
1949  a newly created temporary directory for the socket to be used
1950  in the "mysql_upgrade" operation, overriding any local setting.
1951
1952* Tue Jun 20 2006 Joerg Bruehe <joerg@mysql.com>
1953
1954- To run "mysql_upgrade", we need a running server;
1955  start it in isolation and skip password checks.
1956
1957* Sat May 20 2006 Kent Boortz <kent@mysql.com>
1958
1959- Always compile for PIC, position independent code.
1960
1961* Wed May 10 2006 Kent Boortz <kent@mysql.com>
1962
1963- Use character set "all" when compiling with Cluster, to make Cluster
1964  nodes independent on the character set directory, and the problem
1965  that two RPM sub packages both wants to install this directory.
1966
1967* Mon May 01 2006 Kent Boortz <kent@mysql.com>
1968
1969- Use "./libtool --mode=execute" instead of searching for the
1970  executable in current directory and ".libs".
1971
1972* Fri Apr 28 2006 Kent Boortz <kent@mysql.com>
1973
1974- Install and run "mysql_upgrade"
1975
1976* Wed Apr 12 2006 Jim Winstead <jimw@mysql.com>
1977
1978- Remove sql-bench, and MySQL-bench RPM (will be built as an independent
1979  project from the mysql-bench repository)
1980
1981* Tue Apr 11 2006 Jim Winstead <jimw@mysql.com>
1982
1983- Remove old mysqltestmanager and related programs
1984* Sat Apr 01 2006 Kent Boortz <kent@mysql.com>
1985
1986- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS
1987
1988* Tue Mar 07 2006 Kent Boortz <kent@mysql.com>
1989
1990- Changed product name from "Community Edition" to "Community Server"
1991
1992* Mon Mar 06 2006 Kent Boortz <kent@mysql.com>
1993
1994- Fast mutexes is now disabled by default, but should be
1995  used in Linux builds.
1996
1997* Mon Feb 20 2006 Kent Boortz <kent@mysql.com>
1998
1999- Reintroduced a max build
2000- Limited testing of 'debug' and 'max' servers
2001- Berkeley DB only in 'max'
2002
2003* Mon Feb 13 2006 Joerg Bruehe <joerg@mysql.com>
2004
2005- Use "-i" on "make test-force";
2006  this is essential for later evaluation of this log file.
2007
2008* Thu Feb 09 2006 Kent Boortz <kent@mysql.com>
2009
2010- Pass '-static' to libtool, link static with our own libraries, dynamic
2011  with system libraries.  Link with the bundled zlib.
2012
2013* Wed Feb 08 2006 Kristian Nielsen <knielsen@mysql.com>
2014
2015- Modified RPM spec to match new 5.1 debug+max combined community packaging.
2016
2017* Sun Dec 18 2005 Kent Boortz <kent@mysql.com>
2018
2019- Added "client/mysqlslap"
2020
2021* Mon Dec 12 2005 Rodrigo Novo <rodrigo@mysql.com>
2022
2023- Added zlib to the list of (static) libraries installed
2024- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld)
2025- Compile MySQL with bundled zlib
2026- Fixed %%packager name to "MySQL Production Engineering Team"
2027
2028* Mon Dec 05 2005 Joerg Bruehe <joerg@mysql.com>
2029
2030- Avoid using the "bundled" zlib on "shared" builds:
2031  As it is not installed (on the build system), this gives dependency
2032  problems with "libtool" causing the build to fail.
2033  (Change was done on Nov 11, but left uncommented.)
2034
2035* Tue Nov 22 2005 Joerg Bruehe <joerg@mysql.com>
2036
2037- Extend the file existence check for "init.d/mysql" on un-install
2038  to also guard the call to "insserv"/"chkconfig".
2039
2040* Thu Oct 27 2005 Lenz Grimmer <lenz@grimmer.com>
2041
2042- added more man pages
2043
2044* Wed Oct 19 2005 Kent Boortz <kent@mysql.com>
2045
2046- Made yaSSL support an option (off by default)
2047
2048* Wed Oct 19 2005 Kent Boortz <kent@mysql.com>
2049
2050- Enabled yaSSL support
2051
2052* Sat Oct 15 2005 Kent Boortz <kent@mysql.com>
2053
2054- Give mode arguments the same way in all places
2055- Moved copy of mysqld.a to "standard" build, but
2056  disabled it as we don't do embedded yet in 5.0
2057
2058* Fri Oct 14 2005 Kent Boortz <kent@mysql.com>
2059
2060- For 5.x, always compile with --with-big-tables
2061- Copy the config.log file to location outside
2062  the build tree
2063
2064* Fri Oct 14 2005 Kent Boortz <kent@mysql.com>
2065
2066- Removed unneeded/obsolete configure options
2067- Added archive engine to standard server
2068- Removed the embedded server from experimental server
2069- Changed suffix "-Max" => "-max"
2070- Changed comment string "Max" => "Experimental"
2071
2072* Thu Oct 13 2005 Lenz Grimmer <lenz@mysql.com>
2073
2074- added a usermod call to assign a potential existing mysql user to the
2075  correct user group (BUG#12823)
2076- Save the perror binary built during Max build so it supports the NDB
2077  error codes (BUG#13740)
2078- added a separate macro "mysqld_group" to be able to define the
2079  user group of the mysql user seperately, if desired.
2080
2081* Thu Sep 29 2005 Lenz Grimmer <lenz@mysql.com>
2082
2083- fixed the removing of the RPM_BUILD_ROOT in the %%clean section (the
2084  $RBR variable did not get expanded, thus leaving old build roots behind)
2085
2086* Thu Aug 04 2005 Lenz Grimmer <lenz@mysql.com>
2087
2088- Fixed the creation of the mysql user group account in the postinstall
2089  section (BUG 12348)
2090- Fixed enabling the Archive storage engine in the Max binary
2091
2092* Tue Aug 02 2005 Lenz Grimmer <lenz@mysql.com>
2093
2094- Fixed the Requires: tag for the server RPM (BUG 12233)
2095
2096* Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com>
2097
2098- create a "mysql" user group and assign the mysql user account to that group
2099  in the server postinstall section. (BUG 10984)
2100
2101* Tue Jun 14 2005 Lenz Grimmer <lenz@mysql.com>
2102
2103- Do not build statically on i386 by default, only when adding either "--with
2104  static" or "--define '_with_static 1'" to the RPM build options. Static
2105  linking really only makes sense when linking against the specially patched
2106  glibc 2.2.5.
2107
2108* Mon Jun 06 2005 Lenz Grimmer <lenz@mysql.com>
2109
2110- added mysql_client_test to the "bench" subpackage (BUG 10676)
2111- added the libndbclient static and shared libraries (BUG 10676)
2112
2113* Wed Jun 01 2005 Lenz Grimmer <lenz@mysql.com>
2114
2115- use "mysqldatadir" variable instead of hard-coding the path multiple times
2116- use the "mysqld_user" variable on all occasions a user name is referenced
2117- removed (incomplete) Brazilian translations
2118- removed redundant release tags from the subpackage descriptions
2119
2120* Wed May 25 2005 Joerg Bruehe <joerg@mysql.com>
2121
2122- Added a "make clean" between separate calls to "BuildMySQL".
2123
2124* Thu May 12 2005 Guilhem Bichot <guilhem@mysql.com>
2125
2126- Removed the mysql_tableinfo script made obsolete by the information schema
2127
2128* Wed Apr 20 2005 Lenz Grimmer <lenz@mysql.com>
2129
2130- Enabled the "blackhole" storage engine for the Max RPM
2131
2132* Wed Apr 13 2005 Lenz Grimmer <lenz@mysql.com>
2133
2134- removed the MySQL manual files (html/ps/texi) - they have been removed
2135  from the MySQL sources and are now available seperately.
2136
2137* Mon Apr 4 2005 Petr Chardin <petr@mysql.com>
2138
2139- old mysqlmanager, mysqlmanagerc and mysqlmanager-pwger renamed into
2140  mysqltestmanager, mysqltestmanager and mysqltestmanager-pwgen respectively
2141
2142* Fri Mar 18 2005 Lenz Grimmer <lenz@mysql.com>
2143
2144- Disabled RAID in the Max binaries once and for all (it has finally been
2145  removed from the source tree)
2146
2147* Sun Feb 20 2005 Petr Chardin <petr@mysql.com>
2148
2149- Install MySQL Instance Manager together with mysqld, touch mysqlmanager
2150  password file
2151
2152* Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com>
2153
2154- Fixed the compilation comments and moved them into the separate build sections
2155  for Max and Standard
2156
2157* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com>
2158
2159- enabled the "Ndbcluster" storage engine for the max binary
2160- added extra make install in ndb subdir after Max build to get ndb binaries
2161- added packages for ndbcluster storage engine
2162
2163* Fri Jan 14 2005 Lenz Grimmer <lenz@mysql.com>
2164
2165- replaced obsoleted "BuildPrereq" with "BuildRequires" instead
2166
2167* Thu Jan 13 2005 Lenz Grimmer <lenz@mysql.com>
2168
2169- enabled the "Federated" storage engine for the max binary
2170
2171* Tue Jan 04 2005 Petr Chardin <petr@mysql.com>
2172
2173- ISAM and merge storage engines were purged. As well as appropriate
2174  tools and manpages (isamchk and isamlog)
2175
2176* Fri Dec 31 2004 Lenz Grimmer <lenz@mysql.com>
2177
2178- enabled the "Archive" storage engine for the max binary
2179- enabled the "CSV" storage engine for the max binary
2180- enabled the "Example" storage engine for the max binary
2181
2182* Thu Aug 26 2004 Lenz Grimmer <lenz@mysql.com>
2183
2184- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860)
2185
2186* Fri Aug 20 2004 Lenz Grimmer <lenz@mysql.com>
2187
2188- do not link statically on IA64/AMD64 as these systems do not have
2189  a patched glibc installed
2190
2191* Tue Aug 10 2004 Lenz Grimmer <lenz@mysql.com>
2192
2193- Added libmygcc.a to the devel subpackage (required to link applications
2194  against the the embedded server libmysqld.a) (BUG 4921)
2195
2196* Mon Aug 09 2004 Lenz Grimmer <lenz@mysql.com>
2197
2198- Added EXCEPTIONS-CLIENT to the "devel" package
2199
2200* Thu Jul 29 2004 Lenz Grimmer <lenz@mysql.com>
2201
2202- disabled OpenSSL in the Max binaries again (the RPM packages were the
2203  only exception to this anyway) (BUG 1043)
2204
2205* Wed Jun 30 2004 Lenz Grimmer <lenz@mysql.com>
2206
2207- fixed server postinstall (mysql_install_db was called with the wrong
2208  parameter)
2209
2210* Thu Jun 24 2004 Lenz Grimmer <lenz@mysql.com>
2211
2212- added mysql_tzinfo_to_sql to the server subpackage
2213- run "make clean" instead of "make distclean"
2214
2215* Mon Apr 05 2004 Lenz Grimmer <lenz@mysql.com>
2216
2217- added ncurses-devel to the build prerequisites (BUG 3377)
2218
2219* Thu Feb 12 2004 Lenz Grimmer <lenz@mysql.com>
2220
2221- when using gcc, _always_ use CXX=gcc
2222- replaced Copyright with License field (Copyright is obsolete)
2223
2224* Tue Feb 03 2004 Lenz Grimmer <lenz@mysql.com>
2225
2226- added myisam_ftdump to the Server package
2227
2228* Tue Jan 13 2004 Lenz Grimmer <lenz@mysql.com>
2229
2230- link the mysql client against libreadline instead of libedit (BUG 2289)
2231
2232* Mon Dec 22 2003 Lenz Grimmer <lenz@mysql.com>
2233
2234- marked /etc/logrotate.d/mysql as a config file (BUG 2156)
2235
2236* Sat Dec 13 2003 Lenz Grimmer <lenz@mysql.com>
2237
2238- fixed file permissions (BUG 1672)
2239
2240* Thu Dec 11 2003 Lenz Grimmer <lenz@mysql.com>
2241
2242- made testing for gcc3 a bit more robust
2243
2244* Fri Dec 05 2003 Lenz Grimmer <lenz@mysql.com>
2245
2246- added missing file mysql_create_system_tables to the server subpackage
2247
2248* Fri Nov 21 2003 Lenz Grimmer <lenz@mysql.com>
2249
2250- removed dependency on MySQL-client from the MySQL-devel subpackage
2251  as it is not really required. (BUG 1610)
2252
2253* Fri Aug 29 2003 Lenz Grimmer <lenz@mysql.com>
2254
2255- Fixed BUG 1162 (removed macro names from the changelog)
2256- Really fixed BUG 998 (disable the checking for installed but
2257  unpackaged files)
2258
2259* Tue Aug 05 2003 Lenz Grimmer <lenz@mysql.com>
2260
2261- Fixed BUG 959 (libmysqld not being compiled properly)
2262- Fixed BUG 998 (RPM build errors): added missing files to the
2263  distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow,
2264  mysql_fix_privilege_tables.1), removed "-n" from install section.
2265
2266* Wed Jul 09 2003 Lenz Grimmer <lenz@mysql.com>
2267
2268- removed the GIF Icon (file was not included in the sources anyway)
2269- removed unused variable shared_lib_version
2270- do not run automake before building the standard binary
2271  (should not be necessary)
2272- add server suffix '-standard' to standard binary (to be in line
2273  with the binary tarball distributions)
2274- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir,
2275  _datadir, _includedir) throughout the spec file.
2276- allow overriding CC and CXX (required when building with other compilers)
2277
2278* Fri May 16 2003 Lenz Grimmer <lenz@mysql.com>
2279
2280- re-enabled RAID again
2281
2282* Wed Apr 30 2003 Lenz Grimmer <lenz@mysql.com>
2283
2284- disabled MyISAM RAID (--with-raid) - it throws an assertion which
2285  needs to be investigated first.
2286
2287* Mon Mar 10 2003 Lenz Grimmer <lenz@mysql.com>
2288
2289- added missing file mysql_secure_installation to server subpackage
2290  (BUG 141)
2291
2292* Tue Feb 11 2003 Lenz Grimmer <lenz@mysql.com>
2293
2294- re-added missing pre- and post(un)install scripts to server subpackage
2295- added config file /etc/my.cnf to the file list (just for completeness)
2296- make sure to create the datadir with 755 permissions
2297
2298* Mon Jan 27 2003 Lenz Grimmer <lenz@mysql.com>
2299
2300- removed unused CC and CXX variables
2301- CFLAGS and CXXFLAGS should honor RPM_OPT_FLAGS
2302
2303* Fri Jan 24 2003 Lenz Grimmer <lenz@mysql.com>
2304
2305- renamed package "MySQL" to "MySQL-server"
2306- fixed Copyright tag
2307- added mysql_waitpid to client subpackage (required for mysql-test-run)
2308
2309* Wed Nov 27 2002 Lenz Grimmer <lenz@mysql.com>
2310
2311- moved init script from /etc/rc.d/init.d to /etc/init.d (the majority of
2312  Linux distributions now support this scheme as proposed by the LSB either
2313  directly or via a compatibility symlink)
2314- Use new "restart" init script action instead of starting and stopping
2315  separately
2316- Be more flexible in activating the automatic bootup - use insserv (on
2317  older SuSE versions) or chkconfig (Red Hat, newer SuSE versions and
2318  others) to create the respective symlinks
2319
2320* Wed Sep 25 2002 Lenz Grimmer <lenz@mysql.com>
2321
2322- MySQL-Max now requires MySQL >= 4.0 to avoid version mismatches
2323  (mixing 3.23 and 4.0 packages)
2324
2325* Fri Aug 09 2002 Lenz Grimmer <lenz@mysql.com>
2326
2327- Turn off OpenSSL in MySQL-Max for now until it works properly again
2328- enable RAID for the Max binary instead
2329- added compatibility link: safe_mysqld -> mysqld_safe to ease the
2330  transition from 3.23
2331
2332* Thu Jul 18 2002 Lenz Grimmer <lenz@mysql.com>
2333
2334- Reworked the build steps a little bit: the Max binary is supposed
2335  to include OpenSSL, which cannot be linked statically, thus trying
2336  to statically link against a special glibc is futile anyway
2337- because of this, it is not required to make yet another build run
2338  just to compile the shared libs (saves a lot of time)
2339- updated package description of the Max subpackage
2340- clean up the BuildRoot directory afterwards
2341
2342* Mon Jul 15 2002 Lenz Grimmer <lenz@mysql.com>
2343
2344- Updated Packager information
2345- Fixed the build options: the regular package is supposed to
2346  include InnoDB and linked statically, while the Max package
2347  should include BDB and SSL support
2348
2349* Fri May 03 2002 Lenz Grimmer <lenz@mysql.com>
2350
2351- Use more RPM macros (e.g. infodir, mandir) to make the spec
2352  file more portable
2353- reorganized the installation of documentation files: let RPM
2354  take care of this
2355- reorganized the file list: actually install man pages along
2356  with the binaries of the respective subpackage
2357- do not include libmysqld.a in the devel subpackage as well, if we
2358  have a special "embedded" subpackage
2359- reworked the package descriptions
2360
2361* Mon Oct  8 2001 Monty
2362
2363- Added embedded server as a separate RPM
2364
2365* Fri Apr 13 2001 Monty
2366
2367- Added mysqld-max to the distribution
2368
2369* Tue Jan 2  2001  Monty
2370
2371- Added mysql-test to the bench package
2372
2373* Fri Aug 18 2000 Tim Smith <tim@mysql.com>
2374
2375- Added separate libmysql_r directory; now both a threaded
2376  and non-threaded library is shipped.
2377
2378* Tue Sep 28 1999 David Axmark <davida@mysql.com>
2379
2380- Added the support-files/my-example.cnf to the docs directory.
2381
2382- Removed devel dependency on base since it is about client
2383  development.
2384
2385* Wed Sep 8 1999 David Axmark <davida@mysql.com>
2386
2387- Cleaned up some for 3.23.
2388
2389* Thu Jul 1 1999 David Axmark <davida@mysql.com>
2390
2391- Added support for shared libraries in a separate sub
2392  package. Original fix by David Fox (dsfox@cogsci.ucsd.edu)
2393
2394- The --enable-assembler switch is now automatically disables on
2395  platforms there assembler code is unavailable. This should allow
2396  building this RPM on non i386 systems.
2397
2398* Mon Feb 22 1999 David Axmark <david@detron.se>
2399
2400- Removed unportable cc switches from the spec file. The defaults can
2401  now be overridden with environment variables. This feature is used
2402  to compile the official RPM with optimal (but compiler version
2403  specific) switches.
2404
2405- Removed the repetitive description parts for the sub rpms. Maybe add
2406  again if RPM gets a multiline macro capability.
2407
2408- Added support for a pt_BR translation. Translation contributed by
2409  Jorge Godoy <jorge@bestway.com.br>.
2410
2411* Wed Nov 4 1998 David Axmark <david@detron.se>
2412
2413- A lot of changes in all the rpm and install scripts. This may even
2414  be a working RPM :-)
2415
2416* Sun Aug 16 1998 David Axmark <david@detron.se>
2417
2418- A developers changelog for MySQL is available in the source RPM. And
2419  there is a history of major user visible changed in the Reference
2420  Manual.  Only RPM specific changes will be documented here.
2421