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

Proposed by Ignacio Nin
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 500
Merged at revision: 534
Proposed branch: lp:~ignacio-nin/percona-server/5.5-bug1133266
Merge into: lp:percona-server/5.5
Diff against target: 139 lines (+36/-10)
4 files modified
build/build-binary.sh (+12/-4)
build/build-dpkg.sh (+13/-3)
build/build-rpm.sh (+9/-1)
build/percona-server.spec (+2/-2)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.5-bug1133266
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+167636@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-05-30 19:16:16 +0000
3+++ build/build-binary.sh 2013-06-05 20:52:33 +0000
4@@ -99,6 +99,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@@ -118,7 +126,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 # Create a temporary working directory
27 INSTALLDIR="$(cd "$WORKDIR" && TMPDIR="$WORKDIR_ABS" mktemp -d percona-build.XXXXXX)"
28@@ -168,7 +176,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@@ -178,7 +186,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@@ -191,7 +199,7 @@
47
48 ./configure --prefix="/usr/local/$PRODUCT_FULL/" \
49 --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/"
50- make
51+ make $MAKE_JFLAG
52 make DESTDIR="$INSTALLDIR" install_lib_shared
53
54 # Copy COPYING file
55
56=== modified file 'build/build-dpkg.sh'
57--- build/build-dpkg.sh 2013-06-01 15:04:43 +0000
58+++ build/build-dpkg.sh 2013-06-05 20:52:33 +0000
59@@ -69,6 +69,14 @@
60 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
61 test -e "$SOURCEDIR/Makefile" || exit 2
62
63+# The number of processors is a good default for -j
64+if test -e "/proc/cpuinfo"
65+then
66+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
67+else
68+ PROCESSORS=4
69+fi
70+
71 # Extract version from the Makefile
72 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
73 | cut -d = -f 2)"
74@@ -82,11 +90,13 @@
75 export DEB_BUILD_OPTIONS='debug'
76
77 # Compilation flags
78-export CC=${CC:-gcc}
79-export CXX=${CXX:-gcc}
80+export CC="${CC:-gcc}"
81+export CXX="${CXX:-gcc}"
82+export HS_CXX=${HS_CXX:-g++}
83+export UDF_CXX=${UDF_CXX:-g++}
84 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CFLAGS:-}"
85 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CXXFLAGS:-}"
86-export MAKE_JFLAG=-j4
87+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
88
89 # Prepare sources
90 (
91
92=== modified file 'build/build-rpm.sh'
93--- build/build-rpm.sh 2013-05-30 19:16:16 +0000
94+++ build/build-rpm.sh 2013-06-05 20:52:33 +0000
95@@ -98,6 +98,14 @@
96 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
97 test -e "$SOURCEDIR/Makefile" || exit 2
98
99+# The number of processors is a good default for -j
100+if test -e "/proc/cpuinfo"
101+then
102+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
103+else
104+ PROCESSORS=4
105+fi
106+
107 # Extract version from the Makefile
108 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
109 | cut -d = -f 2)"
110@@ -117,7 +125,7 @@
111 export UDF_CXX=${UDF_CXX:-g++}
112 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
113 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:-}"
114-export MAKE_JFLAG=-j4
115+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
116
117 # Create directories for rpmbuild if these don't exist
118 (cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
119
120=== modified file 'build/percona-server.spec'
121--- build/percona-server.spec 2013-06-01 15:04:43 +0000
122+++ build/percona-server.spec 2013-06-05 20:52:33 +0000
123@@ -349,7 +349,7 @@
124 --with-mysql-plugindir=%{_libdir}/mysql/plugin \
125 --libdir=%{_libdir} \
126 --prefix=%{_prefix}
127- make
128+ make ${MAKE_JFLAG}
129 cd -
130 }
131
132@@ -359,7 +359,7 @@
133 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \
134 ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include \
135 --libdir=%{_libdir}/mysql/plugin
136- make all
137+ make ${MAKE_JFLAG} all
138 cd -
139 }
140

Subscribers

People subscribed via source and target branches