Merge lp:~abychko/percona-xtrabackup/XB-2.2-BLD-68 into lp:percona-xtrabackup/2.2

Proposed by Alexey Bychko on 2014-03-07
Status: Merged
Approved by: Alexey Kopytov on 2014-03-16
Approved revision: 4951
Merged at revision: 4953
Proposed branch: lp:~abychko/percona-xtrabackup/XB-2.2-BLD-68
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 328 lines (+52/-115)
11 files modified
cmake/make_dist.cmake.in (+0/-9)
cmake/mysql_version.cmake (+1/-1)
cmake/ssl.cmake (+1/-1)
storage/innobase/xtrabackup/utils/build-binary.sh (+4/-23)
storage/innobase/xtrabackup/utils/build-dpkg.sh (+27/-47)
storage/innobase/xtrabackup/utils/build-rpm.sh (+5/-5)
storage/innobase/xtrabackup/utils/debian/control (+1/-1)
storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install (+0/-1)
storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install (+0/-6)
storage/innobase/xtrabackup/utils/debian/rules (+2/-8)
storage/innobase/xtrabackup/utils/percona-xtrabackup.spec (+11/-13)
To merge this branch: bzr merge lp:~abychko/percona-xtrabackup/XB-2.2-BLD-68
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2014-03-07 Approve on 2014-03-16
Review via email: mp+209922@code.launchpad.net

Description of the change

[*] fixed tar name in cmake dist target
[*] fixed build-binary.sh
[*] fixed build-rpm.sh
[*] fixed rpm spec
[*] fixed build-deb.sh
[*] fixed debian build file & logic

To post a comment you must log in.
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/make_dist.cmake.in'
2--- cmake/make_dist.cmake.in 2013-02-26 05:45:28 +0000
3+++ cmake/make_dist.cmake.in 2014-03-07 13:36:02 +0000
4@@ -119,15 +119,6 @@
5 CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
6 ${PACKAGE_DIR}/sql/sql_yacc.cc COPYONLY)
7
8-# Copy spec files
9-SET(SPECFILENAME "mysql.${VERSION}.spec")
10-IF("${VERSION}" MATCHES "-ndb-")
11- STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
12- SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec")
13-ENDIF()
14-CONFIGURE_FILE(${CMAKE_BINARY_DIR}/support-files/${SPECFILENAME}
15- ${PACKAGE_DIR}/support-files/${SPECFILENAME} COPYONLY)
16-
17 # Add documentation, if user has specified where to find them
18 IF(MYSQL_DOCS_LOCATION)
19 MESSAGE("Copying documentation files from " ${MYSQL_DOCS_LOCATION})
20
21=== modified file 'cmake/mysql_version.cmake'
22--- cmake/mysql_version.cmake 2013-11-27 08:36:11 +0000
23+++ cmake/mysql_version.cmake 2014-03-07 13:36:02 +0000
24@@ -128,7 +128,7 @@
25 ENDIF()
26
27 IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
28- SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
29+ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "percona-xtrabackup-${XB_VERSION}")
30 IF("${VERSION}" MATCHES "-ndb-")
31 STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
32 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-cluster-gpl-${NDBVERSION}")
33
34=== modified file 'cmake/ssl.cmake'
35--- cmake/ssl.cmake 2013-02-26 05:45:28 +0000
36+++ cmake/ssl.cmake 2014-03-07 13:36:02 +0000
37@@ -234,7 +234,7 @@
38 ENDIF()
39 ELSE()
40 MESSAGE(SEND_ERROR
41- "Wrong option for WITH_SSL. Valid values are : "${WITH_SSL_DOC})
42+ "Wrong option for WITH_SSL. Valid values are: " ${WITH_SSL_DOC})
43 ENDIF()
44 ENDMACRO()
45
46
47=== modified file 'storage/innobase/xtrabackup/utils/build-binary.sh'
48--- storage/innobase/xtrabackup/utils/build-binary.sh 2013-11-26 10:44:44 +0000
49+++ storage/innobase/xtrabackup/utils/build-binary.sh 2014-03-07 13:36:02 +0000
50@@ -43,7 +43,7 @@
51 # Working directory
52 if test "$#" -eq 0
53 then
54- WORKDIR="$(pwd)"
55+ WORKDIR="$(readlink -f $(dirname $0)/../../../../)"
56
57 # Check that the current directory is not empty
58 if test "x$(echo *)" != "x*"
59@@ -107,28 +107,9 @@
60 cd $SOURCEDIR
61
62 # Install the files
63- mkdir "$INSTALLDIR/bin" "$INSTALLDIR/share"
64- mkdir -p "$INSTALLDIR/share/doc/percona-xtrabackup"
65-
66- cmake -DBUILD_CONFIG=xtrabackup_release . && make $MAKE_JFLAG
67-
68- install -m 755 storage/innobase/xtrabackup/src/xtrabackup \
69- "$INSTALLDIR/bin"
70-
71- install -m 755 storage/innobase/xtrabackup/src/xbstream \
72- "$INSTALLDIR/bin"
73-
74- install -m 755 storage/innobase/xtrabackup/src/xbcrypt \
75- "$INSTALLDIR/bin"
76-
77- install -m 755 storage/innobase/xtrabackup/innobackupex \
78- "$INSTALLDIR/bin"
79-
80- install -m 644 storage/innobase/xtrabackup/COPYING \
81- "$INSTALLDIR/share/doc/percona-xtrabackup"
82-
83- cp -R storage/innobase/xtrabackup/test \
84- "$INSTALLDIR/share/percona-xtrabackup-test"
85+ mkdir -p "$INSTALLDIR"
86+ cmake -DBUILD_CONFIG=xtrabackup_release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" . && make $MAKE_JFLAG
87+ make install
88
89 )
90 exit_value=$?
91
92=== modified file 'storage/innobase/xtrabackup/utils/build-dpkg.sh'
93--- storage/innobase/xtrabackup/utils/build-dpkg.sh 2013-11-27 10:55:41 +0000
94+++ storage/innobase/xtrabackup/utils/build-dpkg.sh 2014-03-07 13:36:02 +0000
95@@ -40,7 +40,7 @@
96 esac
97 done
98
99-SOURCEDIR="$(cd $(dirname "$0"); pwd)"
100+SOURCEDIR="$(readlink -f $(dirname "$0")/../../../../)"
101
102 # Read version info from the XB_VERSION file
103 . $SOURCEDIR/XB_VERSION
104@@ -87,53 +87,33 @@
105 export DEB_DUMMY="$DUMMY"
106
107 # Build
108-(
109- (
110- # Prepare source directory for dpkg-source
111- cd "$SOURCEDIR"
112-
113+ # Prepare source directory for dpkg-source
114+ TMPDIR=$(mktemp -d)
115+ cd ${TMPDIR}
116+ cmake "$SOURCEDIR"
117 make DUMMY="$DUMMY" dist
118-
119- if ! test -d debian
120- then
121- cp -a utils/debian/ .
122- fi
123-
124- # Update distribution
125- dch -m -D "$DEBIAN_VERSION" --force-distribution \
126- -v "$XTRABACKUP_VERSION-$REVISION$PACKAGE_SUFFIX" 'Update distribution'
127-
128- )
129-
130 # Create the original tarball
131- mv "$SOURCEDIR/percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz" \
132+ mv "${TMPDIR}/percona-xtrabackup-$XTRABACKUP_VERSION.tar.gz" \
133 "$WORKDIR/percona-xtrabackup_$XTRABACKUP_VERSION-$REVISION.orig.tar.gz"
134-
135- (
136+ rm -fr ${TMPDIR}
137+ #
138 cd "$WORKDIR"
139-
140- # Create the rest of the source, ignoring changes since we may be in the
141- # sourcedir.
142- dpkg-source -i'.*' -b "$SOURCEDIR"
143-
144- # Unpack it
145- dpkg-source -x "percona-xtrabackup_$XTRABACKUP_VERSION-$REVISION$PACKAGE_SUFFIX.dsc"
146-
147- (
148- cd "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION"
149-
150- # Don't build transitional packages if requested
151- if test "x$NOTRANSITIONAL" = "xyes"
152- then
153- sed -i '/Package: xtrabackup/,/^$/d' debian/control
154- fi
155-
156- # Issue dpkg-buildpackage command
157- dpkg-buildpackage $DPKG_BINSRC $BUILDPKG_KEY
158-
159- )
160-
161- rm -rf "percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION"
162-
163- )
164-)
165+ rm -fr percona-xtrabackup-$XTRABACKUP_VERSION
166+ tar xzf percona-xtrabackup_$XTRABACKUP_VERSION-$REVISION.orig.tar.gz
167+ cd percona-xtrabackup-$XTRABACKUP_VERSION
168+ cp -a storage/innobase/xtrabackup/utils/debian .
169+
170+ # Update distribution
171+ dch -m -D "$DEBIAN_VERSION" --force-distribution \
172+ -v "$XTRABACKUP_VERSION-$REVISION$PACKAGE_SUFFIX" 'Update distribution'
173+
174+ #Do not build transitional packages if requested
175+ if test "x$NOTRANSITIONAL" = "xyes"
176+ then
177+ sed -i '/Package: xtrabackup/,/^$/d' debian/control
178+ fi
179+
180+ # Issue dpkg-buildpackage command
181+ dpkg-buildpackage $DPKG_BINSRC $BUILDPKG_KEY
182+ rm -rf "percona-xtrabackup-$XTRABACKUP_VERSION"
183+
184
185=== modified file 'storage/innobase/xtrabackup/utils/build-rpm.sh'
186--- storage/innobase/xtrabackup/utils/build-rpm.sh 2013-11-27 10:55:41 +0000
187+++ storage/innobase/xtrabackup/utils/build-rpm.sh 2014-03-07 13:36:02 +0000
188@@ -91,7 +91,7 @@
189
190 fi
191
192-SOURCEDIR="$(cd $(dirname "$0"); cd ../../../../; pwd)"
193+SOURCEDIR="$(readlink -f $(dirname "$0")/../../../..)"
194 test -e "$SOURCEDIR/XB_VERSION" || exit 2
195
196 # Read version info from the XB_VERSION file
197@@ -129,14 +129,14 @@
198 mkdir -p BUILD SOURCES RPMS SRPMS
199
200 # Create the source archive
201- (cd "$SOURCEDIR"; make DUMMY="$DUMMY" dist)
202+ (cd "$SOURCEDIR"; cmake .; make DUMMY="$DUMMY" dist)
203
204- cp $SOURCEDIR/percona-xtrabackup-$XTRABACKUP_VERSION-$REVISION.tar.gz \
205- SOURCES/percona-xtrabackup-$XTRABACKUP_VERSION.tar.gz
206+ cp $SOURCEDIR/percona-xtrabackup-$XTRABACKUP_VERSION.tar.gz SOURCES/
207+ cp $SOURCEDIR/storage/innobase/xtrabackup/utils/percona-xtrabackup.spec SPECS/
208
209 # Issue RPM command
210 rpmbuild $SIGN $TARGET $TARGET_LIBDIR $TARGET_ARCH $DUMMY \
211- -ba --clean "$SOURCEDIR/utils/xtrabackup.spec" \
212+ -ba --clean SPECS/percona-xtrabackup.spec \
213 --define "_topdir $WORKDIR_ABS" \
214 --define "xtrabackup_version $XTRABACKUP_VERSION" \
215 --define "xtrabackup_revision $REVISION" \
216
217=== modified file 'storage/innobase/xtrabackup/utils/debian/control'
218--- storage/innobase/xtrabackup/utils/debian/control 2013-12-11 01:06:14 +0000
219+++ storage/innobase/xtrabackup/utils/debian/control 2014-03-07 13:36:02 +0000
220@@ -2,7 +2,7 @@
221 Section: database
222 Priority: extra
223 Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
224-Uploaders: Stewart Smith <stewart.smith@percona.com>, Alexey Bychko <alexey.bychko@percona.com>, Clint Byrum <clint@fewbar.com>
225+Uploaders: Alexey Bychko <alexey.bychko@percona.com>, Clint Byrum <clint@fewbar.com>
226 Build-Depends: automake,
227 bison,
228 ca-certificates,
229
230=== renamed file 'storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.dirs' => 'storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install'
231--- storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.dirs 2013-09-26 06:20:33 +0000
232+++ storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install 2014-03-07 13:36:02 +0000
233@@ -1,1 +1,1 @@
234-usr/share/percona-xtrabackup-test
235+/usr/share/percona-xtrabackup-test
236
237=== removed file 'storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install'
238--- storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install 2013-09-26 06:20:33 +0000
239+++ storage/innobase/xtrabackup/utils/debian/percona-xtrabackup-test.install 1970-01-01 00:00:00 +0000
240@@ -1,1 +0,0 @@
241-test/* usr/share/percona-xtrabackup-test
242
243=== added file 'storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install'
244--- storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install 1970-01-01 00:00:00 +0000
245+++ storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install 2014-03-07 13:36:02 +0000
246@@ -0,0 +1,1 @@
247+/usr/bin
248
249=== removed file 'storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install'
250--- storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install 2013-09-26 06:20:33 +0000
251+++ storage/innobase/xtrabackup/utils/debian/percona-xtrabackup.install 1970-01-01 00:00:00 +0000
252@@ -1,6 +0,0 @@
253-innobackupex usr/bin/
254-xbcrypt usr/bin/
255-xbstream usr/bin/
256-xtrabackup usr/bin/
257-xtrabackup_55 usr/bin/
258-xtrabackup_56 usr/bin/
259
260=== modified file 'storage/innobase/xtrabackup/utils/debian/rules'
261--- storage/innobase/xtrabackup/utils/debian/rules 2013-11-27 03:29:12 +0000
262+++ storage/innobase/xtrabackup/utils/debian/rules 2014-03-07 13:36:02 +0000
263@@ -20,14 +20,8 @@
264 override_dh_auto_build:
265
266 ifeq "$(DEB_DUMMY)" ""
267- ./utils/build.sh xtradb
268- cp src/xtrabackup src/xbstream src/xbcrypt .
269-
270- ./utils/build.sh xtradb55
271- cp src/xtrabackup_55 .
272-
273- ./utils/build.sh xtradb56
274- cp src/xtrabackup_56 .
275+ cmake -DBUILD_CONFIG=xtrabackup_release -DCMAKE_INSTALL_PREFIX=/usr \
276+ -DINSTALL_MYSQLTESTDIR=/usr/share/percona-xtrabackup-test .
277 else
278 # Dummy binaries that avoid compilation
279 echo 'main() { return 300; }' | gcc -x c - -o xtrabackup
280
281=== renamed file 'storage/innobase/xtrabackup/utils/xtrabackup.spec' => 'storage/innobase/xtrabackup/utils/percona-xtrabackup.spec'
282--- storage/innobase/xtrabackup/utils/xtrabackup.spec 2013-11-27 10:55:41 +0000
283+++ storage/innobase/xtrabackup/utils/percona-xtrabackup.spec 2014-03-07 13:36:02 +0000
284@@ -3,7 +3,7 @@
285 #
286 %{!?redhat_version:%define redhat_version 5}
287 %{!?buildnumber:%define buildnumber 1}
288-%define distribution rhel%{redhat_version}
289+%define distribution el%{redhat_version}
290 %define release %{buildnumber}.%{distribution}
291 %{!?xtrabackup_revision:%define xtrabackup_revision undefined}
292
293@@ -63,9 +63,12 @@
294 export CXX=${CXX-"g++"}
295 export CFLAGS="$CFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\""
296 export CXXFLAGS="$CXXFLAGS -DXTRABACKUP_VERSION=\\\"%{xtrabackup_version}\\\" -DXTRABACKUP_REVISION=\\\"%{xtrabackup_revision}\\\""
297-cp src/xtrabackup_56 .
298-cmake -DBUILD_CONFIG=xtrabackup_release . && make -j6
299-cp storage/innobase/xtrabackup/src/xtrabackup .
300+#
301+
302+cmake -DBUILD_CONFIG=xtrabackup_release -DCMAKE_INSTALL_PREFIX=%{_prefix} \
303+ -DINSTALL_MYSQLTESTDIR=%{_datadir}/percona-xtrabackup-test .
304+%{__make} %{?_smp_mflags}
305+
306 %else
307 # Dummy binaries that avoid compilation
308 echo 'main() { return 300; }' | gcc -x c - -o storage/innobase/xtrabackup/src/xtrabackup
309@@ -75,15 +78,10 @@
310
311 %install
312 [ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
313-install -d %{buildroot}%{_bindir}
314-install -d %{buildroot}%{_datadir}
315-# install binaries and configs
316-
317-install -m 755 storage/innobase/xtrabackup/src/xtrabackup %{buildroot}%{_bindir}
318-install -m 755 storage/innobase/xtrabackup/innobackupex %{buildroot}%{_bindir}
319-install -m 755 storage/innobase/xtrabackup/src/xbstream %{buildroot}%{_bindir}
320-install -m 755 storage/innobase/xtrabackup/src/xbcrypt %{buildroot}%{_bindir}
321-cp -R storage/innobase/xtrabackup/test %{buildroot}%{_datadir}/percona-xtrabackup-test
322+
323+%makeinstall
324+%{__make} install DESTDIR=$RPM_BUILD_ROOT
325+
326
327 %clean
328 [ "%{buildroot}" != '/' ] && rm -rf %{buildroot}

Subscribers

People subscribed via source and target branches