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

  ViewVC Help
Powered by ViewVC 1.1.30