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

  ViewVC Help
Powered by ViewVC 1.1.30