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