/[packages]/cauldron/mariadb/current/SPECS/mariadb.spec
ViewVC logotype

Contents of /cauldron/mariadb/current/SPECS/mariadb.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 434195 - (show annotations) (download)
Sat Jun 1 15:05:50 2013 UTC (7 years, 2 months ago) by alien
File size: 29233 byte(s)
- really switch to upstream versioning
- remove initscript
- move new plugin to extra subpackage
1 #(ie. use with rpm --rebuild):
2 #
3 # --with debug Compile with debugging code
4 #
5 # enable build with debugging code: will _not_ strip away any debugging code,
6 # will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to
7 # configure.
8
9 %define build_debug 0
10 %define build_test 0
11
12 # commandline overrides:
13 # rpm -ba|--rebuild --with 'xxx'
14 %{?_with_debug: %{expand: %%define build_debug 1}}
15 %{?_with_test: %{expand: %%define build_test 1}}
16 %{?_without_test: %global build_test 0}
17
18 %if %{build_debug}
19 # disable build root strip policy
20 %define __spec_install_post %{_libdir}/rpm/brp-compress || :
21
22 # This gives extra debuggin and huge binaries
23 %{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')}
24 %endif
25
26 %if %{build_debug}
27 %define build_debug 1
28 %endif
29
30 %if %{build_test}
31 %define build_test 1
32 %endif
33
34 %define major 18
35 %define libmysqlembedded_major 0
36 %define libmysqlembedded_minor 0.1
37 %define libname %mklibname mariadb %{major}
38 %define libmariadbservices %mklibname mariadbservices
39 %define libmariadbembedded %mklibname mariadb-embedded %{major}
40 %define develname %mklibname -d mariadb
41 %define old_staticdevelname %mklibname -d -s mariadb
42 %define libmariadbembedded_devel %mklibname -d mariadb-embedded
43
44 %define mysql_libname %mklibname mysql %{major}
45 %define mysql_develname %mklibname -d mysql
46 %define libmysqlservices %mklibname mysqlservices
47 %define libmysqlembedded %mklibname mysqld %{libmysqlembedded_major}
48 %define libmysqlembedded_devel %mklibname -d mariadb-embedded
49
50 %define mirror http://ftp.osuosl.org/pub/mariadb
51
52 %define muser mysql
53 Summary: A very fast and reliable SQL database engine
54 Name: mariadb
55 Version: 5.5.31
56 Release: %mkrel 1
57 Group: Databases
58 License: GPLv2 with exceptions
59 URL: http://mariadb.org/
60 Source0: %{mirror}/%{name}-%{version}/kvm-tarbake-jaunty-x86/%{name}-%{version}.tar.gz
61 Source2: mysqld.sysconfig
62 Source3: my.cnf
63 Source10: mysql.tmpfiles.d
64 Source11: mysqld.service
65 Source12: mysqld-prepare-db-dir
66 Source13: mysqld-wait-ready
67 # the following patches are rediffed from the mysql-5.5 src.rpm to mariadb-5.5
68 # fedora patches
69 Patch1: mariadb-5.5-errno.patch
70 Patch3: mariadb-5.5-install-test.patch
71 Patch4: mysql-expired-certs.patch
72
73 # mandriva patches
74 Patch101: mariadb-5.5-logrotate.patch
75 Patch106: mariadb-5.5-hotcopy.patch
76 Patch107: mariadb-5.5-mysql_install_db-quiet.patch
77
78 # mageia patches
79 Patch120: mariadb-5.5.25-forgotten-files.patch
80 Patch132: mariadb-5.5-no-anonymous-user.patch
81
82 Requires(post): systemd >= %{systemd_required_version}
83 Requires(post): rpm-helper >= 0.24.8-1
84 Requires(preun): rpm-helper >= 0.24.8-1
85 Requires(post): %{name}-common%{_isa} = %{version}-%{release}
86 Requires(preun): %{name}-common%{_isa} = %{version}-%{release}
87 Requires(post): %{name}-client%{_isa} = %{version}-%{release}
88 Requires(preun): %{name}-client%{_isa} = %{version}-%{release}
89 Requires(postun): %{name}-common%{_isa} = %{version}-%{release}
90 Requires(postun): %{name}-client%{_isa} = %{version}-%{release}
91 Requires: %{name}-common%{_isa} = %{version}-%{release}
92 Requires: %{name}-core%{_isa} = %{version}-%{release}
93 Requires: %{name}-client%{_isa} = %{version}-%{release}
94 Provides: mysql = %{version}-%{release}
95 Obsoletes: mysql < %{version}-%{release}
96 Obsoletes: %{libmariadbservices} < 5.5.18-0.3194.20111227.1
97 Obsoletes: %{libmysqlservices} < %{version}-%{release}
98 Conflicts: %{name}-extra%{_isa} < %{version}-%{release}
99 Conflicts: %{name}-feedback%{_isa} < %{version}-%{release}
100 Conflicts: %{name}-obsolete%{_isa} < %{version}-%{release}
101 Suggests: %{name}-extra%{_isa}
102 BuildRequires: bison
103 BuildRequires: cmake
104 BuildRequires: doxygen
105 BuildRequires: glibc-devel
106 BuildRequires: libaio-devel
107 BuildRequires: libstdc++-devel
108 BuildRequires: libtermcap-devel
109 BuildRequires: multiarch-utils >= 1.0.3
110 BuildRequires: ncurses-devel
111 BuildRequires: openssl-devel
112 BuildRequires: wrap-devel
113 BuildRequires: python
114 BuildRequires: systemtap
115 BuildRequires: tetex
116 BuildRequires: texinfo
117 BuildRequires: xfs-devel
118 BuildRequires: zlib-devel
119 BuildRequires: boost-devel
120 BuildRequires: libaio-devel
121 BuildRequires: pam-devel
122 BuildConflicts: edit-devel
123
124 %description
125 The MariaDB software delivers a very fast, multi-threaded, multi-user, and
126 robust SQL (Structured Query Language) database server. MariaDB Server is
127 intended for mission-critical, heavy-load production systems as well as for
128 embedding into mass-deployed software.
129
130 The mariadb server is compiled with the following storage engines:
131
132 - Aria Storage Engine
133 - Archive Storage Engine
134 - Blackhole Storage Engine
135 - CSV Storage Engine
136 - FederatedX Storage Engine (Federated replacement)
137 - Heap Storage Engine
138 - MyISAM Storage Engine
139 - MyISAMMRG Storage Engine
140 - Partition Storage Engine
141 - Perfschema Storage Engine
142 - XtraDB Storage Engine (InnoDB replacement)
143
144 The following extra storage engines are provided by the mariadb-extra package
145
146 - OQGraph Storage Engine
147 - Sphinx Storage Engine
148
149 The feedback storage engine is provided by the mariadb-feedback package
150
151 - Feedback Storage Engine
152
153 The following storage engines are provided in the mariadb-obsolete package
154
155 - Federated Storage Engine
156 - InnoDB Storage Engine
157
158 %package -n mysql-MariaDB
159 Summary: A MySQL drop-in replacement
160 Group: System/Servers
161 Requires: %{name}%{_isa}
162
163 %description -n mysql-MariaDB
164 MariaDB is a complete MySQL drop-in replacement with additional fixes and
165 storage engines.
166
167 This package is used as a transitional virtual package, which requires
168 MariaDB so that people who used to use mysql can find it nicely.
169
170 %package feedback
171 Summary: MariaDB feedback storage engine
172 Group: System/Servers
173 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
174 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
175
176 %description feedback
177 MariaDB feedback storage engine submits feedback about your mariadb server.
178 Results can be seen on http://mariadb.org/feedback_plugin/ .
179
180 %package extra
181 Summary: MariaDB extra storage engines
182 Group: System/Servers
183 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
184 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
185
186 %description extra
187 MariaDB oqgraph and sphinx storage engines.
188
189 %package obsolete
190 Summary: MariaDB obsolete storage engines
191 Group: System/Servers
192 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
193 Conflicts: %{name}-common-core%{_isa} < %{version}-%{release}
194 Conflicts: mysql-core < 5.5.18
195
196 %description obsolete
197 MariaDB obsolete storage engines. InnoDB and Federated are being replaced by
198 XtraDB and FederatedX storage engines. These obsolete storage engines are
199 provided in case you need the vanilla mysql storage engines.
200
201 %package core
202 Summary: Server core binary
203 Group: System/Servers
204 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
205 Provides: mysql-core = %{version}-%{release}
206 Obsoletes: mysql-core < %{version}-%{release}
207
208 %description core
209 Core mysqld server binary. For a full MariaDB database server, install
210 package 'mariadb'.
211
212 %package common-core
213 Summary: Common files required by core binary
214 Group: System/Servers
215 Provides: mysql-common-core = %{version}-%{release}
216 Obsoletes: mysql-common-core < %{version}-%{release}
217
218 %description common-core
219 Common files minimally required by mysqld server binary.
220
221 %package common
222 Summary: Common files
223 Group: System/Servers
224 Requires(post): rpm-helper
225 Requires(preun): rpm-helper
226 Requires(pre): rpm-helper
227 Requires(postun): rpm-helper
228 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
229 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
230 Requires: %{name}-client%{_isa} >= %{version}-%{release}
231 Requires: %{name}-common-core%{_isa} >= %{version}-%{release}
232 Provides: mysql-common = %{version}-%{release}
233 Obsoletes: mysql-common < %{version}-%{release}
234
235 %description common
236 Common files for the MariaDB database server.
237
238 %package client
239 Summary: Client
240 Group: Databases
241 Requires(post): %{libname}%{_isa} >= %{version}-%{release}
242 Requires(preun): %{libname}%{_isa} >= %{version}-%{release}
243 Requires: %{libname}%{_isa} >= %{version}-%{release}
244 Provides: mysql-client = %{version}-%{release}
245 Obsoletes: mysql-client < %{version}-%{release}
246
247 %description client
248 This package contains the standard MariaDB clients.
249
250 %package bench
251 Summary: Benchmarks and test system
252 Group: System/Servers
253 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
254 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
255 Requires: %{name}-client%{_isa} >= %{version}-%{release}
256 Suggests: %{name}%{_isa} >= %{version}-%{release}
257 Provides: mysql-bench = %{version}-%{release}
258 Obsoletes: mysql-bench < %{version}-%{release}
259
260 %description bench
261 This package contains MariaDB benchmark scripts and data.
262
263 %package -n %{libname}
264 Summary: Shared libraries
265 Group: System/Libraries
266 Provides: %{name}-shared-libs = %{version}-%{release}
267 Provides: %{name}-shared = %{version}-%{release}
268 Provides: %{mysql_libname} = %{version}-%{release}
269 Obsoletes: %{mysql_libname} < %{version}-%{release}
270
271 %description -n %{libname}
272 This package contains the shared libraries (*.so*) which certain languages and
273 applications need to dynamically load and use MariaDB.
274
275 %package -n %{develname}
276 Summary: Development header files and libraries
277 Group: Development/Other
278 Requires(post): %{libname} >= %{version}-%{release}
279 Requires(preun): %{libname} >= %{version}-%{release}
280 Requires(post): %{name}-common%{_isa} >= %{version}-%{release}
281 Requires(preun): %{name}-common%{_isa} >= %{version}-%{release}
282 Requires(post): %{name}-client%{_isa} >= %{version}-%{release}
283 Requires(preun): %{name}-client%{_isa} >= %{version}-%{release}
284 Requires: %{libname} = %{version}-%{release}
285 Requires: %{name}-common%{_isa} >= %{version}-%{release}
286 Requires: %{name}-client%{_isa} >= %{version}-%{release}
287 Provides: %{name}-devel = %{version}-%{release}
288 Provides: %{libname}-devel = %{version}-%{release}
289 Obsoletes: %{libname}-devel < %{version}-%{release}
290 Obsoletes: %{old_staticdevelname} < %{version}-%{release}
291 Provides: %{mysql_develname} = %{version}-%{release}
292 Obsoletes: %{mysql_develname} < %{version}-%{release}
293 Provides: mysql-devel = %{version}-%{release}
294
295 %description -n %{develname}
296 This package contains the development header files and libraries necessary to
297 develop MariaDB client applications.
298
299 %package -n %{libmariadbembedded}
300 Summary: MariaDB as an embeddable library
301 Group: System/Libraries
302 Provides: %{name}-embedded = %{version}-%{release}
303 Obsoletes: %{name}-embedded < %{version}-%{release}
304 Provides: %{libmysqlembedded} = %{version}-%{release}
305 Obsoletes: %{libmysqlembedded} < %{version}-%{release}
306
307 %description -n %{libmariadbembedded}
308 MariaDB is a multi-user, multi-threaded SQL database server. This
309 package contains a version of the MariaDB server that can be embedded
310 into a client application instead of running as a separate process.
311
312 The API is identical for the embedded MariaDB version and the client/server
313 version.
314
315 %package -n %{libmariadbembedded_devel}
316 Summary: Development files for MySQL as an embeddable library
317 Group: Development/Other
318 Provides: %{name}-embedded-devel = %{version}-%{release}
319 Obsoletes: %{name}-embedded-devel < %{version}-%{release}
320 Requires: %{libmariadbembedded} = %{version}-%{release}
321 Requires: %{develname} = %{version}-%{release}
322 Provides: %{libmysqlembedded_devel} = %{version}-%{release}
323 Obsoletes: %{libmysqlembedded_devel} < %{version}-%{release}
324 Provides: mysql-embedded-devel = %{version}-%{release}
325
326 %description -n %{libmariadbembedded_devel}
327 MariaDB is a multi-user, multi-threaded SQL database server. This
328 package contains files needed for developing and testing with
329 the embedded version of the MariaDB server.
330
331 The API is identical for the embedded MariaDB version and the client/server
332 version.
333
334
335 %prep
336 %setup -q
337 %apply_patches
338
339 mkdir -p Mageia
340 cp %{SOURCE2} Mageia/mysqld.sysconfig
341 cp %{SOURCE3} Mageia/my.cnf
342
343 # remove the sql_yacc.cc file so that bison will regenerate it properly, even if it's patched
344 rm -f sql/sql_yacc.cc
345
346 # lib64 fix
347 perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf
348
349 # antiborker
350 perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/*
351 perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/*
352 perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/*
353 perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/*
354 perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db*
355
356 # this may be part of the problems with mysql-test
357 # http://bugs.mysql.com/bug.php?id=52223
358 #perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl
359 #perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl
360
361 # workaround for upstream bug #56342
362 rm -f mysql-test/t/ssl_8k_key-master.opt
363 rm -f mysql-test/t/file_contents.test
364
365 # fix distribution name
366 sed -i 's/Source distribution/%{_vendor} MariaDB Server/' mysql-test/suite/percona/innodb_sys_index.result
367
368 %build
369 %serverbuild
370 export CFLAGS="${CFLAGS:-%{optflags}}"
371 export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
372 export FFLAGS="${FFLAGS:-%{optflags}}"
373
374 %cmake \
375 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
376 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
377 -DINSTALL_SBINDIR=sbin \
378 -DMYSQL_DATADIR=/var/lib/mysql \
379 -DSYSCONFDIR=%{_sysconfdir} \
380 -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \
381 -DINSTALL_MANDIR=share/man \
382 -DINSTALL_SHAREDIR=share/mysql \
383 -DINSTALL_LIBDIR=%{_lib} \
384 -DINSTALL_INCLUDEDIR=include/mysql \
385 -DINSTALL_INFODIR=share/info \
386 -DINSTALL_MYSQLDATADIR=/var/lib/mysql \
387 -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
388 -DINSTALL_SQLBENCHDIR=share/mysql \
389 -DINSTALL_SUPPORTFILESDIR=share/mysql \
390 -DINSTALL_MYSQLSHAREDIR=share/mysql \
391 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
392 -DWITH_READLINE=0 \
393 -DWITH_LIBEDIT=0 \
394 -DWITH_LIBWRAP=1 \
395 -DWITH_SSL=system \
396 -DWITH_ZLIB=system \
397 -DWITH_PIC=1 \
398 -DMYSQL_TCP_PORT=3306 \
399 -DEXTRA_CHARSETS=all \
400 -DENABLED_LOCAL_INFILE=1 \
401 -DENABLE_DTRACE=1 \
402 -DWITH_EMBEDDED_SERVER=1 \
403 -DMYSQL_USER=%{muser} \
404 %if %{build_debug}
405 -DWITH_DEBUG=1 \
406 %else
407 -DWITH_DEBUG=0 \
408 %endif
409 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
410 -DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \
411 -DWITHOUT_DAEMON_EXAMPLE=1 \
412 -DWITH_PLUGIN_PBXT=0 \
413 -DFEATURE_SET="community" \
414 -DRPM=1 \
415 -DCOMPILATION_COMMENT="%{_vendor} MariaDB Server"
416
417 %make
418
419 %install
420 rm -rf %{buildroot}
421
422 # don't fiddle with the initscript!
423 export DONT_GPRINTIFY=1
424
425 %if %{build_debug}
426 export DONT_STRIP=1
427 %endif
428
429 install -d %{buildroot}%{_sysconfdir}/sysconfig
430 install -d %{buildroot}%{_var}/log/mysqld
431 install -d %{buildroot}/var/lib/mysql/{mysql,test}
432
433 %makeinstall_std -C build
434
435 # exclude loaddata7 from being converted
436 export EXCLUDE_FROM_EOL_CONVERSION="std_data/loaddata7.dat"
437
438 # install configuration files
439 install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
440 install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
441
442 install -m 0644 -D %{SOURCE10} %{buildroot}%{_tmpfilesdir}/mysql.conf
443 install -m 0644 -D %{SOURCE11} %{buildroot}%{_unitdir}/mysqld.service
444 install -m 0755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir
445 install -m 0755 %{SOURCE13} %{buildroot}%{_sbindir}/mysqld-wait-ready
446
447 # bork
448 mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/
449 chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf
450 mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
451
452 pushd %{buildroot}%{_bindir}
453 ln -sf mysqlcheck mysqlrepair
454 ln -sf mysqlcheck mysqlanalyze
455 ln -sf mysqlcheck mysqloptimize
456 popd
457
458 # nuke -Wl,--as-needed from the mysql_config file
459 perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
460
461 # cmake generates some completely wacko references to -lprobes_mysql when
462 # building with dtrace support. Haven't found where to shut that off,
463 # so resort to this blunt instrument. While at it, let's not reference
464 # libmysqlclient_r anymore either.
465 sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
466 %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
467 cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
468 chmod 755 %{buildroot}%{_bindir}/mysql_config
469 install -m 0755 -d %{buildroot}/var/lib/mysql
470
471 # Remove libmysqld.a, + hardlink libmysqld.so.%{libmysqlembedded_major} so that it's provided
472 rm -f %{buildroot}%{_libdir}/libmysqld.a
473 ln %{buildroot}%{_libdir}/libmysqld.so.%{major} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor}
474 ln -s libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}
475
476 # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
477 # but that really doesn't work (wrong soname in particular). We'll keep
478 # just the devel libmysqlclient_r.so link, so that rebuilding without any
479 # source change is enough to get rid of dependency on libmysqlclient_r.
480 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
481 ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
482
483 # remove static libs
484 rm -f %{buildroot}%{_libdir}/libmysqlclient.a
485 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a
486
487 # mysql-test includes one executable that doesn't belong under /usr/share,
488 # so move it and provide a symlink
489 mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
490 ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
491
492 # mysql client statically built against a local embedded library, pretty useless
493 rm -f %{buildroot}%{_bindir}/mysql_embedded
494
495 # this command enables plugins, but needs ini file + configuration in my.cnf
496 # before executing... and oh yeah, mysql must be stopped... => useless
497 # however, apparently tests seem to want it, even thought they don't use it.
498 #rm -f %{buildroot}%{_bindir}/mysql_plugin
499 rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
500
501 # remove more useless plugins
502 rm -f %{buildroot}%{_libdir}/mysql/plugin/auth_0x0100.so
503 rm -f %{buildroot}%{_libdir}/mysql/plugin/auth_test_plugin.so
504 rm -f %{buildroot}%{_libdir}/mysql/plugin/dialog_examples.so
505
506 # no RHEL4 selinux files for us
507 rm -rf %{buildroot}%{_datadir}/mysql/SELinux
508 # no init script for us
509 rm -f %{buildroot}%{_initrddir}/mysql
510 rm -f %{buildroot}%{_initrddir}/mysqld
511 # no split up config yet
512 rm -rf %{buildroot}%{_sysconfdir}/my.cnf.d
513
514 # house cleaning
515 rm -rf %{buildroot}%{_datadir}/info
516 rm -f %{buildroot}%{_bindir}/client_test
517 rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
518 rm -f %{buildroot}%{_bindir}/make_win_src_distribution
519 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
520 rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
521 rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
522 rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
523 rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
524 rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
525 rm -f %{buildroot}%{_datadir}/mysql/mysql.server
526 rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
527 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
528 rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
529 rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
530 rm -f %{buildroot}%{_datadir}/mysql/magic
531
532 # no idea how to fix this
533 rm -rf %{buildroot}%{_prefix}/data
534 rm -rf %{buildroot}%{_prefix}/docs
535 rm -rf %{buildroot}%{_prefix}/scripts
536 rm -rf %{buildroot}%{_datadir}/doc
537 rm -rf %{buildroot}%{_sysconfdir}/init.d/mysql
538 rm -rf %{buildroot}%{_sysconfdir}/logrotate.d/mysql
539
540 %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
541 %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
542
543 cat > README.urpmi <<EOF
544
545 NOTE: MariaDB is installed without root password, it is recommended to set the
546 root password with the following command as soon as possible:
547
548 mysqladmin password
549
550 The initscript used to start mysql has been reverted to use the one shipped
551 by MariaDB. This means the following changes:
552
553 * The generation of the initial system mysql database is now done when mysql
554 is started from the initscript and only if the /var/lib/mysql/mysql
555 directory is empty (mysql_install_db). Previousely this was quite hidden and
556 silently done at (rpm) install time. As a consequence to this change you may
557 have to perform some manual tasks to upgrade the mysql system database and
558 such. So, doing something like this might help you:
559
560 /etc/init.d/mysqld stop
561 TMPDIR=/var/tmp mysql_install_db
562 mysql_upgrade
563
564 The cluster functionalities (ndb) has been deactivated and will be removed in
565 future mysql versions. Oracle has a new product named mysql-cluster that
566 replaces the cluster functionalities.
567
568 The mysql-common-core package ships with a default /etc/my.cnf file that is
569 based on the my-medium.cnf file that comes with the source code.
570 EOF
571
572 ################################################################################
573 # run the tests
574 %if %{build_test}
575 # disable failing tests
576 pushd build/mysql-test
577 export LANG=C
578 export LC_ALL=C
579 export LANGUAGE=C
580 perl ./mysql-test-run.pl \
581 --mtr-build-thread="$((${RANDOM} % 100))" \
582 --retry=0 \
583 --ssl \
584 --big-test \
585 --force \
586 --max-test-fail=0 \
587 --testcase-timeout=60 \
588 --suite-timeout=1200 || false
589 popd
590 %endif
591
592 %pre
593 # enable plugins
594 if [ -f %{_sysconfdir}/my.cnf ]; then
595 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
596 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
597 # switch to federatedx provider
598 perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
599 fi
600
601 %pre common
602 # delete the mysql group if no mysql user is found, before adding the user
603 if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
604 %{_sbindir}/groupdel %{muser} 2> /dev/null || :
605 fi
606
607 %_pre_useradd %{muser} /var/lib/mysql /bin/bash
608
609 %post
610 %_tmpfilescreate mysql
611 %_post_service mysqld
612
613 %preun
614 %_preun_service mysqld
615
616 %postun
617 if [ "$1" = "1" ]; then
618 if [ -f /var/lock/subsys/mysqld ]; then
619 %{_initrddir}/mysqld restart > /dev/null 2>/dev/null || :
620 fi
621 fi
622
623 %pre common-core
624 # enable plugins
625 if [ -f %{_sysconfdir}/my.cnf ]; then
626 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
627 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
628 # switch to federatedx provider
629 perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
630 fi
631
632 %files
633 %doc README.urpmi
634 %{_tmpfilesdir}/mysql.conf
635 %{_unitdir}/mysqld.service
636 %{_sbindir}/mysqld-prepare-db-dir
637 %{_sbindir}/mysqld-wait-ready
638 %dir %{_libdir}/mysql/plugin
639 # authentication plugins
640 %{_libdir}/mysql/plugin/auth_socket.so
641 %{_libdir}/mysql/plugin/auth_pam.so
642 %{_libdir}/mysql/plugin/dialog.so
643 %{_libdir}/mysql/plugin/mysql_clear_password.so
644 # replication plugins
645 %{_libdir}/mysql/plugin/semisync_master.so
646 %{_libdir}/mysql/plugin/semisync_slave.so
647 # storage engines
648 %{_libdir}/mysql/plugin/ha_archive.so
649 %{_libdir}/mysql/plugin/ha_blackhole.so
650 %{_libdir}/mysql/plugin/ha_federatedx.so
651 # sql logging plugin
652 %{_libdir}/mysql/plugin/sql_errlog.so
653 # upstream describes this as "junk"
654 %{_libdir}/mysql/plugin/adt_null.so
655 %{_libdir}/mysql/plugin/mypluglib.so
656 %{_libdir}/mysql/plugin/qa_auth_client.so
657 %{_libdir}/mysql/plugin/qa_auth_interface.so
658 %{_libdir}/mysql/plugin/qa_auth_server.so
659 # example plugins, not usefull at all, removing
660 #%{_libdir}/mysql/plugin/auth_0x0100.so
661 #%{_libdir}/mysql/plugin/auth_test_plugin.so
662 #%{_libdir}/mysql/plugin/dialog_examples.so
663
664 %files -n mysql-MariaDB
665
666 %files obsolete
667 %{_libdir}/mysql/plugin/ha_innodb.so
668 %{_libdir}/mysql/plugin/ha_federated.so
669
670 %files feedback
671 %{_libdir}/mysql/plugin/feedback.so
672
673 %files extra
674 %{_libdir}/mysql/plugin/ha_oqgraph.so
675 %{_libdir}/mysql/plugin/ha_sphinx.so
676 %{_libdir}/mysql/plugin/handlersocket.so
677 # new optional functionality
678 %{_libdir}/mysql/plugin/query_cache_info.so
679
680 %files client
681 %config(noreplace) %{_sysconfdir}/mysqlaccess.conf
682 %{_bindir}/msql2mysql
683 %{_bindir}/mysql
684 %{_bindir}/mysqlaccess
685 %{_bindir}/mysqladmin
686 %{_bindir}/mysqlanalyze
687 %{_bindir}/mysqlbinlog
688 %{_bindir}/mysqlcheck
689 %{_bindir}/mysqldump
690 %{_bindir}/mysqldumpslow
691 %{_bindir}/mysql_find_rows
692 %{_bindir}/mysqlimport
693 %{_bindir}/mysqloptimize
694 %{_bindir}/mysqlrepair
695 %{_bindir}/mysqlshow
696 %{_bindir}/mysqlslap
697 %{_bindir}/mysql_waitpid
698 %{_mandir}/man1/msql2mysql.1*
699 %{_mandir}/man1/myisam_ftdump.1*
700 %{_mandir}/man1/mysql.1*
701 %{_mandir}/man1/mysqlaccess.1*
702 %{_mandir}/man1/mysqladmin.1*
703 %{_mandir}/man1/mysqlbinlog.1*
704 %{_mandir}/man1/mysqlcheck.1*
705 %{_mandir}/man1/mysqldump.1*
706 %{_mandir}/man1/mysqldumpslow.1*
707 %{_mandir}/man1/mysql_find_rows.1*
708 %{_mandir}/man1/mysqlimport.1*
709 %{_mandir}/man1/mysqlshow.1*
710 %{_mandir}/man1/mysql_waitpid.1*
711
712 %files bench
713 %doc build/sql-bench/README
714 %{_bindir}/my_safe_process
715 %{_bindir}/mysql_client_test
716 %{_bindir}/mysql_client_test_embedded
717 %{_bindir}/mysqltest_embedded
718 %{_datadir}/mysql/sql-bench
719 %attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test
720 %{_mandir}/man1/mysql-stress-test.pl.1*
721 %{_mandir}/man1/mysql-test-run.pl.1*
722 %{_mandir}/man1/mysql_client_test.1*
723 %{_mandir}/man1/mysql_client_test_embedded.1*
724 %{_mandir}/man1/mysqltest.1*
725 %{_mandir}/man1/mysqltest_embedded.1*
726
727 %files core
728 %{_sbindir}/mysqld
729
730 %files common-core
731 %config(noreplace) %{_sysconfdir}/my.cnf
732 %dir %{_datadir}/mysql
733 %{_datadir}/mysql/english
734 %{_datadir}/mysql/charsets
735
736 %files common
737 %doc README COPYING
738 %config(noreplace) %{_sysconfdir}/sysconfig/mysqld
739 %{_bindir}/aria_chk
740 %{_bindir}/aria_dump_log
741 %{_bindir}/aria_ftdump
742 %{_bindir}/aria_pack
743 %{_bindir}/aria_read_log
744 %{_bindir}/innochecksum
745 %{_bindir}/myisamchk
746 %{_bindir}/myisam_ftdump
747 %{_bindir}/myisamlog
748 %{_bindir}/myisampack
749 %{_bindir}/my_print_defaults
750 %{_bindir}/mysqlbug
751 %{_bindir}/mysql_convert_table_format
752 %{_bindir}/mysqld_multi
753 %{_bindir}/mysqld_safe
754 %{_bindir}/mysql_fix_extensions
755 %{_bindir}/mysqlhotcopy
756 %{_bindir}/mysql_install_db
757 %{_bindir}/mysql_plugin
758 %{_bindir}/mysql_secure_installation
759 %{_bindir}/mysql_setpermission
760 %{_bindir}/mysqltest
761 %{_bindir}/mysql_tzinfo_to_sql
762 %{_bindir}/mysql_upgrade
763 %{_bindir}/mysql_zap
764 %{_bindir}/mytop
765 %{_bindir}/perror
766 %{_bindir}/replace
767 %{_bindir}/resolveip
768 %{_bindir}/resolve_stack_dump
769 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql
770 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/mysql
771 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/test
772 %attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
773 %{_datadir}/mysql/*.cnf
774 %{_datadir}/mysql/fill_help_tables.sql
775 %{_datadir}/mysql/mysql_performance_tables.sql
776 %{_datadir}/mysql/mysql_system_tables.sql
777 %{_datadir}/mysql/mysql_system_tables_data.sql
778 %{_datadir}/mysql/mysql_test_data_timezone.sql
779 %{_datadir}/mysql/errmsg-utf8.txt
780 %{_datadir}/mysql/czech
781 %{_datadir}/mysql/danish
782 %{_datadir}/mysql/dutch
783 %{_datadir}/mysql/estonian
784 %{_datadir}/mysql/french
785 %{_datadir}/mysql/german
786 %{_datadir}/mysql/greek
787 %{_datadir}/mysql/hungarian
788 %{_datadir}/mysql/italian
789 %{_datadir}/mysql/japanese
790 %{_datadir}/mysql/korean
791 %{_datadir}/mysql/norwegian
792 %{_datadir}/mysql/norwegian-ny
793 %{_datadir}/mysql/polish
794 %{_datadir}/mysql/portuguese
795 %{_datadir}/mysql/romanian
796 %{_datadir}/mysql/russian
797 %{_datadir}/mysql/serbian
798 %{_datadir}/mysql/slovak
799 %{_datadir}/mysql/spanish
800 %{_datadir}/mysql/swedish
801 %{_datadir}/mysql/ukrainian
802 %{_mandir}/man1/innochecksum.1*
803 %{_mandir}/man1/myisamchk.1*
804 %{_mandir}/man1/myisamlog.1*
805 %{_mandir}/man1/myisampack.1*
806 %{_mandir}/man1/my_print_defaults.1*
807 %{_mandir}/man1/mysqlbug.1*
808 %{_mandir}/man1/mysql_convert_table_format.1*
809 %{_mandir}/man1/mysqld_multi.1*
810 %{_mandir}/man1/mysqld_safe.1*
811 %{_mandir}/man1/mysql_fix_extensions.1*
812 %{_mandir}/man1/mysql_fix_privilege_tables.1*
813 %{_mandir}/man1/mysqlhotcopy.1*
814 %{_mandir}/man1/mysql_install_db.1*
815 %{_mandir}/man1/mysqlman.1*
816 %{_mandir}/man1/mysql_secure_installation.1*
817 %{_mandir}/man1/mysql.server.1*
818 %{_mandir}/man1/mysql_setpermission.1*
819 %{_mandir}/man1/mysqlslap.1*
820 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
821 %{_mandir}/man1/mysql_upgrade.1*
822 %{_mandir}/man1/mysql_zap.1*
823 %{_mandir}/man1/perror.1*
824 %{_mandir}/man1/replace.1*
825 %{_mandir}/man1/resolveip.1*
826 %{_mandir}/man1/resolve_stack_dump.1*
827 %{_mandir}/man8/mysqld.8*
828 %{_mandir}/man8/mysqlmanager.8*
829
830 %files -n %{libname}
831 %{_libdir}/libmysqlclient.so.%{major}*
832
833 %files -n %{develname}
834 %doc INSTALL-SOURCE
835 %multiarch %{multiarch_bindir}/mysql_config
836 %{_bindir}/mysql_config
837 %{_libdir}/libmysqlclient_r.so
838 %{_libdir}/libmysqlclient.so
839 %dir %{_includedir}/mysql
840 %dir %{_includedir}/mysql/psi
841 %{_includedir}/mysql/*.h
842 %{_includedir}/mysql/private/*.h
843 %{_includedir}/mysql/private/atomic/*.h
844 %{_includedir}/mysql/psi/*.h
845 %multiarch %{multiarch_includedir}/mysql/my_config.h
846 %{_mandir}/man1/comp_err.1*
847 %{_mandir}/man1/mysql_config.1*
848 %{_datadir}/aclocal/mysql.m4
849 # mysqlservices library is static, because it doesn't contain any code
850 # itself, and is meant to be statically linked to all plugins.
851 %{_libdir}/libmysqlservices.a
852
853 %files -n %{libmariadbembedded}
854 %doc README COPYING
855 %{_libdir}/libmysqld.so.%{major}
856 %{_libdir}/libmysqld.so.%{libmysqlembedded_major}*
857
858 %files -n %{libmariadbembedded_devel}
859 %{_libdir}/libmysqld.so
860 %{_bindir}/mysql_client_test_embedded
861 %{_bindir}/mysqltest_embedded
862 %{_mandir}/man1/mysql_client_test_embedded.1*
863 %{_mandir}/man1/mysqltest_embedded.1*

  ViewVC Help
Powered by ViewVC 1.1.28