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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30