Merge lp:~ignacio-nin/percona-server/5.1-bug1133266 into lp:percona-server/5.1

Proposed by Ignacio Nin
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 570
Proposed branch: lp:~ignacio-nin/percona-server/5.1-bug1133266
Merge into: lp:percona-server/5.1
Diff against target: 208 lines (+49/-16)
5 files modified
build/build-binary.sh (+11/-3)
build/build-dpkg.sh (+11/-2)
build/build-rpm.sh (+9/-1)
build/debian/rules (+10/-4)
build/percona-server.spec (+8/-6)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.1-bug1133266
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+167642@code.launchpad.net
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 'build/build-binary.sh'
2--- build/build-binary.sh 2013-03-25 17:49:38 +0000
3+++ build/build-binary.sh 2013-06-05 21:10:41 +0000
4@@ -77,6 +77,14 @@
5 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
6 test -e "$SOURCEDIR/Makefile" || exit 2
7
8+# The number of processors is a good default for -j
9+if test -e "/proc/cpuinfo"
10+then
11+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
12+else
13+ PROCESSORS=4
14+fi
15+
16 # Extract version from the Makefile
17 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
18 | cut -d = -f 2)"
19@@ -98,7 +106,7 @@
20 export CXX=${CXX:-gcc}
21 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
22 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION $TARGET_CFLAGS ${CXXFLAGS:-}"
23-export MAKE_JFLAG=-j4
24+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
25
26 # Create a temporary working directory
27 INSTALLDIR="$(cd "$WORKDIR" && TMPDIR="$WORKDIR_ABS" mktemp -d percona-build.XXXXXX)"
28@@ -142,7 +150,7 @@
29 --with-mysql-plugindir="/usr/local/$PRODUCT_FULL/lib/mysql/plugin" \
30 --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/plugin" \
31 --prefix="/usr/local/$PRODUCT_FULL"
32- make
33+ make $MAKE_JFLAG
34 make DESTDIR="$INSTALLDIR" install
35
36 )
37@@ -152,7 +160,7 @@
38 cd "UDF"
39 CXX=${UDF_CXX:-g++} ./configure --includedir="$SOURCEDIR/$PRODUCT/include" \
40 --libdir="/usr/local/$PRODUCT_FULL/mysql/plugin"
41- make
42+ make $MAKE_JFLAG
43 make DESTDIR="$INSTALLDIR" install
44
45 )
46
47=== modified file 'build/build-dpkg.sh'
48--- build/build-dpkg.sh 2013-05-23 09:10:47 +0000
49+++ build/build-dpkg.sh 2013-06-05 21:10:41 +0000
50@@ -67,6 +67,14 @@
51 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
52 test -e "$SOURCEDIR/Makefile" || exit 2
53
54+# The number of processors is a good default for -j
55+if test -e "/proc/cpuinfo"
56+then
57+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
58+else
59+ PROCESSORS=4
60+fi
61+
62 # Extract version from the Makefile
63 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
64 | cut -d = -f 2)"
65@@ -79,12 +87,13 @@
66 # Build information
67 export BB_PERCONA_REVISION="$(cd "$SOURCEDIR"; bzr revno)"
68 export DEB_BUILD_OPTIONS='debug'
69-export MYSQL_BUILD_CC='gcc'
70-export MYSQL_BUILD_CXX='gcc'
71+export MYSQL_BUILD_CC="${CC:-gcc}"
72+export MYSQL_BUILD_CXX="${CXX:-gcc}"
73 export HS_CXX=${HS_CXX:-g++}
74 export UDF_CXX=${UDF_CXX:-g++}
75 export MYSQL_BUILD_CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION"
76 export MYSQL_BUILD_CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION"
77+export MYSQL_BUILD_MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
78
79 # Prepare sources
80 (
81
82=== modified file 'build/build-rpm.sh'
83--- build/build-rpm.sh 2013-03-06 10:46:45 +0000
84+++ build/build-rpm.sh 2013-06-05 21:10:41 +0000
85@@ -94,6 +94,14 @@
86 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
87 test -e "$SOURCEDIR/Makefile" || exit 2
88
89+# The number of processors is a good default for -j
90+if test -e "/proc/cpuinfo"
91+then
92+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
93+else
94+ PROCESSORS=4
95+fi
96+
97 # Extract version from the Makefile
98 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
99 | cut -d = -f 2)"
100@@ -115,7 +123,7 @@
101 export UDF_CXX=${UDF_CXX:-g++}
102 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION $TARGET_CFLAGS"
103 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_INNODB_VERSION $TARGET_CFLAGS"
104-export MAKE_JFLAG=-j4
105+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
106
107 export MYSQL_RPMBUILD_TEST="$TEST"
108
109
110=== modified file 'build/debian/rules'
111--- build/debian/rules 2013-05-30 05:37:36 +0000
112+++ build/debian/rules 2013-06-05 21:10:41 +0000
113@@ -28,8 +28,14 @@
114
115 MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi)
116 ifeq (${MAKE_J}, -j0)
117- MAKE_J = -j1
118-endif
119+ MAKE_J = -j4
120+endif
121+ifeq ($(MYSQL_BUILD_MAKE_JFLAG),)
122+ MAKE_JFLAG = $(MAKE_J)
123+else
124+ MAKE_JFLAG = $(MYSQL_BUILD_MAKE_JFLAG)
125+endif
126+
127 MYSQL_SRC = $(shell pwd)
128
129 MAKE_TEST_TARGET=test-force
130@@ -118,7 +124,7 @@
131 build-stamp: configure
132 dh_testdir
133
134- $(MAKE) $(MAKE_J)
135+ $(MAKE) $(MAKE_JFLAG)
136 ifneq ($(findstring check,$(DEB_BUILD_OPTIONS)),)
137 if [ ! -f testsuite-stamp ] ; then \
138 $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
139@@ -196,7 +202,7 @@
140 --with-mysql-plugindir="/usr/lib/mysql/plugin" \
141 --libdir="/usr/lib" \
142 --prefix="/usr" && \
143- $(MAKE)
144+ $(MAKE) $(MAKE_JFLAG)
145 cd storage/HandlerSocket-Plugin-for-MySQL && $(MAKE) install DESTDIR=$(TMP)/
146 # build Maatkit UDF
147 cd UDF/ && CXX="$${UDF_CXX:-g++}" ./configure --includedir=$(MYSQL_SRC)/include --libdir=/usr/lib/mysql/plugin && $(MAKE) all && $(MAKE) install DESTDIR=$(TMP)/
148
149=== modified file 'build/percona-server.spec'
150--- build/percona-server.spec 2013-05-23 09:09:56 +0000
151+++ build/percona-server.spec 2013-06-05 21:10:41 +0000
152@@ -273,9 +273,11 @@
153 MAKE_J=-j`if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi`
154 if [ $MAKE_J = -j0 ]
155 then
156- MAKE_J=-j1
157+ MAKE_J=-j4
158 fi
159
160+MAKE_JFLAG="${MAKE_JFLAG:-$MAKE_J}"
161+
162 # The --enable-assembler simply does nothing on systems that does not
163 # support assembler speedups.
164 sh -c "CFLAGS=\"$CFLAGS\" \
165@@ -309,7 +311,7 @@
166 %endif
167 $OPT_DEBUG \
168 --with-readline \
169- ; make $MAKE_J"
170+ ; make $MAKE_JFLAG"
171 }
172 # end of function definition "BuildMySQL"
173
174@@ -321,14 +323,14 @@
175 --with-mysql-plugindir=%{_libdir}/mysql/plugin \
176 --libdir=%{_libdir} \
177 --prefix=%{_prefix}
178-make
179+make $MAKE_JFLAG
180 cd -
181 }
182
183 BuildUDF() {
184 cd UDF
185 CXX=${UDF_CXX:-g++} ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include --libdir=%{_libdir}/mysql/plugin
186-make all
187+make $MAKE_JFLAG all
188 cd -
189 }
190 # end of function definition "BuildHandlerSocket"
191@@ -406,7 +408,7 @@
192 ( BuildServer ) # subshell, so that CFLAGS + CXXFLAGS are modified only locally
193
194 if [ "$MYSQL_RPMBUILD_TEST" != "no" ] ; then
195- MTR_BUILD_THREAD=auto make %{DEBUG_TEST_MODE}
196+ MTR_BUILD_THREAD=auto make $MAKE_JFLAG %{DEBUG_TEST_MODE}
197 fi
198
199 # Get the debug server and its .sym file from the build tree
200@@ -428,7 +430,7 @@
201 BuildHandlerSocket
202 BuildUDF
203 if [ "$MYSQL_RPMBUILD_TEST" != "no" ] ; then
204- MTR_BUILD_THREAD=auto make %{NORMAL_TEST_MODE}
205+ MTR_BUILD_THREAD=auto make $MAKE_JFLAG %{NORMAL_TEST_MODE}
206 fi
207
208 # Now, build plugin

Subscribers

People subscribed via source and target branches