/[packages]/updates/1/mysql/current/SPECS/mysql.spec
ViewVC logotype

Annotation of /updates/1/mysql/current/SPECS/mysql.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77201 - (hide annotations) (download)
Fri Mar 25 01:52:29 2011 UTC (13 years, 1 month ago) by mikala
Original Path: cauldron/mysql/current/SPECS/mysql.spec
File size: 28550 byte(s)
Really fix conflicts (thks to ahmad)
1 ahmad 6918 %define Werror_cflags %nil
2     %define _disable_ld_no_undefined 1
3    
4 dmorgan 76590 %define _with_systemd 0
5    
6 ahmad 6918 #(ie. use with rpm --rebuild):
7     #
8     # --with debug Compile with debugging code
9     #
10     # enable build with debugging code: will _not_ strip away any debugging code,
11     # will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to
12     # configure.
13    
14     %define build_debug 0
15     %define build_test 0
16    
17     # commandline overrides:
18     # rpm -ba|--rebuild --with 'xxx'
19     %{?_with_debug: %{expand: %%define build_debug 1}}
20     %{?_with_test: %{expand: %%define build_test 1}}
21     %{?_without_test: %global build_test 0}
22    
23     %if %{build_debug}
24     # disable build root strip policy
25     %define __spec_install_post %{_libdir}/rpm/brp-compress || :
26    
27     # This gives extra debuggin and huge binaries
28     %{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')}
29     %endif
30    
31     %if %{build_debug}
32     %define build_debug 1
33     %endif
34    
35     %if %{build_test}
36     %define build_test 1
37     %endif
38    
39     %define _requires_exceptions perl(this)
40    
41 dmorgan 76591 %define major 18
42 ahmad 6918 %define libname %mklibname mysql %{major}
43 mikala 77175 %define libmysqlservices %mklibname mysqlservices
44 ahmad 6918 %define develname %mklibname -d mysql
45 ahmad 75795 %define old_staticdevelname %mklibname -d -s mysql
46 ahmad 6918
47     %define muser mysql
48    
49     Summary: A very fast and reliable SQL database engine
50     Name: mysql
51 dmorgan 76590 Version: 5.5.10
52 mikala 77201 Release: %mkrel 5
53 ahmad 6918 Group: Databases
54     License: GPL
55     URL: http://www.mysql.com/
56 dmorgan 76590 # The upstream tarball includes non-free documentation that we cannot ship.
57     # To remove the non-free documentation, run this script after downloading
58     # the tarball into the current directory:
59     # ./generate-tarball.sh $VERSION
60     Source0: mysql-%{version}-nodocs.tar.gz
61     Source1: generate-tarball.sh
62 ahmad 6918 Source2: mysqld.sysconfig
63     Source3: my.cnf
64     Source4: libmysql.version
65 dmorgan 76590 Source10: mysql.tmpfiles.d
66 ahmad 6918 # fedora patches
67     Patch0: mysql-errno.patch
68     Patch1: mysql-strmov.patch
69     Patch2: mysql-install-test.patch
70     Patch3: mysql-expired-certs.patch
71     Patch4: mysql-stack-guard.patch
72     Patch5: mysql-chain-certs.patch
73     Patch6: mysql-versioning.patch
74     Patch7: mysql-dubious-exports.patch
75     Patch8: mysql-disable-test.patch
76 ahmad 29144 Patch9: mysql-home.patch
77     Patch10: mysql-embedded-crash.patch
78    
79 ahmad 6918 # mandriva patches
80     Patch100: mysql-mysqldumpslow_no_basedir.diff
81     Patch101: mysql-logrotate.diff
82     Patch102: mysql-initscript.diff
83     Patch103: mysql_upgrade-exit-status.patch
84     Patch104: mysql-5.1.31-shebang.patch
85     Patch105: mysql-5.1.35-test-variables-big.patch
86     Patch106: mysql-5.1.36-hotcopy.patch
87     Patch107: mysql-install_db-quiet.patch
88 rtp 29549 Patch109: mysql_valist_fix.patch
89 dmorgan 76590
90     # mageia patches
91 ahmad 57950 # (ahmad) add patch to fix some header files location (hint from Mandriva)
92     Patch110: mysql-5.5.9-fix-headers-location.patch
93 ahmad 6918 Requires(post): rpm-helper
94     Requires(preun): rpm-helper
95     Requires(pre): rpm-helper
96     Requires(postun): rpm-helper
97     Requires(post): mysql-common = %{version}-%{release}
98     Requires(preun): mysql-common = %{version}-%{release}
99     Requires(post): mysql-client = %{version}-%{release}
100     Requires(preun): mysql-client = %{version}-%{release}
101     Requires(postun): mysql-common = %{version}-%{release}
102     Requires(postun): mysql-client = %{version}-%{release}
103     Requires: mysql-common = %{version}-%{release}
104     Requires: mysql-core = %{version}-%{release}
105     Requires: mysql-client = %{version}-%{release}
106 dmorgan 76590 %if %_with_systemd
107     # This is for /etc/tmpfiles.d
108     Requires: systemd-units
109     %endif
110 ahmad 6918 BuildRequires: bison
111     BuildRequires: cmake
112     BuildRequires: dos2unix
113     BuildRequires: doxygen
114     BuildRequires: glibc-devel
115     BuildRequires: libaio-devel
116     BuildRequires: libstdc++-devel
117     BuildRequires: libtermcap-devel
118     BuildRequires: multiarch-utils >= 1.0.3
119     BuildRequires: ncurses-devel
120     BuildRequires: openssl-devel
121     BuildRequires: python
122     BuildRequires: readline-devel
123     BuildRequires: systemtap
124     BuildRequires: tetex
125     BuildRequires: texinfo
126     BuildRequires: xfs-devel
127     BuildRequires: zlib-devel
128     BuildConflicts: edit-devel
129     Provides: msqlormysql mysqlserver
130     Provides: mysql-max = %{version}-%{release}
131     Obsoletes: mysql-max < 5.1.43
132     BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
133    
134     %description
135     The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and
136     robust SQL (Structured Query Language) database server. MySQL Server is
137     intended for mission-critical, heavy-load production systems as well as for
138     embedding into mass-deployed software. MySQL is a trademark of MySQL AB.
139    
140     The mysql server is compiled with the following storage engines:
141    
142     - InnoDB Storage Engine
143     - Archive Storage Engine
144     - CSV Storage Engine
145     - Federated Storage Engine
146     - User Defined Functions (UDFs).
147     - Blackhole Storage Engine
148     - Partition Storage Engine
149     - Perfschema Storage Engine
150    
151     %package core
152     Summary: Server core binary
153     Group: System/Servers
154     Conflicts: mysql < 5.1.39-3
155     Conflicts: mysql-max < 5.1.43
156     Requires: mysql-common-core >= %{version}-%{release}
157    
158     %description core
159     Core mysqld server binary. For a full MySQL database server, install
160     package 'mysql'.
161    
162     %package common-core
163     Summary: Common files required by core binary
164     Group: System/Servers
165     Conflicts: mysql-common < 5.1.43-1
166    
167     %description common-core
168     Common files minimally required by mysqld server binary.
169    
170     %package common
171     Summary: Common files
172     Group: System/Servers
173     Requires(post): rpm-helper
174     Requires(preun): rpm-helper
175     Requires(pre): rpm-helper
176     Requires(postun): rpm-helper
177     Requires(post): mysql-client >= %{version}-%{release}
178     Requires(preun): mysql-client >= %{version}-%{release}
179     Requires: mysql-client >= %{version}-%{release}
180     Requires: mysql-common-core >= %{version}-%{release}
181    
182     %description common
183     Common files for the MySQL(TM) database server.
184    
185     %package client
186     Summary: Client
187     Group: Databases
188     Requires(post): %{libname} >= %{version}-%{release}
189     Requires(preun): %{libname} >= %{version}-%{release}
190     Requires: %{libname} >= %{version}-%{release}
191    
192     %description client
193     This package contains the standard MySQL clients.
194    
195     %package bench
196     Summary: Benchmarks and test system
197     Group: System/Servers
198     Requires(post): mysql-client >= %{version}-%{release}
199     Requires(preun): mysql-client >= %{version}-%{release}
200     Requires: mysql-client >= %{version}-%{release}
201     Requires: perl
202    
203     %description bench
204     This package contains MySQL benchmark scripts and data.
205    
206     %package -n %{libname}
207     Summary: Shared libraries
208     Group: System/Libraries
209     Provides: mysql-shared-libs = %{version}-%{release}
210     Provides: mysql-shared = %{version}-%{release}
211    
212     %description -n %{libname}
213     This package contains the shared libraries (*.so*) which certain languages and
214     applications need to dynamically load and use MySQL.
215    
216 mikala 77175
217     %package -n %{libmysqlservices}
218     Summary: Shared libraries
219     Group: System/Libraries
220 mikala 77201 Conflicts: %{mklibname %name 16} <= 5.5.9-6
221 mikala 77175 %description -n %{libmysqlservices}
222     The libmysqlservices library provides access to the available services and
223     dynamic plugins now must be linked against this library
224     (use the -lmysqlservices flag).
225    
226 ahmad 6918 %package -n %{develname}
227     Summary: Development header files and libraries
228     Group: Development/Other
229     Requires(post): %{libname} >= %{version}-%{release}
230     Requires(preun): %{libname} >= %{version}-%{release}
231     Requires(post): mysql-common >= %{version}-%{release}
232     Requires(preun): mysql-common >= %{version}-%{release}
233     Requires(post): mysql-client >= %{version}-%{release}
234     Requires(preun): mysql-client >= %{version}-%{release}
235     Requires: %{libname} = %{version}-%{release}
236 mikala 77175 Requires: %{libmysqlservices} = %{version}-%{release}
237 ahmad 6918 Requires: mysql-common >= %{version}-%{release}
238     Requires: mysql-client >= %{version}-%{release}
239     Provides: mysql-devel = %{version}-%{release}
240     Provides: %{libname}-devel = %{version}-%{release}
241     Obsoletes: %{libname}-devel
242 ahmad 75795 Obsoletes: %{old_staticdevelname} <= 5.5.9-5
243 dmorgan 75676 # Todo: 21/03/2011 (Balcaen John)
244     # We should drop thoses conflict & versionnate libmysqlservices.so & put it
245     # in his own subpackage.
246 ahmad 6918 Conflicts: %{mklibname mysql 12 -d}
247     Conflicts: %{mklibname mysql 14 -d}
248     Conflicts: %{mklibname mysql 15 -d}
249 dmorgan 77044 Conflicts: %{mklibname mysql 16 -d}
250 ahmad 6918
251     %description -n %{develname}
252     This package contains the development header files and libraries necessary to
253     develop MySQL client applications.
254    
255 dmorgan 75676 %package embedded
256     Summary: MySQL as an embeddable library
257 mikala 76997 Group: System/Libraries
258 ahmad 6918
259 dmorgan 75676 %description embedded
260     MySQL is a multi-user, multi-threaded SQL database server. This
261     package contains a version of the MySQL server that can be embedded
262     into a client application instead of running as a separate process.
263 ahmad 6918
264     The API is identical for the embedded MySQL version and the client/server
265     version.
266    
267 dmorgan 75676 %package embedded-devel
268     Summary: Development files for MySQL as an embeddable library
269 mikala 76997 Group: Development/Other
270 dmorgan 75676 Requires: %{name}-embedded = %{version}-%{release}
271     Requires: %{name}-devel = %{version}-%{release}
272 ahmad 6918
273 dmorgan 75676 %description embedded-devel
274     MySQL is a multi-user, multi-threaded SQL database server. This
275     package contains files needed for developing and testing with
276     the embedded version of the MySQL server.
277    
278     The API is identical for the embedded MySQL version and the client/server
279     version.
280 ahmad 6918
281     %prep
282    
283     %setup -q -n mysql-%{version}
284    
285     # fedora patches
286     %patch0 -p1 -b .errno
287     %patch1 -p1 -b .strmov
288     %patch2 -p1 -b .install-test
289     %patch3 -p1 -b .expired-certs
290     %patch4 -p1 -b .stack-guard
291     %patch5 -p1 -b .chain-certs
292     %patch6 -p1 -b .versioning
293     %patch7 -p1 -b .dubious-exports
294     %patch8 -p1 -b .disable-test
295 ahmad 29144 %patch9 -p1 -b .mysql-home
296     %patch10 -p1 -b .mysql-embedded-crash
297 ahmad 6918
298     # mandriva patches
299     %patch100 -p0 -b .mysqldumpslow_no_basedir
300     %patch101 -p0 -b .logrotate
301     %patch102 -p0 -b .initscript
302     %patch103 -p1 -b .mysql_upgrade-exit-status
303     %patch104 -p1 -b .shebang
304     %patch105 -p0 -b .test-variables-big
305     %patch106 -p0 -b .hotcopy
306     %patch107 -p0 -b .install_db-quiet
307 rtp 29549 %patch109 -p1 -b .va_list_arm
308 ahmad 57950 %patch110 -p1 -b .headers-location
309 rtp 29549
310 ahmad 16644 mkdir -p Mageia
311     cp %{SOURCE2} Mageia/mysqld.sysconfig
312     cp %{SOURCE3} Mageia/my.cnf
313 ahmad 6918
314     # lib64 fix
315 ahmad 16644 perl -pi -e "s|/usr/lib/|%{_libdir}/|g" Mageia/my.cnf
316 ahmad 6918
317     # antiborker
318     perl -pi -e "s|\@bindir\@|%{_bindir}|g" support-files/* scripts/*
319     perl -pi -e "s|\@sbindir\@|%{_sbindir}|g" support-files/* scripts/*
320     perl -pi -e "s|\@libexecdir\@|%{_sbindir}|g" support-files/* scripts/*
321     perl -pi -e "s|\@localstatedir\@|/var/lib/mysql|g" support-files/* scripts/*
322     perl -pi -e "s|^basedir=.*|basedir=%{_prefix}|g" support-files/* scripts/mysql_install_db*
323    
324     # this may be part of the problems with mysql-test
325     # http://bugs.mysql.com/bug.php?id=52223
326     #perl -pi -e "s|basedir/lib\b|basedir/%{_lib}\b|g" mysql-test/mysql-test-run.pl
327     #perl -pi -e "s|basedir/lib/|basedir/%{_lib}/|g" mysql-test/mysql-test-run.pl
328    
329     # workaround for upstream bug #56342
330     rm -f mysql-test/t/ssl_8k_key-master.opt
331    
332     # upstream has fallen down badly on symbol versioning, do it ourselves
333     cp %{SOURCE4} libmysql/libmysql.version
334    
335     %build
336     %serverbuild
337     export CFLAGS="${CFLAGS:-%{optflags}}"
338     export CXXFLAGS="${CXXFLAGS:-%{optflags}}"
339     export FFLAGS="${FFLAGS:-%{optflags}}"
340    
341     %cmake \
342     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
343     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
344     -DINSTALL_SBINDIR=sbin \
345     -DMYSQL_DATADIR=/var/lib/mysql \
346     -DSYSCONFDIR=%{_sysconfdir} \
347     -DINSTALL_PLUGINDIR=%{_lib}/mysql/plugin \
348     -DINSTALL_MANDIR=share/man \
349     -DINSTALL_SHAREDIR=share/mysql \
350     -DINSTALL_LIBDIR=%{_lib} \
351     -DINSTALL_INCLUDEDIR=include/mysql \
352     -DINSTALL_INFODIR=share/info \
353     -DINSTALL_MYSQLDATADIR=/var/lib/mysql \
354     -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
355     -DINSTALL_SQLBENCHDIR=share/mysql \
356     -DINSTALL_SUPPORTFILESDIR=share/mysql \
357     -DINSTALL_MYSQLSHAREDIR=share/mysql \
358     -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
359     -DWITH_READLINE=0 \
360     -DWITH_LIBEDIT=0 \
361     -DWITH_LIBWRAP=1 \
362     -DWITH_SSL=system \
363     -DWITH_ZLIB=system \
364     -DWITH_PIC=1 \
365     -DMYSQL_TCP_PORT=3306 \
366     -DEXTRA_CHARSETS=all \
367     -DENABLED_LOCAL_INFILE=1 \
368     -DENABLE_DTRACE=1 \
369     -DWITH_EMBEDDED_SERVER=1 \
370     -DMYSQL_USER=%{muser} \
371     %if %{build_debug}
372     -DWITH_DEBUG=1 \
373     %else
374     -DWITH_DEBUG=0 \
375     %endif
376     -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
377     -DWITHOUT_NDBCLUSTER_STORAGE_ENGINE=1 \
378     -DWITHOUT_DAEMON_EXAMPLE=1 \
379     -DFEATURE_SET="community" \
380 ahmad 16644 -DCOMPILATION_COMMENT="Mageia - MySQL Community Edition (GPL)"
381 ahmad 6918
382     cp ../libmysql/libmysql.version libmysql/libmysql.version
383    
384     %make
385 dmorgan 75676 # regular build will make libmysqld.a but not libmysqld.so :-(
386     mkdir libmysqld/work
387     cd libmysqld/work
388     ar -x ../libmysqld.a
389     # these result in missing dependencies: (filed upstream as bug 59104)
390     rm -f sql_binlog.cc.o rpl_utility.cc.o
391     gcc $CFLAGS $LDFLAGS -shared -Wl,-soname,libmysqld.so.0 -o libmysqld.so.0.0.1 \
392     *.o ../../probes_mysql.o \
393     -lpthread -laio -lcrypt -lssl -lcrypto -lz -lrt -lstdc++ -ldl -lm -lc
394 ahmad 6918
395     %install
396     rm -rf %{buildroot}
397    
398     # don't fiddle with the initscript!
399     export DONT_GPRINTIFY=1
400    
401     %if %{build_debug}
402     export DONT_STRIP=1
403     %endif
404    
405     install -d %{buildroot}%{_sysconfdir}/sysconfig
406     install -d %{buildroot}%{_initrddir}
407     install -d %{buildroot}%{_var}/run/mysqld
408     install -d %{buildroot}%{_var}/log/mysqld
409     install -d %{buildroot}/var/lib/mysql/{mysql,test}
410    
411     %makeinstall_std -C build
412    
413     # install init scripts
414     install -m0755 build/support-files/mysql.server %{buildroot}%{_initrddir}/mysqld
415    
416     # install configuration files
417 ahmad 16644 install -m0644 Mageia/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
418     install -m0644 Mageia/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
419 ahmad 6918
420 dmorgan 76590 %if %_with_systemd
421     mkdir -p $RPM_BUILD_ROOT/etc/tmpfiles.d
422     install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT/etc/tmpfiles.d/mysql.conf
423     %endif
424    
425 ahmad 6918 # bork
426     mv %{buildroot}%{_bindir}/mysqlaccess.conf %{buildroot}%{_sysconfdir}/
427     chmod 644 %{buildroot}%{_sysconfdir}/mysqlaccess.conf
428     mv %{buildroot}%{_prefix}/scripts/mysql_install_db %{buildroot}%{_bindir}/
429     mv %{buildroot}%{_datadir}/mysql/aclocal %{buildroot}%{_datadir}/aclocal
430    
431     pushd %{buildroot}%{_bindir}
432     ln -sf mysqlcheck mysqlrepair
433     ln -sf mysqlcheck mysqlanalyze
434     ln -sf mysqlcheck mysqloptimize
435     popd
436    
437     # nuke -Wl,--as-needed from the mysql_config file
438     perl -pi -e "s|^ldflags=.*|ldflags=\'-rdynamic\'|g" %{buildroot}%{_bindir}/mysql_config
439    
440     # cmake generates some completely wacko references to -lprobes_mysql when
441     # building with dtrace support. Haven't found where to shut that off,
442     # so resort to this blunt instrument. While at it, let's not reference
443     # libmysqlclient_r anymore either.
444     sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
445     %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp
446     cp -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
447     chmod 755 %{buildroot}%{_bindir}/mysql_config
448 dmorgan 75141 install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql
449 ahmad 6918
450 dmorgan 75676 # Remove libmysqld.a, install libmysqld.so
451     rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmysqld.a
452     install -m 0755 build/libmysqld/work/libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/libmysqld.so.0.0.1
453     ln -s libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/libmysqld.so.0
454     ln -s libmysqld.so.0 ${RPM_BUILD_ROOT}%{_libdir}/libmysqld.so
455    
456 ahmad 6918 # libmysqlclient_r is no more. Upstream tries to replace it with symlinks
457     # but that really doesn't work (wrong soname in particular). We'll keep
458     # just the devel libmysqlclient_r.so link, so that rebuilding without any
459     # source change is enough to get rid of dependency on libmysqlclient_r.
460     rm -f %{buildroot}%{_libdir}/libmysqlclient_r.so*
461     ln -s libmysqlclient.so %{buildroot}%{_libdir}/libmysqlclient_r.so
462    
463     # mysql-test includes one executable that doesn't belong under /usr/share,
464     # so move it and provide a symlink
465     mv %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir}
466     ln -s %{_bindir}/my_safe_process %{buildroot}%{_datadir}/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
467    
468     # house cleaning
469     rm -rf %{buildroot}%{_datadir}/info
470     rm -f %{buildroot}%{_bindir}/client_test
471     rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
472     rm -f %{buildroot}%{_bindir}/make_win_src_distribution
473     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
474     rm -f %{buildroot}%{_datadir}/mysql/config.huge.ini
475     rm -f %{buildroot}%{_datadir}/mysql/config.medium.ini
476     rm -f %{buildroot}%{_datadir}/mysql/config.small.ini
477     rm -f %{buildroot}%{_datadir}/mysql/mysqld_multi.server
478     rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
479     rm -f %{buildroot}%{_datadir}/mysql/mysql.server
480     rm -f %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini
481     rm -f %{buildroot}%{_datadir}/mysql/binary-configure
482     rm -f %{buildroot}%{_mandir}/man1/make_win_bin_dist.1*
483     rm -f %{buildroot}%{_mandir}/man1/make_win_src_distribution.1*
484     rm -f %{buildroot}%{_datadir}/mysql/magic
485    
486     # no idea how to fix this
487     rm -rf %{buildroot}%{_prefix}/data
488     rm -rf %{buildroot}%{_prefix}/docs
489     rm -rf %{buildroot}%{_prefix}/scripts
490     rm -f %{buildroot}%{_prefix}/COPYING
491     rm -f %{buildroot}%{_prefix}/INSTALL-BINARY
492     rm -f %{buildroot}%{_prefix}/README
493    
494     %multiarch_binaries %{buildroot}%{_bindir}/mysql_config
495     %multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
496    
497     cat > README.urpmi <<EOF
498    
499     The initscript used to start mysql has been reverted to use the one shipped
500     by MySQL AB. This means the following changes:
501    
502     * The generation of the initial system mysql database is now done when mysql
503     is started from the initscript and only if the /var/lib/mysql/mysql
504     directory is empty (mysql_install_db). Previousely this was quite hidden and
505     silently done at (rpm) install time. As a consequence to this change you may
506     have to perform some manual tasks to upgrade the mysql system database and
507     such. So, doing something like this might help you:
508    
509     /etc/rc.d/init.d/mysqld stop
510     TMPDIR=/var/tmp mysql_install_db
511     mysql_upgrade
512    
513     The cluster functionalities (ndb) has been deactivated and will be removed in
514 ahmad 61108 future mysql versions. A new product named mysql-cluster has been added that
515     replaces the cluster functionalities.
516 ahmad 6918
517     The mysql-common-core package ships with a default /etc/my.cnf file that is
518     based on the my-medium.cnf file that comes with the source code.
519    
520     Starting from mysql-5.1.43-2 the storage engines is built as dynamically
521     loadable modules. You can either load the engines using the /etc/my.cnf file or
522     at runtime. Please look at these lines in the /etc/my.cnf file to enable
523     additional engines or disable one or more of the default ones:
524    
525     plugin_dir=%{_libdir}/mysql/plugin
526     plugin-load=ha_archive.so;ha_blackhole.so;ha_federated.so
527    
528     Starting from mysql-5.1.44-3 the html documentation and the mysql.info is not
529 ahmad 16644 shipped with the Mageia packages due to strict licensing.
530 ahmad 6918
531     EOF
532    
533     ################################################################################
534     # run the tests
535     %if %{build_test}
536     # disable failing tests
537     echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def
538     echo "type_enum : Unstable test case" >> mysql-test/t/disabled.def
539     echo "windows : For MS Windows only" >> mysql-test/t/disabled.def
540     pushd build/mysql-test
541     export LANG=C
542     export LC_ALL=C
543     export LANGUAGE=C
544     perl ./mysql-test-run.pl \
545     --mtr-build-thread="$((${RANDOM} % 100))" \
546     --skip-ndb \
547     --timer \
548     --retry=0 \
549     --ssl \
550     --mysqld=--binlog-format=mixed \
551     --testcase-timeout=60 \
552     --suite-timeout=120 || false
553     popd
554     %endif
555    
556     %pre
557     # enable plugins
558     if [ -f %{_sysconfdir}/my.cnf ]; then
559     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
560     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
561     fi
562    
563     %pre common
564     # delete the mysql group if no mysql user is found, before adding the user
565     if [ -z "`getent passwd %{muser}`" ] && ! [ -z "`getent group %{muser}`" ]; then
566     %{_sbindir}/groupdel %{muser} 2> /dev/null || :
567     fi
568    
569     %_pre_useradd %{muser} /var/lib/mysql /bin/bash
570    
571     %post common
572    
573     %post
574     # Change permissions so that the user that will run the MySQL daemon
575     # owns all needed files.
576     chown -R %{muser}:%{muser} /var/lib/mysql /var/run/mysqld /var/log/mysqld
577    
578     # make sure the /var/lib/mysql directory can be accessed
579 dmorgan 75141 chmod 755 /var/lib/mysql
580 ahmad 6918
581     %_post_service mysqld
582    
583     %preun
584     %_preun_service mysqld
585    
586     %postun
587     if [ "$1" = "0" ]; then
588     if [ -f /var/lock/subsys/mysqld ]; then
589     %{_initrddir}/mysqld restart > /dev/null 2>/dev/null || :
590     fi
591     fi
592    
593     %pre common-core
594     # enable plugins
595     if [ -f %{_sysconfdir}/my.cnf ]; then
596     perl -pi -e "s|^#plugin-load|plugin-load|g" %{_sysconfdir}/my.cnf
597     perl -pi -e "s|^#federated|federated|g" %{_sysconfdir}/my.cnf
598     fi
599    
600     %clean
601     rm -rf %{buildroot}
602    
603     %files
604     %defattr(-,root,root)
605     %doc README.urpmi
606     %attr(0755,root,root) %{_initrddir}/mysqld
607 dmorgan 76590 %if %_with_systemd
608     %_sysconfdir/tmpfiles.d/mysql.conf
609     %endif
610 ahmad 6918 %dir %{_libdir}/mysql/plugin
611     %attr(0755,root,root) %{_libdir}/mysql/plugin/adt_null.so
612     %attr(0755,root,root) %{_libdir}/mysql/plugin/auth.so
613     %attr(0755,root,root) %{_libdir}/mysql/plugin/auth_socket.so
614     %attr(0755,root,root) %{_libdir}/mysql/plugin/auth_test_plugin.so
615     %attr(0755,root,root) %{_libdir}/mysql/plugin/ha_archive.so
616     %attr(0755,root,root) %{_libdir}/mysql/plugin/ha_blackhole.so
617     %attr(0755,root,root) %{_libdir}/mysql/plugin/ha_federated.so
618     %attr(0755,root,root) %{_libdir}/mysql/plugin/mypluglib.so
619     %attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_client.so
620     %attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_interface.so
621     %attr(0755,root,root) %{_libdir}/mysql/plugin/qa_auth_server.so
622     %attr(0755,root,root) %{_libdir}/mysql/plugin/semisync_master.so
623     %attr(0755,root,root) %{_libdir}/mysql/plugin/semisync_slave.so
624    
625     %files client
626     %defattr(-,root,root)
627     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mysqlaccess.conf
628     %attr(0755,root,root) %{_bindir}/msql2mysql
629     %attr(0755,root,root) %{_bindir}/mysql
630     %attr(0755,root,root) %{_bindir}/mysqlaccess
631     %attr(0755,root,root) %{_bindir}/mysqladmin
632     %attr(0755,root,root) %{_bindir}/mysqlanalyze
633     %attr(0755,root,root) %{_bindir}/mysqlbinlog
634     %attr(0755,root,root) %{_bindir}/mysqlcheck
635     %attr(0755,root,root) %{_bindir}/mysqldump
636     %attr(0755,root,root) %{_bindir}/mysqldumpslow
637     %attr(0755,root,root) %{_bindir}/mysql_find_rows
638     %attr(0755,root,root) %{_bindir}/mysqlimport
639     %attr(0755,root,root) %{_bindir}/mysqloptimize
640     %attr(0755,root,root) %{_bindir}/mysqlrepair
641     %attr(0755,root,root) %{_bindir}/mysqlshow
642     %attr(0755,root,root) %{_bindir}/mysqlslap
643     %attr(0755,root,root) %{_bindir}/mysql_waitpid
644     %attr(0644,root,root) %{_mandir}/man1/msql2mysql.1*
645     %attr(0644,root,root) %{_mandir}/man1/myisam_ftdump.1*
646     %attr(0644,root,root) %{_mandir}/man1/mysql.1*
647     %attr(0644,root,root) %{_mandir}/man1/mysqlaccess.1*
648     %attr(0644,root,root) %{_mandir}/man1/mysqladmin.1*
649     %attr(0644,root,root) %{_mandir}/man1/mysqlbinlog.1*
650     %attr(0644,root,root) %{_mandir}/man1/mysqlcheck.1*
651     %attr(0644,root,root) %{_mandir}/man1/mysqldump.1*
652     %attr(0644,root,root) %{_mandir}/man1/mysqldumpslow.1*
653     %attr(0644,root,root) %{_mandir}/man1/mysql_find_rows.1*
654     %attr(0644,root,root) %{_mandir}/man1/mysqlimport.1*
655     %attr(0644,root,root) %{_mandir}/man1/mysqlshow.1*
656     %attr(0644,root,root) %{_mandir}/man1/mysql_waitpid.1*
657    
658     %files bench
659     %defattr(-,root,root)
660     %doc build/sql-bench/README
661     %attr(0755,root,root) %{_bindir}/my_safe_process
662     %attr(0755,root,root) %{_bindir}/mysql_client_test
663 dmorgan 75133 %attr(0755,root,root) %{_bindir}/mysql_client_test_embedded
664 dmorgan 75132 %attr(0755,root,root) %{_bindir}/mysqltest_embedded
665 ahmad 6918 %{_datadir}/mysql/sql-bench
666     %attr(-,mysql,mysql) %{_datadir}/mysql/mysql-test
667     %attr(0644,root,root) %{_mandir}/man1/mysql-stress-test.pl.1*
668     %attr(0644,root,root) %{_mandir}/man1/mysql-test-run.pl.1*
669     %attr(0644,root,root) %{_mandir}/man1/mysql_client_test.1*
670     %attr(0644,root,root) %{_mandir}/man1/mysql_client_test_embedded.1*
671     %attr(0644,root,root) %{_mandir}/man1/mysqltest.1*
672     %attr(0644,root,root) %{_mandir}/man1/mysqltest_embedded.1*
673    
674     %files core
675     %defattr(-,root,root)
676     %attr(0755,root,root) %{_sbindir}/mysqld
677    
678     %files common-core
679     %defattr(-,root,root)
680     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/my.cnf
681     %dir %{_datadir}/mysql
682     %{_datadir}/mysql/english
683     %{_datadir}/mysql/charsets
684    
685     %files common
686     %defattr(-,root,root)
687     %doc README COPYING
688     %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/mysqld
689     %attr(0755,root,root) %{_bindir}/innochecksum
690     %attr(0755,root,root) %{_bindir}/myisamchk
691     %attr(0755,root,root) %{_bindir}/myisam_ftdump
692     %attr(0755,root,root) %{_bindir}/myisamlog
693     %attr(0755,root,root) %{_bindir}/myisampack
694     %attr(0755,root,root) %{_bindir}/my_print_defaults
695     %attr(0755,root,root) %{_bindir}/mysqlbug
696     %attr(0755,root,root) %{_bindir}/mysql_convert_table_format
697     %attr(0755,root,root) %{_bindir}/mysqld_multi
698     %attr(0755,root,root) %{_bindir}/mysqld_safe
699     %attr(0755,root,root) %{_bindir}/mysql_fix_extensions
700     %attr(0755,root,root) %{_bindir}/mysqlhotcopy
701     %attr(0755,root,root) %{_bindir}/mysql_install_db
702     %attr(0755,root,root) %{_bindir}/mysql_secure_installation
703     %attr(0755,root,root) %{_bindir}/mysql_setpermission
704     %attr(0755,root,root) %{_bindir}/mysqltest
705     %attr(0755,root,root) %{_bindir}/mysql_tzinfo_to_sql
706     %attr(0755,root,root) %{_bindir}/mysql_upgrade
707     %attr(0755,root,root) %{_bindir}/mysql_zap
708     %attr(0755,root,root) %{_bindir}/perror
709     %attr(0755,root,root) %{_bindir}/replace
710     %attr(0755,root,root) %{_bindir}/resolveip
711     %attr(0755,root,root) %{_bindir}/resolve_stack_dump
712 dmorgan 75141 %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql
713     %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/mysql
714     %attr(0755,%{muser},%{muser}) %dir /var/lib/mysql/test
715 ahmad 6918 %attr(0755,%{muser},%{muser}) %dir %{_var}/run/mysqld
716     %attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
717     %{_datadir}/mysql/*.cnf
718     %{_datadir}/mysql/fill_help_tables.sql
719     %{_datadir}/mysql/mysql_system_tables.sql
720     %{_datadir}/mysql/mysql_system_tables_data.sql
721     %{_datadir}/mysql/mysql_test_data_timezone.sql
722     %{_datadir}/mysql/errmsg-utf8.txt
723     %{_datadir}/mysql/czech
724     %{_datadir}/mysql/danish
725     %{_datadir}/mysql/dutch
726     %{_datadir}/mysql/estonian
727     %{_datadir}/mysql/french
728     %{_datadir}/mysql/german
729     %{_datadir}/mysql/greek
730     %{_datadir}/mysql/hungarian
731     %{_datadir}/mysql/italian
732     %{_datadir}/mysql/japanese
733     %{_datadir}/mysql/korean
734     %{_datadir}/mysql/norwegian
735     %{_datadir}/mysql/norwegian-ny
736     %{_datadir}/mysql/polish
737     %{_datadir}/mysql/portuguese
738     %{_datadir}/mysql/romanian
739     %{_datadir}/mysql/russian
740     %{_datadir}/mysql/serbian
741     %{_datadir}/mysql/slovak
742     %{_datadir}/mysql/spanish
743     %{_datadir}/mysql/swedish
744     %{_datadir}/mysql/ukrainian
745     %attr(0644,root,root) %{_mandir}/man1/innochecksum.1*
746     %attr(0644,root,root) %{_mandir}/man1/myisamchk.1*
747     %attr(0644,root,root) %{_mandir}/man1/myisamlog.1*
748     %attr(0644,root,root) %{_mandir}/man1/myisampack.1*
749     %attr(0644,root,root) %{_mandir}/man1/my_print_defaults.1*
750     %attr(0644,root,root) %{_mandir}/man1/mysqlbug.1*
751     %attr(0644,root,root) %{_mandir}/man1/mysql_convert_table_format.1*
752     %attr(0644,root,root) %{_mandir}/man1/mysqld_multi.1*
753     %attr(0644,root,root) %{_mandir}/man1/mysqld_safe.1*
754     %attr(0644,root,root) %{_mandir}/man1/mysql_fix_extensions.1*
755     %attr(0644,root,root) %{_mandir}/man1/mysqlhotcopy.1*
756     %attr(0644,root,root) %{_mandir}/man1/mysql_install_db.1*
757     %attr(0644,root,root) %{_mandir}/man1/mysqlman.1*
758     %attr(0644,root,root) %{_mandir}/man1/mysql_secure_installation.1*
759     %attr(0644,root,root) %{_mandir}/man1/mysql.server.1*
760     %attr(0644,root,root) %{_mandir}/man1/mysql_setpermission.1*
761     %attr(0644,root,root) %{_mandir}/man1/mysqlslap.1*
762     %attr(0644,root,root) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
763     %attr(0644,root,root) %{_mandir}/man1/mysql_upgrade.1*
764     %attr(0644,root,root) %{_mandir}/man1/mysql_zap.1*
765     %attr(0644,root,root) %{_mandir}/man1/perror.1*
766     %attr(0644,root,root) %{_mandir}/man1/replace.1*
767     %attr(0644,root,root) %{_mandir}/man1/resolveip.1*
768     %attr(0644,root,root) %{_mandir}/man1/resolve_stack_dump.1*
769     %attr(0644,root,root) %{_mandir}/man8/mysqld.8*
770    
771     %files -n %{libname}
772     %defattr(-,root,root)
773     %doc Docs/ChangeLog
774     %attr(0755,root,root) %{_libdir}/libmysqlclient.so.%{major}*
775     # not sure about this one...
776 mikala 77175
777     %files -n %{libmysqlservices}
778     %defattr(-,root,root)
779 ahmad 6918 %attr(0755,root,root) %{_libdir}/libmysqlservices.so
780    
781     %files -n %{develname}
782     %defattr(-,root,root)
783     %doc INSTALL-SOURCE
784     %multiarch %{multiarch_bindir}/mysql_config
785     %attr(0755,root,root) %{_bindir}/mysql_config
786     %attr(0755,root,root) %{_libdir}/libmysqlclient_r.so
787     %attr(0755,root,root) %{_libdir}/libmysqlclient.so
788     %dir %{_includedir}/mysql
789     %dir %{_includedir}/mysql/psi
790     %attr(0644,root,root) %{_includedir}/mysql/*.h
791     %attr(0644,root,root) %{_includedir}/mysql/psi/*.h
792     %multiarch %{multiarch_includedir}/mysql/my_config.h
793     %attr(0644,root,root) %{_mandir}/man1/comp_err.1*
794     %attr(0644,root,root) %{_mandir}/man1/mysql_config.1*
795     %attr(0644,root,root) %{_datadir}/aclocal/mysql.m4
796 dmorgan 75676 # Todo: 21/03/2011
797     # We should also delete thoses files (since we're provinding a .so
798     # they're produced since we're building the libmysqld.so
799     %_libdir/libmysqlclient.a
800     %_libdir/libmysqlclient_r.a
801 ahmad 6918
802 dmorgan 75676 %files embedded
803 ahmad 6918 %defattr(-,root,root)
804 dmorgan 75676 %doc README COPYING
805     %{_libdir}/libmysqld.so.*
806    
807     %files embedded-devel
808     %defattr(-,root,root)
809     %{_libdir}/libmysqld.so
810     %{_bindir}/mysql_client_test_embedded
811     %{_bindir}/mysqltest_embedded
812     %{_mandir}/man1/mysql_client_test_embedded.1*
813     %{_mandir}/man1/mysqltest_embedded.1*

  ViewVC Help
Powered by ViewVC 1.1.30