rpms/mysql/devel mysql-abi-check.patch, NONE, 1.1 mysql.spec, 1.155, 1.156

Tom Lane tgl at fedoraproject.org
Wed Jul 14 16:36:39 UTC 2010


Author: tgl

Update of /cvs/pkgs/rpms/mysql/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4693

Modified Files:
	mysql.spec 
Added Files:
	mysql-abi-check.patch 
Log Message:
Fix FTBFS with gcc 4.5.

mysql-abi-check.patch:
 Makefile.am        |    9 +++------
 include/mysql.h    |    2 ++
 include/mysql.h.pp |    1 -
 3 files changed, 5 insertions(+), 7 deletions(-)

--- NEW FILE mysql-abi-check.patch ---
Fix "ABI check" that doesn't work on gcc >= 4.5, or indeed any compiler that
aborts on missing #include's.  Per http://bugs.mysql.com/bug.php?id=52514


diff -Naur mysql-5.1.48.orig/Makefile.am mysql-5.1.48/Makefile.am
--- mysql-5.1.48.orig/Makefile.am	2010-06-03 11:50:10.000000000 -0400
+++ mysql-5.1.48/Makefile.am	2010-07-14 10:39:06.274186484 -0400
@@ -275,10 +275,7 @@
 #
 # 1) Generate preprocessor output for the files that need to
 #    be tested for abi/api changes. use -nostdinc to prevent
-#    generation of preprocessor output for system headers. This
-#    results in messages in stderr saying that these headers
-#    were not found. Redirect the stderr output to /dev/null
-#    to prevent seeing these messages.
+#    generation of preprocessor output for system headers.
 # 2) sed the output to 
 #    2.1) remove blank lines and lines that begin with "# "
 #    2.2) When gcc -E is run on the Mac OS  and solaris sparc platforms it
@@ -314,14 +311,14 @@
 do_abi_check:
 	set -ex; \
 	for file in $(abi_headers); do \
-	         @CC@ -E -nostdinc -dI \
+	         @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
 	                  -I$(top_srcdir)/include \
 	                  -I$(top_srcdir)/include/mysql \
 	                  -I$(top_srcdir)/sql \
 	                  -I$(top_builddir)/include \
 	                  -I$(top_builddir)/include/mysql \
 	                  -I$(top_builddir)/sql \
-	                                 $$file 2>/dev/null | \
+	                                 $$file | \
 	                  @SED@ -e '/^# /d' \
 	                            -e '/^[ 	]*$$/d' \
 	                            -e '/^#pragma GCC set_debug_pwd/d' \
diff -Naur mysql-5.1.48.orig/include/mysql.h mysql-5.1.48/include/mysql.h
--- mysql-5.1.48.orig/include/mysql.h	2010-06-03 11:50:21.000000000 -0400
+++ mysql-5.1.48/include/mysql.h	2010-07-14 10:35:53.489148781 -0400
@@ -44,7 +44,9 @@
 #endif
 
 #ifndef _global_h				/* If not standard header */
+#ifndef MYSQL_ABI_CHECK
 #include <sys/types.h>
+#endif
 #ifdef __LCC__
 #include <winsock2.h>				/* For windows */
 #endif
diff -Naur mysql-5.1.48.orig/include/mysql.h.pp mysql-5.1.48/include/mysql.h.pp
--- mysql-5.1.48.orig/include/mysql.h.pp	2010-06-03 11:50:12.000000000 -0400
+++ mysql-5.1.48/include/mysql.h.pp	2010-07-14 10:35:53.491151797 -0400
@@ -1,4 +1,3 @@
-#include <sys/types.h>
 typedef char my_bool;
 typedef int my_socket;
 #include "mysql_version.h"


Index: mysql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mysql/devel/mysql.spec,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -p -r1.155 -r1.156
--- mysql.spec	14 Jul 2010 02:08:48 -0000	1.155
+++ mysql.spec	14 Jul 2010 16:36:38 -0000	1.156
@@ -1,6 +1,6 @@
 Name: mysql
 Version: 5.1.48
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: MySQL client programs and shared libraries
 Group: Applications/Databases
 URL: http://www.mysql.com
@@ -44,6 +44,7 @@ Patch13: mysql-expired-certs.patch
 Patch14: mysql-missing-string-code.patch
 Patch15: mysql-lowercase-bug.patch
 Patch16: mysql-chain-certs.patch
+Patch17: mysql-abi-check.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: gperf, perl, readline-devel, openssl-devel
@@ -184,6 +185,7 @@ the MySQL sources.
 %patch14 -p1
 %patch15 -p1
 %patch16 -p1
+%patch17 -p1
 
 libtoolize --force
 aclocal
@@ -574,6 +576,10 @@ fi
 %{_mandir}/man1/mysql_client_test.1*
 
 %changelog
+* Wed Jul 14 2010 Tom Lane <tgl at redhat.com> 5.1.48-3
+- Fix FTBFS with gcc 4.5.
+Related: #614293
+
 * Tue Jul 13 2010 Tom Lane <tgl at redhat.com> 5.1.48-2
 - Duplicate COPYING and EXCEPTIONS-CLIENT in -libs and -embedded subpackages,
   to ensure they are available when any subset of mysql RPMs are installed,



More information about the scm-commits mailing list