/[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 230713 - (hide annotations) (download)
Fri Apr 13 18:38:51 2012 UTC (12 years ago) by tmb
File size: 29494 byte(s)
- update to 5.5.23
- drop P10 (merged)
- rediff P8, P9, P105
- update filelists


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

  ViewVC Help
Powered by ViewVC 1.1.30