Merge lp:~abychko/percona-server/percona-server-5.5-builds-fixed into lp:percona-server/5.5

Proposed by Alexey Bychko
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 628
Proposed branch: lp:~abychko/percona-server/percona-server-5.5-builds-fixed
Merge into: lp:percona-server/5.5
Diff against target: 662 lines (+33/-463)
8 files modified
Makefile-ps (+6/-6)
UDF/Makefile.am (+1/-1)
build-ps/build-binary.sh (+12/-4)
build-ps/build-shared-compat-rpm.sh (+0/-157)
build-ps/debian/rules (+2/-2)
build-ps/percona-server.spec (+12/-38)
build-ps/percona-shared-compat.spec (+0/-97)
build-ps/rpm/mysql-dubious-exports.patch (+0/-158)
To merge this branch: bzr merge lp:~abychko/percona-server/percona-server-5.5-builds-fixed
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+207178@code.launchpad.net

Description of the change

fixed build issues for 5.5

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile-ps'
--- Makefile-ps 2014-02-03 04:39:37 +0000
+++ Makefile-ps 2014-02-19 12:55:31 +0000
@@ -7,13 +7,13 @@
7RELEASE_DIR ?= $(PERCONA_SERVER)-release7RELEASE_DIR ?= $(PERCONA_SERVER)-release
8SERIES ?=series8SERIES ?=series
99
10CFLAGS=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing10CFLAGS ?=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
11CXXFLAGS=-fno-exceptions -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing11CXXFLAGS ?=-fno-exceptions -fPIC -Wall -Wno-unused-parameter -fno-implicit-templates -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
1212
13CFLAGS_RELEASE=$(CFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=113CFLAGS_RELEASE=$(CFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
14CXXFLAGS_RELEASE=$(CXXFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=114CXXFLAGS_RELEASE=$(CXXFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
1515
16CMAKE=CC=gcc CXX=gcc cmake $(ADDITIONAL)16CMAKE=CC=gcc CXX=g++ cmake $(ADDITIONAL)
17ADDITIONAL ?=17ADDITIONAL ?=
18CONFIGURE=CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" LIBS=-lrt ./configure --prefix=/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION) --with-plugin-innobase --with-plugin-partition18CONFIGURE=CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2" LIBS=-lrt ./configure --prefix=/usr/local/$(PERCONA_SERVER)-$(MYSQL_VERSION) --with-plugin-innobase --with-plugin-partition
1919
@@ -25,9 +25,9 @@
25 @echo "Percona Server source code is ready"25 @echo "Percona Server source code is ready"
26 @echo "Now change directory to $(PERCONA_SERVER) define variables as show below"26 @echo "Now change directory to $(PERCONA_SERVER) define variables as show below"
27 @echo ""27 @echo ""
28 export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"28 @echo export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
29 export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"29 @echo export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
30 export LIBS=-lrt30 @echo export LIBS=-lrt
31 @echo ""31 @echo ""
32 @echo "and run cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF && make all install"32 @echo "and run cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF && make all install"
33 @echo ""33 @echo ""
3434
=== modified file 'UDF/Makefile.am'
--- UDF/Makefile.am 2013-11-29 01:14:06 +0000
+++ UDF/Makefile.am 2014-02-19 12:55:31 +0000
@@ -1,3 +1,3 @@
1ACLOCAL_AMFLAGS = -Im41ACLOCAL_AMFLAGS = -I m4
22
3SUBDIRS = src3SUBDIRS = src
44
=== modified file 'build-ps/build-binary.sh'
--- build-ps/build-binary.sh 2013-12-20 02:58:23 +0000
+++ build-ps/build-binary.sh 2014-02-19 12:55:31 +0000
@@ -134,7 +134,7 @@
134then134then
135 PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"135 PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
136else136else
137 PROCESSORS=4137 PROCESSORS=2
138fi138fi
139139
140# Extract version from the Makefile-ps140# Extract version from the Makefile-ps
@@ -153,9 +153,17 @@
153153
154# Compilation flags154# Compilation flags
155export CC=${CC:-gcc}155export CC=${CC:-gcc}
156export CXX=${CXX:-gcc}156export CXX=${CXX:-g++}
157export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"157#
158export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CXXFLAGS:-}"158if [ -n "$(which rpm)" ]; then
159 export COMMON_FLAGS=$(rpm --eval %optflags | sed -e "s|march=i386|march=i686|g")
160else
161 export COMMON_FLAGS="-O2 -g"
162fi
163#
164export CFLAGS="${COMMON_FLAGS} -static-libgcc -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION"
165export CXXFLAGS="${COMMON_FLAGS} -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION"
166#
159export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"167export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
160168
161# Create a temporary working directory169# Create a temporary working directory
162170
=== removed file 'build-ps/build-shared-compat-rpm.sh'
--- build-ps/build-shared-compat-rpm.sh 2013-03-06 10:47:52 +0000
+++ build-ps/build-shared-compat-rpm.sh 1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
1#!/bin/sh
2#
3# Execute this tool to setup and build the shared-compat RPM starting
4# from a fresh tree
5#
6# Usage: build-shared-compat-rpm.sh [target dir]
7# The default target directory is the current directory. If it is not
8# supplied and the current directory is not empty, it will issue an error in
9# order to avoid polluting the current directory after a test run.
10#
11# The program will setup the rpm building environment, download the sources
12# and ultimately call rpmbuild with the appropiate parameters.
13#
14
15# Bail out on errors, be strict
16set -ue
17
18# Examine parameters
19TARGET=''
20TARGET_ARG=''
21TARGET_CFLAGS=''
22SIGN='--sign'
23
24# Check if we have a functional getopt(1)
25if ! getopt --test
26then
27 go_out="$(getopt --options="iK" --longoptions=i686,nosign \
28 --name="$(basename "$0")" -- "$@")"
29 test $? -eq 0 || exit 1
30 eval set -- $go_out
31fi
32
33for arg
34do
35 case "$arg" in
36 -- ) shift; break;;
37 -i | --i686 )
38 shift
39 TARGET='i686'
40 TARGET_ARG="--target i686"
41 TARGET_CFLAGS="-m32 -march=i686"
42 ;;
43 -K | --nosign )
44 shift
45 SIGN=''
46 ;;
47 esac
48done
49
50# Working directory
51if test "$#" -eq 0
52then
53 WORKDIR="$(pwd)"
54
55 # Check that the current directory is not empty
56 if test "x$(echo *)" != "x*"
57 then
58 echo >&2 \
59 "Current directory is not empty. Use $0 . to force build in ."
60 exit 1
61 fi
62
63elif test "$#" -eq 1
64then
65 WORKDIR="$1"
66
67 # Check that the provided directory exists and is a directory
68 if ! test -d "$WORKDIR"
69 then
70 echo >&2 "$WORKDIR is not a directory"
71 exit 1
72 fi
73
74else
75 echo >&2 "Usage: $0 [target dir]"
76 exit 1
77
78fi
79
80WORKDIR_ABS="$(cd "$WORKDIR"; pwd)"
81
82# If we're in 32 bits, ensure that we're compiling for i686.
83if test "x$TARGET" == "x"
84then
85 if test "x$(uname -m)" != "xx86_64"
86 then
87 TARGET='i686'
88 TARGET_ARG="--target i686"
89 TARGET_CFLAGS='-m32 -march=i686'
90 fi
91
92fi
93
94SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
95test -e "$SOURCEDIR/Makefile" || exit 2
96
97# Extract version from the Makefile
98MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
99 | cut -d = -f 2)"
100PERCONA_SERVER_VERSION="$(grep ^PERCONA_SERVER_VERSION= \
101 "$SOURCEDIR/Makefile" | cut -d = -f 2)"
102PRODUCT="Percona-Server-$MYSQL_VERSION-$PERCONA_SERVER_VERSION"
103
104# Extract version of the 5.1 branch, to get .so.16 from there.
105MYSQL_VERSION51="$(grep '^%define version51 ' \
106 "$SOURCEDIR/build/percona-shared-compat.spec" | cut -d ' ' -f3)"
107
108# Build information
109REDHAT_RELEASE="$(grep -o 'release [0-9][0-9]*' /etc/redhat-release | \
110 cut -d ' ' -f 2)"
111REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
112
113# Compilation flags
114export CC=gcc
115export CXX=gcc
116export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"
117export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"
118export MAKE_JFLAG=-j4
119
120# Create directories for rpmbuild if these don't exist
121(cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
122
123# Prepare sources
124(
125 cd "$WORKDIR/SOURCES/"
126
127 # Download the sources from the community site
128 if test "x$TARGET" = "xi686"
129 then
130 RPMVER=i386
131 elif test "x$(uname -m)" = "xx86_64"
132 then
133 RPMVER=x86_64
134 else
135 RPMVER=i386
136 fi
137
138 wget -c "http://www.percona.com/downloads/community/shared-compat/MySQL-shared-compat-$MYSQL_VERSION-1.linux2.6.$RPMVER.rpm"
139 wget -c "http://www.percona.com/downloads/community/shared-compat/Percona-Server-shared-51-$MYSQL_VERSION51.rhel$REDHAT_RELEASE.$RPMVER.rpm"
140
141)
142
143# Issue rpmbuild command
144(
145 cd "$WORKDIR"
146
147 # Issue RPM command
148 rpmbuild -ba --clean $SIGN \
149 "$SOURCEDIR/build/percona-shared-compat.spec" \
150 --define "_topdir $WORKDIR_ABS" \
151 --define "redhat_version $REDHAT_RELEASE" \
152 --define "gotrevision $REVISION" \
153 --define "release $PERCONA_SERVER_VERSION" \
154 $TARGET_ARG
155
156)
157
1580
=== modified file 'build-ps/debian/rules'
--- build-ps/debian/rules 2014-02-07 07:16:41 +0000
+++ build-ps/debian/rules 2014-02-19 12:55:31 +0000
@@ -61,9 +61,9 @@
61 ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \61 ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
62 sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \62 sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \
63 CC=$${MYSQL_BUILD_CC:-gcc} \63 CC=$${MYSQL_BUILD_CC:-gcc} \
64 CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O3 -DBIG_JOINS=1"} \64 CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -g -fno-strict-aliasing"} \
65 CXX=$${MYSQL_BUILD_CXX:-g++} \65 CXX=$${MYSQL_BUILD_CXX:-g++} \
66 CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti"} \66 CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -g -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing"} \
67 cmake -DCMAKE_INSTALL_PREFIX=/usr \67 cmake -DCMAKE_INSTALL_PREFIX=/usr \
68 \68 \
69 -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \69 -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
7070
=== modified file 'build-ps/percona-server.spec'
--- build-ps/percona-server.spec 2014-01-28 10:44:13 +0000
+++ build-ps/percona-server.spec 2014-02-19 12:55:31 +0000
@@ -25,15 +25,15 @@
25%define mysql_vendor Oracle and/or its affiliates25%define mysql_vendor Oracle and/or its affiliates
26%define percona_server_vendor Percona, Inc26%define percona_server_vendor Percona, Inc
2727
28%define mysql_version 5.5.3528%define mysql_version @@MYSQL_VERSION@@
29%define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')29%define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')
30%define percona_server_version 33.130%define percona_server_version @@PERCONA_VERSION@@
3131
32%define mysqld_user mysql32%define mysqld_user mysql
33%define mysqld_group mysql33%define mysqld_group mysql
34%define mysqldatadir /var/lib/mysql34%define mysqldatadir /var/lib/mysql
3535
36%define release rel%{percona_server_version}.1%{?dist}36%define release rel%{percona_server_version}%{?dist}
3737
38#38#
39# Macros we use which are not available in all supported versions of RPM39# Macros we use which are not available in all supported versions of RPM
@@ -225,7 +225,6 @@
225Distribution: %{distro_description}225Distribution: %{distro_description}
226License: Copyright (c) 2000, 2010, %{mysql_vendor}. All rights reserved. Use is subject to license terms. Under %{license_type} license as shown in the Description field.226License: Copyright (c) 2000, 2010, %{mysql_vendor}. All rights reserved. Use is subject to license terms. Under %{license_type} license as shown in the Description field.
227Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{percona_server_version}/source/%{src_dir}.tar.gz227Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{percona_server_version}/source/%{src_dir}.tar.gz
228Patch1: mysql-dubious-exports.patch
229URL: http://www.percona.com/228URL: http://www.percona.com/
230Packager: Percona MySQL Development Team <mysqldev@percona.com>229Packager: Percona MySQL Development Team <mysqldev@percona.com>
231Vendor: %{percona_server_vendor}230Vendor: %{percona_server_vendor}
@@ -317,18 +316,17 @@
317Summary: Percona Server - Shared libraries316Summary: Percona Server - Shared libraries
318Group: Applications/Databases317Group: Applications/Databases
319Provides: mysql-shared mysql-libs318Provides: mysql-shared mysql-libs
320Obsoletes: mysql-libs
321319
322%description -n Percona-Server-shared%{product_suffix}320%description -n Percona-Server-shared%{product_suffix}
323This package contains the shared libraries (*.so*) which certain languages321This package contains the shared libraries (*.so*) which certain languages
324and applications need to dynamically load and use Percona Server.322and applications need to dynamically load and use Percona Server.
325323
326##############################################################################324##############################################################################
325#
327%prep326%prep
327#
328%setup -n %{src_dir}328%setup -n %{src_dir}
329#329#
330%patch1 -p1
331#
332##############################################################################330##############################################################################
333%build331%build
334332
@@ -366,12 +364,6 @@
366# Set environment in order of preference, MYSQL_BUILD_* first, then variable364# Set environment in order of preference, MYSQL_BUILD_* first, then variable
367# name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the365# name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the
368# default RPM build environment.366# default RPM build environment.
369#
370# We set CXX=gcc by default to support so-called 'generic' binaries, where we
371# do not have a dependancy on libgcc/libstdc++. This only works while we do
372# not require C++ features such as exceptions, and may need to be removed at
373# a later date.
374#
375367
376# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break368# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break
377# the compile in cmd-line-utils/readline - needs investigation, but for now369# the compile in cmd-line-utils/readline - needs investigation, but for now
@@ -423,6 +415,8 @@
423 -DCMAKE_BUILD_TYPE=Debug \415 -DCMAKE_BUILD_TYPE=Debug \
424 -DWITH_EMBEDDED_SERVER=OFF \416 -DWITH_EMBEDDED_SERVER=OFF \
425 -DWITH_SSL=system \417 -DWITH_SSL=system \
418 -DINSTALL_MYSQLSHAREDIR=share/percona-server \
419 -DINSTALL_SUPPORTFILESDIR=share/percona-server \
426 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \420 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
427 -DFEATURE_SET="%{feature_set}" \421 -DFEATURE_SET="%{feature_set}" \
428 -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \422 -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
@@ -441,6 +435,8 @@
441 -DCMAKE_BUILD_TYPE=RelWithDebInfo \435 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
442 -DWITH_EMBEDDED_SERVER=OFF \436 -DWITH_EMBEDDED_SERVER=OFF \
443 -DWITH_SSL=system \437 -DWITH_SSL=system \
438 -DINSTALL_MYSQLSHAREDIR=share/percona-server \
439 -DINSTALL_SUPPORTFILESDIR=share/percona-server \
444 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \440 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
445 -DFEATURE_SET="%{feature_set}" \441 -DFEATURE_SET="%{feature_set}" \
446 -DCOMPILATION_COMMENT="%{compilation_comment_release}" \442 -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
@@ -472,39 +468,17 @@
472# Clean up the BuildRoot first468# Clean up the BuildRoot first
473[ "$RBR" != "/" ] && [ -d "$RBR" ] && rm -rf "$RBR";469[ "$RBR" != "/" ] && [ -d "$RBR" ] && rm -rf "$RBR";
474470
475# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). This
476# needs to be during build phase as $CC is not set during install.
477if "$CC" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1
478then
479 libgcc=`$CC $CFLAGS --print-libgcc-file`
480 if [ -f $libgcc ]
481 then
482 mkdir -p $RBR%{_libdir}/mysql
483 install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a
484 echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel
485 fi
486fi
487
488# Move temporarily the saved files to the BUILD directory since the BUILDROOT
489# dir will be cleaned at the start of the install phase
490mkdir -p "$(dirname $RPM_BUILD_DIR/%{_libdir})"
491mv $RBR%{_libdir} $RPM_BUILD_DIR/%{_libdir}
492
493##############################################################################471##############################################################################
494%install472%install
495473
496RBR=$RPM_BUILD_ROOT474RBR=$RPM_BUILD_ROOT
497MBD=$RPM_BUILD_DIR/percona-server-%{mysql_version}%{server_suffix}475MBD=$RPM_BUILD_DIR/percona-server-%{mysql_version}%{server_suffix}
498476
499# Move back the libdir from BUILD dir to BUILDROOT
500mkdir -p "$(dirname $RBR%{_libdir})"
501mv $RPM_BUILD_DIR/%{_libdir} $RBR%{_libdir}
502
503# Ensure that needed directories exists477# Ensure that needed directories exists
504install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}478install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
505install -d $RBR%{mysqldatadir}/mysql479install -d $RBR%{mysqldatadir}/mysql
506install -d $RBR%{_datadir}/mysql-test480install -d $RBR%{_datadir}/mysql-test
507install -d $RBR%{_datadir}/mysql/SELinux/RHEL4481install -d $RBR%{_datadir}/percona-server/SELinux/RHEL4
508install -d $RBR%{_includedir}482install -d $RBR%{_includedir}
509install -d $RBR%{_libdir}483install -d $RBR%{_libdir}
510install -d $RBR%{_mandir}484install -d $RBR%{_mandir}
@@ -552,7 +526,7 @@
552526
553# Install SELinux files in datadir527# Install SELinux files in datadir
554install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \528install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
555 $RBR%{_datadir}/mysql/SELinux/RHEL4529 $RBR%{_datadir}/percona-server/SELinux/RHEL4
556530
557%if %{WITH_TCMALLOC}531%if %{WITH_TCMALLOC}
558# Even though this is a shared library, put it under /usr/lib*/mysql, so it532# Even though this is a shared library, put it under /usr/lib*/mysql, so it
@@ -1093,7 +1067,7 @@
1093%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql1067%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
1094%attr(755, root, root) %{_sysconfdir}/init.d/mysql1068%attr(755, root, root) %{_sysconfdir}/init.d/mysql
10951069
1096%attr(755, root, root) %{_datadir}/mysql/1070%attr(755, root, root) %{_datadir}/percona-server/
10971071
1098# ----------------------------------------------------------------------------1072# ----------------------------------------------------------------------------
1099%files -n Percona-Server-client%{product_suffix}1073%files -n Percona-Server-client%{product_suffix}
11001074
=== removed file 'build-ps/percona-shared-compat.spec'
--- build-ps/percona-shared-compat.spec 2013-12-20 02:58:23 +0000
+++ build-ps/percona-shared-compat.spec 1970-01-01 00:00:00 +0000
@@ -1,97 +0,0 @@
1#
2# percona-shared-compat.spec
3#
4# Based on MySQL-shared-compat.spec, which is Copyright (C) 2003 MySQL AB
5#
6# RPM build instructions to create a "meta" package that includes different
7# versions of the MySQL shared libraries (for compatibility with
8# distributions that ship older versions of MySQL).
9#
10# In this version we simply repackage mysql-shared-compat from upstream.
11#
12# This program is free software; you can redistribute it and/or modify it
13# under the terms of the GNU General Public License as published by the Free
14# Software Foundation; version 2 of the License.
15#
16# This program is distributed in the hope that it will be useful, but
17# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19# for more details.
20#
21# You should have received a copy of the GNU General Public License along
22# with this program; if not, write to the Free Software Foundation, Inc., 59
23# Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
25# For 5.0 and up, this is needed because of "libndbclient".
26%define _unpackaged_files_terminate_build 0
27
28#
29# Change this to match the version of the shared libs you want to include
30#
31%define version55 5.5.33
32%define version51 5.1.70
33%define version50 5.0.91
34%define version41 4.1.22
35%define version40 4.0.27
36#%define version3 3.23.58
37
38%define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')
39
40Name: Percona-Server-shared-compat
41Packager: Percona MySQL Development Team <mysql-dev@percona.com>
42Vendor: Percona Inc
43License: GPL v2
44Group: Applications/Databases
45URL: http://www.percona.com/percona-lab.html
46Autoreqprov: on
47Version: %{version55}
48Release: %{release}.%{gotrevision}.rhel%{redhatversion}
49BuildRoot: %{_tmppath}/%{name}-%{version}-build
50%if "%{redhatversion}" == "5"
51Obsoletes: MySQL-shared mysql
52%else
53Obsoletes: MySQL-shared mysql-libs
54%endif
55Provides: MySQL-shared mysql-libs
56Summary: MySQL shared client libraries for MySQL %{version}, %{version50}, %{version41} and %{version40}
57
58# We extract the older libraries from mysql-shared-compat and the newer from our sources
59Source0: MySQL-shared-compat-%{version55}-1.linux2.6.%{_arch}.rpm
60Source1: Percona-Server-shared-51-%{version51}.rhel%{redhatversion}.%{_arch}.rpm
61#Source1: MySQL-shared-%{version50}-1.%{_arch}.rpm
62#Source2: MySQL-shared-%{version41}-0.%{_arch}.rpm
63#Source3: MySQL-shared-%{version40}-0.%{_arch}.rpm
64#Source3: MySQL-shared-%{version3}-1.%{_arch}.rpm
65# No need to include the RPMs once more - they can be downloaded seperately
66# if you want to rebuild this package
67NoSource: 0
68NoSource: 1
69#NoSource: 2
70#NoSource: 3
71BuildRoot: %{_tmppath}/%{name}-%{version}-build
72
73%description
74This package includes the shared libraries for MySQL 4.0, 4.1, 5.0 and 5.1.
75Install this package instead of "MySQL-shared", if you have applications
76installed that are dynamically linked against older versions of the MySQL
77client library but you want to upgrade to MySQL %{version} without breaking the
78library dependencies.
79
80%install
81[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
82mkdir -p $RPM_BUILD_ROOT
83cd $RPM_BUILD_ROOT
84rpm2cpio %{SOURCE0} | cpio -iv --make-directories
85#rpm2cpio %{SOURCE1} | cpio -iv --make-directories
86#rpm2cpio %{SOURCE2} | cpio -iv --make-directories
87#rpm2cpio %{SOURCE3} | cpio -iv --make-directories
88rpm2cpio %{SOURCE1} | cpio -ivu '*/usr/lib64/libperconaserverclient*so.16*'
89/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
90
91%clean
92[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
93
94%files
95%defattr(-, root, root)
96%{_libdir}/libperconaserverclient*
97
980
=== removed directory 'build-ps/rpm'
=== removed file 'build-ps/rpm/mysql-dubious-exports.patch'
--- build-ps/rpm/mysql-dubious-exports.patch 2013-07-23 04:41:43 +0000
+++ build-ps/rpm/mysql-dubious-exports.patch 1970-01-01 00:00:00 +0000
@@ -1,158 +0,0 @@
1Prefix mysql_ to the real names of several symbols that have to be exported
2from libperconaserverclient because mysql-connector-odbc and/or PHP depend on
3them. This limits the intrusion on application namespace.
4
5Also, remove all traces of make_scrambled_password and
6make_scrambled_password_323, so that references to these functions draw
7compile-time warnings, per a suggestion from Paul Howarth in bug #690346.
8It doesn't seem worth trying to get rid of all the internal symbols exposed
9by mysql.h, but these two are relatively easy to get rid of.
10
11
12diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc
13--- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200
14+++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100
15@@ -21,6 +21,7 @@
16 #include <my_pthread.h> /* because of signal() */
17 #include <sys/stat.h>
18 #include <mysql.h>
19+#include <password.h> /* my_make_scrambled_password_323, my_make_scrambled_password */
20 #include <sql_common.h>
21 #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
22
23@@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql
24 }
25 }
26 if (old)
27- make_scrambled_password_323(crypted_pw, typed_password);
28+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password));
29 else
30- make_scrambled_password(crypted_pw, typed_password);
31+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password));
32 }
33 else
34 crypted_pw[0]=0; /* No password */
35diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h
36--- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200
37+++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100
38@@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio);
39 void my_net_local_init(NET *net);
40 void net_end(NET *net);
41 void net_clear(NET *net, my_bool clear_buffer);
42+#define net_realloc mysql_net_realloc /* namespace sanity */
43 my_bool net_realloc(NET *net, size_t length);
44 my_bool net_flush(NET *net);
45 my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
46@@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *);
47 void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
48
49 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
50-void make_scrambled_password_323(char *to, const char *password);
51 void scramble_323(char *to, const char *message, const char *password);
52 my_bool check_scramble_323(const unsigned char *reply, const char *message,
53 unsigned long *salt);
54 void get_salt_from_password_323(unsigned long *res, const char *password);
55 void make_password_from_salt_323(char *to, const unsigned long *salt);
56
57-void make_scrambled_password(char *to, const char *password);
58 void scramble(char *to, const char *message, const char *password);
59 my_bool check_scramble(const unsigned char *reply, const char *message,
60 const unsigned char *hash_stage2);
61diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp
62--- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200
63+++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100
64@@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio);
65 void my_net_local_init(NET *net);
66 void net_end(NET *net);
67 void net_clear(NET *net, my_bool clear_buffer);
68-my_bool net_realloc(NET *net, size_t length);
69+my_bool mysql_net_realloc(NET *net, size_t length);
70 my_bool net_flush(NET *net);
71 my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
72 my_bool net_write_command(NET *net,unsigned char command,
73@@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un
74 double my_rnd(struct rand_struct *);
75 void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
76 void hash_password(unsigned long *to, const char *password, unsigned int password_len);
77-void make_scrambled_password_323(char *to, const char *password);
78 void scramble_323(char *to, const char *message, const char *password);
79 my_bool check_scramble_323(const unsigned char *reply, const char *message,
80 unsigned long *salt);
81 void get_salt_from_password_323(unsigned long *res, const char *password);
82 void make_password_from_salt_323(char *to, const unsigned long *salt);
83-void make_scrambled_password(char *to, const char *password);
84 void scramble(char *to, const char *message, const char *password);
85 my_bool check_scramble(const unsigned char *reply, const char *message,
86 const unsigned char *hash_stage2);
87diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h
88--- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100
89+++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100
90@@ -218,6 +218,7 @@ extern uint my_large_page_size;
91
92 /* charsets */
93 #define MY_ALL_CHARSETS_SIZE 2048
94+#define default_charset_info mysql_default_charset_info /* namespace sanity */
95 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
96 extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
97 extern CHARSET_INFO compiled_charsets[];
98@@ -895,6 +896,9 @@ extern uint get_charset_number(const cha
99 extern uint get_collation_number(const char *name);
100 extern const char *get_charset_name(uint cs_number);
101
102+#define get_charset mysql_get_charset /* namespace sanity */
103+#define get_charset_by_csname mysql_get_charset_by_csname
104+
105 extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
106 extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
107 extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
108diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c
109--- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200
110+++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100
111@@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char
112
113
114 /*
115- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI
116- compatibility.
117- In server code usage of my_make_scrambled_password_323() is preferred to
118- avoid strlen().
119- SYNOPSIS
120- make_scrambled_password_323()
121- to OUT store scrambled password here
122- password IN NULL-terminated string with user-supplied password
123-*/
124-
125-void make_scrambled_password_323(char *to, const char *password)
126-{
127- my_make_scrambled_password_323(to, password, strlen(password));
128-}
129-
130-
131-/*
132 Scramble string with password.
133 Used in pre 4.1 authentication phase.
134 SYNOPSIS
135@@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to
136
137
138 /*
139- Wrapper around my_make_scrambled_password() to maintain client lib ABI
140- compatibility.
141- In server code usage of my_make_scrambled_password() is preferred to
142- avoid strlen().
143- SYNOPSIS
144- make_scrambled_password()
145- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
146- password IN NULL-terminated password string
147-*/
148-
149-void make_scrambled_password(char *to, const char *password)
150-{
151- my_make_scrambled_password(to, password, strlen(password));
152-}
153-
154-
155-/*
156 Produce an obscure octet sequence from password and random
157 string, recieved from the server. This sequence corresponds to the
158 password, but password can not be easily restored from it. The sequence

Subscribers

People subscribed via source and target branches