/[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 192139 - (hide annotations) (download)
Fri Jan 6 01:14:57 2012 UTC (12 years, 3 months ago) by alien
File size: 29009 byte(s)
- Switch Federated to FederatedX storage engine
- Make the root password warning clearer
- add a virtual package so that mysql can be searched
- use static bundled readline5
- remove patches fixed by upstream
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     Patch106: mariadb-5.5-hotcopy.patch
94     Patch107: mariadb-5.5-mysql_install_db-quiet.patch
95    
96     # mageia patches
97     # (ahmad) add patch to fix some header files location (hint from Mandriva)
98     # filed upstream: https://bugs.launchpad.net/maria/+bug/886550
99     Patch110: mariadb-5.5-fix-headers-location.patch
100 alien 182898 # fix oqgraph typecast -- alien
101     Patch111: mariadb-5.5-fix-typecast-oqgraph.patch
102 alien 192139 # make bundled readline static (will be in upstream) -- alien
103     Patch112: mariadb-5.5-use-bundled-readline.patch
104 alien 166284
105     Requires(post): rpm-helper
106     Requires(preun): rpm-helper
107     Requires(pre): rpm-helper
108     Requires(postun): rpm-helper
109     Requires(post): %{name}-common = %{version}-%{release}
110     Requires(preun): %{name}-common = %{version}-%{release}
111     Requires(post): %{name}-client = %{version}-%{release}
112     Requires(preun): %{name}-client = %{version}-%{release}
113     Requires(postun): %{name}-common = %{version}-%{release}
114     Requires(postun): %{name}-client = %{version}-%{release}
115     Requires: %{name}-common = %{version}-%{release}
116     Requires: %{name}-core = %{version}-%{release}
117     Requires: %{name}-client = %{version}-%{release}
118 alien 182848 Provides: mysql = %{version}-%{release}
119     Obsoletes: mysql < 5.5.18
120 alien 188299 Obsoletes: %{libmariadbservices} < 5.5.18-0.3194.20111227.1
121     Obsoletes: %{libmysqlservices} < 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: systemtap
136     BuildRequires: tetex
137     BuildRequires: texinfo
138     BuildRequires: xfs-devel
139     BuildRequires: zlib-devel
140 alien 166362 BuildRequires: boost-devel
141 alien 166284 BuildConflicts: edit-devel
142    
143     %description
144     The MariaDB software delivers a very fast, multi-threaded, multi-user, and
145     robust SQL (Structured Query Language) database server. MariaDB Server is
146     intended for mission-critical, heavy-load production systems as well as for
147     embedding into mass-deployed software.
148    
149     The mariadb server is compiled with the following storage engines:
150    
151     - Aria Storage Engine
152     - Archive Storage Engine
153     - Blackhole Storage Engine
154     - CSV Storage Engine
155 alien 188246 - FederatedX Storage Engine (Federated replacement)
156 alien 166284 - Heap Storage Engine
157     - MyISAM Storage Engine
158     - MyISAMMRG Storage Engine
159     - Partition Storage Engine
160     - Perfschema Storage Engine
161 alien 188246 - XtraDB Storage Engine (InnoDB replacement)
162    
163     The following extra storage engines are provided by the mariadb-extra package
164    
165     - OQGraph Storage Engine
166 alien 166284 - Sphinx Storage Engine
167    
168 alien 188246 The feedback storage engine is provided by the mariadb-feedback package
169 alien 166284
170 alien 188246 - Feedback Storage Engine
171    
172     The following storage engines are provided in the mariadb-obsolete package
173    
174     - Federated Storage Engine
175     - InnoDB Storage Engine
176    
177 alien 192139 %package -n mysql-MariaDB
178     Summary: MariaDB mysql replacement
179     Group: System/Servers
180     Requires: %{name}
181    
182     %description -n mysql-MariaDB
183     MariaDB is a complete MySQL drop-in replacement with additional fixes and
184     storage engines.
185    
186     This package is used as a transitional virtual package, which requires
187     MariaDB so that people who used to use mysql can find it nicely.
188    
189 alien 188246 %package feedback
190     Summary: MariaDB feedback storage engine
191     Group: System/Servers
192     Requires: %{name}-common-core >= %{version}-%{release}
193    
194     %description feedback
195     MariaDB feedback storage engine submits feedback about your mariadb server.
196     Results can be seen on http://mariadb.org/feedback_plugin/ .
197    
198     %package extra
199     Summary: MariaDB extra storage engines
200     Group: System/Servers
201     Requires: %{name}-common-core >= %{version}-%{release}
202    
203     %description extra
204     MariaDB oqgraph and sphinx storage engines.
205    
206     %package obsolete
207     Summary: MariaDB obsolete storage engines
208     Group: System/Servers
209     Requires: %{name}-common-core >= %{version}-%{release}
210     Conflicts: mysql-core < 5.5.18
211    
212     %description obsolete
213     MariaDB obsolete storage engines. InnoDB and Federated are being replaced by
214     XtraDB and FederatedX storage engines. These obsolete storage engines are
215     provided in case you need the vanilla mysql storage engines.
216    
217 alien 166284 %package core
218     Summary: Server core binary
219     Group: System/Servers
220     Requires: %{name}-common-core >= %{version}-%{release}
221 alien 182848 Provides: mysql-core = %{version}-%{release}
222     Obsoletes: mysql-core < 5.5.18
223 alien 166284
224     %description core
225     Core mysqld server binary. For a full MariaDB database server, install
226     package 'mariadb'.
227    
228     %package common-core
229     Summary: Common files required by core binary
230     Group: System/Servers
231 alien 182848 Provides: mysql-common-core = %{version}-%{release}
232     Obsoletes: mysql-common-core < 5.5.18
233 alien 166284
234     %description common-core
235     Common files minimally required by mysqld server binary.
236    
237     %package common
238     Summary: Common files
239     Group: System/Servers
240     Requires(post): rpm-helper
241     Requires(preun): rpm-helper
242     Requires(pre): rpm-helper
243     Requires(postun): rpm-helper
244     Requires(post): %{name}-client >= %{version}-%{release}
245     Requires(preun): %{name}-client >= %{version}-%{release}
246     Requires: %{name}-client >= %{version}-%{release}
247     Requires: %{name}-common-core >= %{version}-%{release}
248 alien 182848 Provides: mysql-common = %{version}-%{release}
249     Obsoletes: mysql-common < 5.5.18
250 alien 166284
251     %description common
252     Common files for the MariaDB database server.
253    
254     %package client
255     Summary: Client
256     Group: Databases
257     Requires(post): %{libname} >= %{version}-%{release}
258     Requires(preun): %{libname} >= %{version}-%{release}
259     Requires: %{libname} >= %{version}-%{release}
260 alien 182848 Provides: mysql-client = %{version}-%{release}
261     Obsoletes: mysql-client < 5.5.18
262 alien 166284
263     %description client
264     This package contains the standard MariaDB clients.
265    
266     %package bench
267     Summary: Benchmarks and test system
268     Group: System/Servers
269     Requires(post): %{name}-client >= %{version}-%{release}
270     Requires(preun): %{name}-client >= %{version}-%{release}
271     Requires: %{name}-client >= %{version}-%{release}
272 alien 182848 Provides: mysql-bench = %{version}-%{release}
273     Obsoletes: mysql-bench < 5.5.18
274 alien 166284
275     %description bench
276     This package contains MariaDB benchmark scripts and data.
277    
278     %package -n %{libname}
279     Summary: Shared libraries
280     Group: System/Libraries
281     Provides: %{name}-shared-libs = %{version}-%{release}
282     Provides: %{name}-shared = %{version}-%{release}
283 alien 183054 Provides: %{mysql_libname} = %{version}-%{release}
284     Obsoletes: %{mysql_libname} < 5.5.18
285 alien 166284
286     %description -n %{libname}
287     This package contains the shared libraries (*.so*) which certain languages and
288     applications need to dynamically load and use MariaDB.
289    
290     %package -n %{develname}
291     Summary: Development header files and libraries
292     Group: Development/Other
293     Requires(post): %{libname} >= %{version}-%{release}
294     Requires(preun): %{libname} >= %{version}-%{release}
295     Requires(post): %{name}-common >= %{version}-%{release}
296     Requires(preun): %{name}-common >= %{version}-%{release}
297     Requires(post): %{name}-client >= %{version}-%{release}
298     Requires(preun): %{name}-client >= %{version}-%{release}
299     Requires: %{libname} = %{version}-%{release}
300     Requires: %{name}-common >= %{version}-%{release}
301     Requires: %{name}-client >= %{version}-%{release}
302     Provides: %{name}-devel = %{version}-%{release}
303     Provides: %{libname}-devel = %{version}-%{release}
304 alien 183005 Obsoletes: %{libname}-devel < 5.5.18
305 alien 166284 Obsoletes: %{old_staticdevelname} < 5.5.10
306 alien 183054 Provides: %{mysql_develname} = %{version}-%{release}
307     Obsoletes: %{mysql_develname} < 5.5.18
308 fwang 182925 Provides: mysql-devel = %{version}-%{release}
309 alien 166284
310     %description -n %{develname}
311     This package contains the development header files and libraries necessary to
312     develop MariaDB client applications.
313    
314     %package -n %{libmariadbembedded}
315     Summary: MariaDB as an embeddable library
316     Group: System/Libraries
317     Provides: %{name}-embedded = %{version}-%{release}
318     Obsoletes: %{name}-embedded < 5.5.10-6
319 alien 183054 Provides: %{libmysqlembedded} = %{version}-%{release}
320     Obsoletes: %{libmysqlembedded} < 5.5.18
321 alien 166284
322     %description -n %{libmariadbembedded}
323     MariaDB is a multi-user, multi-threaded SQL database server. This
324     package contains a version of the MariaDB server that can be embedded
325     into a client application instead of running as a separate process.
326    
327     The API is identical for the embedded MariaDB version and the client/server
328     version.
329    
330     %package -n %{libmariadbembedded_devel}
331     Summary: Development files for MySQL as an embeddable library
332     Group: Development/Other
333     Provides: %{name}-embedded-devel = %{version}-%{release}
334 fwang 182925 Obsoletes: %{name}-embedded-devel < 5.5.10-6
335 alien 166284 Requires: %{libmariadbembedded} = %{version}-%{release}
336     Requires: %{name}-devel = %{version}-%{release}
337 alien 183054 Provides: %{libmysqlembedded_devel} = %{version}-%{release}
338     Obsoletes: %{libmysqlembedded_devel} < 5.5.18
339 fwang 182925 Provides: mysql-embedded-devel = %{version}-%{release}
340 alien 166284
341     %description -n %{libmariadbembedded_devel}
342     MariaDB is a multi-user, multi-threaded SQL database server. This
343     package contains files needed for developing and testing with
344     the embedded version of the MariaDB server.
345    
346     The API is identical for the embedded MariaDB version and the client/server
347     version.
348    
349     %prep
350 alien 182848 %setup -q
351 alien 166284 %apply_patches
352    
353     mkdir -p Mageia
354     cp %{SOURCE2} Mageia/mysqld.sysconfig
355     cp %{SOURCE3} Mageia/my.cnf
356    
357     # lib64 fix
358     perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf
359    
360     # antiborker
361     perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/*
362     perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/*
363     perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/*
364     perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/*
365     perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db*
366    
367     # this may be part of the problems with mysql-test
368     # http://bugs.mysql.com/bug.php?id=52223
369     #perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl
370     #perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl
371    
372     # workaround for upstream bug #56342
373     rm -f mysql-test/t/ssl_8k_key-master.opt
374    
375     # upstream has fallen down badly on symbol versioning, do it ourselves
376     cp %{SOURCE4} libmysql/libmysql.version
377    
378     %build
379     %serverbuild
380     export CFLAGS="${CFLAGS:-%{optflags}}"
381     export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
382     export FFLAGS="${FFLAGS:-%{optflags}}"
383    
384     %cmake \
385     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
386     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
387     -DINSTALL_SBINDIR=sbin \
388     -DMYSQL_DATADIR=/var/lib/mysql \
389     -DSYSCONFDIR=%{_sysconfdir} \
390     -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \
391     -DINSTALL_MANDIR=share/man \
392     -DINSTALL_SHAREDIR=share/mysql \
393     -DINSTALL_LIBDIR=%{_lib} \
394     -DINSTALL_INCLUDEDIR=include/mysql \
395     -DINSTALL_INFODIR=share/info \
396     -DINSTALL_MYSQLDATADIR=/var/lib/mysql \
397     -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
398     -DINSTALL_SQLBENCHDIR=share/mysql \
399     -DINSTALL_SUPPORTFILESDIR=share/mysql \
400     -DINSTALL_MYSQLSHAREDIR=share/mysql \
401     -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
402     -DWITH_READLINE=0 \
403     -DWITH_LIBEDIT=0 \
404     -DWITH_LIBWRAP=1 \
405     -DWITH_SSL=system \
406     -DWITH_ZLIB=system \
407     -DWITH_PIC=1 \
408     -DMYSQL_TCP_PORT=3306 \
409     -DEXTRA_CHARSETS=all \
410     -DENABLED_LOCAL_INFILE=1 \
411     -DENABLE_DTRACE=1 \
412     -DWITH_EMBEDDED_SERVER=1 \
413     -DMYSQL_USER=%{muser} \
414     %if %{build_debug}
415     -DWITH_DEBUG=1 \
416     %else
417     -DWITH_DEBUG=0 \
418     %endif
419     -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
420     -DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \
421     -DWITHOUT_DAEMON_EXAMPLE=1 \
422 alien 168615 -DWITH_PLUGIN_PBXT=1 \
423 alien 166284 -DFEATURE_SET="community" \
424 fwang 182925 -DCOMPILATION_COMMENT="%{_vendor} - MariaDB Community Edition (GPL)"
425 alien 166284
426     cp ../libmysql/libmysql.version libmysql/libmysql.version
427    
428     %make
429    
430     %install
431     rm -rf %{buildroot}
432    
433     # don't fiddle with the initscript!
434     export DONT_GPRINTIFY=1
435    
436     %if %{build_debug}
437     export DONT_STRIP=1
438     %endif
439    
440     install -d %{buildroot}%{_sysconfdir}/sysconfig
441     install -d %{buildroot}%{_initrddir}
442     install -d %{buildroot}%{_var}/run/mysqld
443     install -d %{buildroot}%{_var}/log/mysqld
444     install -d %{buildroot}/var/lib/mysql/{mysql,test}
445    
446     %makeinstall_std -C build
447    
448     # install init scripts
449     install -m0755 build/support-files/mysql.server %{buildroot}%{_initrddir}/mysqld
450    
451     # install configuration files
452     install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
453     install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
454    
455     mkdir -p %{buildroot}/etc/tmpfiles.d
456     install -m 0644 %{SOURCE10} %{buildroot}/etc/tmpfiles.d/mysql.conf
457     mkdir -p %{buildroot}/lib/systemd/system
458     install -m 644 %{SOURCE11} %{buildroot}/lib/systemd/system
459     install -m 755 %{SOURCE12} %{buildroot}%{_sbindir}/mysqld-prepare-db-dir
460     install -m 755 %{SOURCE13} %{buildroot}%{_sbindir}/mysqld-wait-ready
461    
462     # bork
463     mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/
464     chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf
465     mv %{buildroot}%{_prefix}/scripts/mysql_install_db %{buildroot}%{_bindir}/
466     mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
467    
468     pushd %{buildroot}%{_bindir}
469     ln -sf mysqlcheck mysqlrepair
470     ln -sf mysqlcheck mysqlanalyze
471     ln -sf mysqlcheck mysqloptimize
472     popd
473    
474     # nuke -Wl,--as-needed from the mysql_config file
475     perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
476    
477     # cmake generates some completely wacko references to -lprobes_mysql when
478     # building with dtrace support. Haven't found where to shut that off,
479     # so resort to this blunt instrument. While at it, let's not reference
480     # libmysqlclient_r anymore either.
481     sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
482     %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
483     cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
484     chmod 755 %{buildroot}%{_bindir}/mysql_config
485     install -m 0755 -d %{buildroot}/var/lib/mysql
486    
487 alien 185578 # Remove libmysqld.a, + hardlink libmysqld.so.%{libmysqlembedded_major} so that it's provided
488 alien 166284 rm -f %{buildroot}%{_libdir}/libmysqld.a
489 alien 185578 ln %{buildroot}%{_libdir}/libmysqld.so.%{major} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor}
490 alien 182848 ln -s libmysqld.so.%{libmysqlembedded_major}.%{libmysqlembedded_minor} %{buildroot}%{_libdir}/libmysqld.so.%{libmysqlembedded_major}
491 alien 166284
492     # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
493     # but that really doesn't work (wrong soname in particular). We'll keep
494     # just the devel libmysqlclient_r.so link, so that rebuilding without any
495     # source change is enough to get rid of dependency on libmysqlclient_r.
496     rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
497     ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
498    
499     # remove static libs
500     rm -f %{buildroot}%{_libdir}/libmysqlclient.a
501     rm -f %{buildroot}%{_libdir}/libmysqlclient_r.a
502    
503     # mysql-test includes one executable that doesn't belong under /usr/share,
504     # so move it and provide a symlink
505     mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
506     ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
507    
508 alien 182848 # mysql client statically built against a local embedded library, pretty useless
509     rm -f %{buildroot}%{_bindir}/mysql_embedded
510    
511 alien 188246 # this command enables plugins, but needs ini file + configuration in my.cnf before executing
512     # and oh yeah, mysql must be stopped... => useless
513 alien 182848 rm -f %{buildroot}%{_bindir}/mysql_plugin
514     rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
515    
516 alien 188246 # remove more useless plugins
517     rm -f %{buildroot}%{_libdir}/mysql/plugin/auth_test_plugin.so
518     rm -f %{buildroot}%{_libdir}/mysql/plugin/dialog_examples.so
519    
520 alien 166284 # house cleaning
521     rm -rf %{buildroot}%{_datadir}/info
522     rm -f %{buildroot}%{_bindir}/client_test
523     rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
524     rm -f %{buildroot}%{_bindir}/make_win_src_distribution
525     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
526     rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
527     rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
528     rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
529     rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
530     rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
531     rm -f %{buildroot}%{_datadir}/mysql/mysql.server
532     rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
533     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
534     rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
535     rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
536     rm -f %{buildroot}%{_datadir}/mysql/magic
537    
538     # no idea how to fix this
539     rm -rf %{buildroot}%{_prefix}/data
540     rm -rf %{buildroot}%{_prefix}/docs
541     rm -rf %{buildroot}%{_prefix}/scripts
542     rm -f %{buildroot}%{_prefix}/COPYING
543     rm -f %{buildroot}%{_prefix}/INSTALL-BINARY
544     rm -f %{buildroot}%{_prefix}/README
545    
546     %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
547     %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
548    
549     cat > README.urpmi <<EOF
550    
551     NOTE: MariaDB is installed without root password, it is recommended to set the
552 alien 192139 root password with the following command as soon as possible:
553 alien 166284
554 alien 192139 mysqladmin password
555 alien 166284
556     The initscript used to start mysql has been reverted to use the one shipped
557     by MariaDB. This means the following changes:
558    
559     * The generation of the initial system mysql database is now done when mysql
560     is started from the initscript and only if the /var/lib/mysql/mysql
561     directory is empty (mysql_install_db). Previousely this was quite hidden and
562     silently done at (rpm) install time. As a consequence to this change you may
563     have to perform some manual tasks to upgrade the mysql system database and
564     such. So, doing something like this might help you:
565    
566 alien 185578 /etc/init.d/mysqld stop
567 alien 166284 TMPDIR=/var/tmp mysql_install_db
568     mysql_upgrade
569    
570     The cluster functionalities (ndb) has been deactivated and will be removed in
571     future mysql versions. Oracle has a new product named mysql-cluster that
572     replaces the cluster functionalities.
573    
574     The mysql-common-core package ships with a default /etc/my.cnf file that is
575     based on the my-medium.cnf file that comes with the source code.
576     EOF
577    
578     ################################################################################
579     # run the tests
580     %if %{build_test}
581     # disable failing tests
582     echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def
583     echo "type_enum : Unstable test case" >> mysql-test/t/disabled.def
584     echo "windows : For MS Windows only" >> mysql-test/t/disabled.def
585     pushd build/mysql-test
586     export LANG=C
587     export LC_ALL=C
588     export LANGUAGE=C
589     perl ./mysql-test-run.pl \
590     --mtr-build-thread="$((${RANDOM} % 100))" \
591     --skip-ndb \
592     --timer \
593     --retry=0 \
594     --ssl \
595     --mysqld=--binlog-format=mixed \
596     --testcase-timeout=60 \
597     --suite-timeout=120 || false
598     popd
599     %endif
600    
601     %pre
602     # enable plugins
603     if [ -f %{_sysconfdir}/my.cnf ]; then
604     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
605     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
606 alien 192139 # switch to federatedx provider
607     perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
608 alien 166284 fi
609    
610     %pre common
611     # delete the mysql group if no mysql user is found, before adding the user
612     if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
613     %{_sbindir}/groupdel %{muser} 2> /dev/null || :
614     fi
615    
616     %_pre_useradd %{muser} /var/lib/mysql /bin/bash
617    
618     %post
619     %_post_service mysqld
620    
621     %preun
622     %_preun_service mysqld
623    
624     %postun
625     if [ "$1" = "0" ]; then
626     if [ -f /var/lock/subsys/mysqld ]; then
627     %{_initrddir}/mysqld restart > /dev/null 2>/dev/null || :
628     fi
629     fi
630    
631     %pre common-core
632     # enable plugins
633     if [ -f %{_sysconfdir}/my.cnf ]; then
634     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
635     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
636 alien 192139 # switch to federatedx provider
637     perl -pi -e "s|;ha_federated\.so$|;ha_federatedx\.so|g" %{_sysconfdir}/my.cnf
638 alien 166284 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 %{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 alien 188299 # mysqlservices library is static, because it doesn't contain any code
849     # itself, and is meant to be statically linked to all plugins.
850     %{_libdir}/libmysqlservices.a
851 alien 166284
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