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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30