summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmysql.version3
-rw-r--r--mysql-chain-certs.patch31
-rw-r--r--mysql55.spec31
-rw-r--r--mysqld-prepare-db-dir29
-rw-r--r--mysqld-wait-ready2
-rw-r--r--mysqld.service2
6 files changed, 76 insertions, 22 deletions
diff --git a/libmysql.version b/libmysql.version
index 409009e..35dbc64 100644
--- a/libmysql.version
+++ b/libmysql.version
@@ -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:
*;
};
diff --git a/mysql-chain-certs.patch b/mysql-chain-certs.patch
index 579dae2..164c22e 100644
--- a/mysql-chain-certs.patch
+++ b/mysql-chain-certs.patch
@@ -10,21 +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
---- mysql-5.5.28/vio/viosslfactories.c.orig 2012-08-29 10:50:46.000000000 +0200
-+++ mysql-5.5.28/vio/viosslfactories.c 2012-09-29 11:16:08.622223862 +0200
-@@ -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));
-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 @@
}
@@ -38,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));
diff --git a/mysql55.spec b/mysql55.spec
index 8013791..5968be4 100644
--- a/mysql55.spec
+++ b/mysql55.spec
@@ -1,6 +1,6 @@
Name: mysql
Version: 5.5.28
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MySQL client programs and shared libraries
Group: Applications/Databases
@@ -532,6 +532,9 @@ echo -e "You should consider upgrading to a supported release.\n"
/sbin/ldconfig
%post server
+%if 0%{?systemd_post:1}
+%systemd_post mysqld.service
+%else
if [ $1 = 1 ]; then
# Initial installation
%if 0%{?fedora} >= 15
@@ -540,6 +543,7 @@ if [ $1 = 1 ]; then
/sbin/chkconfig --add mysqld
%endif
fi
+%endif
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
@@ -561,6 +565,9 @@ fi
%endif
%preun server
+%if 0%{?systemd_preun:1}
+%systemd_preun mysqld.service
+%else
if [ $1 = 0 ]; then
# Package removal, not upgrade
%if 0%{?fedora} >= 15
@@ -571,6 +578,7 @@ if [ $1 = 0 ]; then
/sbin/chkconfig --del mysqld
%endif
fi
+%endif
%postun libs
if [ $1 = 0 ] ; then
@@ -578,6 +586,9 @@ if [ $1 = 0 ] ; then
fi
%postun server
+%if 0%{?systemd_postun_with_restart:1}
+%systemd_postun_with_restart mysqld.service
+%else
%if 0%{?fedora} >= 15
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
@@ -589,6 +600,7 @@ if [ $1 -ge 1 ]; then
/sbin/service mysqld condrestart >/dev/null 2>&1 || :
fi
%endif
+%endif
%files
@@ -787,6 +799,23 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
+* Sat Sep 29 2012 Remi Collet <RPMS@FamilleCollet.com> - 5.5.28-2
+- sync with rawhide
+
+* 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
+
* Sat Sep 29 2012 Remi Collet <RPMS@FamilleCollet.com> - 5.5.28-1
- update to MySQL 5.5.28 Community Server GA
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-28.html
diff --git a/mysqld-prepare-db-dir b/mysqld-prepare-db-dir
index 78c0bd7..f73bc66 100644
--- a/mysqld-prepare-db-dir
+++ b/mysqld-prepare-db-dir
@@ -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
diff --git a/mysqld-wait-ready b/mysqld-wait-ready
index 8fe99ec..9b0fd0c 100644
--- a/mysqld-wait-ready
+++ b/mysqld-wait-ready
@@ -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
diff --git a/mysqld.service b/mysqld.service
index c6e4dea..3193ce2 100644
--- a/mysqld.service
+++ b/mysqld.service
@@ -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