Merge lp:~ignacio-nin/percona-xtrabackup/2.0-dpkg-dummy-revamp into lp:percona-xtrabackup/2.0

Proposed by Ignacio Nin
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 535
Proposed branch: lp:~ignacio-nin/percona-xtrabackup/2.0-dpkg-dummy-revamp
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 85 lines (+10/-36)
3 files modified
utils/build-dpkg.sh (+1/-6)
utils/debian-dummy-rules.patch (+0/-30)
utils/debian/rules (+9/-0)
To merge this branch: bzr merge lp:~ignacio-nin/percona-xtrabackup/2.0-dpkg-dummy-revamp
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+159898@code.launchpad.net

Description of the change

For the --dummy dpkg packages, instead of having a debian/rules patch, move the dummy rules to the debian/rules package itself, which now operates with a DEB_DUMMY environment variable. This makes it much easier to manage than having to patch a patch whenever debian/rules was changed.

This is the way --dummy operates in RPM (inside xtrabackup.spec).

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utils/build-dpkg.sh'
2--- utils/build-dpkg.sh 2013-04-01 16:55:27 +0000
3+++ utils/build-dpkg.sh 2013-04-19 21:57:27 +0000
4@@ -86,6 +86,7 @@
5 export DEB_BUILD_OPTIONS='debug nocheck'
6 export DEB_CFLAGS_APPEND="$CFLAGS"
7 export DEB_CXXFLAGS_APPEND="$CXXFLAGS"
8+export DEB_DUMMY="$DUMMY"
9
10 # Build
11 (
12@@ -105,12 +106,6 @@
13 sed -i '/Package: xtrabackup/,/^$/d' debian/control
14 fi
15
16- # Apply dummy patch if wanted
17- if test "x$DUMMY" = "xyes"
18- then
19- patch -p1 < 'utils/debian-dummy-rules.patch'
20- fi
21-
22 # Update distribution
23 dch -m -D "$DEBIAN_VERSION" --force-distribution -v "$XTRABACKUP_VERSION-$REVISION.$DEBIAN_VERSION" 'Update distribution'
24 # Issue dpkg-buildpackage command
25
26=== removed file 'utils/debian-dummy-rules.patch'
27--- utils/debian-dummy-rules.patch 2013-04-01 16:55:27 +0000
28+++ utils/debian-dummy-rules.patch 1970-01-01 00:00:00 +0000
29@@ -1,30 +0,0 @@
30-=== modified file 'utils/debian/rules'
31---- utils/debian/rules 2012-04-18 03:26:07 +0000
32-+++ utils/debian/rules 2012-04-18 16:15:15 +0000
33-@@ -40,18 +40,12 @@
34- build-stamp: config.status
35- dh_testdir
36-
37-- # Add here commands to compile the package.
38-- AUTO_DOWNLOAD=yes ./utils/build.sh 5.1
39-- cp src/xtrabackup_51 src/xbstream .
40--
41-- AUTO_DOWNLOAD=yes ./utils/build.sh xtradb
42-- cp src/xtrabackup .
43--
44-- AUTO_DOWNLOAD=yes ./utils/build.sh xtradb55
45-- cp src/xtrabackup_55 .
46--
47-- AUTO_DOWNLOAD=yes ./utils/build.sh xtradb56
48-- cp src/xtrabackup_56 .
49-+ # Dummy binaries that avoid compilation
50-+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup
51-+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_51
52-+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_55
53-+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_56
54-+ echo 'main() { return 300; }' | gcc -x c - -o xbstream
55-
56- #docbook-to-man debian/xtrabackup.sgml > xtrabackup.1
57-
58-
59-
60
61=== modified file 'utils/debian/rules'
62--- utils/debian/rules 2013-04-01 16:55:27 +0000
63+++ utils/debian/rules 2013-04-19 21:57:27 +0000
64@@ -40,6 +40,7 @@
65 build-stamp: config.status
66 dh_testdir
67
68+ifeq "$(DEB_DUMMY)" ""
69 # Add here commands to compile the package.
70 AUTO_DOWNLOAD=yes ./utils/build.sh 5.1
71 cp src/xtrabackup_51 src/xbstream .
72@@ -52,6 +53,14 @@
73
74 AUTO_DOWNLOAD=yes ./utils/build.sh xtradb56
75 cp src/xtrabackup_56 .
76+else
77+ # Dummy binaries that avoid compilation
78+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup
79+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_51
80+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_55
81+ echo 'main() { return 300; }' | gcc -x c - -o xtrabackup_56
82+ echo 'main() { return 300; }' | gcc -x c - -o xbstream
83+endif
84
85 #docbook-to-man debian/xtrabackup.sgml > xtrabackup.1
86

Subscribers

People subscribed via source and target branches