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

Proposed by Ignacio Nin
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 343
Proposed branch: lp:~ignacio-nin/percona-server/5.5-debian-dbg
Merge into: lp:percona-server/5.5
Diff against target: 232 lines (+69/-44)
5 files modified
build/build-dpkg.sh (+12/-3)
build/debian/control (+13/-2)
build/debian/percona-server-server-5.5.docs (+2/-2)
build/debian/percona-server-server-5.5.install (+1/-0)
build/debian/rules (+41/-37)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.5-debian-dbg
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Ignacio Nin Pending
Stewart Smith Pending
George Ormond Lorch III g2 Pending
Review via email: mp+131643@code.launchpad.net

This proposal supersedes a proposal from 2012-10-05.

Description of the change

This is the equivalent of debuginfo at RPM for debian packages.

Also include a mysql-debug binary in the debian package as we do for RPM. This package is built with full debug options (-debug).

Corresponding to https://code.launchpad.net/~ignacio-nin/percona-server/5.1-debian-dbg/+merge/128320

This is a resubmit solving conflicts with the current code.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote : Posted in a previous version of this proposal

Ignacio, I've been told in the past that there should only be 1 commit/revno per MP. Here you have four revno's 312, 313, 314 and 315. So you would either need to split this into four MPs, one for each fix/commit or uncommit these four and recommit them into a single revno with a combined commit message. Maybe for this type of work it is OK. Please check with Stewart or Alexey for proper procedure (I will too so I don't kick out more valid MPs).

review: Needs Fixing (g2)
Revision history for this message
Ignacio Nin (ignacio-nin) wrote : Posted in a previous version of this proposal

As discussed on IRC I took a deep look into the code to help see if it made sense to either merge the commits into one commit or on the other hand if MP's should be submitted for each of these.

I understood that the logic between the merged commits is to avoid commits that are obvious intermediate steps that break the program. I think that in this case the latter 4 commits do comply to the requirement that each of them leaves a program that is fully functional and is a strict improvement from the commit before it. Also for that matter each step was tested. These commits are:

312: We switch to use the override_ system of debhelper.
313: We introduce the creation of an additional -dbg package, by making use of the mechanism provided by 312.
314: We alter a builder so instead of building in the temporary directory, it builds into a subdirectory of it called "release/". This by itself does nothing, it's just laying ground for the next change. However it definitely doesn't break the server.
315: Includes a mysqld-debug binary in the server package by using a mechanism associated with build 314.

Please refer to the commit messages for more information on these.

I certainly think that merging these changes into one would create a commit too complex and that would introduce too many changes. Commits 312 and 313 are definitely part of a process that could be stopped in any of them. Commit 314 by itself would be the most "pointless" commit.

Arguably,

a) 314 and 315 could me merged into one commit
b) Commits 314 and 315 (or a summa of them two) could be submitted into another MP.

As for a), I honestly don't see the point, and I'd recommend keeping them separately. Merging them would create a commit that would have two separate logic parts that don't have too much to do between them and preserving its history makes it easier (this is for a fact) to test them. The whole point of an MP is to flatten them to one logic change so I think that it won't make any noise in the final tree.

As for b), even though these are two sets of changes that could be arranged separately, they are conceptually close and I'd believe it's advantageous to have them tied together. Separating them, even if we ignore the additional noise generated, would mean that 314 and 315 would have to be retested without the changes in 313, which in the end would be pointless since they will work on top of 313 (remember these are both changes on the debian packaging).

Given this I would recommend merging these two as proposed. Let me know your thoughts.

review: Needs Resubmitting
Revision history for this message
George Ormond Lorch III (gl-az) wrote : Posted in a previous version of this proposal

Explanation is more than suitable and I agree with the reasoning.

review: Approve (g2)
Revision history for this message
Alexey Kopytov (akopytov) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal

$ bzr merge lp:~ignacio-nin/percona-server/5.5-debian-dbg
 M build/build-dpkg.sh
 M build/debian/control
 M build/debian/percona-server-server-5.5.docs
 M build/debian/percona-server-server-5.5.install
 M build/debian/rules
Text conflict in build/debian/control
1 conflicts encountered.

review: Needs Fixing
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=== modified file 'build/build-dpkg.sh'
2--- build/build-dpkg.sh 2012-09-18 05:14:49 +0000
3+++ build/build-dpkg.sh 2012-10-26 15:45:29 +0000
4@@ -12,13 +12,14 @@
5 set -ue
6
7 # Examine parameters
8-go_out="$(getopt --options "kK:b" --longoptions key:,nosign,binary \
9+go_out="$(getopt --options "kK:bD" --longoptions key:,nosign,binary,nodebug \
10 --name "$(basename "$0")" -- "$@")"
11 test $? -eq 0 || exit 1
12 eval set -- $go_out
13
14 BUILDPKG_KEY=''
15 BINARY=''
16+DEBUG='yes'
17
18 for arg
19 do
20@@ -27,6 +28,7 @@
21 -k | --key ) shift; BUILDPKG_KEY="-pgpg -k$1"; shift;;
22 -K | --nosign ) shift; BUILDPKG_KEY="-uc -us";;
23 -b | --binary ) shift; BINARY='-b';;
24+ -D | --nodebug ) shift; DEBUG='';;
25 esac
26 done
27
28@@ -72,8 +74,8 @@
29
30
31 # Build information
32-export BB_PERCONA_REVISION="$(cd "$SOURCEDIR"; bzr log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
33-export DEB_BUILD_OPTIONS='nostrip debug nocheck'
34+export BB_PERCONA_REVISION="$(cd "$SOURCEDIR"; bzr revno)"
35+export DEB_BUILD_OPTIONS='debug nocheck'
36
37 # Compilation flags
38 export CC=${CC:-gcc}
39@@ -102,10 +104,17 @@
40 cp -R "$SOURCEDIR/build/debian" .
41 chmod +x debian/rules
42
43+ # If debug is not set, do not ship mysql-debug
44+ if test "x$DEBUG" = "x"
45+ then
46+ sed -i '/mysqld-debug/d' debian/percona-server-server-5.5.install
47+ fi
48+
49 # Update distribution name
50 dch -m -D "$DEBIAN_VERSION" --force-distribution -v "$MYSQL_VERSION-$PERCONA_SERVER_VERSION-$BB_PERCONA_REVISION.$DEBIAN_VERSION" 'Update distribution'
51
52 DEB_CFLAGS_APPEND="$CFLAGS" DEB_CXXFLAGS_APPEND="$CXXFLAGS" \
53+ BUILD_DEBUG_BINARY="$DEBUG" \
54 dpkg-buildpackage $BINARY -rfakeroot $BUILDPKG_KEY
55
56 )
57
58=== modified file 'build/debian/control'
59--- build/debian/control 2012-10-03 22:05:40 +0000
60+++ build/debian/control 2012-10-26 15:45:29 +0000
61@@ -3,8 +3,8 @@
62 Priority: extra
63 Maintainer: Percona Server Development Team <mysql-dev@percona.com>
64 Uploaders: Aleksandr Kuzminsky <aleksandr.kuzminsky@percona.com>
65-Build-Depends: debhelper (>= 7.0), cmake, libtool, autoconf, libncurses5-dev, perl, bison, fakeroot, devscripts, libaio-dev, libpam-dev
66-Standards-Version: 3.9.1
67+Build-Depends: debhelper (>= 7.0.50), cmake, libtool, autoconf, libncurses5-dev, perl, bison, fakeroot, devscripts, libaio-dev, libpam-dev
68+Standards-Version: 7.0.0
69 Homepage: http://www.percona.com/software/percona-server/
70 Vcs-Bzr: bzr+ssh://bazaar.launchpad.net/~percona-dev/percona-server/release-5.5.8-20/
71 Vcs-Browser: http://bazaar.launchpad.net/~percona-dev/percona-server/release-5.5.8-20/files
72@@ -132,3 +132,14 @@
73 a means for verifying that Percona Server and its client programs
74 operate according to expectations
75
76+Package: percona-server-5.5-dbg
77+Architecture: any
78+Section: debug
79+Depends: percona-server-server-5.5 (= ${binary:Version}), ${misc:Depends}
80+Description: Debugging package for Percona Server
81+ Percona Server is a fast, stable and true multi-user, multi-threaded SQL
82+ database server. SQL (Structured Query Language) is the most popular database
83+ query language in the world. The main goals of Percona Server are speed,
84+ robustness and ease of use.
85+ .
86+ This package contains the debugging symbols for the Percona Server binaries.
87
88=== modified file 'build/debian/percona-server-server-5.5.docs'
89--- build/debian/percona-server-server-5.5.docs 2012-09-18 04:57:16 +0000
90+++ build/debian/percona-server-server-5.5.docs 2012-10-26 15:45:29 +0000
91@@ -4,5 +4,5 @@
92 COPYING*
93 Docs/INSTALL-BINARY
94 Docs/mysql.info
95-Docs/INFO_BIN
96-Docs/INFO_SRC
97+release/Docs/INFO_BIN
98+release/Docs/INFO_SRC
99
100=== modified file 'build/debian/percona-server-server-5.5.install'
101--- build/debian/percona-server-server-5.5.install 2012-09-18 04:57:16 +0000
102+++ build/debian/percona-server-server-5.5.install 2012-10-26 15:45:29 +0000
103@@ -23,6 +23,7 @@
104 usr/bin/resolve_stack_dump
105 usr/bin/resolveip
106 usr/sbin/mysqld
107+usr/sbin/mysqld-debug
108 usr/share/man/man1/msql2mysql.1
109 usr/share/man/man1/myisamchk.1
110 usr/share/man/man1/myisamlog.1
111
112=== modified file 'build/debian/rules'
113--- build/debian/rules 2012-10-05 20:43:57 +0000
114+++ build/debian/rules 2012-10-26 15:45:29 +0000
115@@ -20,9 +20,23 @@
116 dh clean
117 rm -rf CMakeFiles
118
119-build: patch
120- dh_testdir
121- $(CMAKE) . -DBUILD_CONFIG=mysql_release \
122+override_dh_auto_configure: patch
123+ifneq ($(BUILD_DEBUG_BINARY),)
124+ # Make a debug binary
125+ mkdir debug
126+ cd debug && \
127+ $(CMAKE) ../ -DBUILD_CONFIG=mysql_release \
128+ -DINSTALL_LAYOUT=DEB \
129+ -DCMAKE_BUILD_TYPE=Debug \
130+ -DWITH_EMBEDDED_SERVER=OFF \
131+ -DMYSQL_UNIX_ADDR="/var/run/mysqld/mysqld.sock" \
132+ -DFEATURE_SET=$(feature_set) \
133+ -DCOMPILATION_COMMENT=$(compilation_comment_debug) \
134+ -DMYSQL_SERVER_SUFFIX=$(server_suffix)
135+endif
136+
137+ mkdir release
138+ cd release && $(CMAKE) ../ -DBUILD_CONFIG=mysql_release \
139 -DINSTALL_LAYOUT=DEB \
140 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
141 -DWITH_EMBEDDED_SERVER=OFF \
142@@ -30,15 +44,21 @@
143 -DFEATURE_SET=$(feature_set) \
144 -DCOMPILATION_COMMENT=$(compilation_comment_release) \
145 -DMYSQL_SERVER_SUFFIX=$(server_suffix)
146- make $(MAKE_JFLAG)
147+
148+override_dh_auto_build:
149+ifneq ($(BUILD_DEBUG_BINARY),)
150+ cd debug && make $(MAKE_JFLAG)
151+endif
152+
153+ cd release && make $(MAKE_JFLAG)
154
155 # Build HandlerSocket
156 echo "Configuring HandlerSocket"
157 cd storage/HandlerSocket-Plugin-for-MySQL && \
158 bash -x autogen.sh && \
159- CXX=g++ CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/include" \
160+ CXX=g++ CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/release/include" \
161 ./configure --with-mysql-source=$(CURDIR) \
162- --with-mysql-bindir=$(CURDIR)/scripts \
163+ --with-mysql-bindir=$(CURDIR)/release/scripts \
164 --with-mysql-plugindir=$(prefix)/lib/mysql/plugin \
165 --libdir=$(prefix)/lib \
166 --prefix=$(prefix) && \
167@@ -46,50 +66,34 @@
168
169 # Build UDF
170 cd UDF && \
171- CXX=g++ CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/include" \
172+ CXX=g++ CXXFLAGS="$(CXXFLAGS) -I$(CURDIR)/release/include" \
173 ./configure --includedir=$(CURDIR)/include \
174 --libdir=$(prefix)/lib/mysql/plugin && \
175 make $(MAKE_JFLAG)
176
177- dh_auto_test
178+build:
179+ dh build
180
181 binary:
182- echo "Making binary"
183- dh --before dh_auto_install binary
184- dh_auto_install
185- cd storage/HandlerSocket-Plugin-for-MySQL && make DESTDIR=$(TMP) install
186- cd UDF && make DESTDIR=$(TMP) install
187- dh --after dh_auto_install --before dh_installinit binary
188- dh_installinit --name=mysql
189- dh --after dh_installinit binary
190-
191+ dh -Brelease binary
192
193 binary-arch:
194- echo "Making binary"
195- dh --before dh_auto_install binary-arch
196- dh_auto_install
197- cd storage/HandlerSocket-Plugin-for-MySQL && make DESTDIR=$(TMP) install
198- cd UDF && make DESTDIR=$(TMP) install
199- dh --after dh_auto_install --before dh_installinit binary-arch
200- dh_installinit --name=mysql
201- dh --after dh_installinit binary-arch
202+ dh -Brelease binary-arch
203
204 binary-indep:
205- echo "Making binary"
206- dh --before dh_auto_install binary-indep
207- dh_auto_install
208- cd storage/HandlerSocket-Plugin-for-MySQL && make DESTDIR=$(TMP) install
209- cd UDF && make DESTDIR=$(TMP) install
210- dh --after dh_auto_install --before dh_installinit binary-indep
211- dh_installinit --name=mysql
212- dh --after dh_installinit binary-indep
213+ dh -Brelease binary-indep
214
215 install:
216- echo "Making binary"
217- dh --before dh_auto_install install
218+ dh install
219+
220+override_dh_auto_install:
221 dh_auto_install
222 cd storage/HandlerSocket-Plugin-for-MySQL && make DESTDIR=$(TMP) install
223 cd UDF && make DESTDIR=$(TMP) install
224- dh --after dh_auto_install --before dh_installinit install
225+
226+override_dh_installinit:
227 dh_installinit --name=mysql
228- dh --after dh_installinit install
229+
230+override_dh_strip:
231+ dh_strip --dbg-package=percona-server-5.5-dbg
232+

Subscribers

People subscribed via source and target branches