Merge lp:~akopytov/percona-xtrabackup/bug610614 into lp:percona-xtrabackup/1.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 265
Proposed branch: lp:~akopytov/percona-xtrabackup/bug610614
Merge into: lp:percona-xtrabackup/1.6
Prerequisite: lp:~akopytov/percona-xtrabackup/more-test-suite-fixes
Diff against target: 168 lines (+34/-12)
9 files modified
Makefile (+1/-1)
VERSION (+1/-0)
test/t/xb_version.sh (+4/-0)
utils/build-binary.sh (+2/-3)
utils/build-dpkg.sh (+3/-3)
utils/build-rpm.sh (+3/-0)
utils/build.sh (+4/-1)
utils/xtrabackup.spec (+0/-2)
xtrabackup.c (+16/-2)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug610614
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+64552@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :
Revision history for this message
Stewart Smith (stewart) wrote :

param build shows that innodb55 targets are failing all tests (incorrect xtrabackup binary detection) - this is likely due to more-test-suite-fixes branch.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Fixed innodb55 targets by merging from more-test-suite-fixes. http://jenkins.percona.com/view/Percona%20Xtrabackup/job/percona-xtrabackup-1.6-param/12/

Revision history for this message
Stewart Smith (stewart) wrote :

looks good - I'll merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2011-03-23 20:08:04 +0000
3+++ Makefile 2011-06-15 06:05:55 +0000
4@@ -11,7 +11,7 @@
5 LIBS = -lpthread
6 DEFS = -DUNIV_LINUX -DMYSQL_SERVER
7
8-CFLAGS += -O3 -g -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Wformat -Wno-format-nonliteral -Wno-format-security -Wno-long-long -Wmissing-declarations -Wno-redundant-decls --std=gnu99
9+CFLAGS += -O3 -g -DXTRABACKUP_VERSION=\"$(XTRABACKUP_VERSION)\" -pedantic -Wall -Wundef -Wshadow -fdiagnostics-show-option -fno-strict-aliasing -Wno-strict-aliasing -Wextra -Wformat -Wno-format-nonliteral -Wno-format-security -Wno-long-long -Wmissing-declarations -Wno-redundant-decls --std=gnu99
10
11 TARGET=xtrabackup
12 PREFIX=/usr
13
14=== added file 'VERSION'
15--- VERSION 1970-01-01 00:00:00 +0000
16+++ VERSION 2011-06-15 06:05:55 +0000
17@@ -0,0 +1,1 @@
18+XTRABACKUP_VERSION=1.6.2
19
20=== added file 'test/t/xb_version.sh'
21--- test/t/xb_version.sh 1970-01-01 00:00:00 +0000
22+++ test/t/xb_version.sh 2011-06-15 06:05:55 +0000
23@@ -0,0 +1,4 @@
24+. inc/common.sh
25+
26+xtrabackup --version
27+
28
29=== modified file 'utils/build-binary.sh'
30--- utils/build-binary.sh 2011-06-12 07:48:43 +0000
31+++ utils/build-binary.sh 2011-06-15 06:05:55 +0000
32@@ -12,8 +12,6 @@
33 # Bail out on errors, be strict
34 set -ue
35
36-XTRABACKUP_VERSION=1.6.2
37-
38 # Examine parameters
39 TARGET="$(uname -m)"
40 TARGET_CFLAGS=''
41@@ -79,7 +77,8 @@
42 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
43 test -e "$SOURCEDIR/Makefile" || exit 2
44
45-# Extract version from the Makefile
46+# Read XTRABACKUP_VERSION from the VERSION file
47+. $SOURCEDIR/VERSION
48
49 # Build information
50 REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
51
52=== modified file 'utils/build-dpkg.sh'
53--- utils/build-dpkg.sh 2011-06-12 07:48:43 +0000
54+++ utils/build-dpkg.sh 2011-06-15 06:05:55 +0000
55@@ -11,8 +11,6 @@
56 # Bail out on errors, be strict
57 set -ue
58
59-XTRABACKUP_VERSION='1.6.2'
60-
61 # Examine parameters
62 go_out="$(getopt --options "k:K" --longoptions key:,nosign \
63 --name "$(basename "$0")" -- "$@")"
64@@ -62,7 +60,9 @@
65
66 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
67
68-# Extract version from the Makefile
69+# Read XTRABACKUP_VERSION from the VERSION file
70+. $SOURCEDIR/VERSION
71+
72 DEBIAN_VERSION="$(lsb_release -sc)"
73 REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
74
75
76=== modified file 'utils/build-rpm.sh'
77--- utils/build-rpm.sh 2011-06-12 07:48:43 +0000
78+++ utils/build-rpm.sh 2011-06-15 06:05:55 +0000
79@@ -91,6 +91,9 @@
80 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
81 test -e "$SOURCEDIR/Makefile" || exit 2
82
83+# Read XTRABACKUP_VERSION from the VERSION file
84+. $SOURCEDIR/VERSION
85+
86 # Build information
87 REDHAT_RELEASE="$(grep -o 'release [0-9][0-9]*' /etc/redhat-release | \
88 cut -d ' ' -f 2)"
89
90=== modified file 'utils/build.sh'
91--- utils/build.sh 2011-06-12 07:47:07 +0000
92+++ utils/build.sh 2011-06-15 06:05:55 +0000
93@@ -93,8 +93,11 @@
94 mkdir $build_dir
95 cp $top_dir/Makefile $top_dir/xtrabackup.c $build_dir
96
97+ # Read XTRABACKUP_VERSION from the VERSION file
98+ . $top_dir/VERSION
99+
100 cd $build_dir
101- $MAKE_CMD $xtrabackup_target
102+ $MAKE_CMD $xtrabackup_target XTRABACKUP_VERSION=$XTRABACKUP_VERSION
103 cd $top_dir
104 }
105
106
107=== modified file 'utils/xtrabackup.spec'
108--- utils/xtrabackup.spec 2011-06-12 07:48:43 +0000
109+++ utils/xtrabackup.spec 2011-06-15 06:05:55 +0000
110@@ -5,8 +5,6 @@
111 %{!?buildnumber:%define buildnumber 1}
112 %define distribution rhel%{redhat_version}
113 %define release %{buildnumber}.%{distribution}
114-%define xtrabackup_version 1.6.2
115-%define xtradb_version 11
116 %{!?xtrabackup_revision:%define xtrabackup_revision undefined}
117
118 %define __os_install_post /usr/lib/rpm/brp-compress
119
120=== modified file 'xtrabackup.c'
121--- xtrabackup.c 2011-03-31 06:45:03 +0000
122+++ xtrabackup.c 2011-06-15 06:05:55 +0000
123@@ -556,6 +556,7 @@
124 /* === xtrabackup specific options === */
125 char xtrabackup_real_target_dir[FN_REFLEN] = "./xtrabackup_backupfiles/";
126 char *xtrabackup_target_dir= xtrabackup_real_target_dir;
127+my_bool xtrabackup_version = FALSE;
128 my_bool xtrabackup_backup = FALSE;
129 my_bool xtrabackup_stats = FALSE;
130 my_bool xtrabackup_prepare = FALSE;
131@@ -868,6 +869,9 @@
132
133 static struct my_option my_long_options[] =
134 {
135+ {"version", 'v', "print xtrabackup version information",
136+ (G_PTR *) &xtrabackup_version, (G_PTR *) &xtrabackup_version, 0, GET_BOOL,
137+ NO_ARG, 0, 0, 0, 0, 0, 0},
138 {"target-dir", OPT_XTRA_TARGET_DIR, "destination directory", (G_PTR*) &xtrabackup_target_dir,
139 (G_PTR*) &xtrabackup_target_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
140 {"backup", OPT_XTRA_BACKUP, "take backup to target-dir",
141@@ -1166,8 +1170,14 @@
142
143 static void print_version(void)
144 {
145- printf("%s Ver %s Rev %s for %s %s (%s)\n" ,my_progname,
146- XTRABACKUP_VERSION, XTRABACKUP_REVISION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
147+ printf("%s version %s for %s %s %s (%s) (revision id: %s)\n", my_progname,
148+ XTRABACKUP_VERSION,
149+#ifdef XTRADB_BASED
150+ "Percona Server",
151+#else
152+ "MySQL server",
153+#endif
154+ MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE, XTRABACKUP_REVISION);
155 }
156
157 static void usage(void)
158@@ -1211,6 +1221,10 @@
159 usage();
160 exit(EXIT_SUCCESS);
161 break;
162+ case 'v':
163+ print_version();
164+ exit(EXIT_SUCCESS);
165+ break;
166 default:
167 break;
168 }

Subscribers

People subscribed via source and target branches