/[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 188246 - (hide annotations) (download)
Tue Dec 27 21:00:54 2011 UTC (12 years, 3 months ago) by alien
File size: 28843 byte(s)
- Update to newer revision
- Split off obsolete packages
- Split off extra packages
- Split off feedback storage engine
- Remove upstreamed patches

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 188246 %define bzrrev 3189.20111226
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 188246 Release: %mkrel 0.bzr%{bzrrev}.6
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     # filed upstream: https://bugs.launchpad.net/maria/+bug/886378
80     Patch6: mariadb-5.5-chain-certs.patch
81     Patch7: mariadb-5.5-versioning.patch
82     Patch8: mariadb-5.5-dubious-exports.patch
83     # filed upstream: https://bugs.launchpad.net/maria/+bug/886476
84     Patch9: mariadb-5.5-disable-test.patch
85     # filed upstream: https://bugs.launchpad.net/maria/+bug/886479
86     Patch10: mariadb-5.5-plugin-bool.patch
87     Patch12: mysql-openssl-test.patch
88     # filed upstream: https://bugs.launchpad.net/maria/+bug/886484
89     Patch13: mariadb-5.5-mysqld-nowatch.patch
90    
91     # mandriva patches
92     Patch101: mariadb-5.5-logrotate.patch
93     Patch102: mariadb-5.5-initscript.patch
94     Patch103: mariadb-5.5-mysql_upgrade-exit-status.patch
95     # unsure if still required
96     #Patch105: mysql-5.1.35-test-variables-big.patch
97     Patch106: mariadb-5.5-hotcopy.patch
98     Patch107: mariadb-5.5-mysql_install_db-quiet.patch
99    
100     # mageia patches
101     # (ahmad) add patch to fix some header files location (hint from Mandriva)
102     # filed upstream: https://bugs.launchpad.net/maria/+bug/886550
103     Patch110: mariadb-5.5-fix-headers-location.patch
104 alien 182898 # fix oqgraph typecast -- alien
105     Patch111: mariadb-5.5-fix-typecast-oqgraph.patch
106 alien 188038 # fix typeinfo of the handler class for rtti build -- alien
107     Patch113: mariadb-5.5-oqgraph-typeinfo.patch
108 alien 166284
109     Requires(post): rpm-helper
110     Requires(preun): rpm-helper
111     Requires(pre): rpm-helper
112     Requires(postun): rpm-helper
113     Requires(post): %{name}-common = %{version}-%{release}
114     Requires(preun): %{name}-common = %{version}-%{release}
115     Requires(post): %{name}-client = %{version}-%{release}
116     Requires(preun): %{name}-client = %{version}-%{release}
117     Requires(postun): %{name}-common = %{version}-%{release}
118     Requires(postun): %{name}-client = %{version}-%{release}
119     Requires: %{name}-common = %{version}-%{release}
120     Requires: %{name}-core = %{version}-%{release}
121     Requires: %{name}-client = %{version}-%{release}
122 alien 182848 Provides: mysql = %{version}-%{release}
123     Obsoletes: mysql < 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    
282     %package -n %{libmariadbservices}
283     Summary: Shared libraries
284     Group: System/Libraries
285 alien 183054 Provides: %{libmysqlservices} = %{version}-%{release}
286     Obsoletes: %{libmysqlservices} < 5.5.18
287 alien 166284
288     %description -n %{libmariadbservices}
289     The libmariadbservices library provides access to the available services and
290     dynamic plugins now must be linked against this library
291     (use the -lmysqlservices flag).
292    
293     %package -n %{develname}
294     Summary: Development header files and libraries
295     Group: Development/Other
296     Requires(post): %{libname} >= %{version}-%{release}
297     Requires(preun): %{libname} >= %{version}-%{release}
298     Requires(post): %{name}-common >= %{version}-%{release}
299     Requires(preun): %{name}-common >= %{version}-%{release}
300     Requires(post): %{name}-client >= %{version}-%{release}
301     Requires(preun): %{name}-client >= %{version}-%{release}
302     Requires: %{libname} = %{version}-%{release}
303     Requires: %{libmariadbservices} = %{version}-%{release}
304     Requires: %{name}-common >= %{version}-%{release}
305     Requires: %{name}-client >= %{version}-%{release}
306     Provides: %{name}-devel = %{version}-%{release}
307     Provides: %{libname}-devel = %{version}-%{release}
308 alien 183005 Obsoletes: %{libname}-devel < 5.5.18
309 alien 166284 Obsoletes: %{old_staticdevelname} < 5.5.10
310 alien 183054 Provides: %{mysql_develname} = %{version}-%{release}
311     Obsoletes: %{mysql_develname} < 5.5.18
312 fwang 182925 Provides: mysql-devel = %{version}-%{release}
313 alien 166284
314     %description -n %{develname}
315     This package contains the development header files and libraries necessary to
316     develop MariaDB client applications.
317    
318     %package -n %{libmariadbembedded}
319     Summary: MariaDB as an embeddable library
320     Group: System/Libraries
321     Provides: %{name}-embedded = %{version}-%{release}
322     Obsoletes: %{name}-embedded < 5.5.10-6
323 alien 183054 Provides: %{libmysqlembedded} = %{version}-%{release}
324     Obsoletes: %{libmysqlembedded} < 5.5.18
325 alien 166284
326     %description -n %{libmariadbembedded}
327     MariaDB is a multi-user, multi-threaded SQL database server. This
328     package contains a version of the MariaDB server that can be embedded
329     into a client application instead of running as a separate process.
330    
331     The API is identical for the embedded MariaDB version and the client/server
332     version.
333    
334     %package -n %{libmariadbembedded_devel}
335     Summary: Development files for MySQL as an embeddable library
336     Group: Development/Other
337     Provides: %{name}-embedded-devel = %{version}-%{release}
338 fwang 182925 Obsoletes: %{name}-embedded-devel < 5.5.10-6
339 alien 166284 Requires: %{libmariadbembedded} = %{version}-%{release}
340     Requires: %{name}-devel = %{version}-%{release}
341 alien 183054 Provides: %{libmysqlembedded_devel} = %{version}-%{release}
342     Obsoletes: %{libmysqlembedded_devel} < 5.5.18
343 fwang 182925 Provides: mysql-embedded-devel = %{version}-%{release}
344 alien 166284
345     %description -n %{libmariadbembedded_devel}
346     MariaDB is a multi-user, multi-threaded SQL database server. This
347     package contains files needed for developing and testing with
348     the embedded version of the MariaDB server.
349    
350     The API is identical for the embedded MariaDB version and the client/server
351     version.
352    
353     %prep
354 alien 182848 %setup -q
355 alien 166284 %apply_patches
356    
357     mkdir -p Mageia
358     cp %{SOURCE2} Mageia/mysqld.sysconfig
359     cp %{SOURCE3} Mageia/my.cnf
360    
361     # lib64 fix
362     perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf
363    
364     # antiborker
365     perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/*
366     perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/*
367     perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/*
368     perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/*
369     perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db*
370    
371     # this may be part of the problems with mysql-test
372     # http://bugs.mysql.com/bug.php?id=52223
373     #perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl
374     #perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl
375    
376     # workaround for upstream bug #56342
377     rm -f mysql-test/t/ssl_8k_key-master.opt
378    
379     # upstream has fallen down badly on symbol versioning, do it ourselves
380     cp %{SOURCE4} libmysql/libmysql.version
381    
382     %build
383     %serverbuild
384     export CFLAGS="${CFLAGS:-%{optflags}}"
385     export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
386     export FFLAGS="${FFLAGS:-%{optflags}}"
387    
388     %cmake \
389     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
390     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
391     -DINSTALL_SBINDIR=sbin \
392     -DMYSQL_DATADIR=/var/lib/mysql \
393     -DSYSCONFDIR=%{_sysconfdir} \
394     -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \
395     -DINSTALL_MANDIR=share/man \
396     -DINSTALL_SHAREDIR=share/mysql \
397     -DINSTALL_LIBDIR=%{_lib} \
398     -DINSTALL_INCLUDEDIR=include/mysql \
399     -DINSTALL_INFODIR=share/info \
400     -DINSTALL_MYSQLDATADIR=/var/lib/mysql \
401     -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
402     -DINSTALL_SQLBENCHDIR=share/mysql \
403     -DINSTALL_SUPPORTFILESDIR=share/mysql \
404     -DINSTALL_MYSQLSHAREDIR=share/mysql \
405     -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
406     -DWITH_READLINE=0 \
407     -DWITH_LIBEDIT=0 \
408     -DWITH_LIBWRAP=1 \
409     -DWITH_SSL=system \
410     -DWITH_ZLIB=system \
411     -DWITH_PIC=1 \
412     -DMYSQL_TCP_PORT=3306 \
413     -DEXTRA_CHARSETS=all \
414     -DENABLED_LOCAL_INFILE=1 \
415     -DENABLE_DTRACE=1 \
416     -DWITH_EMBEDDED_SERVER=1 \
417     -DMYSQL_USER=%{muser} \
418     %if %{build_debug}
419     -DWITH_DEBUG=1 \
420     %else
421     -DWITH_DEBUG=0 \
422     %endif
423     -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
424     -DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \
425     -DWITHOUT_DAEMON_EXAMPLE=1 \
426 alien 168615 -DWITH_PLUGIN_PBXT=1 \
427 alien 166284 -DFEATURE_SET="community" \
428 fwang 182925 -DCOMPILATION_COMMENT="%{_vendor} - MariaDB Community Edition (GPL)"
429 alien 166284
430     cp ../libmysql/libmysql.version libmysql/libmysql.version
431    
432     %make
433    
434     %install
435     rm -rf %{buildroot}
436    
437     # don't fiddle with the initscript!
438     export DONT_GPRINTIFY=1
439    
440     %if %{build_debug}
441     export DONT_STRIP=1
442     %endif
443    
444     install -d %{buildroot}%{_sysconfdir}/sysconfig
445     install -d %{buildroot}%{_initrddir}
446     install -d %{buildroot}%{_var}/run/mysqld
447     install -d %{buildroot}%{_var}/log/mysqld
448     install -d %{buildroot}/var/lib/mysql/{mysql,test}
449    
450     %makeinstall_std -C build
451    
452     # install init scripts
453     install -m0755 build/support-files/mysql.server %{buildroot}%{_initrddir}/mysqld
454    
455     # install configuration files
456     install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
457     install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
458    
459     mkdir -p %{buildroot}/etc/tmpfiles.d
460     install -m 0644 %{SOURCE10} %{buildroot}/etc/tmpfiles.d/mysql.conf
461     mkdir -p %{buildroot}/lib/systemd/system
462     install -m 644 %{SOURCE11} %{buildroot}/lib/systemd/system
463     install -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir
464     install -m 755 %{SOURCE13} %{buildroot}%{_sbindir}/mysqld-wait-ready
465    
466     # bork
467     mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/
468     chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf
469     mv %{buildroot}%{_prefix}/scripts/mysql_install_db %{buildroot}%{_bindir}/
470     mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
471    
472     pushd %{buildroot}%{_bindir}
473     ln -sf mysqlcheck mysqlrepair
474     ln -sf mysqlcheck mysqlanalyze
475     ln -sf mysqlcheck mysqloptimize
476     popd
477    
478     # nuke -Wl,--as-needed from the mysql_config file
479     perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
480    
481     # cmake generates some completely wacko references to -lprobes_mysql when
482     # building with dtrace support. Haven't found where to shut that off,
483     # so resort to this blunt instrument. While at it, let's not reference
484     # libmysqlclient_r anymore either.
485     sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
486     %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
487     cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
488     chmod 755 %{buildroot}%{_bindir}/mysql_config
489     install -m 0755 -d %{buildroot}/var/lib/mysql
490    
491 alien 185578 # Remove libmysqld.a, + hardlink libmysqld.so.%{libmysqlembedded_major} so that it's provided
492 alien 166284 rm -f %{buildroot}%{_libdir}/libmysqld.a
493 alien 185578 ln %{buildroot}%{_libdir}/libmysqld.so.%{major} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor}
494 alien 182848 ln -s libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}
495 alien 166284
496     # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
497     # but that really doesn't work (wrong soname in particular). We'll keep
498     # just the devel libmysqlclient_r.so link, so that rebuilding without any
499     # source change is enough to get rid of dependency on libmysqlclient_r.
500     rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
501     ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
502    
503     # remove static libs
504     rm -f %{buildroot}%{_libdir}/libmysqlclient.a
505     rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a
506    
507     # mysql-test includes one executable that doesn't belong under /usr/share,
508     # so move it and provide a symlink
509     mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
510     ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
511    
512 alien 182848 # mysql client statically built against a local embedded library, pretty useless
513     rm -f %{buildroot}%{_bindir}/mysql_embedded
514    
515 alien 188246 # this command enables plugins, but needs ini file + configuration in my.cnf before executing
516     # and oh yeah, mysql must be stopped... => useless
517 alien 182848 rm -f %{buildroot}%{_bindir}/mysql_plugin
518     rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
519    
520 alien 188246 # remove more useless plugins
521     rm -f %{buildroot}%{_libdir}/mysql/plugin/auth_test_plugin.so
522     rm -f %{buildroot}%{_libdir}/mysql/plugin/dialog_examples.so
523    
524 alien 166284 # house cleaning
525     rm -rf %{buildroot}%{_datadir}/info
526     rm -f %{buildroot}%{_bindir}/client_test
527     rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
528     rm -f %{buildroot}%{_bindir}/make_win_src_distribution
529     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
530     rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
531     rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
532     rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
533     rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
534     rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
535     rm -f %{buildroot}%{_datadir}/mysql/mysql.server
536     rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
537     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
538     rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
539     rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
540     rm -f %{buildroot}%{_datadir}/mysql/magic
541    
542     # no idea how to fix this
543     rm -rf %{buildroot}%{_prefix}/data
544     rm -rf %{buildroot}%{_prefix}/docs
545     rm -rf %{buildroot}%{_prefix}/scripts
546     rm -f %{buildroot}%{_prefix}/COPYING
547     rm -f %{buildroot}%{_prefix}/INSTALL-BINARY
548     rm -f %{buildroot}%{_prefix}/README
549    
550     %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
551     %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
552    
553     cat > README.urpmi <<EOF
554    
555     NOTE: MariaDB is installed without root password, it is recommended to set the
556     root password as soon as possible:
557    
558     mysqladmin password 'new_password'
559    
560     The initscript used to start mysql has been reverted to use the one shipped
561     by MariaDB. This means the following changes:
562    
563     * The generation of the initial system mysql database is now done when mysql
564     is started from the initscript and only if the /var/lib/mysql/mysql
565     directory is empty (mysql_install_db). Previousely this was quite hidden and
566     silently done at (rpm) install time. As a consequence to this change you may
567     have to perform some manual tasks to upgrade the mysql system database and
568     such. So, doing something like this might help you:
569    
570 alien 185578 /etc/init.d/mysqld stop
571 alien 166284 TMPDIR=/var/tmp mysql_install_db
572     mysql_upgrade
573    
574     The cluster functionalities (ndb) has been deactivated and will be removed in
575     future mysql versions. Oracle has a new product named mysql-cluster that
576     replaces the cluster functionalities.
577    
578     The mysql-common-core package ships with a default /etc/my.cnf file that is
579     based on the my-medium.cnf file that comes with the source code.
580     EOF
581    
582     ################################################################################
583     # run the tests
584     %if %{build_test}
585     # disable failing tests
586     echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def
587     echo "type_enum : Unstable test case" >> mysql-test/t/disabled.def
588     echo "windows : For MS Windows only" >> mysql-test/t/disabled.def
589     pushd build/mysql-test
590     export LANG=C
591     export LC_ALL=C
592     export LANGUAGE=C
593     perl ./mysql-test-run.pl \
594     --mtr-build-thread="$((${RANDOM} % 100))" \
595     --skip-ndb \
596     --timer \
597     --retry=0 \
598     --ssl \
599     --mysqld=--binlog-format=mixed \
600     --testcase-timeout=60 \
601     --suite-timeout=120 || false
602     popd
603     %endif
604    
605     %pre
606     # enable plugins
607     if [ -f %{_sysconfdir}/my.cnf ]; then
608     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
609     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
610     fi
611    
612     %pre common
613     # delete the mysql group if no mysql user is found, before adding the user
614     if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
615     %{_sbindir}/groupdel %{muser} 2> /dev/null || :
616     fi
617    
618     %_pre_useradd %{muser} /var/lib/mysql /bin/bash
619    
620     %post
621     %_post_service mysqld
622    
623     %preun
624     %_preun_service mysqld
625    
626     %postun
627     if [ "$1" = "0" ]; then
628     if [ -f /var/lock/subsys/mysqld ]; then
629     %{_initrddir}/mysqld restart > /dev/null 2>/dev/null || :
630     fi
631     fi
632    
633     %pre common-core
634     # enable plugins
635     if [ -f %{_sysconfdir}/my.cnf ]; then
636     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
637     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
638     fi
639    
640     %files
641     %doc README.urpmi
642     %{_initrddir}/mysqld
643     %_sysconfdir/tmpfiles.d/mysql.conf
644     /lib/systemd/system/mysqld.service
645     %{_sbindir}/mysqld-prepare-db-dir
646     %{_sbindir}/mysqld-wait-ready
647     %dir %{_libdir}/mysql/plugin
648 alien 188246 # authentication plugins
649 alien 166284 %{_libdir}/mysql/plugin/auth_socket.so
650     %{_libdir}/mysql/plugin/dialog.so
651 alien 188246 %{_libdir}/mysql/plugin/mysql_clear_password.so
652     # replication plugins
653     %{_libdir}/mysql/plugin/semisync_master.so
654     %{_libdir}/mysql/plugin/semisync_slave.so
655     # storage engines
656 alien 166284 %{_libdir}/mysql/plugin/ha_archive.so
657     %{_libdir}/mysql/plugin/ha_blackhole.so
658     %{_libdir}/mysql/plugin/ha_federatedx.so
659 alien 188246 # upstream describes this as "junk"
660     %{_libdir}/mysql/plugin/adt_null.so
661 alien 166284 %{_libdir}/mysql/plugin/mypluglib.so
662     %{_libdir}/mysql/plugin/qa_auth_client.so
663     %{_libdir}/mysql/plugin/qa_auth_interface.so
664     %{_libdir}/mysql/plugin/qa_auth_server.so
665 alien 188246 # example plugins, not usefull at all, removing
666     #%{_libdir}/mysql/plugin/auth_test_plugin.so
667     #%{_libdir}/mysql/plugin/dialog_examples.so
668 alien 166284
669 alien 188246 %files obsolete
670     %{_libdir}/mysql/plugin/ha_innodb.so
671     %{_libdir}/mysql/plugin/ha_federated.so
672    
673     %files feedback
674     %{_libdir}/mysql/plugin/feedback.so
675    
676     %files extra
677     %{_libdir}/mysql/plugin/ha_oqgraph.so
678     %{_libdir}/mysql/plugin/ha_sphinx.so
679    
680 alien 166284 %files client
681     %config(noreplace) %{_sysconfdir}/mysqlaccess.conf
682     %{_bindir}/msql2mysql
683     %{_bindir}/mysql
684     %{_bindir}/mysqlaccess
685     %{_bindir}/mysqladmin
686     %{_bindir}/mysqlanalyze
687     %{_bindir}/mysqlbinlog
688     %{_bindir}/mysqlcheck
689     %{_bindir}/mysqldump
690     %{_bindir}/mysqldumpslow
691     %{_bindir}/mysql_find_rows
692     %{_bindir}/mysqlimport
693     %{_bindir}/mysqloptimize
694     %{_bindir}/mysqlrepair
695     %{_bindir}/mysqlshow
696     %{_bindir}/mysqlslap
697     %{_bindir}/mysql_waitpid
698     %{_mandir}/man1/msql2mysql.1*
699     %{_mandir}/man1/myisam_ftdump.1*
700     %{_mandir}/man1/mysql.1*
701     %{_mandir}/man1/mysqlaccess.1*
702     %{_mandir}/man1/mysqladmin.1*
703     %{_mandir}/man1/mysqlbinlog.1*
704     %{_mandir}/man1/mysqlcheck.1*
705     %{_mandir}/man1/mysqldump.1*
706     %{_mandir}/man1/mysqldumpslow.1*
707     %{_mandir}/man1/mysql_find_rows.1*
708     %{_mandir}/man1/mysqlimport.1*
709     %{_mandir}/man1/mysqlshow.1*
710     %{_mandir}/man1/mysql_waitpid.1*
711    
712     %files bench
713     %doc build/sql-bench/README
714     %{_bindir}/my_safe_process
715     %{_bindir}/mysql_client_test
716     %{_bindir}/mysql_client_test_embedded
717     %{_bindir}/mysqltest_embedded
718     %{_datadir}/mysql/sql-bench
719     %attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test
720     %{_mandir}/man1/mysql-stress-test.pl.1*
721     %{_mandir}/man1/mysql-test-run.pl.1*
722     %{_mandir}/man1/mysql_client_test.1*
723     %{_mandir}/man1/mysql_client_test_embedded.1*
724     %{_mandir}/man1/mysqltest.1*
725     %{_mandir}/man1/mysqltest_embedded.1*
726    
727     %files core
728     %{_sbindir}/mysqld
729    
730     %files common-core
731     %config(noreplace) %{_sysconfdir}/my.cnf
732     %dir %{_datadir}/mysql
733     %{_datadir}/mysql/english
734     %{_datadir}/mysql/charsets
735    
736     %files common
737     %doc README COPYING
738     %config(noreplace) %{_sysconfdir}/sysconfig/mysqld
739     %{_bindir}/aria_chk
740     %{_bindir}/aria_dump_log
741     %{_bindir}/aria_ftdump
742     %{_bindir}/aria_pack
743     %{_bindir}/aria_read_log
744     %{_bindir}/innochecksum
745     %{_bindir}/myisamchk
746     %{_bindir}/myisam_ftdump
747     %{_bindir}/myisamlog
748     %{_bindir}/myisampack
749     %{_bindir}/my_print_defaults
750     %{_bindir}/mysqlbug
751     %{_bindir}/mysql_convert_table_format
752     %{_bindir}/mysqld_multi
753     %{_bindir}/mysqld_safe
754     %{_bindir}/mysql_fix_extensions
755     %{_bindir}/mysqlhotcopy
756     %{_bindir}/mysql_install_db
757     %{_bindir}/mysql_secure_installation
758     %{_bindir}/mysql_setpermission
759     %{_bindir}/mysqltest
760     %{_bindir}/mysql_tzinfo_to_sql
761     %{_bindir}/mysql_upgrade
762     %{_bindir}/mysql_zap
763     %{_bindir}/perror
764     %{_bindir}/replace
765     %{_bindir}/resolveip
766     %{_bindir}/resolve_stack_dump
767     %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql
768     %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/mysql
769     %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/test
770     %attr(0755,%{muser},%{muser}) %dir %{_var}/run/mysqld
771     %attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
772     %{_datadir}/mysql/*.cnf
773     %{_datadir}/mysql/fill_help_tables.sql
774     %{_datadir}/mysql/mysql_system_tables.sql
775     %{_datadir}/mysql/mysql_system_tables_data.sql
776     %{_datadir}/mysql/mysql_test_data_timezone.sql
777     %{_datadir}/mysql/errmsg-utf8.txt
778     %{_datadir}/mysql/czech
779     %{_datadir}/mysql/danish
780     %{_datadir}/mysql/dutch
781     %{_datadir}/mysql/estonian
782     %{_datadir}/mysql/french
783     %{_datadir}/mysql/german
784     %{_datadir}/mysql/greek
785     %{_datadir}/mysql/hungarian
786     %{_datadir}/mysql/italian
787     %{_datadir}/mysql/japanese
788     %{_datadir}/mysql/korean
789     %{_datadir}/mysql/norwegian
790     %{_datadir}/mysql/norwegian-ny
791     %{_datadir}/mysql/polish
792     %{_datadir}/mysql/portuguese
793     %{_datadir}/mysql/romanian
794     %{_datadir}/mysql/russian
795     %{_datadir}/mysql/serbian
796     %{_datadir}/mysql/slovak
797     %{_datadir}/mysql/spanish
798     %{_datadir}/mysql/swedish
799     %{_datadir}/mysql/ukrainian
800     %{_mandir}/man1/innochecksum.1*
801     %{_mandir}/man1/myisamchk.1*
802     %{_mandir}/man1/myisamlog.1*
803     %{_mandir}/man1/myisampack.1*
804     %{_mandir}/man1/my_print_defaults.1*
805     %{_mandir}/man1/mysqlbug.1*
806     %{_mandir}/man1/mysql_convert_table_format.1*
807     %{_mandir}/man1/mysqld_multi.1*
808     %{_mandir}/man1/mysqld_safe.1*
809     %{_mandir}/man1/mysql_fix_extensions.1*
810     %{_mandir}/man1/mysql_fix_privilege_tables.1*
811     %{_mandir}/man1/mysqlhotcopy.1*
812     %{_mandir}/man1/mysql_install_db.1*
813     %{_mandir}/man1/mysqlman.1*
814     %{_mandir}/man1/mysql_secure_installation.1*
815     %{_mandir}/man1/mysql.server.1*
816     %{_mandir}/man1/mysql_setpermission.1*
817     %{_mandir}/man1/mysqlslap.1*
818     %{_mandir}/man1/mysql_tzinfo_to_sql.1*
819     %{_mandir}/man1/mysql_upgrade.1*
820     %{_mandir}/man1/mysql_zap.1*
821     %{_mandir}/man1/ndbd_redo_log_reader.1*
822     %{_mandir}/man1/perror.1*
823     %{_mandir}/man1/replace.1*
824     %{_mandir}/man1/resolveip.1*
825     %{_mandir}/man1/resolve_stack_dump.1*
826     %{_mandir}/man8/mysqld.8*
827     %{_mandir}/man8/mysqlmanager.8*
828     %{_mandir}/man8/ndbd.8*
829     %{_mandir}/man8/ndbmtd.8*
830    
831     %files -n %{libname}
832     %{_libdir}/libmysqlclient.so.%{major}*
833    
834     %files -n %{libmariadbservices}
835     %{_libdir}/libmysqlservices.so
836    
837     %files -n %{develname}
838     %doc INSTALL-SOURCE
839     %multiarch %{multiarch_bindir}/mysql_config
840     %{_bindir}/mysql_config
841     %{_libdir}/libmysqlclient_r.so
842     %{_libdir}/libmysqlclient.so
843     %dir %{_includedir}/mysql
844     %dir %{_includedir}/mysql/psi
845     %{_includedir}/mysql/*.h
846     %{_includedir}/mysql/psi/*.h
847     %multiarch %{multiarch_includedir}/mysql/my_config.h
848     %{_mandir}/man1/comp_err.1*
849     %{_mandir}/man1/mysql_config.1*
850     %{_datadir}/aclocal/mysql.m4
851    
852     %files -n %{libmariadbembedded}
853     %doc README COPYING
854 alien 182848 %{_libdir}/libmysqld.so.%{major}
855     %{_libdir}/libmysqld.so.%{libmysqlembedded_major}*
856 alien 166284
857     %files -n %{libmariadbembedded_devel}
858     %{_libdir}/libmysqld.so
859     %{_bindir}/mysql_client_test_embedded
860     %{_bindir}/mysqltest_embedded
861     %{_mandir}/man1/mysql_client_test_embedded.1*
862     %{_mandir}/man1/mysqltest_embedded.1*

  ViewVC Help
Powered by ViewVC 1.1.30