From: Ivan Suzdal Date: Mon, 3 Oct 2016 15:01:52 +0000 (+0300) Subject: Add mysql-server-wsrep-core-5.6-dbg package X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=381c4d2a618e44da4b89b4caf9bb03d386063100;p=packages%2Ftrusty%2Fmysql-wsrep-5.6.git Add mysql-server-wsrep-core-5.6-dbg package Change-Id: I0f44fb6b33dfa95d251e4bbb0e3f429349f25aab Closes-Bug: #1628104 --- diff --git a/debian/changelog b/debian/changelog index 879dfd21..716e9739 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mysql-wsrep-5.6 (5.6.33-0~u14.04+mos2) mos; urgency=low + + * Add mysql-server-wsrep-core-5.6-dbg package (Closes: #LP1628104) + + -- Ivan Suzdal Mon, 03 Oct 2016 14:57:30 +0000 + mysql-wsrep-5.6 (5.6.33-0~u14.04+mos1) mos; urgency=low * Rebuilt for MOS diff --git a/debian/control b/debian/control index 9272a803..90261bed 100644 --- a/debian/control +++ b/debian/control @@ -150,3 +150,8 @@ Description: MySQL source This package includes the MySQL source code as configured before building - but after the arch specific configuration. This is currently required for building plugins. + +Package: mysql-server-wsrep-core-5.6-dbg +Architecture: any +Depends: mysql-server-wsrep-core-5.6 (= ${binary:Version}), ${misc:Depends} +Description: debugging symbols for mysql-server-wsrep-core-5.6 diff --git a/debian/rules b/debian/rules index 9b64bc23..f00d93fa 100755 --- a/debian/rules +++ b/debian/rules @@ -29,6 +29,7 @@ TESTSUITE_FAIL_CMD:=true TMP := $(CURDIR)/debian/tmp/ USE_ASSEMBLER:=--enable-assembler +DBG_PACKAGES := $(shell awk '/^Package:([[:space:]]+)([^[:space:]]+)-dbg([[:space:]]*)$$/ { gsub(/-dbg$$/, "", $$2); print $$2 }' debian/control) export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++ @@ -58,6 +59,20 @@ ifeq ($(STATIC_MYSQLD), 1) USE_STATIC_MYSQLD:=--with-mysqld-ldflags=-all-static endif +# Default CMAKE_BUILD_TYPE is RelwithDebInfo, but this type +# doesn't provide enough debugging symbols (actually, this type +# is quite similar to Release mode). +# So, let's build with debug symbols and put them into separate package. +CMAKE_BUILD_TYPE ?= Debug + +# Otherwise, it can cause exception during build, like +# "error: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', +# declared with attribute warn_unused_result [-Werror=unused-result]" +# I've seen this error only then build with debug. +ifeq ($(CMAKE_BUILD_TYPE), Debug) + UNUSED_RESULT_FLAGS:=-Wno-unused-result +endif + override_dh_auto_clean: @echo "RULES.$@" dh_testdir @@ -83,12 +98,12 @@ configure-stamp configure-pic-stamp: CC=$${MYSQL_BUILD_CC:-gcc} \ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing ${TAOCRYPT_OPT}"} \ CXX=$${MYSQL_BUILD_CXX:-g++} \ - CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fpermissive ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing ${TAOCRYPT_OPT}"} \ + CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fpermissive ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing ${TAOCRYPT_OPT} ${UNUSED_RESULT_FLAGS}"} \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_VERBOSE_MAKEFILE=ON \ $(FORCE_FPIC) \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \ -DWITH_WSREP=1 \ -DWITH_LIBWRAP=ON \ -DWITH_ZLIB=system \ @@ -219,8 +234,16 @@ override_dh_installinit-arch: override_dh_installcron-arch: dh_installcron --name mysql-server +ifeq ($(CMAKE_BUILD_TYPE), Debug) +override_dh_strip: + for pkg in $(DBG_PACKAGES); do \ + dh_strip -p$$pkg --dbg-package=$$pkg-dbg; \ + done + dh_strip +else override_dh_strip: @echo "Notice: not stripping debug symbols from any binaries" +endif binary: binary-indep binary-arch