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
1=== modified file 'Makefile-ps'
2--- Makefile-ps 2014-02-03 04:39:37 +0000
3+++ Makefile-ps 2014-02-19 12:55:31 +0000
4@@ -7,13 +7,13 @@
5 RELEASE_DIR ?= $(PERCONA_SERVER)-release
6 SERIES ?=series
7
8-CFLAGS=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
9-CXXFLAGS=-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
10+CFLAGS ?=-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
11+CXXFLAGS ?=-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
12
13 CFLAGS_RELEASE=$(CFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
14 CXXFLAGS_RELEASE=$(CXXFLAGS) -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1
15
16-CMAKE=CC=gcc CXX=gcc cmake $(ADDITIONAL)
17+CMAKE=CC=gcc CXX=g++ cmake $(ADDITIONAL)
18 ADDITIONAL ?=
19 CONFIGURE=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
20
21@@ -25,9 +25,9 @@
22 @echo "Percona Server source code is ready"
23 @echo "Now change directory to $(PERCONA_SERVER) define variables as show below"
24 @echo ""
25- export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
26- export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
27- export LIBS=-lrt
28+ @echo export CFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
29+ @echo export CXXFLAGS="-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2"
30+ @echo export LIBS=-lrt
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"
33 @echo ""
34
35=== modified file 'UDF/Makefile.am'
36--- UDF/Makefile.am 2013-11-29 01:14:06 +0000
37+++ UDF/Makefile.am 2014-02-19 12:55:31 +0000
38@@ -1,3 +1,3 @@
39-ACLOCAL_AMFLAGS = -Im4
40+ACLOCAL_AMFLAGS = -I m4
41
42 SUBDIRS = src
43
44=== modified file 'build-ps/build-binary.sh'
45--- build-ps/build-binary.sh 2013-12-20 02:58:23 +0000
46+++ build-ps/build-binary.sh 2014-02-19 12:55:31 +0000
47@@ -134,7 +134,7 @@
48 then
49 PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
50 else
51- PROCESSORS=4
52+ PROCESSORS=2
53 fi
54
55 # Extract version from the Makefile-ps
56@@ -153,9 +153,17 @@
57
58 # Compilation flags
59 export CC=${CC:-gcc}
60-export CXX=${CXX:-gcc}
61-export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
62-export 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:-}"
63+export CXX=${CXX:-g++}
64+#
65+if [ -n "$(which rpm)" ]; then
66+ export COMMON_FLAGS=$(rpm --eval %optflags | sed -e "s|march=i386|march=i686|g")
67+else
68+ export COMMON_FLAGS="-O2 -g"
69+fi
70+#
71+export CFLAGS="${COMMON_FLAGS} -static-libgcc -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION"
72+export CXXFLAGS="${COMMON_FLAGS} -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION"
73+#
74 export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
75
76 # Create a temporary working directory
77
78=== removed file 'build-ps/build-shared-compat-rpm.sh'
79--- build-ps/build-shared-compat-rpm.sh 2013-03-06 10:47:52 +0000
80+++ build-ps/build-shared-compat-rpm.sh 1970-01-01 00:00:00 +0000
81@@ -1,157 +0,0 @@
82-#!/bin/sh
83-#
84-# Execute this tool to setup and build the shared-compat RPM starting
85-# from a fresh tree
86-#
87-# Usage: build-shared-compat-rpm.sh [target dir]
88-# The default target directory is the current directory. If it is not
89-# supplied and the current directory is not empty, it will issue an error in
90-# order to avoid polluting the current directory after a test run.
91-#
92-# The program will setup the rpm building environment, download the sources
93-# and ultimately call rpmbuild with the appropiate parameters.
94-#
95-
96-# Bail out on errors, be strict
97-set -ue
98-
99-# Examine parameters
100-TARGET=''
101-TARGET_ARG=''
102-TARGET_CFLAGS=''
103-SIGN='--sign'
104-
105-# Check if we have a functional getopt(1)
106-if ! getopt --test
107-then
108- go_out="$(getopt --options="iK" --longoptions=i686,nosign \
109- --name="$(basename "$0")" -- "$@")"
110- test $? -eq 0 || exit 1
111- eval set -- $go_out
112-fi
113-
114-for arg
115-do
116- case "$arg" in
117- -- ) shift; break;;
118- -i | --i686 )
119- shift
120- TARGET='i686'
121- TARGET_ARG="--target i686"
122- TARGET_CFLAGS="-m32 -march=i686"
123- ;;
124- -K | --nosign )
125- shift
126- SIGN=''
127- ;;
128- esac
129-done
130-
131-# Working directory
132-if test "$#" -eq 0
133-then
134- WORKDIR="$(pwd)"
135-
136- # Check that the current directory is not empty
137- if test "x$(echo *)" != "x*"
138- then
139- echo >&2 \
140- "Current directory is not empty. Use $0 . to force build in ."
141- exit 1
142- fi
143-
144-elif test "$#" -eq 1
145-then
146- WORKDIR="$1"
147-
148- # Check that the provided directory exists and is a directory
149- if ! test -d "$WORKDIR"
150- then
151- echo >&2 "$WORKDIR is not a directory"
152- exit 1
153- fi
154-
155-else
156- echo >&2 "Usage: $0 [target dir]"
157- exit 1
158-
159-fi
160-
161-WORKDIR_ABS="$(cd "$WORKDIR"; pwd)"
162-
163-# If we're in 32 bits, ensure that we're compiling for i686.
164-if test "x$TARGET" == "x"
165-then
166- if test "x$(uname -m)" != "xx86_64"
167- then
168- TARGET='i686'
169- TARGET_ARG="--target i686"
170- TARGET_CFLAGS='-m32 -march=i686'
171- fi
172-
173-fi
174-
175-SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
176-test -e "$SOURCEDIR/Makefile" || exit 2
177-
178-# Extract version from the Makefile
179-MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
180- | cut -d = -f 2)"
181-PERCONA_SERVER_VERSION="$(grep ^PERCONA_SERVER_VERSION= \
182- "$SOURCEDIR/Makefile" | cut -d = -f 2)"
183-PRODUCT="Percona-Server-$MYSQL_VERSION-$PERCONA_SERVER_VERSION"
184-
185-# Extract version of the 5.1 branch, to get .so.16 from there.
186-MYSQL_VERSION51="$(grep '^%define version51 ' \
187- "$SOURCEDIR/build/percona-shared-compat.spec" | cut -d ' ' -f3)"
188-
189-# Build information
190-REDHAT_RELEASE="$(grep -o 'release [0-9][0-9]*' /etc/redhat-release | \
191- cut -d ' ' -f 2)"
192-REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
193-
194-# Compilation flags
195-export CC=gcc
196-export CXX=gcc
197-export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"
198-export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"
199-export MAKE_JFLAG=-j4
200-
201-# Create directories for rpmbuild if these don't exist
202-(cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
203-
204-# Prepare sources
205-(
206- cd "$WORKDIR/SOURCES/"
207-
208- # Download the sources from the community site
209- if test "x$TARGET" = "xi686"
210- then
211- RPMVER=i386
212- elif test "x$(uname -m)" = "xx86_64"
213- then
214- RPMVER=x86_64
215- else
216- RPMVER=i386
217- fi
218-
219- wget -c "http://www.percona.com/downloads/community/shared-compat/MySQL-shared-compat-$MYSQL_VERSION-1.linux2.6.$RPMVER.rpm"
220- wget -c "http://www.percona.com/downloads/community/shared-compat/Percona-Server-shared-51-$MYSQL_VERSION51.rhel$REDHAT_RELEASE.$RPMVER.rpm"
221-
222-)
223-
224-# Issue rpmbuild command
225-(
226- cd "$WORKDIR"
227-
228- # Issue RPM command
229- rpmbuild -ba --clean $SIGN \
230- "$SOURCEDIR/build/percona-shared-compat.spec" \
231- --define "_topdir $WORKDIR_ABS" \
232- --define "redhat_version $REDHAT_RELEASE" \
233- --define "gotrevision $REVISION" \
234- --define "release $PERCONA_SERVER_VERSION" \
235- $TARGET_ARG
236-
237-)
238-
239
240=== modified file 'build-ps/debian/rules'
241--- build-ps/debian/rules 2014-02-07 07:16:41 +0000
242+++ build-ps/debian/rules 2014-02-19 12:55:31 +0000
243@@ -61,9 +61,9 @@
244 ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \
245 sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \
246 CC=$${MYSQL_BUILD_CC:-gcc} \
247- CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O3 -DBIG_JOINS=1"} \
248+ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -g -fno-strict-aliasing"} \
249 CXX=$${MYSQL_BUILD_CXX:-g++} \
250- CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti"} \
251+ CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -g -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing"} \
252 cmake -DCMAKE_INSTALL_PREFIX=/usr \
253 \
254 -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
255
256=== modified file 'build-ps/percona-server.spec'
257--- build-ps/percona-server.spec 2014-01-28 10:44:13 +0000
258+++ build-ps/percona-server.spec 2014-02-19 12:55:31 +0000
259@@ -25,15 +25,15 @@
260 %define mysql_vendor Oracle and/or its affiliates
261 %define percona_server_vendor Percona, Inc
262
263-%define mysql_version 5.5.35
264+%define mysql_version @@MYSQL_VERSION@@
265 %define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')
266-%define percona_server_version 33.1
267+%define percona_server_version @@PERCONA_VERSION@@
268
269 %define mysqld_user mysql
270 %define mysqld_group mysql
271 %define mysqldatadir /var/lib/mysql
272
273-%define release rel%{percona_server_version}.1%{?dist}
274+%define release rel%{percona_server_version}%{?dist}
275
276 #
277 # Macros we use which are not available in all supported versions of RPM
278@@ -225,7 +225,6 @@
279 Distribution: %{distro_description}
280 License: 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.
281 Source: http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-%{mysql_version}-%{percona_server_version}/source/%{src_dir}.tar.gz
282-Patch1: mysql-dubious-exports.patch
283 URL: http://www.percona.com/
284 Packager: Percona MySQL Development Team <mysqldev@percona.com>
285 Vendor: %{percona_server_vendor}
286@@ -317,18 +316,17 @@
287 Summary: Percona Server - Shared libraries
288 Group: Applications/Databases
289 Provides: mysql-shared mysql-libs
290-Obsoletes: mysql-libs
291
292 %description -n Percona-Server-shared%{product_suffix}
293 This package contains the shared libraries (*.so*) which certain languages
294 and applications need to dynamically load and use Percona Server.
295
296 ##############################################################################
297+#
298 %prep
299+#
300 %setup -n %{src_dir}
301 #
302-%patch1 -p1
303-#
304 ##############################################################################
305 %build
306
307@@ -366,12 +364,6 @@
308 # Set environment in order of preference, MYSQL_BUILD_* first, then variable
309 # name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the
310 # default RPM build environment.
311-#
312-# We set CXX=gcc by default to support so-called 'generic' binaries, where we
313-# do not have a dependancy on libgcc/libstdc++. This only works while we do
314-# not require C++ features such as exceptions, and may need to be removed at
315-# a later date.
316-#
317
318 # This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break
319 # the compile in cmd-line-utils/readline - needs investigation, but for now
320@@ -423,6 +415,8 @@
321 -DCMAKE_BUILD_TYPE=Debug \
322 -DWITH_EMBEDDED_SERVER=OFF \
323 -DWITH_SSL=system \
324+ -DINSTALL_MYSQLSHAREDIR=share/percona-server \
325+ -DINSTALL_SUPPORTFILESDIR=share/percona-server \
326 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
327 -DFEATURE_SET="%{feature_set}" \
328 -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
329@@ -441,6 +435,8 @@
330 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
331 -DWITH_EMBEDDED_SERVER=OFF \
332 -DWITH_SSL=system \
333+ -DINSTALL_MYSQLSHAREDIR=share/percona-server \
334+ -DINSTALL_SUPPORTFILESDIR=share/percona-server \
335 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
336 -DFEATURE_SET="%{feature_set}" \
337 -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
338@@ -472,39 +468,17 @@
339 # Clean up the BuildRoot first
340 [ "$RBR" != "/" ] && [ -d "$RBR" ] && rm -rf "$RBR";
341
342-# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). This
343-# needs to be during build phase as $CC is not set during install.
344-if "$CC" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1
345-then
346- libgcc=`$CC $CFLAGS --print-libgcc-file`
347- if [ -f $libgcc ]
348- then
349- mkdir -p $RBR%{_libdir}/mysql
350- install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a
351- echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel
352- fi
353-fi
354-
355-# Move temporarily the saved files to the BUILD directory since the BUILDROOT
356-# dir will be cleaned at the start of the install phase
357-mkdir -p "$(dirname $RPM_BUILD_DIR/%{_libdir})"
358-mv $RBR%{_libdir} $RPM_BUILD_DIR/%{_libdir}
359-
360 ##############################################################################
361 %install
362
363 RBR=$RPM_BUILD_ROOT
364 MBD=$RPM_BUILD_DIR/percona-server-%{mysql_version}%{server_suffix}
365
366-# Move back the libdir from BUILD dir to BUILDROOT
367-mkdir -p "$(dirname $RBR%{_libdir})"
368-mv $RPM_BUILD_DIR/%{_libdir} $RBR%{_libdir}
369-
370 # Ensure that needed directories exists
371 install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
372 install -d $RBR%{mysqldatadir}/mysql
373 install -d $RBR%{_datadir}/mysql-test
374-install -d $RBR%{_datadir}/mysql/SELinux/RHEL4
375+install -d $RBR%{_datadir}/percona-server/SELinux/RHEL4
376 install -d $RBR%{_includedir}
377 install -d $RBR%{_libdir}
378 install -d $RBR%{_mandir}
379@@ -552,7 +526,7 @@
380
381 # Install SELinux files in datadir
382 install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \
383- $RBR%{_datadir}/mysql/SELinux/RHEL4
384+ $RBR%{_datadir}/percona-server/SELinux/RHEL4
385
386 %if %{WITH_TCMALLOC}
387 # Even though this is a shared library, put it under /usr/lib*/mysql, so it
388@@ -1093,7 +1067,7 @@
389 %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
390 %attr(755, root, root) %{_sysconfdir}/init.d/mysql
391
392-%attr(755, root, root) %{_datadir}/mysql/
393+%attr(755, root, root) %{_datadir}/percona-server/
394
395 # ----------------------------------------------------------------------------
396 %files -n Percona-Server-client%{product_suffix}
397
398=== removed file 'build-ps/percona-shared-compat.spec'
399--- build-ps/percona-shared-compat.spec 2013-12-20 02:58:23 +0000
400+++ build-ps/percona-shared-compat.spec 1970-01-01 00:00:00 +0000
401@@ -1,97 +0,0 @@
402-#
403-# percona-shared-compat.spec
404-#
405-# Based on MySQL-shared-compat.spec, which is Copyright (C) 2003 MySQL AB
406-#
407-# RPM build instructions to create a "meta" package that includes different
408-# versions of the MySQL shared libraries (for compatibility with
409-# distributions that ship older versions of MySQL).
410-#
411-# In this version we simply repackage mysql-shared-compat from upstream.
412-#
413-# This program is free software; you can redistribute it and/or modify it
414-# under the terms of the GNU General Public License as published by the Free
415-# Software Foundation; version 2 of the License.
416-#
417-# This program is distributed in the hope that it will be useful, but
418-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
419-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
420-# for more details.
421-#
422-# You should have received a copy of the GNU General Public License along
423-# with this program; if not, write to the Free Software Foundation, Inc., 59
424-# Temple Place, Suite 330, Boston, MA 02111-1307 USA
425-
426-# For 5.0 and up, this is needed because of "libndbclient".
427-%define _unpackaged_files_terminate_build 0
428-
429-#
430-# Change this to match the version of the shared libs you want to include
431-#
432-%define version55 5.5.33
433-%define version51 5.1.70
434-%define version50 5.0.91
435-%define version41 4.1.22
436-%define version40 4.0.27
437-#%define version3 3.23.58
438-
439-%define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')
440-
441-Name: Percona-Server-shared-compat
442-Packager: Percona MySQL Development Team <mysql-dev@percona.com>
443-Vendor: Percona Inc
444-License: GPL v2
445-Group: Applications/Databases
446-URL: http://www.percona.com/percona-lab.html
447-Autoreqprov: on
448-Version: %{version55}
449-Release: %{release}.%{gotrevision}.rhel%{redhatversion}
450-BuildRoot: %{_tmppath}/%{name}-%{version}-build
451-%if "%{redhatversion}" == "5"
452-Obsoletes: MySQL-shared mysql
453-%else
454-Obsoletes: MySQL-shared mysql-libs
455-%endif
456-Provides: MySQL-shared mysql-libs
457-Summary: MySQL shared client libraries for MySQL %{version}, %{version50}, %{version41} and %{version40}
458-
459-# We extract the older libraries from mysql-shared-compat and the newer from our sources
460-Source0: MySQL-shared-compat-%{version55}-1.linux2.6.%{_arch}.rpm
461-Source1: Percona-Server-shared-51-%{version51}.rhel%{redhatversion}.%{_arch}.rpm
462-#Source1: MySQL-shared-%{version50}-1.%{_arch}.rpm
463-#Source2: MySQL-shared-%{version41}-0.%{_arch}.rpm
464-#Source3: MySQL-shared-%{version40}-0.%{_arch}.rpm
465-#Source3: MySQL-shared-%{version3}-1.%{_arch}.rpm
466-# No need to include the RPMs once more - they can be downloaded seperately
467-# if you want to rebuild this package
468-NoSource: 0
469-NoSource: 1
470-#NoSource: 2
471-#NoSource: 3
472-BuildRoot: %{_tmppath}/%{name}-%{version}-build
473-
474-%description
475-This package includes the shared libraries for MySQL 4.0, 4.1, 5.0 and 5.1.
476-Install this package instead of "MySQL-shared", if you have applications
477-installed that are dynamically linked against older versions of the MySQL
478-client library but you want to upgrade to MySQL %{version} without breaking the
479-library dependencies.
480-
481-%install
482-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
483-mkdir -p $RPM_BUILD_ROOT
484-cd $RPM_BUILD_ROOT
485-rpm2cpio %{SOURCE0} | cpio -iv --make-directories
486-#rpm2cpio %{SOURCE1} | cpio -iv --make-directories
487-#rpm2cpio %{SOURCE2} | cpio -iv --make-directories
488-#rpm2cpio %{SOURCE3} | cpio -iv --make-directories
489-rpm2cpio %{SOURCE1} | cpio -ivu '*/usr/lib64/libperconaserverclient*so.16*'
490-/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
491-
492-%clean
493-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
494-
495-%files
496-%defattr(-, root, root)
497-%{_libdir}/libperconaserverclient*
498-
499
500=== removed directory 'build-ps/rpm'
501=== removed file 'build-ps/rpm/mysql-dubious-exports.patch'
502--- build-ps/rpm/mysql-dubious-exports.patch 2013-07-23 04:41:43 +0000
503+++ build-ps/rpm/mysql-dubious-exports.patch 1970-01-01 00:00:00 +0000
504@@ -1,158 +0,0 @@
505-Prefix mysql_ to the real names of several symbols that have to be exported
506-from libperconaserverclient because mysql-connector-odbc and/or PHP depend on
507-them. This limits the intrusion on application namespace.
508-
509-Also, remove all traces of make_scrambled_password and
510-make_scrambled_password_323, so that references to these functions draw
511-compile-time warnings, per a suggestion from Paul Howarth in bug #690346.
512-It doesn't seem worth trying to get rid of all the internal symbols exposed
513-by mysql.h, but these two are relatively easy to get rid of.
514-
515-
516-diff -up mysql-5.5.28/client/mysqladmin.cc.p8 mysql-5.5.28/client/mysqladmin.cc
517---- mysql-5.5.28/client/mysqladmin.cc.p8 2012-08-29 10:50:46.000000000 +0200
518-+++ mysql-5.5.28/client/mysqladmin.cc 2012-12-06 14:16:14.598520859 +0100
519-@@ -21,6 +21,7 @@
520- #include <my_pthread.h> /* because of signal() */
521- #include <sys/stat.h>
522- #include <mysql.h>
523-+#include <password.h> /* my_make_scrambled_password_323, my_make_scrambled_password */
524- #include <sql_common.h>
525- #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
526-
527-@@ -989,9 +990,9 @@ static int execute_commands(MYSQL *mysql
528- }
529- }
530- if (old)
531-- make_scrambled_password_323(crypted_pw, typed_password);
532-+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password));
533- else
534-- make_scrambled_password(crypted_pw, typed_password);
535-+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password));
536- }
537- else
538- crypted_pw[0]=0; /* No password */
539-diff -up mysql-5.5.28/include/mysql_com.h.p8 mysql-5.5.28/include/mysql_com.h
540---- mysql-5.5.28/include/mysql_com.h.p8 2012-08-29 10:50:46.000000000 +0200
541-+++ mysql-5.5.28/include/mysql_com.h 2012-12-06 14:16:14.599520860 +0100
542-@@ -452,6 +452,7 @@ my_bool my_net_init(NET *net, Vio* vio);
543- void my_net_local_init(NET *net);
544- void net_end(NET *net);
545- void net_clear(NET *net, my_bool clear_buffer);
546-+#define net_realloc mysql_net_realloc /* namespace sanity */
547- my_bool net_realloc(NET *net, size_t length);
548- my_bool net_flush(NET *net);
549- my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
550-@@ -533,14 +534,12 @@ double my_rnd(struct rand_struct *);
551- void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
552-
553- void hash_password(unsigned long *to, const char *password, unsigned int password_len);
554--void make_scrambled_password_323(char *to, const char *password);
555- void scramble_323(char *to, const char *message, const char *password);
556- my_bool check_scramble_323(const unsigned char *reply, const char *message,
557- unsigned long *salt);
558- void get_salt_from_password_323(unsigned long *res, const char *password);
559- void make_password_from_salt_323(char *to, const unsigned long *salt);
560-
561--void make_scrambled_password(char *to, const char *password);
562- void scramble(char *to, const char *message, const char *password);
563- my_bool check_scramble(const unsigned char *reply, const char *message,
564- const unsigned char *hash_stage2);
565-diff -up mysql-5.5.28/include/mysql.h.pp.p8 mysql-5.5.28/include/mysql.h.pp
566---- mysql-5.5.28/include/mysql.h.pp.p8 2012-08-29 10:50:46.000000000 +0200
567-+++ mysql-5.5.28/include/mysql.h.pp 2012-12-06 14:16:14.598520859 +0100
568-@@ -86,7 +86,7 @@ my_bool my_net_init(NET *net, Vio* vio);
569- void my_net_local_init(NET *net);
570- void net_end(NET *net);
571- void net_clear(NET *net, my_bool clear_buffer);
572--my_bool net_realloc(NET *net, size_t length);
573-+my_bool mysql_net_realloc(NET *net, size_t length);
574- my_bool net_flush(NET *net);
575- my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
576- my_bool net_write_command(NET *net,unsigned char command,
577-@@ -128,13 +128,11 @@ void randominit(struct rand_struct *, un
578- double my_rnd(struct rand_struct *);
579- void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
580- void hash_password(unsigned long *to, const char *password, unsigned int password_len);
581--void make_scrambled_password_323(char *to, const char *password);
582- void scramble_323(char *to, const char *message, const char *password);
583- my_bool check_scramble_323(const unsigned char *reply, const char *message,
584- unsigned long *salt);
585- void get_salt_from_password_323(unsigned long *res, const char *password);
586- void make_password_from_salt_323(char *to, const unsigned long *salt);
587--void make_scrambled_password(char *to, const char *password);
588- void scramble(char *to, const char *message, const char *password);
589- my_bool check_scramble(const unsigned char *reply, const char *message,
590- const unsigned char *hash_stage2);
591-diff -up mysql-5.5.28/include/my_sys.h.p8 mysql-5.5.28/include/my_sys.h
592---- mysql-5.5.28/include/my_sys.h.p8 2012-12-06 14:09:15.218170154 +0100
593-+++ mysql-5.5.28/include/my_sys.h 2012-12-06 14:16:14.598520859 +0100
594-@@ -218,6 +218,7 @@ extern uint my_large_page_size;
595-
596- /* charsets */
597- #define MY_ALL_CHARSETS_SIZE 2048
598-+#define default_charset_info mysql_default_charset_info /* namespace sanity */
599- extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
600- extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
601- extern CHARSET_INFO compiled_charsets[];
602-@@ -895,6 +896,9 @@ extern uint get_charset_number(const cha
603- extern uint get_collation_number(const char *name);
604- extern const char *get_charset_name(uint cs_number);
605-
606-+#define get_charset mysql_get_charset /* namespace sanity */
607-+#define get_charset_by_csname mysql_get_charset_by_csname
608-+
609- extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
610- extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
611- extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
612-diff -up mysql-5.5.28/sql/password.c.p8 mysql-5.5.28/sql/password.c
613---- mysql-5.5.28/sql/password.c.p8 2012-08-29 10:50:46.000000000 +0200
614-+++ mysql-5.5.28/sql/password.c 2012-12-06 14:16:14.599520860 +0100
615-@@ -155,23 +155,6 @@ void my_make_scrambled_password_323(char
616-
617-
618- /*
619-- Wrapper around my_make_scrambled_password_323() to maintain client lib ABI
620-- compatibility.
621-- In server code usage of my_make_scrambled_password_323() is preferred to
622-- avoid strlen().
623-- SYNOPSIS
624-- make_scrambled_password_323()
625-- to OUT store scrambled password here
626-- password IN NULL-terminated string with user-supplied password
627--*/
628--
629--void make_scrambled_password_323(char *to, const char *password)
630--{
631-- my_make_scrambled_password_323(to, password, strlen(password));
632--}
633--
634--
635--/*
636- Scramble string with password.
637- Used in pre 4.1 authentication phase.
638- SYNOPSIS
639-@@ -434,23 +417,6 @@ void my_make_scrambled_password(char *to
640-
641-
642- /*
643-- Wrapper around my_make_scrambled_password() to maintain client lib ABI
644-- compatibility.
645-- In server code usage of my_make_scrambled_password() is preferred to
646-- avoid strlen().
647-- SYNOPSIS
648-- make_scrambled_password()
649-- buf OUT buffer of size 2*SHA1_HASH_SIZE + 2 to store hex string
650-- password IN NULL-terminated password string
651--*/
652--
653--void make_scrambled_password(char *to, const char *password)
654--{
655-- my_make_scrambled_password(to, password, strlen(password));
656--}
657--
658--
659--/*
660- Produce an obscure octet sequence from password and random
661- string, recieved from the server. This sequence corresponds to the
662- password, but password can not be easily restored from it. The sequence

Subscribers

People subscribed via source and target branches