Merge lp:~ignacio-nin/percona-server/5.6-bug1079688 into lp:percona-server/5.6

Proposed by Ignacio Nin
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 359
Proposed branch: lp:~ignacio-nin/percona-server/5.6-bug1079688
Merge into: lp:percona-server/5.6
Diff against target: 463 lines (+36/-312)
5 files modified
build/build-shared-compat-rpm.sh (+0/-157)
build/debian/libmysqlclient-dev.install (+0/-1)
build/debian/rules (+12/-27)
build/percona-server.spec (+24/-30)
build/percona-shared-compat.spec (+0/-97)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.6-bug1079688
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+166383@code.launchpad.net

Description of the change

Fix for bug #1079688

We're also piggybacking a fix to the build/ directory that introduced some issues after revno 349 (part of The Merge). This fix is to return some files to its pre-349 (correct) status.

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=== removed file 'build/build-shared-compat-rpm.sh'
2--- build/build-shared-compat-rpm.sh 2013-05-12 09:21:34 +0000
3+++ build/build-shared-compat-rpm.sh 1970-01-01 00:00:00 +0000
4@@ -1,157 +0,0 @@
5-#!/bin/sh
6-#
7-# Execute this tool to setup and build the shared-compat RPM starting
8-# from a fresh tree
9-#
10-# Usage: build-shared-compat-rpm.sh [target dir]
11-# The default target directory is the current directory. If it is not
12-# supplied and the current directory is not empty, it will issue an error in
13-# order to avoid polluting the current directory after a test run.
14-#
15-# The program will setup the rpm building environment, download the sources
16-# and ultimately call rpmbuild with the appropiate parameters.
17-#
18-
19-# Bail out on errors, be strict
20-set -ue
21-
22-# Examine parameters
23-TARGET=''
24-TARGET_ARG=''
25-TARGET_CFLAGS=''
26-SIGN='--sign'
27-
28-# Check if we have a functional getopt(1)
29-if ! getopt --test
30-then
31- go_out="$(getopt --options="iK" --longoptions=i686,nosign \
32- --name="$(basename "$0")" -- "$@")"
33- test $? -eq 0 || exit 1
34- eval set -- $go_out
35-fi
36-
37-for arg
38-do
39- case "$arg" in
40- -- ) shift; break;;
41- -i | --i686 )
42- shift
43- TARGET='i686'
44- TARGET_ARG="--target i686"
45- TARGET_CFLAGS="-m32 -march=i686"
46- ;;
47- -K | --nosign )
48- shift
49- SIGN=''
50- ;;
51- esac
52-done
53-
54-# Working directory
55-if test "$#" -eq 0
56-then
57- WORKDIR="$(pwd)"
58-
59- # Check that the current directory is not empty
60- if test "x$(echo *)" != "x*"
61- then
62- echo >&2 \
63- "Current directory is not empty. Use $0 . to force build in ."
64- exit 1
65- fi
66-
67-elif test "$#" -eq 1
68-then
69- WORKDIR="$1"
70-
71- # Check that the provided directory exists and is a directory
72- if ! test -d "$WORKDIR"
73- then
74- echo >&2 "$WORKDIR is not a directory"
75- exit 1
76- fi
77-
78-else
79- echo >&2 "Usage: $0 [target dir]"
80- exit 1
81-
82-fi
83-
84-WORKDIR_ABS="$(cd "$WORKDIR"; pwd)"
85-
86-# If we're in 32 bits, ensure that we're compiling for i686.
87-if test "x$TARGET" == "x"
88-then
89- if test "x$(uname -m)" != "xx86_64"
90- then
91- TARGET='i686'
92- TARGET_ARG="--target i686"
93- TARGET_CFLAGS='-m32 -march=i686'
94- fi
95-
96-fi
97-
98-SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
99-test -e "$SOURCEDIR/Makefile" || exit 2
100-
101-# Extract version from the Makefile
102-MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
103- | cut -d = -f 2)"
104-PERCONA_SERVER_VERSION="$(grep ^PERCONA_SERVER_VERSION= \
105- "$SOURCEDIR/Makefile" | cut -d = -f 2)"
106-PRODUCT="Percona-Server-$MYSQL_VERSION-$PERCONA_SERVER_VERSION"
107-
108-# Extract version of the 5.1 branch, to get .so.16 from there.
109-MYSQL_VERSION51="$(grep '^%define version51 ' \
110- "$SOURCEDIR/build/percona-shared-compat.spec" | cut -d ' ' -f3)"
111-
112-# Build information
113-REDHAT_RELEASE="$(grep -o 'release [0-9][0-9]*' /etc/redhat-release | \
114- cut -d ' ' -f 2)"
115-REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
116-
117-# Compilation flags
118-export CC=gcc
119-export CXX=gcc
120-export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer $TARGET_CFLAGS"
121-export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions $TARGET_CFLAGS"
122-export MAKE_JFLAG=-j4
123-
124-# Create directories for rpmbuild if these don't exist
125-(cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
126-
127-# Prepare sources
128-(
129- cd "$WORKDIR/SOURCES/"
130-
131- # Download the sources from the community site
132- if test "x$TARGET" = "xi686"
133- then
134- RPMVER=i386
135- elif test "x$(uname -m)" = "xx86_64"
136- then
137- RPMVER=x86_64
138- else
139- RPMVER=i386
140- fi
141-
142- wget -c "http://www.percona.com/downloads/community/shared-compat/MySQL-shared-compat-$MYSQL_VERSION-1.linux2.6.$RPMVER.rpm"
143- wget -c "http://www.percona.com/downloads/community/shared-compat/Percona-Server-shared-51-$MYSQL_VERSION51.rhel$REDHAT_RELEASE.$RPMVER.rpm"
144-
145-)
146-
147-# Issue rpmbuild command
148-(
149- cd "$WORKDIR"
150-
151- # Issue RPM command
152- rpmbuild -ba --clean $SIGN \
153- "$SOURCEDIR/build/percona-shared-compat.spec" \
154- --define "_topdir $WORKDIR_ABS" \
155- --define "redhat_version $REDHAT_RELEASE" \
156- --define "gotrevision $REVISION" \
157- --define "release $PERCONA_SERVER_VERSION" \
158- $TARGET_ARG
159-
160-)
161-
162
163=== modified file 'build/debian/libmysqlclient-dev.install'
164--- build/debian/libmysqlclient-dev.install 2013-05-10 13:29:38 +0000
165+++ build/debian/libmysqlclient-dev.install 2013-05-29 20:38:44 +0000
166@@ -3,5 +3,4 @@
167 usr/lib/libmysqlclient.a
168 usr/lib/libmysqlclient_r.a
169 usr/lib/libmysqlservices.a
170-usr/lib/libhsclient.a
171 usr/share/man/man1/mysql_config.1
172
173=== modified file 'build/debian/rules'
174--- build/debian/rules 2013-05-13 04:25:56 +0000
175+++ build/debian/rules 2013-05-29 20:38:44 +0000
176@@ -56,48 +56,33 @@
177
178 # Build UDF
179 cd UDF && \
180- CXX=g++ CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/include" \
181+ CXX="$${UDF_CXX:-g++}" CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/release/include" \
182 ./configure --includedir=$(CURDIR)/include \
183 --libdir=$(prefix)/lib/mysql/plugin && \
184 make $(MAKE_JFLAG)
185
186- dh_auto_test
187+build:
188+ dh build
189
190 binary:
191- echo "Making binary"
192- dh --before dh_auto_install binary
193- dh_auto_install
194- cd UDF && make DESTDIR=$(TMP) install
195- dh --after dh_auto_install --before dh_installinit binary
196- dh_installinit --name=mysql
197- dh --after dh_installinit binary
198-
199+ dh -Brelease binary
200
201 binary-arch:
202- echo "Making binary"
203- dh --before dh_auto_install binary-arch
204- dh_auto_install
205- cd UDF && make DESTDIR=$(TMP) install
206- dh --after dh_auto_install --before dh_installinit binary-arch
207- dh_installinit --name=mysql
208- dh --after dh_installinit binary-arch
209+ dh -Brelease binary-arch
210
211 binary-indep:
212- echo "Making binary"
213- dh --before dh_auto_install binary-indep
214- dh_auto_install
215- cd UDF && make DESTDIR=$(TMP) install
216- dh --after dh_auto_install --before dh_installinit binary-indep
217- dh_installinit --name=mysql
218- dh --after dh_installinit binary-indep
219+ dh -Brelease binary-indep
220
221 install:
222- echo "Making binary"
223- dh --before dh_auto_install install
224+ dh install
225+
226+override_dh_auto_install:
227 dh_auto_install
228 cd UDF && make DESTDIR=$(TMP) install
229- dh --after dh_auto_install --before dh_installinit install
230+
231+override_dh_installinit:
232 dh_installinit --name=mysql
233
234 override_dh_strip:
235 dh_strip --dbg-package=percona-server-5.6-dbg
236+
237
238=== modified file 'build/percona-server.spec'
239--- build/percona-server.spec 2013-05-26 10:55:00 +0000
240+++ build/percona-server.spec 2013-05-29 20:38:44 +0000
241@@ -703,26 +703,13 @@
242 fi
243
244 %post -n Percona-Server-server%{product_suffix}
245-if [ X${PERCONA_DEBUG} == X1 ]; then
246- set -x
247-fi
248+
249 # ATTENTION: Parts of this are duplicated in the "triggerpostun" !
250
251 mysql_datadir=%{mysqldatadir}
252 NEW_VERSION=%{mysql_version}-%{release}
253 STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER
254
255-if [ $1 -eq 1 ]; then
256-# ----------------------------------------------------------------------
257-# Create a MySQL user and group. Do not report any problems if it already
258-# exists.
259-# ----------------------------------------------------------------------
260-groupadd -r %{mysqld_group} 2> /dev/null || true
261-useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \
262- -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
263-# The user may already exist, make sure it has the proper group nevertheless
264-# (BUG#12823)
265-usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
266 # ----------------------------------------------------------------------
267 # Create data directory if needed, check whether upgrade or install
268 # ----------------------------------------------------------------------
269@@ -740,11 +727,8 @@
270 # If the directory exists, we may assume it is an upgrade.
271 echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE
272 fi
273-if [ ! -d $mysql_datadir/test ]; then
274- mkdir $mysql_datadir/test;
275-fi
276-%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
277-fi
278+if [ ! -d $mysql_datadir/test ] ; then mkdir $mysql_datadir/test; fi
279+
280 # ----------------------------------------------------------------------
281 # Make MySQL start/shutdown automatically when the machine does it.
282 # ----------------------------------------------------------------------
283@@ -759,15 +743,33 @@
284 fi
285
286 # ----------------------------------------------------------------------
287+# Create a MySQL user and group. Do not report any problems if it already
288+# exists.
289+# ----------------------------------------------------------------------
290+groupadd -r %{mysqld_group} 2> /dev/null || true
291+useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \
292+ -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
293+# The user may already exist, make sure it has the proper group nevertheless
294+# (BUG#12823)
295+usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
296+
297+# ----------------------------------------------------------------------
298+# Change permissions so that the user that will run the MySQL daemon
299+# owns all database files.
300+# ----------------------------------------------------------------------
301+chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
302+
303+# ----------------------------------------------------------------------
304 # Initiate databases if needed
305 # ----------------------------------------------------------------------
306+%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
307+
308 # ----------------------------------------------------------------------
309 # Upgrade databases if needed would go here - but it cannot be automated yet
310 # ----------------------------------------------------------------------
311
312 # ----------------------------------------------------------------------
313-# Change permissions so that the user that will run the MySQL daemon
314-# owns all database files.
315+# Change permissions again to fix any new files.
316 # ----------------------------------------------------------------------
317 chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
318
319@@ -1006,7 +1008,6 @@
320 %attr(755, root, root) %{_sbindir}/mysqld
321 %attr(755, root, root) %{_sbindir}/mysqld-debug
322 %attr(755, root, root) %{_sbindir}/rcmysql
323-%attr(755, root, root) %{_bindir}/innodb_memcached_config.sql
324 %attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini
325 %attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
326 %attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
327@@ -1019,9 +1020,6 @@
328 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_client.so
329 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_interface.so
330 %attr(755, root, root) %{_libdir}/mysql/plugin/qa_auth_server.so
331-%attr(755, root, root) %{_libdir}/mysql/plugin/auth_pam.so
332-%attr(755, root, root) %{_libdir}/mysql/plugin/auth_pam_compat.so
333-%attr(755, root, root) %{_libdir}/mysql/plugin/dialog.so
334 %attr(755, root, root) %{_libdir}/mysql/plugin/validate_password.so
335 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
336 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
337@@ -1034,9 +1032,6 @@
338 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_client.so
339 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_interface.so
340 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/qa_auth_server.so
341-%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_pam.so
342-%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_pam_compat.so
343-%attr(755, root, root) %{_libdir}/mysql/plugin/debug/dialog.so
344 %attr(755, root, root) %{_libdir}/mysql/plugin/debug/validate_password.so
345 # UDF files
346 %attr(755, root, root) %{_libdir}/mysql/plugin/libfnv1a_udf.so
347@@ -1107,13 +1102,12 @@
348 %{_libdir}/mysql/libmysqlclient.a
349 %{_libdir}/mysql/libmysqlclient_r.a
350 %{_libdir}/mysql/libmysqlservices.a
351-%{_libdir}/*.so
352
353 # ----------------------------------------------------------------------------
354 %files -n Percona-Server-shared%{product_suffix}
355 %defattr(-, root, root, 0755)
356 # Shared libraries (omit for architectures that don't support them)
357-%{_libdir}/libmysql*.so.*
358+%{_libdir}/libmysql*.so*
359 # Maatkit UDF libs
360 %{_libdir}/mysql/plugin/libfnv1a_udf.a
361 %{_libdir}/mysql/plugin/libfnv1a_udf.la
362
363=== removed file 'build/percona-shared-compat.spec'
364--- build/percona-shared-compat.spec 2013-03-05 16:39:46 +0000
365+++ build/percona-shared-compat.spec 1970-01-01 00:00:00 +0000
366@@ -1,97 +0,0 @@
367-#
368-# percona-shared-compat.spec
369-#
370-# Based on MySQL-shared-compat.spec, which is Copyright (C) 2003 MySQL AB
371-#
372-# RPM build instructions to create a "meta" package that includes different
373-# versions of the MySQL shared libraries (for compatibility with
374-# distributions that ship older versions of MySQL).
375-#
376-# In this version we simply repackage mysql-shared-compat from upstream.
377-#
378-# This program is free software; you can redistribute it and/or modify it
379-# under the terms of the GNU General Public License as published by the Free
380-# Software Foundation; version 2 of the License.
381-#
382-# This program is distributed in the hope that it will be useful, but
383-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
384-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
385-# for more details.
386-#
387-# You should have received a copy of the GNU General Public License along
388-# with this program; if not, write to the Free Software Foundation, Inc., 59
389-# Temple Place, Suite 330, Boston, MA 02111-1307 USA
390-
391-# For 5.0 and up, this is needed because of "libndbclient".
392-%define _unpackaged_files_terminate_build 0
393-
394-#
395-# Change this to match the version of the shared libs you want to include
396-#
397-%define version55 5.5.29
398-%define version51 5.1.66
399-%define version50 5.0.91
400-%define version41 4.1.22
401-%define version40 4.0.27
402-#%define version3 3.23.58
403-
404-%define redhatversion %(lsb_release -rs | awk -F. '{ print $1}')
405-
406-Name: Percona-Server-shared-compat
407-Packager: Percona MySQL Development Team <mysql-dev@percona.com>
408-Vendor: Percona Inc
409-License: GPL v2
410-Group: Applications/Databases
411-URL: http://www.percona.com/percona-lab.html
412-Autoreqprov: on
413-Version: %{version55}
414-Release: %{release}.%{gotrevision}.rhel%{redhatversion}
415-BuildRoot: %{_tmppath}/%{name}-%{version}-build
416-%if "%{redhatversion}" == "5"
417-Obsoletes: MySQL-shared mysql
418-%else
419-Obsoletes: MySQL-shared mysql-libs
420-%endif
421-Provides: MySQL-shared mysql-libs
422-Summary: MySQL shared client libraries for MySQL %{version}, %{version50}, %{version41} and %{version40}
423-
424-# We extract the older libraries from mysql-shared-compat and the newer from our sources
425-Source0: MySQL-shared-compat-%{version55}-1.linux2.6.%{_arch}.rpm
426-Source1: Percona-Server-shared-51-%{version51}.rhel%{redhatversion}.%{_arch}.rpm
427-#Source1: MySQL-shared-%{version50}-1.%{_arch}.rpm
428-#Source2: MySQL-shared-%{version41}-0.%{_arch}.rpm
429-#Source3: MySQL-shared-%{version40}-0.%{_arch}.rpm
430-#Source3: MySQL-shared-%{version3}-1.%{_arch}.rpm
431-# No need to include the RPMs once more - they can be downloaded seperately
432-# if you want to rebuild this package
433-NoSource: 0
434-NoSource: 1
435-#NoSource: 2
436-#NoSource: 3
437-BuildRoot: %{_tmppath}/%{name}-%{version}-build
438-
439-%description
440-This package includes the shared libraries for MySQL 4.0, 4.1, 5.0 and 5.1.
441-Install this package instead of "MySQL-shared", if you have applications
442-installed that are dynamically linked against older versions of the MySQL
443-client library but you want to upgrade to MySQL %{version} without breaking the
444-library dependencies.
445-
446-%install
447-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
448-mkdir -p $RPM_BUILD_ROOT
449-cd $RPM_BUILD_ROOT
450-rpm2cpio %{SOURCE0} | cpio -iv --make-directories
451-#rpm2cpio %{SOURCE1} | cpio -iv --make-directories
452-#rpm2cpio %{SOURCE2} | cpio -iv --make-directories
453-#rpm2cpio %{SOURCE3} | cpio -iv --make-directories
454-rpm2cpio %{SOURCE1} | cpio -ivu '*/usr/lib64/libmysqlclient*so.16*'
455-/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
456-
457-%clean
458-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
459-
460-%files
461-%defattr(-, root, root)
462-%{_libdir}/libmysqlclient*
463-

Subscribers

People subscribed via source and target branches