/[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 168615 - (show annotations) (download)
Thu Nov 17 21:16:38 2011 UTC (12 years, 5 months ago) by alien
File size: 25760 byte(s)
fix missing PBXT storage
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 -DWITH_PLUGIN_PBXT=1 \
366 -DFEATURE_SET="community" \
367 -DCOMPILATION_COMMENT="Mageia - MariaDB Community Edition (GPL)"
368
369 cp ../libmysql/libmysql.version libmysql/libmysql.version
370
371 %make
372
373 %install
374 rm -rf %{buildroot}
375
376 # don't fiddle with the initscript!
377 export DONT_GPRINTIFY=1
378
379 %if %{build_debug}
380 export DONT_STRIP=1
381 %endif
382
383 install -d %{buildroot}%{_sysconfdir}/sysconfig
384 install -d %{buildroot}%{_initrddir}
385 install -d %{buildroot}%{_var}/run/mysqld
386 install -d %{buildroot}%{_var}/log/mysqld
387 install -d %{buildroot}/var/lib/mysql/{mysql,test}
388
389 %makeinstall_std -C build
390
391 # install init scripts
392 install -m0755 build/support-files/mysql.server %{buildroot}%{_initrddir}/mysqld
393
394 # install configuration files
395 install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
396 install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
397
398 mkdir -p %{buildroot}/etc/tmpfiles.d
399 install -m 0644 %{SOURCE10} %{buildroot}/etc/tmpfiles.d/mysql.conf
400 mkdir -p %{buildroot}/lib/systemd/system
401 install -m 644 %{SOURCE11} %{buildroot}/lib/systemd/system
402 install -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir
403 install -m 755 %{SOURCE13} %{buildroot}%{_sbindir}/mysqld-wait-ready
404
405 # bork
406 mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/
407 chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf
408 mv %{buildroot}%{_prefix}/scripts/mysql_install_db %{buildroot}%{_bindir}/
409 mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
410
411 pushd %{buildroot}%{_bindir}
412 ln -sf mysqlcheck mysqlrepair
413 ln -sf mysqlcheck mysqlanalyze
414 ln -sf mysqlcheck mysqloptimize
415 popd
416
417 # nuke -Wl,--as-needed from the mysql_config file
418 perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
419
420 # cmake generates some completely wacko references to -lprobes_mysql when
421 # building with dtrace support. Haven't found where to shut that off,
422 # so resort to this blunt instrument. While at it, let's not reference
423 # libmysqlclient_r anymore either.
424 sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
425 %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
426 cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
427 chmod 755 %{buildroot}%{_bindir}/mysql_config
428 install -m 0755 -d %{buildroot}/var/lib/mysql
429
430 # Remove libmysqld.a, install libmysqld.so
431 rm -f %{buildroot}%{_libdir}/libmysqld.a
432 mv %{buildroot}%{_libdir}/libmysqld.so %{buildroot}%{_libdir}/libmysqld.so.%{libmariadbembedded_major}.%{libmariadbembedded_minor}
433 ln -s libmysqld.so.%{libmariadbembedded_major}.%{libmariadbembedded_minor} %{buildroot}%{_libdir}/libmysqld.so.%{libmariadbembedded_major}
434 ln -s libmysqld.so.%{libmariadbembedded_major} %{buildroot}%{_libdir}/libmysqld.so
435
436 # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
437 # but that really doesn't work (wrong soname in particular). We'll keep
438 # just the devel libmysqlclient_r.so link, so that rebuilding without any
439 # source change is enough to get rid of dependency on libmysqlclient_r.
440 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
441 ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
442
443 # remove static libs
444 rm -f %{buildroot}%{_libdir}/libmysqlclient.a
445 rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a
446
447 # mysql-test includes one executable that doesn't belong under /usr/share,
448 # so move it and provide a symlink
449 mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
450 ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
451
452 # house cleaning
453 rm -rf %{buildroot}%{_datadir}/info
454 rm -f %{buildroot}%{_bindir}/client_test
455 rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
456 rm -f %{buildroot}%{_bindir}/make_win_src_distribution
457 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
458 rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
459 rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
460 rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
461 rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
462 rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
463 rm -f %{buildroot}%{_datadir}/mysql/mysql.server
464 rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
465 rm -f %{buildroot}%{_datadir}/mysql/binary-configure
466 rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
467 rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
468 rm -f %{buildroot}%{_datadir}/mysql/magic
469
470 # no idea how to fix this
471 rm -rf %{buildroot}%{_prefix}/data
472 rm -rf %{buildroot}%{_prefix}/docs
473 rm -rf %{buildroot}%{_prefix}/scripts
474 rm -f %{buildroot}%{_prefix}/COPYING
475 rm -f %{buildroot}%{_prefix}/INSTALL-BINARY
476 rm -f %{buildroot}%{_prefix}/README
477
478 %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
479 %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
480
481 cat > README.urpmi <<EOF
482
483 NOTE: MariaDB is installed without root password, it is recommended to set the
484 root password as soon as possible:
485
486 mysqladmin password 'new_password'
487
488 The initscript used to start mysql has been reverted to use the one shipped
489 by MariaDB. This means the following changes:
490
491 * The generation of the initial system mysql database is now done when mysql
492 is started from the initscript and only if the /var/lib/mysql/mysql
493 directory is empty (mysql_install_db). Previousely this was quite hidden and
494 silently done at (rpm) install time. As a consequence to this change you may
495 have to perform some manual tasks to upgrade the mysql system database and
496 such. So, doing something like this might help you:
497
498 /etc/rc.d/init.d/mysqld stop
499 TMPDIR=/var/tmp mysql_install_db
500 mysql_upgrade
501
502 The cluster functionalities (ndb) has been deactivated and will be removed in
503 future mysql versions. Oracle has a new product named mysql-cluster that
504 replaces the cluster functionalities.
505
506 The mysql-common-core package ships with a default /etc/my.cnf file that is
507 based on the my-medium.cnf file that comes with the source code.
508 EOF
509
510 ################################################################################
511 # run the tests
512 %if %{build_test}
513 # disable failing tests
514 echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def
515 echo "type_enum : Unstable test case" >> mysql-test/t/disabled.def
516 echo "windows : For MS Windows only" >> mysql-test/t/disabled.def
517 pushd build/mysql-test
518 export LANG=C
519 export LC_ALL=C
520 export LANGUAGE=C
521 perl ./mysql-test-run.pl \
522 --mtr-build-thread="$((${RANDOM} % 100))" \
523 --skip-ndb \
524 --timer \
525 --retry=0 \
526 --ssl \
527 --mysqld=--binlog-format=mixed \
528 --testcase-timeout=60 \
529 --suite-timeout=120 || false
530 popd
531 %endif
532
533 %pre
534 # enable plugins
535 if [ -f %{_sysconfdir}/my.cnf ]; then
536 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
537 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
538 fi
539
540 %pre common
541 # delete the mysql group if no mysql user is found, before adding the user
542 if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
543 %{_sbindir}/groupdel %{muser} 2> /dev/null || :
544 fi
545
546 %_pre_useradd %{muser} /var/lib/mysql /bin/bash
547
548 %post
549 %_post_service mysqld
550
551 %preun
552 %_preun_service mysqld
553
554 %postun
555 if [ "$1" = "0" ]; then
556 if [ -f /var/lock/subsys/mysqld ]; then
557 %{_initrddir}/mysqld restart > /dev/null 2>/dev/null || :
558 fi
559 fi
560
561 %pre common-core
562 # enable plugins
563 if [ -f %{_sysconfdir}/my.cnf ]; then
564 perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
565 perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
566 fi
567
568 %files
569 %doc README.urpmi
570 %{_initrddir}/mysqld
571 %_sysconfdir/tmpfiles.d/mysql.conf
572 /lib/systemd/system/mysqld.service
573 %{_sbindir}/mysqld-prepare-db-dir
574 %{_sbindir}/mysqld-wait-ready
575 %dir %{_libdir}/mysql/plugin
576 %{_libdir}/mysql/plugin/adt_null.so
577 %{_libdir}/mysql/plugin/auth_socket.so
578 %{_libdir}/mysql/plugin/auth_test_plugin.so
579 %{_libdir}/mysql/plugin/dialog.so
580 %{_libdir}/mysql/plugin/dialog_examples.so
581 %{_libdir}/mysql/plugin/ha_archive.so
582 %{_libdir}/mysql/plugin/ha_blackhole.so
583 %{_libdir}/mysql/plugin/ha_federated.so
584 %{_libdir}/mysql/plugin/ha_federatedx.so
585 %{_libdir}/mysql/plugin/ha_innodb.so
586 %{_libdir}/mysql/plugin/ha_oqgraph.so
587 %{_libdir}/mysql/plugin/ha_sphinx.so
588 %{_libdir}/mysql/plugin/mypluglib.so
589 %{_libdir}/mysql/plugin/mysql_clear_password.so
590 %{_libdir}/mysql/plugin/qa_auth_client.so
591 %{_libdir}/mysql/plugin/qa_auth_interface.so
592 %{_libdir}/mysql/plugin/qa_auth_server.so
593 %{_libdir}/mysql/plugin/semisync_master.so
594 %{_libdir}/mysql/plugin/semisync_slave.so
595
596 %files client
597 %config(noreplace) %{_sysconfdir}/mysqlaccess.conf
598 %{_bindir}/msql2mysql
599 %{_bindir}/mysql
600 %{_bindir}/mysqlaccess
601 %{_bindir}/mysqladmin
602 %{_bindir}/mysqlanalyze
603 %{_bindir}/mysqlbinlog
604 %{_bindir}/mysqlcheck
605 %{_bindir}/mysqldump
606 %{_bindir}/mysqldumpslow
607 %{_bindir}/mysql_find_rows
608 %{_bindir}/mysqlimport
609 %{_bindir}/mysqloptimize
610 %{_bindir}/mysqlrepair
611 %{_bindir}/mysqlshow
612 %{_bindir}/mysqlslap
613 %{_bindir}/mysql_waitpid
614 %{_mandir}/man1/msql2mysql.1*
615 %{_mandir}/man1/myisam_ftdump.1*
616 %{_mandir}/man1/mysql.1*
617 %{_mandir}/man1/mysqlaccess.1*
618 %{_mandir}/man1/mysqladmin.1*
619 %{_mandir}/man1/mysqlbinlog.1*
620 %{_mandir}/man1/mysqlcheck.1*
621 %{_mandir}/man1/mysqldump.1*
622 %{_mandir}/man1/mysqldumpslow.1*
623 %{_mandir}/man1/mysql_find_rows.1*
624 %{_mandir}/man1/mysqlimport.1*
625 %{_mandir}/man1/mysqlshow.1*
626 %{_mandir}/man1/mysql_waitpid.1*
627
628 %files bench
629 %doc build/sql-bench/README
630 %{_bindir}/my_safe_process
631 %{_bindir}/mysql_client_test
632 %{_bindir}/mysql_client_test_embedded
633 %{_bindir}/mysqltest_embedded
634 %{_datadir}/mysql/sql-bench
635 %attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test
636 %{_mandir}/man1/mysql-stress-test.pl.1*
637 %{_mandir}/man1/mysql-test-run.pl.1*
638 %{_mandir}/man1/mysql_client_test.1*
639 %{_mandir}/man1/mysql_client_test_embedded.1*
640 %{_mandir}/man1/mysqltest.1*
641 %{_mandir}/man1/mysqltest_embedded.1*
642
643 %files core
644 %{_sbindir}/mysqld
645
646 %files common-core
647 %config(noreplace) %{_sysconfdir}/my.cnf
648 %dir %{_datadir}/mysql
649 %{_datadir}/mysql/english
650 %{_datadir}/mysql/charsets
651
652 %files common
653 %doc README COPYING
654 %config(noreplace) %{_sysconfdir}/sysconfig/mysqld
655 %{_bindir}/aria_chk
656 %{_bindir}/aria_dump_log
657 %{_bindir}/aria_ftdump
658 %{_bindir}/aria_pack
659 %{_bindir}/aria_read_log
660 %{_bindir}/innochecksum
661 %{_bindir}/myisamchk
662 %{_bindir}/myisam_ftdump
663 %{_bindir}/myisamlog
664 %{_bindir}/myisampack
665 %{_bindir}/my_print_defaults
666 %{_bindir}/mysqlbug
667 %{_bindir}/mysql_convert_table_format
668 %{_bindir}/mysqld_multi
669 %{_bindir}/mysqld_safe
670 %{_bindir}/mysql_fix_extensions
671 %{_bindir}/mysqlhotcopy
672 %{_bindir}/mysql_install_db
673 %{_bindir}/mysql_secure_installation
674 %{_bindir}/mysql_setpermission
675 %{_bindir}/mysqltest
676 %{_bindir}/mysql_tzinfo_to_sql
677 %{_bindir}/mysql_upgrade
678 %{_bindir}/mysql_zap
679 %{_bindir}/perror
680 %{_bindir}/replace
681 %{_bindir}/resolveip
682 %{_bindir}/resolve_stack_dump
683 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql
684 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/mysql
685 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/test
686 %attr(0755,%{muser},%{muser}) %dir %{_var}/run/mysqld
687 %attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
688 %{_datadir}/mysql/*.cnf
689 %{_datadir}/mysql/fill_help_tables.sql
690 %{_datadir}/mysql/mysql_system_tables.sql
691 %{_datadir}/mysql/mysql_system_tables_data.sql
692 %{_datadir}/mysql/mysql_test_data_timezone.sql
693 %{_datadir}/mysql/errmsg-utf8.txt
694 %{_datadir}/mysql/czech
695 %{_datadir}/mysql/danish
696 %{_datadir}/mysql/dutch
697 %{_datadir}/mysql/estonian
698 %{_datadir}/mysql/french
699 %{_datadir}/mysql/german
700 %{_datadir}/mysql/greek
701 %{_datadir}/mysql/hungarian
702 %{_datadir}/mysql/italian
703 %{_datadir}/mysql/japanese
704 %{_datadir}/mysql/korean
705 %{_datadir}/mysql/norwegian
706 %{_datadir}/mysql/norwegian-ny
707 %{_datadir}/mysql/polish
708 %{_datadir}/mysql/portuguese
709 %{_datadir}/mysql/romanian
710 %{_datadir}/mysql/russian
711 %{_datadir}/mysql/serbian
712 %{_datadir}/mysql/slovak
713 %{_datadir}/mysql/spanish
714 %{_datadir}/mysql/swedish
715 %{_datadir}/mysql/ukrainian
716 %{_mandir}/man1/innochecksum.1*
717 %{_mandir}/man1/myisamchk.1*
718 %{_mandir}/man1/myisamlog.1*
719 %{_mandir}/man1/myisampack.1*
720 %{_mandir}/man1/my_print_defaults.1*
721 %{_mandir}/man1/mysqlbug.1*
722 %{_mandir}/man1/mysql_convert_table_format.1*
723 %{_mandir}/man1/mysqld_multi.1*
724 %{_mandir}/man1/mysqld_safe.1*
725 %{_mandir}/man1/mysql_fix_extensions.1*
726 %{_mandir}/man1/mysql_fix_privilege_tables.1*
727 %{_mandir}/man1/mysqlhotcopy.1*
728 %{_mandir}/man1/mysql_install_db.1*
729 %{_mandir}/man1/mysqlman.1*
730 %{_mandir}/man1/mysql_secure_installation.1*
731 %{_mandir}/man1/mysql.server.1*
732 %{_mandir}/man1/mysql_setpermission.1*
733 %{_mandir}/man1/mysqlslap.1*
734 %{_mandir}/man1/mysql_tzinfo_to_sql.1*
735 %{_mandir}/man1/mysql_upgrade.1*
736 %{_mandir}/man1/mysql_zap.1*
737 %{_mandir}/man1/ndbd_redo_log_reader.1*
738 %{_mandir}/man1/perror.1*
739 %{_mandir}/man1/replace.1*
740 %{_mandir}/man1/resolveip.1*
741 %{_mandir}/man1/resolve_stack_dump.1*
742 %{_mandir}/man8/mysqld.8*
743 %{_mandir}/man8/mysqlmanager.8*
744 %{_mandir}/man8/ndbd.8*
745 %{_mandir}/man8/ndbmtd.8*
746
747 %files -n %{libname}
748 %{_libdir}/libmysqlclient.so.%{major}*
749 # not sure about this one...
750
751 %files -n %{libmariadbservices}
752 %{_libdir}/libmysqlservices.so
753
754 %files -n %{develname}
755 %doc INSTALL-SOURCE
756 %multiarch %{multiarch_bindir}/mysql_config
757 %{_bindir}/mysql_config
758 %{_libdir}/libmysqlclient_r.so
759 %{_libdir}/libmysqlclient.so
760 %dir %{_includedir}/mysql
761 %dir %{_includedir}/mysql/psi
762 %{_includedir}/mysql/*.h
763 %{_includedir}/mysql/psi/*.h
764 %multiarch %{multiarch_includedir}/mysql/my_config.h
765 %{_mandir}/man1/comp_err.1*
766 %{_mandir}/man1/mysql_config.1*
767 %{_datadir}/aclocal/mysql.m4
768
769 %files -n %{libmariadbembedded}
770 %doc README COPYING
771 %{_libdir}/libmysqld.so.%{libmariadbembedded_major}*
772
773 %files -n %{libmariadbembedded_devel}
774 %{_libdir}/libmysqld.so
775 %{_bindir}/mysql_client_test_embedded
776 %{_bindir}/mysqltest_embedded
777 %{_mandir}/man1/mysql_client_test_embedded.1*
778 %{_mandir}/man1/mysqltest_embedded.1*

  ViewVC Help
Powered by ViewVC 1.1.30