%define majversion %(echo %version | cut -d. -f 1-2) %define MAJversion %(echo %version | cut -d. -f 1) %define groupid 65018 %define userid 65018 Name: mysql51 Version: 5.1.54 Release: 3mamba Summary: A very fast and reliable SQL database engine Group: Applications/Databases Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.mysql.com Source: ftp://ftp.easynet.be/mysql/Downloads/MySQL-%{majversion}/mysql-%{version}.tar.gz Source2: mysql-logrotate Source3: mysql_convert_db_format_to_mysql41.sh Source4: mysql-initscript Patch0: mysql-4.1.19-CVE-2006-0903.patch Patch1: mysql-5.1.45-skip-abi-check.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libncurses-devel BuildRequires: libopenssl-devel BuildRequires: libstdc++6-devel BuildRequires: libz-devel BuildRequires: perl-DBI BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: libdb47-devel >= 4.2.52 BuildRequires: ORBit-devel >= 2.12.0 BuildRequires: perl >= 5.8.0 BuildRequires: bison BuildRequires: doxygen BuildRequires: tetex BuildRequires: tetex-latex Requires(post):%{__install_info} Requires: %{name}-common = %{version}-%{release} Requires: lsb BuildRoot: %{_tmppath}/%{name}-%{version}-root Provides: mysql5 Obsoletes: mysql5 %description The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of MySQL AB. The MySQL software has Dual Licensing, which means you can use the MySQL software free of charge under the GNU General Public License (http://www.gnu.org/licenses/). You can also purchase commercial MySQL licenses from MySQL AB if you do not wish to be bound by the terms of the GPL. See the chapter "Licensing and Support" in the manual for further info. The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the documentation and the manual for more information. %package server Summary: MySQL server Group: Applications/Databases Requires: %{name} = %{version}-%{release} Requires: %{name}-client = %{version}-%{release} %description server The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of MySQL AB. The MySQL software has Dual Licensing, which means you can use the MySQL software free of charge under the GNU General Public License (http://www.gnu.org/licenses/). You can also purchase commercial MySQL licenses from MySQL AB if you do not wish to be bound by the terms of the GPL. See the chapter "Licensing and Support" in the manual for further info. The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the documentation and the manual for more information. This package contains the initscript for executing MySQL as a service. %package client Summary: MySQL client Group: Applications/Databases Requires: %{name}-common = %{version}-%{release} %description client The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. This package contains the standard MySQL clients. %package bench Summary: MySQL benchmarks and test system Group: Applications/Databases Requires: %{name} = %{version}-%{release} %description bench The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. This package contains MySQL benchmark scripts and data. %package common Summary: Common files for the MySQL(TM) database server Group: Applications/Databases %description common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Common files for the MySQL(TM) database server. %package -n libmysql51 Summary: Shared libraries need to dynamically load and use MySQL Group: System/Libraries %description -n libmysql51 The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MySQL. %package -n libmysql51-devel Summary: Development header files and static libraries for MySQL Group: Development/Libraries Requires: libmysql51 = %{version}-%{release} %description -n libmysql51-devel The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. This package contains the development header files and libraries necessary to develop MySQL client applications. %prep %setup -q -n mysql-%{version} #-D -T #%patch0 -p1 -b .CVE-2006-0903 #%patch1 -p1 %build #:<< _EOF %configure \ --libexecdir=%{_sbindir} \ --localstatedir=/var/lib/mysql%{MAJversion} \ --with-ssl \ --without-debug \ --with-extra-charsets=all \ --with-named-thread-libs="-lpthread" \ --enable-shared \ --enable-thread-safe-client \ --with-embedded-server \ --with-plugins=innobase %make \ pkglibdir=%{_libdir} \ pkgdatadir=%{_datadir}/mysql%{MAJversion} \ pkgsuppdir=%{_datadir}/mysql%{MAJversion} %make check #make test %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} %makeinstall \ libexecdir=%{_sbindir} \ pkglibdir=%{_libdir} \ pkgdatadir=%{_datadir}/mysql%{MAJversion} \ pkgsuppdir=%{_datadir}/mysql%{MAJversion} install -d %{buildroot}/var/lib/mysql%{MAJversion} #install -d %{buildroot}/var/log #touch %{buildroot}/var/log/mysqld.log install -D -m755 support-files/mysql.server %{buildroot}%{_initrddir}/mysql install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/mysql #install -D -m755 %{SOURCE3} \ # %{buildroot}%{_datadir}/mysql/%{name}_convert_db_format_to_mysql41 # copy default configuration file install -D -m644 support-files/my-medium.cnf %{buildroot}%{_sysconfdir}/my.cnf install -D -m0755 %{SOURCE4} %{buildroot}%{_initrddir}/mysql mv %{buildroot}%{_prefix}/sql-bench %{buildroot}%{_datadir}/sql-bench # delete unpackaged files #rm -f %{buildroot}%{_bindir}/make_win* rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/mysql-*.spec rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/MySQL-shared-compat.spec rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/mysql-log-rotate rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/binary-configure rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/mi_test_all* rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/*.cnf rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/*.ini rm -fr %{buildroot}%{_prefix}/mysql-test rm -f %{buildroot}%{_datadir}/mysql%{?MAJversion}/ChangeLog %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre server if [ $1 -ge 1 ]; then /usr/sbin/groupadd mysql -g %{groupid} 2>/dev/null /usr/sbin/useradd -u %{userid} -c 'Mysql service' -d /dev/null \ -g mysql -s /bin/false mysql 2>/dev/null fi exit 0 %post server if [ $1 -eq 1 ]; then # new install: initialize db mysql_install_db -b %{_prefix} --ldata=/var/lib/mysql%{MAJversion} /bin/chown -R mysql.mysql /var/lib/mysql%{MAJversion} /sbin/chkconfig --add mysql /sbin/service mysql start fi exit 0 %preun server if [ $1 -eq 0 ]; then # erase /sbin/chkconfig --del mysql /sbin/service mysql stop /usr/sbin/userdel mysql /usr/sbin/groupdel mysql fi exit 0 %postun server if [ $1 -eq 1 ]; then # update [ -f /var/lock/subsys/mysql ] && service mysql restart # [ -x %{_datadir}/mysql/mysql_convert_db_format_to_mysql41 ] && # %{_datadir}/mysql/mysql_convert_db_format_to_mysql41 &>/dev/null fi exit 0 %post -n libmysql51 -p /sbin/ldconfig %postun -n libmysql51 -p /sbin/ldconfig %post common %install_info %{name}.info %preun common %uninstall_info %{name}.info exit 0 %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/my.cnf %{_sbindir}/mysqld %{_bindir}/mysql_upgrade #%{_bindir}/mysql_upgrade_shell %{_mandir}/man8/mysqld.8.gz %doc ChangeLog COPYING README #%doc Docs/manual.html %files server %defattr(-,root,root) %attr(755,root,root) %{_initrddir}/mysql %attr(755,mysql,mysql) %dir /var/lib/mysql%{?MAJversion} %files client %defattr(-,root,root) %{_bindir}/msql2mysql %{_bindir}/mysql %{_bindir}/mysqlaccess %{_bindir}/mysqladmin %{_bindir}/mysqlbinlog %{_bindir}/mysqlcheck %{_bindir}/mysqldump %{_bindir}/mysqldumpslow %{_bindir}/mysqlimport %{_bindir}/mysqlshow %{_bindir}/mysqlslap %{_bindir}/mysqltest %{_bindir}/mysql_client_test %{_bindir}/mysql_find_rows %{_mandir}/man1/* %files common %defattr(-,root,root) %{_bindir}/innochecksum %{_bindir}/my_print_defaults %{_bindir}/myisamchk %{_bindir}/myisamlog %{_bindir}/myisampack %{_bindir}/mysql_convert_table_format #%{_bindir}/mysql_explain_log %{_bindir}/mysql_fix_extensions %{_bindir}/mysql_fix_privilege_tables #%{_bindir}/mysql_install %{_bindir}/mysql_install_db %{_bindir}/mysql_secure_installation %{_bindir}/mysql_setpermission #%{_bindir}/mysql_tableinfo %{_bindir}/mysql_tzinfo_to_sql %{_bindir}/mysql_waitpid %{_bindir}/mysql_zap %{_bindir}/mysqlbug %{_bindir}/mysqld_multi %{_bindir}/mysqld_safe %{_bindir}/mysqlhotcopy #%{_bindir}/mysqltestmanager #%{_bindir}/mysqltestmanager-pwgen #%{_bindir}/mysqltestmanagerc %{_bindir}/perror %{_bindir}/replace %{_bindir}/resolve_stack_dump %{_bindir}/resolveip %{_sbindir}/mysqlmanager %config(noreplace) %{_sysconfdir}/logrotate.d/mysql %dir %{_datadir}/mysql%{MAJversion} #%{_datadir}/mysql/%{name}_convert_db_format_to_mysql41 %{_datadir}/mysql%{?MAJversion}/english %lang(cs) %{_datadir}/mysql%{?MAJversion}/czech %lang(da) %{_datadir}/mysql%{?MAJversion}/danish %lang(nl) %{_datadir}/mysql%{?MAJversion}/dutch %lang(et) %{_datadir}/mysql%{?MAJversion}/estonian %lang(fr) %{_datadir}/mysql%{?MAJversion}/french %lang(de) %{_datadir}/mysql%{?MAJversion}/german %lang(el) %{_datadir}/mysql%{?MAJversion}/greek %lang(hu) %{_datadir}/mysql%{?MAJversion}/hungarian %lang(it) %{_datadir}/mysql%{?MAJversion}/italian %lang(ja) %{_datadir}/mysql%{?MAJversion}/japanese %lang(ko) %{_datadir}/mysql%{?MAJversion}/korean %lang(no) %{_datadir}/mysql%{?MAJversion}/norwegian %lang(no) %{_datadir}/mysql%{?MAJversion}/norwegian-ny %lang(pl) %{_datadir}/mysql%{?MAJversion}/polish %lang(pt) %{_datadir}/mysql%{?MAJversion}/portuguese %lang(ro) %{_datadir}/mysql%{?MAJversion}/romanian %lang(ru) %{_datadir}/mysql%{?MAJversion}/russian %lang(sr) %{_datadir}/mysql%{?MAJversion}/serbian %lang(sk) %{_datadir}/mysql%{?MAJversion}/slovak %lang(es) %{_datadir}/mysql%{?MAJversion}/spanish %lang(sv) %{_datadir}/mysql%{?MAJversion}/swedish %lang(uk) %{_datadir}/mysql%{?MAJversion}/ukrainian %{_datadir}/mysql%{?MAJversion}/charsets %{_datadir}/mysql%{?MAJversion}/errmsg.txt %{_datadir}/mysql%{?MAJversion}/fill_help_tables.sql %{_datadir}/mysql%{?MAJversion}/mysql_fix_privilege_tables.sql %{_datadir}/mysql%{?MAJversion}/mysql_system_tables.sql %{_datadir}/mysql%{?MAJversion}/mysql_system_tables_data.sql %{_datadir}/mysql%{?MAJversion}/mysql_test_data_timezone.sql %{_datadir}/mysql%{?MAJversion}/mysql.server %{_datadir}/mysql%{?MAJversion}/mysqld_multi.server %{_infodir}/mysql.info.* %{_mandir}/man8/mysqlmanager.8.gz %files bench %defattr(-,root,root) %dir %{_datadir}/sql-bench %{_datadir}/sql-bench/* %files -n libmysql51 %defattr(-,root,root) %{_libdir}/libmysqlclient.so.* %{_libdir}/libmysqlclient_r.so.* %{_libdir}/plugin/ha_archive.a %{_libdir}/plugin/ha_archive.la %{_libdir}/plugin/ha_archive.so %{_libdir}/plugin/ha_archive.so.* %{_libdir}/plugin/ha_blackhole.a %{_libdir}/plugin/ha_blackhole.la %{_libdir}/plugin/ha_blackhole.so %{_libdir}/plugin/ha_blackhole.so.* %{_libdir}/plugin/ha_example.a %{_libdir}/plugin/ha_example.la %{_libdir}/plugin/ha_example.so %{_libdir}/plugin/ha_example.so.* %{_libdir}/plugin/ha_federated.a %{_libdir}/plugin/ha_federated.la %{_libdir}/plugin/ha_federated.so %{_libdir}/plugin/ha_federated.so.* %{_libdir}/plugin/ha_innodb_plugin.a %{_libdir}/plugin/ha_innodb_plugin.la %{_libdir}/plugin/ha_innodb_plugin.so %{_libdir}/plugin/ha_innodb_plugin.so.* %{_libdir}/plugin/libdaemon_example.a %{_libdir}/plugin/libdaemon_example.la %{_libdir}/plugin/libdaemon_example.so %{_libdir}/plugin/libdaemon_example.so.* %{_libdir}/plugin/mypluglib.a %{_libdir}/plugin/mypluglib.la %{_libdir}/plugin/mypluglib.so %{_libdir}/plugin/mypluglib.so.* %files -n libmysql51-devel %defattr(-,root,root) %{_bindir}/mysql_client_test_embedded %{_bindir}/mysqltest_embedded #%{_bindir}/comp_err %{_bindir}/mysql_config %{_bindir}/myisam_ftdump %{_includedir}/* %{_libdir}/*.a %{_libdir}/libmysqlclient.la %{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient_r.la %{_libdir}/libmysqlclient_r.so %{_datadir}/aclocal/mysql.m4 %changelog * Sat Mar 28 2015 Silvan Calarco 5.1.54-3mamba - legacy package * Tue Feb 01 2011 Silvan Calarco 5.1.54-2mamba - move mysqlslap and mysqltest to client package to remove circular dependency with mysql-common * Fri Dec 24 2010 Silvan Calarco 5.1.54-1mamba - update to 5.1.54 * Wed Aug 04 2010 Automatic Build System 5.1.49-1mamba - automatic update to 5.1.49 by autodist * Thu Jun 17 2010 Automatic Build System 5.1.48-1mamba - automatic update to 5.1.48 by autodist * Sun Jun 06 2010 Silvan Calarco 5.1.47-2mamba - mysql_upgrade moved from server to main package - gcc 4.5 build patch added * Thu May 20 2010 Automatic Build System 5.1.47-1mamba - automatic update to 5.1.47 by autodist * Fri Apr 23 2010 Automatic Build System 5.1.46-1mamba - automatic update to 5.1.46 by autodist * Fri Apr 09 2010 Silvan Calarco 5.1.45-2mamba - mysql-server: added requirement for mysql-client * Wed Mar 17 2010 Automatic Build System 5.1.45-1mamba - automatic update to 5.1.45 by autodist * Sun Mar 14 2010 Automatic Build System 5.1.44-1mamba - automatic update to 5.1.44 by autodist * Mon Feb 01 2010 Automatic Build System 5.1.43-1mamba - automatic update to 5.1.43 by autodist * Fri Jan 01 2010 Automatic Build System 5.1.42-1mamba - automatic update to 5.1.42 by autodist * Wed Nov 18 2009 Automatic Build System 5.1.41-1mamba - automatic update to 5.1.41 by autodist * Tue Oct 20 2009 Automatic Build System 5.1.40-1mamba - automatic update to 5.1.40 by autodist * Tue Sep 22 2009 Automatic Build System 5.1.39-1mamba - automatic update to 5.1.39 by autodist * Fri Sep 11 2009 Automatic Build System 5.1.38-1mamba - automatic update to 5.1.38 by autodist * Fri Jul 31 2009 Automatic Build System 5.1.37-1mamba - automatic update to 5.1.37 by autodist * Wed Jul 01 2009 Automatic Build System 5.1.36-1mamba - automatic update to 5.1.36 by autodist * Tue Jun 30 2009 Davide Madrisan 5.1.35-3mamba - fixed installation of the mysql infofile * Mon Jun 29 2009 Silvan Calarco 5.1.35-2mamba - initscript: redirect logger output to prevent multithreaded init lockup * Thu Jun 04 2009 Automatic Build System 5.1.35-1mamba - automatic update to 5.1.35 by autodist * Sat May 30 2009 Silvan Calarco 5.1.34-3mamba - rebuilt with innobase plugin statically included into mysqld (as required by akonadi) * Fri May 29 2009 Silvan Calarco 5.1.34-2mamba - added package mysql-server so mysqld can be used by akonadi without enabling it as a system service * Mon Apr 20 2009 Automatic Build System 5.1.34-1mamba - update to 5.1.34 * Fri Apr 03 2009 Silvan Calarco 5.1.33-1mamba - automatic update to 5.1.33 by autodist * Mon Mar 16 2009 Silvan Calarco 5.1.32-3mamba - default configuration file name fixed (/etc/my.cnf) * Wed Mar 11 2009 Silvan Calarco 5.1.32-2mamba - update to mysql5, obsolete mysql5 packages * Thu Mar 05 2009 Silvan Calarco 5.1.32-1mamba - automatic update to 5.1.32 by autodist * Thu Feb 19 2009 Silvan Calarco 5.1.31-1mamba - update to 5.1.31 * Sat Dec 13 2008 Silvan Calarco 5.1.30-1mamba - update to 5.1.30 * Tue Nov 04 2008 Silvan Calarco 5.0.67-2mamba - changed datadir to /usr/lib/mysql5 - build with libdb47 * Sun Nov 02 2008 Silvan Calarco 5.0.67-1mamba - automatic update to 5.0.67 by autodist * Fri Jun 27 2008 Silvan Calarco 5.0.51b-1mamba - update to 5.0.51b [Stativa] * Fri Jan 11 2008 Silvan Calarco 4.1.22-2mamba - use default initscript - require lsb * Tue Mar 13 2007 Silvan Calarco 4.1.22-1qilnx - update to version 4.1.22 by autospec * Tue Jun 27 2006 Davide Madrisan 4.1.20-1qilnx - update to version 4.1.20 by autospec - this version also fixes CVE-2006-2753 * Mon May 15 2006 Davide Madrisan 4.1.19-1qilnx - update to version 4.1.19 by autospec - also fixes the security issues: CVE-2006-{1516,1517,3081} - security bug CVE-2006-0903 fixed * Wed Mar 01 2006 Silvan Calarco 4.1.18-1qilnx - update to version 4.1.18 by autospec * Tue Sep 20 2005 Davide Madrisan 4.1.14-1qilnx - update to version 4.1.14 by autospec - also fix the security issue: QSA-2005-108 (CAN-2005-2558) - specfile updated: install/uninstall info files - new script %{name}_convert_db_format_to_mysql41 * Wed Mar 23 2005 Davide Madrisan 4.0.24-2qilnx - restart the mysql server only when active (%%postun script) - added mising %%postun script for `libmysql' * Wed Mar 23 2005 Davide Madrisan 4.0.24-1qilnx - update to version 4.0.24 by autospec - fixes security vulnerabilities QSA-2005-032 (CAN-2005-07[09,10,11]) * Tue Feb 01 2005 Davide Madrisan 4.0.23-1qilnx - update to version 4.0.23 by autospec - fixed security vulnerability QSA-2005-011 (CAN-2005-0004) * Tue Sep 14 2004 Davide Madrisan 4.0.21-1qilnx - update to version 4.0.21 by autospec also fix: CAN-2004-0457, CAN-2004-083[5,6,7] * Fri Jul 09 2004 Silvan Calarco 4.0.20-1qilnx - new version build * Thu Feb 26 2004 Silvan Calarco 4.0.18-1qilnx - New version rebuild - groupid and userid specified according to QiLinux services rules * Wed Sep 03 2003 Silvan Calarco 4.0.12-2qilnx - Added configuration scripts and /var directories * Mon May 19 2003 Alessandro Ramazzina 4.0.12-1qilnx - creation of mysql package