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

  ViewVC Help
Powered by ViewVC 1.1.30