Update to MySQL 5.5.28; assorted minor packaging fixes

This commit is contained in:
Tom Lane 2012-09-29 15:57:43 -04:00 committed by Michal Schorm
parent cae704db91
commit b29f12be3a
9 changed files with 75 additions and 49 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/mysql-5.5.27-nodocs.tar.gz
/mysql-5.5.28-nodocs.tar.gz

View File

@ -117,6 +117,9 @@ libmysqlclient_16 {
# de-facto API as well. We're not going to export the deprecated version
# make_scrambled_password, however.
my_make_scrambled_password;
# This really shouldn't be exported, but some applications use it as a
# workaround for inadequate threading support; see bug #846602
THR_KEY_mysys;
local:
*;
};

View File

@ -10,22 +10,10 @@ Fedora builds, I'm not feeling motivated to try to fix yassl for this.
See RH bug #598656. Filed upstream at http://bugs.mysql.com/bug.php?id=54158
diff -Naur mysql-5.1.47.orig/vio/viosslfactories.c mysql-5.1.47/vio/viosslfactories.c
--- mysql-5.1.47.orig/vio/viosslfactories.c 2010-05-06 11:28:07.000000000 -0400
+++ mysql-5.1.47/vio/viosslfactories.c 2010-05-26 23:23:46.000000000 -0400
@@ -100,7 +100,7 @@
(long) ctx, cert_file, key_file));
if (cert_file)
{
- if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
+ if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0)
{
*error= SSL_INITERR_CERT;
DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));
diff -Naur mysql-5.1.47.orig/extra/yassl/src/ssl.cpp mysql-5.1.47/extra/yassl/src/ssl.cpp
--- mysql-5.1.47.orig/extra/yassl/src/ssl.cpp 2010-05-06 11:24:26.000000000 -0400
+++ mysql-5.1.47/extra/yassl/src/ssl.cpp 2010-05-26 23:29:13.000000000 -0400
@@ -1606,10 +1606,10 @@
diff -Naur mysql-5.5.28.orig/extra/yassl/src/ssl.cpp mysql-5.5.28/extra/yassl/src/ssl.cpp
--- mysql-5.5.28.orig/extra/yassl/src/ssl.cpp 2012-08-29 04:50:46.000000000 -0400
+++ mysql-5.5.28/extra/yassl/src/ssl.cpp 2012-09-29 12:45:19.682287214 -0400
@@ -1627,10 +1627,10 @@
}
@ -39,3 +27,15 @@ diff -Naur mysql-5.1.47.orig/extra/yassl/src/ssl.cpp mysql-5.1.47/extra/yassl/sr
}
diff -Naur mysql-5.5.28.orig/vio/viosslfactories.c mysql-5.5.28/vio/viosslfactories.c
--- mysql-5.5.28.orig/vio/viosslfactories.c 2012-08-29 04:50:46.000000000 -0400
+++ mysql-5.5.28/vio/viosslfactories.c 2012-09-29 12:46:35.124975585 -0400
@@ -106,7 +106,7 @@
key_file= cert_file;
if (cert_file &&
- SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
+ SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0)
{
*error= SSL_INITERR_CERT;
DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));

View File

@ -1,22 +0,0 @@
Adjust openssl_1.result to match actual output when using OpenSSL.
The given expected result seems to be yaSSL-specific, as of mysql 5.5.14.
Upstream at http://bugs.mysql.com/bug.php?id=61827
diff -Naur mysql-5.5.14.orig/mysql-test/r/openssl_1.result mysql-5.5.14/mysql-test/r/openssl_1.result
--- mysql-5.5.14.orig/mysql-test/r/openssl_1.result 2011-06-21 12:42:40.000000000 -0400
+++ mysql-5.5.14/mysql-test/r/openssl_1.result 2011-07-11 18:52:39.925070616 -0400
@@ -44,9 +44,9 @@
drop user ssl_user1@localhost, ssl_user2@localhost,
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
drop table t1;
-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
+mysqltest: Could not open connection 'default': 2026 SSL connection error: error:00000001:lib(0):func(0):reason(1)
+mysqltest: Could not open connection 'default': 2026 SSL connection error: error:00000001:lib(0):func(0):reason(1)
+mysqltest: Could not open connection 'default': 2026 SSL connection error: error:00000001:lib(0):func(0):reason(1)
SSL error: Unable to get private key from ''
mysqltest: Could not open connection 'default': 2026 SSL connection error: Unable to get private key
SSL error: Unable to get certificate from ''

View File

@ -1,5 +1,5 @@
Name: mysql
Version: 5.5.27
Version: 5.5.28
Release: 1%{?dist}
Summary: MySQL client programs and shared libraries
@ -48,7 +48,6 @@ 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
@ -203,7 +202,6 @@ the MySQL sources.
%patch8 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
@ -459,10 +457,14 @@ rm -rf $RPM_BUILD_ROOT
/sbin/ldconfig
%post server
%if 0%{?systemd_post:1}
%systemd_post mysqld.service
%else
if [ $1 = 1 ]; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%endif
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
@ -482,11 +484,15 @@ if [ -f /etc/rc.d/init.d/mysqld ]; then
fi
%preun server
%if 0%{?systemd_preun:1}
%systemd_preun mysqld.service
%else
if [ $1 = 0 ]; then
# 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
@ -494,11 +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
# Package upgrade, not uninstall
/bin/systemctl try-restart mysqld.service >/dev/null 2>&1 || :
fi
%endif
%files
@ -691,6 +701,20 @@ 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

View File

@ -22,10 +22,31 @@ datadir="$result"
get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
errlogfile="$result"
# Absorb configuration settings from the specified systemd service file,
# or the default "mysqld" service if not specified
SERVICE_NAME="$1"
if [ x"$SERVICE_NAME" = x ]
then
SERVICE_NAME=mysqld.service
fi
myuser=`systemctl show -p User "${SERVICE_NAME}" |
sed 's/^User=//'`
if [ x"$myuser" = x ]
then
myuser=mysql
fi
mygroup=`systemctl show -p Group "${SERVICE_NAME}" |
sed 's/^Group=//'`
if [ x"$mygroup" = x ]
then
mygroup=mysql
fi
# Set up the errlogfile with appropriate permissions
touch "$errlogfile"
chown mysql:mysql "$errlogfile"
chown "$myuser:$mygroup" "$errlogfile"
chmod 0640 "$errlogfile"
[ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile"
@ -37,13 +58,13 @@ if [ ! -d "$datadir/mysql" ] ; then
then
mkdir -p "$datadir" || exit 1
fi
chown mysql:mysql "$datadir"
chown "$myuser:$mygroup" "$datadir"
chmod 0755 "$datadir"
[ -x /sbin/restorecon ] && /sbin/restorecon "$datadir"
# Now create the database
echo "Initializing MySQL database"
/usr/bin/mysql_install_db --datadir="$datadir" --user=mysql
/usr/bin/mysql_install_db --datadir="$datadir" --user="$myuser"
ret=$?
if [ $ret -ne 0 ] ; then
echo "Initialization of MySQL database failed." >&2
@ -55,7 +76,7 @@ if [ ! -d "$datadir/mysql" ] ; then
exit $ret
fi
# In case we're running as root, make sure files are owned properly
chown -R mysql:mysql "$datadir"
chown -R "$myuser:$mygroup" "$datadir"
fi
exit 0

View File

@ -31,7 +31,7 @@ socketfile="$result"
# Wait for the server to come up or for the mysqld process to disappear
ret=0
while /bin/true; do
RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
mret=$?
if [ $mret -eq 0 ]; then
break

View File

@ -27,7 +27,7 @@ Type=simple
User=mysql
Group=mysql
ExecStartPre=/usr/libexec/mysqld-prepare-db-dir
ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
# per bug #547485
ExecStart=/usr/bin/mysqld_safe --basedir=/usr

View File

@ -1 +1 @@
fc115ac6b28412298886651cffc70ccf mysql-5.5.27-nodocs.tar.gz
88d39960d3f348836f803aca091ee601 mysql-5.5.28-nodocs.tar.gz