summaryrefslogtreecommitdiffstats
path: root/mysql55
diff options
context:
space:
mode:
authorHonza Horák <hhorak@redhat.com>2012-10-08 14:35:34 +0200
committerHonza Horák <hhorak@redhat.com>2012-10-08 14:35:34 +0200
commit748e641f928121e3aded4f7a6c513b641cda2647 (patch)
tree48abe6ce8fe9fff842f000c7915079a0d941a592 /mysql55
parentac7505c74c340c0708b6e1418680424904ad4cbd (diff)
downloaddsc-748e641f928121e3aded4f7a6c513b641cda2647.tar.gz
dsc-748e641f928121e3aded4f7a6c513b641cda2647.tar.xz
dsc-748e641f928121e3aded4f7a6c513b641cda2647.zip
mysql upgraded to 5.5.28 and collection renamed to mysql55
Diffstat (limited to 'mysql55')
-rw-r--r--mysql55/meta-mysql.spec5
-rw-r--r--mysql55/mysql.spec212
-rw-r--r--mysql55/mysql.spec.nodsc184
3 files changed, 324 insertions, 77 deletions
diff --git a/mysql55/meta-mysql.spec b/mysql55/meta-mysql.spec
index 2f6591d..f82ffa1 100644
--- a/mysql55/meta-mysql.spec
+++ b/mysql55/meta-mysql.spec
@@ -1,4 +1,4 @@
-%{!?scl:%global scl mysql-5.5}
+%{!?scl:%global scl mysql55}
%scl_package %scl
Summary: Package that installs %scl
@@ -55,6 +55,9 @@ EOF
%{_root_sysconfdir}/rpm/macros.%{scl}-config
%changelog
+* Thu Oct 04 2012 Honza Horak <hhorak@redhat.com> 1-2
+- rename collection to mysql55
+
* Tue Mar 20 2012 Honza Horak <hhorak@redhat.com> 1-1
- initial packaging
diff --git a/mysql55/mysql.spec b/mysql55/mysql.spec
index 6c44796..203e455 100644
--- a/mysql55/mysql.spec
+++ b/mysql55/mysql.spec
@@ -1,7 +1,8 @@
%{?scl:%scl_package mysql}
+%{!?_unitdir:%global _unitdir /lib/systemd/system}
Name: %{?scl_prefix}mysql
-Version: 5.5.21
+Version: 5.5.28
Release: 1%{?dist}
Summary: MySQL client programs and shared libraries
@@ -12,7 +13,7 @@ URL: http://www.mysql.com
License: GPLv2 with exceptions
# Regression tests take a long time, you can skip 'em with this
-%{!?runselftest:%global runselftest 1}
+%{!?runselftest:%global runselftest 0}
# Upstream has a mirror redirector for downloads, so the URL is hard to
# represent statically. You can get the tarball by following a link from
@@ -23,7 +24,6 @@ Source0: mysql-%{version}-nodocs.tar.gz
# the tarball into the current directory:
# ./generate-tarball.sh $VERSION
Source1: generate-tarball.sh
-Source2: mysql.init
Source3: my.cnf
Source4: scriptstub.c
Source5: my_config.h
@@ -32,8 +32,12 @@ Source7: README.mysql-license
Source8: libmysql.version
Source9: mysql-embedded-check.c
Source10: mysql.tmpfiles.d
+Source11: mysqld.service
+Source12: mysqld-prepare-db-dir
+Source13: mysqld-wait-ready
Source14: rh-skipped-tests-base.list
Source15: rh-skipped-tests-arm.list
+Source16: mysql.init
# Working around perl dependency checking bug in rpm FTTB. Remove later.
Source999: filter-requires-mysql.sh
@@ -48,12 +52,13 @@ Patch7: mysql-versioning.patch
Patch8: mysql-dubious-exports.patch
Patch10: mysql-plugin-bool.patch
Patch11: mysql-s390-tsc.patch
-Patch12: mysql-openssl-test.patch
Patch14: mysql-va-list.patch
Patch15: mysql-netdevname.patch
+Patch16: mysql-logrotate.patch
Patch17: mysql-plugin-test.patch
-Patch18: mysql-default-cipher.patch
+Patch18: mysql-cipherspec.patch
Patch19: mysql-file-contents.patch
+Patch20: mysql-string-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl, readline-devel, openssl-devel
@@ -107,13 +112,7 @@ Requires: sh-utils
Requires(pre): /usr/sbin/useradd
Requires(post): chkconfig
Requires(preun): chkconfig
-# This is for /sbin/service
-Requires(preun): initscripts
-Requires(postun): initscripts
-# This is for /etc/tmpfiles.d
-#Requires: systemd-units
# mysqlhotcopy needs DBI/DBD support
-#Requires: perl-DBI, perl-DBD-MySQL
Conflicts: MySQL-server
%description server
@@ -197,12 +196,13 @@ the MySQL sources.
%patch8 -p1
%patch10 -p1
%patch11 -p1
-%patch12 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
# path fixes for dsc
sed -i -e 's|/etc/|%{_sysconfdir}/|' mysys/default.c
@@ -268,8 +268,8 @@ cmake . -DBUILD_CONFIG=mysql_release \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_SQLBENCHDIR=share \
-DINSTALL_SUPPORTFILESDIR=share/mysql \
- -DMYSQL_DATADIR="%{_scl_root}/var/lib/mysql" \
- -DMYSQL_UNIX_ADDR="%{_scl_root}/var/lib/mysql/mysql.sock" \
+ -DMYSQL_DATADIR="%{?_scl_root}/var/lib/mysql" \
+ -DMYSQL_UNIX_ADDR="%{?_scl_root}/var/lib/mysql/mysql.sock" \
-DENABLED_LOCAL_INFILE=ON \
-DENABLE_DTRACE=ON \
-DWITH_EMBEDDED_SERVER=ON \
@@ -364,12 +364,29 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/mysql_config
install -m 644 Docs/INFO_SRC ${RPM_BUILD_ROOT}%{_libdir}/mysql/
install -m 644 Docs/INFO_BIN ${RPM_BUILD_ROOT}%{_libdir}/mysql/
-mkdir -p $RPM_BUILD_ROOT%{_scl_root}/var/log
-touch $RPM_BUILD_ROOT%{_scl_root}/var/log/mysqld.log
+mkdir -p $RPM_BUILD_ROOT%{?_scl_root}/var/log
+touch $RPM_BUILD_ROOT%{?_scl_root}/var/log/mysqld.log
-mkdir -p $RPM_BUILD_ROOT%{_scl_root}/var/lock/subsys/
-mkdir -p $RPM_BUILD_ROOT%{_root_sysconfdir}/rc.d/init.d
-mkdir -p $RPM_BUILD_ROOT%{_scl_root}/var/run/mysqld
+mkdir -p $RPM_BUILD_ROOT%{?_scl_root}/var/run/mysqld
+install -m 0755 -d $RPM_BUILD_ROOT%{?_scl_root}/var/lib/mysql
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
+sed -e 's|=/var/|=%{?_scl_root}/var/|' >my.cnf <%{SOURCE3}
+install -m 0644 my.cnf $RPM_BUILD_ROOT%{_sysconfdir}/my.cnf
+
+# install systemd unit files and scripts for handling server startup
+mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}
+install -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}%{_unitdir}/%{?scl_prefix}mysqld.service
+install -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}%{_libexecdir}/
+install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/
+
+mkdir -p $RPM_BUILD_ROOT%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/tmpfiles.d
+sed -e 's|/var/run/mysqld|%{?_scl_root}/var/run/mysqld|' <%{SOURCE10} >%{?scl_prefix}mysql.conf
+install -m 0644 %{?scl_prefix}mysql.conf $RPM_BUILD_ROOT%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/tmpfiles.d/%{?scl_prefix}mysql.conf
+
+mkdir -p $RPM_BUILD_ROOT%{?_scl_root}/var/lock/subsys/
+mkdir -p $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT%{?_scl_root}/var/run/mysqld
install -m 0755 -d $RPM_BUILD_ROOT%{_scl_root}/var/lib/mysql
sed -e 's|/etc/my.cnf|%{_sysconfdir}/my.cnf|' \
-e 's|/etc/sysconfig/mysqld|%{_sysconfdir}/sysconfig/mysqld|' \
@@ -379,16 +396,8 @@ sed -e 's|/etc/my.cnf|%{_sysconfdir}/my.cnf|' \
-e 's|/var/lock/|%{_scl_root}/var/lock/|' \
-e 's|/var/lib/|%{_scl_root}/var/lib/|' \
-e 's|/var/log/|%{_scl_root}/var/log/|' \
- <%{SOURCE2} >mysql.init
-install -m 0755 mysql.init $RPM_BUILD_ROOT%{_root_sysconfdir}/rc.d/init.d/%{?scl_prefix}mysqld
-
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
-sed -e 's|=/var/|=%{_scl_root}/var/|' >my.cnf <%{SOURCE3}
-install -m 0644 my.cnf $RPM_BUILD_ROOT%{_sysconfdir}/my.cnf
-
-#mkdir -p $RPM_BUILD_ROOT%{_root_sysconfdir}/tmpfiles.d
-#sed -e 's|/var/run/mysqld|%{_scl_root}/var/run/mysqld|' <%{SOURCE10} >%{?scl_prefix}mysql.conf
-#install -m 0644 %{?scl_prefix}mysql.conf $RPM_BUILD_ROOT%{_root_sysconfdir}/tmpfiles.d/%{?scl_prefix}mysql.conf
+ <%{SOURCE16} >mysql.init
+install -m 0755 mysql.init $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rc.d/init.d/%{?scl_prefix}mysqld
# Fix funny permissions that cmake build scripts apply to config files
chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/mysql/config.*.ini
@@ -436,14 +445,15 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/magic
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/ndb-config-2-node.ini
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql.server
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysqld_multi.server
-rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql-log-rotate
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/comp_err.1*
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-stress-test.pl.1*
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-test-run.pl.1*
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysqlhotcopy.1*
-mkdir -p $RPM_BUILD_ROOT%{_root_sysconfdir}/ld.so.conf.d
-echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT%{_root_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
+# put logrotate script where it needs to be
+mkdir -p $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/logrotate.d
+mv ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql-log-rotate $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/logrotate.d/%{?scl_prefix}mysqld
+chmod 644 $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/logrotate.d/%{?scl_prefix}mysqld
# copy additional docs into build tree so %%doc will find them
cp %{SOURCE6} README.mysql-docs
@@ -464,16 +474,26 @@ rm -rf $RPM_BUILD_ROOT
/sbin/ldconfig
%post server
-if [ $1 = 1 ]; then
- /sbin/chkconfig --add %{?scl_prefix}mysqld
+if [ -e /bin/systemctl ] ; then
+# This part is run in RHEL-7 and newer
+# We don't want old SysVinit script if we use systemd
+rm -f %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rc.d/init.d/%{?scl_prefix}mysqld
+%systemd_post %{?scl_prefix}mysqld.service
+else
+# This part is run in RHEL-6 and older
+# We don't want new systemd unit file if we don't use systemd
+rm -f %{_unitdir}/%{?scl_prefix}mysqld.service
+/sbin/chkconfig --add %{?scl_prefix}mysqld
fi
-/bin/chmod 0755 %{_scl_root}/var/lib/mysql
-/bin/touch %{_scl_root}/var/log/mysqld.log
+/bin/chmod 0755 %{?_scl_root}/var/lib/mysql
+/bin/touch %{?_scl_root}/var/log/mysqld.log
%preun server
-if [ $1 = 0 ]; then
- /sbin/service %{?scl_prefix}mysqld stop >/dev/null 2>&1
- /sbin/chkconfig --del %{?scl_prefix}mysqld
+if [ -e /bin/systemctl ] ; then
+%systemd_preun %{?scl_prefix}mysqld.service
+else
+/sbin/service %{?scl_prefix}mysqld stop >/dev/null 2>&1
+/sbin/chkconfig --del %{?scl_prefix}mysqld
fi
%postun libs
@@ -482,8 +502,10 @@ if [ $1 = 0 ] ; then
fi
%postun server
-if [ $1 -ge 1 ]; then
- /sbin/service %{?scl_prefix}mysqld condrestart >/dev/null 2>&1 || :
+if [ -e /bin/systemctl ] ; then
+%systemd_postun_with_restart %{?scl_prefix}mysqld.service
+else
+/sbin/service %{?scl_prefix}mysqld condrestart >/dev/null 2>&1 || :
fi
@@ -528,7 +550,6 @@ fi
%config(noreplace) %{_sysconfdir}/my.cnf
%dir %{_libdir}/mysql
%{_libdir}/mysql/libmysqlclient.so.*
-/etc/ld.so.conf.d/*
%dir %{_datadir}/mysql
%{_datadir}/mysql/english
@@ -577,7 +598,6 @@ fi
%{_bindir}/mysqldumpslow
%{_bindir}/mysqld_multi
%{_bindir}/mysqld_safe
-#%{_bindir}/mysqlhotcopy
%{_bindir}/mysqltest
%{_bindir}/innochecksum
%{_bindir}/perror
@@ -613,7 +633,6 @@ fi
%{_mandir}/man1/mysqlcheck.1*
%{_mandir}/man1/mysqld_multi.1*
%{_mandir}/man1/mysqld_safe.1*
-#%{_mandir}/man1/mysqlhotcopy.1*
%{_mandir}/man1/mysqlimport.1*
%{_mandir}/man1/mysqlman.1*
%{_mandir}/man1/mysql_setpermission.1*
@@ -634,12 +653,16 @@ fi
%{_datadir}/mysql/my-*.cnf
%{_datadir}/mysql/config.*.ini
-/etc/rc.d/init.d/%{?scl_prefix}mysqld
-#/etc/tmpfiles.d/%{?scl_prefix}mysql.conf
-%attr(0755,mysql,mysql) %dir %{_scl_root}/var/run/mysqld
-%attr(0755,mysql,mysql) %dir %{_scl_root}/var/lib/mysql
-%attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) %{_scl_root}/var/log/mysqld.log
-%{_scl_root}/var/lock/subsys/
+%{_unitdir}/%{?scl_prefix}mysqld.service
+%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rc.d/init.d/%{?scl_prefix}mysqld
+%{_libexecdir}/mysqld-prepare-db-dir
+%{_libexecdir}/mysqld-wait-ready
+
+%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/tmpfiles.d/%{?scl_prefix}mysql.conf
+%attr(0755,mysql,mysql) %dir %{?_scl_root}/var/run/mysqld
+%attr(0755,mysql,mysql) %dir %{?_scl_root}/var/lib/mysql
+%attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) %{?_scl_root}/var/log/mysqld.log
+%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/logrotate.d/%{?scl_prefix}mysqld
%files devel
%defattr(-,root,root)
@@ -674,18 +697,82 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
+* Sat Sep 29 2012 Tom Lane <tgl@redhat.com> 5.5.28-1
+- Update to MySQL 5.5.28, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-28.html
+- Clean up partially-created database files when mysql_install_db fails
+Related: #835131
+- Honor user and group settings from service file in mysqld-prepare-db-dir
+Resolves: #840431
+- Export THR_KEY_mysys as a workaround for inadequate threading support
+Resolves: #846602
+- Adopt new systemd macros for server package install/uninstall triggers
+Resolves: #850222
+- Use --no-defaults when invoking mysqladmin to wait for the server to start
+Related: #855704
+
+* Sun Aug 5 2012 Tom Lane <tgl@redhat.com> 5.5.27-1
+- Update to MySQL 5.5.27, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-27.html
+
+* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5.25a-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jul 6 2012 Tom Lane <tgl@redhat.com> 5.5.25a-1
+- Update to MySQL 5.5.25a, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25a.html
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25.html
+- Don't use systemd's Restart feature; rely on mysqld_safe instead
+Resolves: #832029
+
+* Mon Jun 11 2012 Tom Lane <tgl@redhat.com> 5.5.24-1
+- Update to MySQL 5.5.24, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html
+ including the fix for CVE-2012-2122
+Resolves: #830680
+- Tweak logrotate script to put the right permissions on mysqld.log
+- Minor specfile fixes for recent packaging guidelines changes
+
+* Sat Apr 28 2012 Tom Lane <tgl@redhat.com> 5.5.23-1
+- Update to MySQL 5.5.23, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-23.html
+
+* Sat Mar 24 2012 Tom Lane <tgl@redhat.com> 5.5.22-1
+- Update to MySQL 5.5.22, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-22.html
+- Turn on PrivateTmp in service file
+Resolves: #782513
+- Comment out the contents of /etc/logrotate.d/mysqld, so that manual
+ action is needed to enable log rotation. Given the multiple ways in
+ which the rotation script can fail, it seems imprudent to try to make
+ it run by default.
+Resolves: #799735
+
+* Tue Mar 20 2012 Honza Horak <hhorak@redhat.com> 5.5.21-3
+- Revise mysql_plugin test patch so it moves plugin files to
+ a temporary directory (better solution to #789530)
+
+* Tue Mar 13 2012 Honza Horak <hhorak@redhat.com> 5.5.21-2
+- Fix ssl-related tests to specify expected cipher explicitly
+Related: #789600
+- Fix several strcpy calls to check destination size
+
* Mon Feb 27 2012 Tom Lane <tgl@redhat.com> 5.5.21-1
- Update to MySQL 5.5.21, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-21.html
- Hack openssl regression test to still work with rawhide's openssl
- Fix assorted failures in post-install regression tests (mysql-test RPM)
Resolves: #789530
+
+* Fri Feb 10 2012 Tom Lane <tgl@redhat.com> 5.5.20-2
- Revise our test-disabling method to make it possible to disable tests on a
platform-specific basis, and also to get rid of mysql-disable-test.patch,
which broke in just about every upstream update (Honza Horak)
- Disable cycle-counter-dependent regression tests on ARM, since there is
not currently any support for that in Fedora ARM kernels
Resolves: #773116
+- Add some comments to mysqld.service documenting how to customize it
+Resolves: #785243
* Fri Jan 27 2012 Tom Lane <tgl@redhat.com> 5.5.20-1
- Update to MySQL 5.5.20, for various fixes described at
@@ -693,25 +780,44 @@ Resolves: #773116
as well as security fixes described at
http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
Resolves: #783828
+- Re-include the mysqld logrotate script, now that it's not so bogus
+Resolves: #547007
* Wed Jan 4 2012 Tom Lane <tgl@redhat.com> 5.5.19-1
- Update to MySQL 5.5.19, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-19.html
-* Mon Nov 21 2011 Tom Lane <tgl@redhat.com> 5.5.18-1
+* Sun Nov 20 2011 Tom Lane <tgl@redhat.com> 5.5.18-1
- Update to MySQL 5.5.18, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-18.html
+
+* Sat Nov 12 2011 Tom Lane <tgl@redhat.com> 5.5.17-1
+- Update to MySQL 5.5.17, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-17.html
+- Get rid of version-number assumption in sysv-to-systemd conversion trigger
+
+* Wed Nov 02 2011 Honza Horak <hhorak@redhat.com> 5.5.16-4
- Don't assume all ethernet devices are named ethX
Resolves: #682365
+- Exclude user definition from my.cnf, user is defined in mysqld.service now
+Resolves: #661265
-* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.15-1.1
+* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-3
- Fix unportable usage associated with va_list arguments
Resolves: #744707
-* Fri Jul 29 2011 Tom Lane <tgl@redhat.com> 5.5.15-1
+* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-2
+- Update to MySQL 5.5.16, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html
+
+* Fri Jul 29 2011 Tom Lane <tgl@redhat.com> 5.5.15-2
- Update to MySQL 5.5.15, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-15.html
+* Wed Jul 27 2011 Tom Lane <tgl@redhat.com> 5.5.14-3
+- Convert to systemd startup support (no socket activation, for now anyway)
+Related: #714426
+
* Tue Jul 12 2011 Tom Lane <tgl@redhat.com> 5.5.14-2
- Remove make_scrambled_password and make_scrambled_password_323 from mysql.h,
since we're not allowing clients to call those functions anyway
diff --git a/mysql55/mysql.spec.nodsc b/mysql55/mysql.spec.nodsc
index c56cd1f..dff5a8e 100644
--- a/mysql55/mysql.spec.nodsc
+++ b/mysql55/mysql.spec.nodsc
@@ -1,5 +1,5 @@
Name: mysql
-Version: 5.5.21
+Version: 5.5.28
Release: 1%{?dist}
Summary: MySQL client programs and shared libraries
@@ -21,7 +21,6 @@ Source0: mysql-%{version}-nodocs.tar.gz
# the tarball into the current directory:
# ./generate-tarball.sh $VERSION
Source1: generate-tarball.sh
-Source2: mysql.init
Source3: my.cnf
Source4: scriptstub.c
Source5: my_config.h
@@ -30,6 +29,9 @@ Source7: README.mysql-license
Source8: libmysql.version
Source9: mysql-embedded-check.c
Source10: mysql.tmpfiles.d
+Source11: mysqld.service
+Source12: mysqld-prepare-db-dir
+Source13: mysqld-wait-ready
Source14: rh-skipped-tests-base.list
Source15: rh-skipped-tests-arm.list
# Working around perl dependency checking bug in rpm FTTB. Remove later.
@@ -46,12 +48,13 @@ Patch7: mysql-versioning.patch
Patch8: mysql-dubious-exports.patch
Patch10: mysql-plugin-bool.patch
Patch11: mysql-s390-tsc.patch
-Patch12: mysql-openssl-test.patch
Patch14: mysql-va-list.patch
Patch15: mysql-netdevname.patch
+Patch16: mysql-logrotate.patch
Patch17: mysql-plugin-test.patch
-Patch18: mysql-default-cipher.patch
+Patch18: mysql-cipherspec.patch
Patch19: mysql-file-contents.patch
+Patch20: mysql-string-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl, readline-devel, openssl-devel
@@ -61,6 +64,7 @@ BuildRequires: systemtap-sdt-devel
BuildRequires: time procps
# Socket and Time::HiRes are needed to run regression tests
BuildRequires: perl(Socket), perl(Time::HiRes)
+BuildRequires: systemd-units
Requires: grep, fileutils
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -103,11 +107,16 @@ Requires: sh-utils
Requires(pre): /usr/sbin/useradd
Requires(post): chkconfig
Requires(preun): chkconfig
-# This is for /sbin/service
-Requires(preun): initscripts
-Requires(postun): initscripts
-# This is for /etc/tmpfiles.d
+# We require this to be present for %%{_prefix}/lib/tmpfiles.d
Requires: systemd-units
+# Make sure it's there when scriptlets run, too
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+# This is actually needed for the %%triggerun script but Requires(triggerun)
+# is not valid. We can use %%post because this particular %%triggerun script
+# should fire just after this package is installed.
+Requires(post): systemd-sysv
# mysqlhotcopy needs DBI/DBD support
Requires: perl-DBI, perl-DBD-MySQL
Conflicts: MySQL-server
@@ -193,12 +202,13 @@ the MySQL sources.
%patch8 -p1
%patch10 -p1
%patch11 -p1
-%patch12 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
# workaround for upstream bug #56342
rm -f mysql-test/t/ssl_8k_key-master.opt
@@ -356,14 +366,20 @@ install -m 644 Docs/INFO_BIN ${RPM_BUILD_ROOT}%{_libdir}/mysql/
mkdir -p $RPM_BUILD_ROOT/var/log
touch $RPM_BUILD_ROOT/var/log/mysqld.log
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/var/run/mysqld
install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql
-install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysqld
+
+mkdir -p $RPM_BUILD_ROOT/etc
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/my.cnf
-mkdir -p $RPM_BUILD_ROOT/etc/tmpfiles.d
-install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT/etc/tmpfiles.d/mysql.conf
+# install systemd unit files and scripts for handling server startup
+mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}
+install -m 644 %{SOURCE11} ${RPM_BUILD_ROOT}%{_unitdir}/
+install -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}%{_libexecdir}/
+install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/
+
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
+install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/mysql.conf
# Fix funny permissions that cmake build scripts apply to config files
chmod 644 ${RPM_BUILD_ROOT}%{_datadir}/mysql/config.*.ini
@@ -410,11 +426,15 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/magic
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/ndb-config-2-node.ini
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql.server
rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysqld_multi.server
-rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql-log-rotate
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/comp_err.1*
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-stress-test.pl.1*
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-test-run.pl.1*
+# put logrotate script where it needs to be
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+mv ${RPM_BUILD_ROOT}%{_datadir}/mysql/mysql-log-rotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mysqld
+chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/mysqld
+
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
@@ -437,17 +457,42 @@ rm -rf $RPM_BUILD_ROOT
/sbin/ldconfig
%post server
+%if 0%{?systemd_post:1}
+%systemd_post mysqld.service
+%else
if [ $1 = 1 ]; then
- /sbin/chkconfig --add mysqld
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
+%endif
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
+# Handle upgrading from SysV initscript to native systemd unit.
+# We can tell if a SysV version of mysql was previously installed by
+# checking to see if the initscript is present.
+%triggerun server -- mysql-server
+if [ -f /etc/rc.d/init.d/mysqld ]; then
+ # Save the current service runlevel info
+ # User must manually run systemd-sysv-convert --apply mysqld
+ # to migrate them to systemd targets
+ /usr/bin/systemd-sysv-convert --save mysqld >/dev/null 2>&1 || :
+
+ # Run these because the SysV package being removed won't do them
+ /sbin/chkconfig --del mysqld >/dev/null 2>&1 || :
+ /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || :
+fi
+
%preun server
+%if 0%{?systemd_preun:1}
+%systemd_preun mysqld.service
+%else
if [ $1 = 0 ]; then
- /sbin/service mysqld stop >/dev/null 2>&1
- /sbin/chkconfig --del mysqld
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable mysqld.service >/dev/null 2>&1 || :
+ /bin/systemctl stop mysqld.service >/dev/null 2>&1 || :
fi
+%endif
%postun libs
if [ $1 = 0 ] ; then
@@ -455,9 +500,15 @@ if [ $1 = 0 ] ; then
fi
%postun server
+%if 0%{?systemd_postun_with_restart:1}
+%systemd_postun_with_restart mysqld.service
+%else
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
- /sbin/service mysqld condrestart >/dev/null 2>&1 || :
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || :
fi
+%endif
%files
@@ -607,11 +658,15 @@ fi
%{_datadir}/mysql/my-*.cnf
%{_datadir}/mysql/config.*.ini
-/etc/rc.d/init.d/mysqld
-/etc/tmpfiles.d/mysql.conf
+%{_unitdir}/mysqld.service
+%{_libexecdir}/mysqld-prepare-db-dir
+%{_libexecdir}/mysqld-wait-ready
+
+%{_prefix}/lib/tmpfiles.d/mysql.conf
%attr(0755,mysql,mysql) %dir /var/run/mysqld
%attr(0755,mysql,mysql) %dir /var/lib/mysql
%attr(0640,mysql,mysql) %config(noreplace) %verify(not md5 size mtime) /var/log/mysqld.log
+%config(noreplace) %{_sysconfdir}/logrotate.d/mysqld
%files devel
%defattr(-,root,root)
@@ -646,18 +701,82 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
+* Sat Sep 29 2012 Tom Lane <tgl@redhat.com> 5.5.28-1
+- Update to MySQL 5.5.28, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-28.html
+- Clean up partially-created database files when mysql_install_db fails
+Related: #835131
+- Honor user and group settings from service file in mysqld-prepare-db-dir
+Resolves: #840431
+- Export THR_KEY_mysys as a workaround for inadequate threading support
+Resolves: #846602
+- Adopt new systemd macros for server package install/uninstall triggers
+Resolves: #850222
+- Use --no-defaults when invoking mysqladmin to wait for the server to start
+Related: #855704
+
+* Sun Aug 5 2012 Tom Lane <tgl@redhat.com> 5.5.27-1
+- Update to MySQL 5.5.27, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-27.html
+
+* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5.25a-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jul 6 2012 Tom Lane <tgl@redhat.com> 5.5.25a-1
+- Update to MySQL 5.5.25a, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25a.html
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-25.html
+- Don't use systemd's Restart feature; rely on mysqld_safe instead
+Resolves: #832029
+
+* Mon Jun 11 2012 Tom Lane <tgl@redhat.com> 5.5.24-1
+- Update to MySQL 5.5.24, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html
+ including the fix for CVE-2012-2122
+Resolves: #830680
+- Tweak logrotate script to put the right permissions on mysqld.log
+- Minor specfile fixes for recent packaging guidelines changes
+
+* Sat Apr 28 2012 Tom Lane <tgl@redhat.com> 5.5.23-1
+- Update to MySQL 5.5.23, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-23.html
+
+* Sat Mar 24 2012 Tom Lane <tgl@redhat.com> 5.5.22-1
+- Update to MySQL 5.5.22, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-22.html
+- Turn on PrivateTmp in service file
+Resolves: #782513
+- Comment out the contents of /etc/logrotate.d/mysqld, so that manual
+ action is needed to enable log rotation. Given the multiple ways in
+ which the rotation script can fail, it seems imprudent to try to make
+ it run by default.
+Resolves: #799735
+
+* Tue Mar 20 2012 Honza Horak <hhorak@redhat.com> 5.5.21-3
+- Revise mysql_plugin test patch so it moves plugin files to
+ a temporary directory (better solution to #789530)
+
+* Tue Mar 13 2012 Honza Horak <hhorak@redhat.com> 5.5.21-2
+- Fix ssl-related tests to specify expected cipher explicitly
+Related: #789600
+- Fix several strcpy calls to check destination size
+
* Mon Feb 27 2012 Tom Lane <tgl@redhat.com> 5.5.21-1
- Update to MySQL 5.5.21, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-21.html
- Hack openssl regression test to still work with rawhide's openssl
- Fix assorted failures in post-install regression tests (mysql-test RPM)
Resolves: #789530
+
+* Fri Feb 10 2012 Tom Lane <tgl@redhat.com> 5.5.20-2
- Revise our test-disabling method to make it possible to disable tests on a
platform-specific basis, and also to get rid of mysql-disable-test.patch,
which broke in just about every upstream update (Honza Horak)
- Disable cycle-counter-dependent regression tests on ARM, since there is
not currently any support for that in Fedora ARM kernels
Resolves: #773116
+- Add some comments to mysqld.service documenting how to customize it
+Resolves: #785243
* Fri Jan 27 2012 Tom Lane <tgl@redhat.com> 5.5.20-1
- Update to MySQL 5.5.20, for various fixes described at
@@ -665,25 +784,44 @@ Resolves: #773116
as well as security fixes described at
http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
Resolves: #783828
+- Re-include the mysqld logrotate script, now that it's not so bogus
+Resolves: #547007
* Wed Jan 4 2012 Tom Lane <tgl@redhat.com> 5.5.19-1
- Update to MySQL 5.5.19, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-19.html
-* Mon Nov 21 2011 Tom Lane <tgl@redhat.com> 5.5.18-1
+* Sun Nov 20 2011 Tom Lane <tgl@redhat.com> 5.5.18-1
- Update to MySQL 5.5.18, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-18.html
+
+* Sat Nov 12 2011 Tom Lane <tgl@redhat.com> 5.5.17-1
+- Update to MySQL 5.5.17, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-17.html
+- Get rid of version-number assumption in sysv-to-systemd conversion trigger
+
+* Wed Nov 02 2011 Honza Horak <hhorak@redhat.com> 5.5.16-4
- Don't assume all ethernet devices are named ethX
Resolves: #682365
+- Exclude user definition from my.cnf, user is defined in mysqld.service now
+Resolves: #661265
-* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.15-1.1
+* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-3
- Fix unportable usage associated with va_list arguments
Resolves: #744707
-* Fri Jul 29 2011 Tom Lane <tgl@redhat.com> 5.5.15-1
+* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-2
+- Update to MySQL 5.5.16, for various fixes described at
+ http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html
+
+* Fri Jul 29 2011 Tom Lane <tgl@redhat.com> 5.5.15-2
- Update to MySQL 5.5.15, for various fixes described at
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-15.html
+* Wed Jul 27 2011 Tom Lane <tgl@redhat.com> 5.5.14-3
+- Convert to systemd startup support (no socket activation, for now anyway)
+Related: #714426
+
* Tue Jul 12 2011 Tom Lane <tgl@redhat.com> 5.5.14-2
- Remove make_scrambled_password and make_scrambled_password_323 from mysql.h,
since we're not allowing clients to call those functions anyway