Merge lp:~akopytov/percona-xtrabackup/links-to-percona-site-2.1 into lp:percona-xtrabackup/2.1

Proposed by Alexey Kopytov
Status: Merged
Merged at revision: 697
Proposed branch: lp:~akopytov/percona-xtrabackup/links-to-percona-site-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 103 lines (+63/-0)
3 files modified
innobackupex.pl (+8/-0)
test/t/distribution_message.sh (+15/-0)
utils/build.sh (+40/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/links-to-percona-site-2.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Stewart Smith Pending
Review via email: mp+195374@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'innobackupex' => 'innobackupex.pl' (properties changed: +x to -x)
2--- innobackupex 2013-11-12 09:12:14 +0000
3+++ innobackupex.pl 2013-11-15 12:17:46 +0000
4@@ -1641,7 +1641,15 @@
5 # print_version subroutine prints program version and copyright.
6 #
7 sub print_version {
8+ my $distribution = "@XB_DISTRIBUTION@";
9+
10 printf(STDERR $copyright_notice);
11+
12+ if ($distribution) {
13+ printf STDERR "Get the latest version of Percona XtraBackup, ".
14+ "documentation, and help resources:\n";
15+ printf STDERR "http://www.percona.com/xb/$distribution\n";
16+ }
17 }
18
19
20
21=== added file 'test/t/distribution_message.sh'
22--- test/t/distribution_message.sh 1970-01-01 00:00:00 +0000
23+++ test/t/distribution_message.sh 2013-11-15 12:17:46 +0000
24@@ -0,0 +1,15 @@
25+########################################################################
26+# Tests for distribution specific messages in innobackupex
27+########################################################################
28+
29+[ -z ${XB_DISTRIBUTION:-} ] && skip_test "Requires XB_DISTRIBUTION to be set"
30+
31+# Remove the argument when bug #1223716 is fixed
32+innobackupex --version $topdir/backup
33+
34+link="http://www.percona.com/xb/$XB_DISTRIBUTION"
35+
36+if ! grep -q $link $OUTFILE
37+then
38+ die "Could not find '$link' in the innobackupex version message!"
39+fi
40
41=== modified file 'utils/build.sh'
42--- utils/build.sh 2013-07-20 14:24:26 +0000
43+++ utils/build.sh 2013-11-15 12:17:46 +0000
44@@ -68,6 +68,24 @@
45 fi
46
47 xtrabackup_include_dir="$top_dir/src"
48+
49+# Auto-detect distribution string if not overridden with the XB_DISTRIBUTION
50+# environment variable
51+XB_DISTRIBUTION=${XB_DISTRIBUTION:-}
52+if [ -z "$XB_DISTRIBUTION" ]
53+then
54+ if which lsb_release >/dev/null 2>&1;
55+ then
56+ XB_DISTRIBUTION=`lsb_release -i | \
57+sed -e 's/Distributor ID:[[:space:]]//' | \
58+tr '[:upper:]' '[:lower:]'`
59+ case $XB_DISTRIBUTION in
60+ centos|redhat)
61+ XB_DISTRIBUTION="epel";;
62+ esac
63+ fi
64+fi
65+
66 CFLAGS="$CFLAGS -I$xtrabackup_include_dir"
67 CXXFLAGS="$CXXFLAGS -I$xtrabackup_include_dir"
68
69@@ -97,6 +115,26 @@
70 }
71
72 ################################################################################
73+# Process a file specified as the first argument, replace some certain variables
74+# with their actual values and store the result in the file specified as the
75+# second argument. The optional third argument may be used to set a specific
76+# access mode on the resulting files (e.g. '+x")
77+########################################################################
78+function configure_file()
79+{
80+ local src=$1
81+ local dst=$2
82+
83+ echo "Configuring $src to $dst"
84+ sed 's|@XB_DISTRIBUTION@|'$XB_DISTRIBUTION'|g' $src > $dst
85+
86+ if [ $# -gt 2 ]
87+ then
88+ chmod $3 $dst
89+ fi
90+}
91+
92+################################################################################
93 # Download files specified as arguments from $MASTER_SITE if $AUTO_DOWNLOAD is
94 # "yes". Otherwise print an error message and exit.
95 ################################################################################
96@@ -220,6 +258,8 @@
97
98 innodb_dir=$server_dir/storage/$innodb_name
99
100+ configure_file innobackupex.pl innobackupex +x
101+
102 echo "Downloading sources"
103 auto_download $server_tarball
104

Subscribers

People subscribed via source and target branches

to all changes: