Merge lp:~ignacio-nin/percona-xtradb-cluster/pxc-bug1133266 into lp:percona-xtradb-cluster/percona-xtradb-cluster-5.5

Proposed by Ignacio Nin
Status: Merged
Approved by: Raghavendra D Prabhu
Approved revision: 388
Merged at revision: 388
Proposed branch: lp:~ignacio-nin/percona-xtradb-cluster/pxc-bug1133266
Merge into: lp:percona-xtradb-cluster/percona-xtradb-cluster-5.5
Diff against target: 149 lines (+38/-11)
4 files modified
build/build-binary.sh (+14/-5)
build/build-dpkg.sh (+13/-3)
build/build-rpm.sh (+9/-1)
build/percona-xtradb-cluster.spec (+2/-2)
To merge this branch: bzr merge lp:~ignacio-nin/percona-xtradb-cluster/pxc-bug1133266
Reviewer Review Type Date Requested Status
Raghavendra D Prabhu (community) Approve
Review via email: mp+167638@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Looks good.

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-04-06 09:45:47 +0000
3+++ build/build-binary.sh 2013-06-05 20:52:42 +0000
4@@ -106,6 +106,14 @@
5 exit 1
6 fi
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@@ -131,7 +139,7 @@
20 export CXX=${CXX:-gcc}
21 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_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_SERVER_VERSION $TARGET_CFLAGS ${CXXFLAGS:-}"
23-export MAKE_JFLAG=-j4
24+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
25
26 export WSREP_REV="$WSREP_REV"
27
28@@ -162,7 +170,8 @@
29 export CXX=${GALERA_CXX:-g++}
30
31 cd "percona-xtradb-cluster-galera"
32- scons --config=force revno="$GALERA_REVISION" garb/garbd libgalera_smm.so
33+ scons --config=force revno="$GALERA_REVISION" $MAKE_JFLAG \
34+ garb/garbd libgalera_smm.so
35 mkdir -p "$INSTALLDIR/usr/local/$PRODUCT_FULL/bin" \
36 "$INSTALLDIR/usr/local/$PRODUCT_FULL/lib"
37 cp garb/garbd "$INSTALLDIR/usr/local/$PRODUCT_FULL/bin"
38@@ -203,7 +212,7 @@
39 --with-mysql-plugindir="/usr/local/$PRODUCT_FULL/lib/mysql/plugin" \
40 --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/plugin" \
41 --prefix="/usr/local/$PRODUCT_FULL"
42- make
43+ make $MAKE_JFLAG
44 make DESTDIR="$INSTALLDIR" install
45
46 )
47@@ -213,7 +222,7 @@
48 cd "UDF"
49 CXX=${UDF_CXX:-g++} ./configure --includedir="$INSTALLDIR/src/Percona-Server/include" \
50 --libdir="/usr/local/$PRODUCT_FULL/mysql/plugin"
51- make
52+ make $MAKE_JFLAG
53 make DESTDIR="$INSTALLDIR" install
54
55 )
56@@ -226,7 +235,7 @@
57
58 ./configure --prefix="/usr/local/$PRODUCT_FULL/" \
59 --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/"
60- make
61+ make $MAKE_JFLAG
62 make DESTDIR="$INSTALLDIR" install_lib_shared
63
64 # Copy COPYING file
65
66=== modified file 'build/build-dpkg.sh'
67--- build/build-dpkg.sh 2013-04-11 20:42:44 +0000
68+++ build/build-dpkg.sh 2013-06-05 20:52:42 +0000
69@@ -64,6 +64,14 @@
70 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
71 test -e "$SOURCEDIR/Makefile" || exit 2
72
73+# The number of processors is a good default for -j
74+if test -e "/proc/cpuinfo"
75+then
76+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
77+else
78+ PROCESSORS=4
79+fi
80+
81 # Extract version from the Makefile
82 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
83 | cut -d = -f 2)"
84@@ -80,11 +88,13 @@
85 export DEB_BUILD_OPTIONS='debug nocheck'
86
87 # Compilation flags
88-export CC=${CC:-gcc}
89-export CXX=${CXX:-gcc}
90+export CC="${CC:-gcc}"
91+export CXX="${CXX:-gcc}"
92+export HS_CXX=${HS_CXX:-g++}
93+export UDF_CXX=${UDF_CXX:-g++}
94 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CFLAGS:-}"
95 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CXXFLAGS:-}"
96-export MAKE_JFLAG=-j4
97+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
98
99 # Prepare sources
100 (
101
102=== modified file 'build/build-rpm.sh'
103--- build/build-rpm.sh 2013-04-05 17:15:41 +0000
104+++ build/build-rpm.sh 2013-06-05 20:52:42 +0000
105@@ -96,6 +96,14 @@
106 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
107 test -e "$SOURCEDIR/Makefile" || exit 2
108
109+# The number of processors is a good default for -j
110+if test -e "/proc/cpuinfo"
111+then
112+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
113+else
114+ PROCESSORS=4
115+fi
116+
117 # Extract version from the Makefile
118 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
119 | cut -d = -f 2)"
120@@ -119,7 +127,7 @@
121 export UDF_CXX=${UDF_CXX:-g++}
122 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
123 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:-}"
124-export MAKE_JFLAG=-j4
125+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
126
127 # For the wsrep version
128 export WSREP_REV="$(cd "$SOURCEDIR";test -r WSREP-REVISION && cat WSREP-REVISION || echo "$REVISION")"
129
130=== modified file 'build/percona-xtradb-cluster.spec'
131--- build/percona-xtradb-cluster.spec 2013-04-23 05:19:16 +0000
132+++ build/percona-xtradb-cluster.spec 2013-06-05 20:52:42 +0000
133@@ -401,7 +401,7 @@
134 --with-mysql-plugindir=%{_libdir}/mysql/plugin \
135 --libdir=%{_libdir} \
136 --prefix=%{_prefix}
137- make
138+ make ${MAKE_JFLAG}
139 cd -
140 }
141
142@@ -411,7 +411,7 @@
143 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \
144 ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/%{src_dir}/include \
145 --libdir=%{_libdir}/mysql/plugin
146- make all
147+ make ${MAKE_JFLAG} all
148 cd -
149 }
150

Subscribers

People subscribed via source and target branches

to all changes: