Skip to content

Commit d8fb0f2

Browse files
committed
Clean up old cruft from rules file after review by Sergei Golubchik
* Don't set or use MYSQL_BUILD_CC as they were hard-coded anyway * Remove unnecessary comment about how make translates -j option to --jobserver * Assembler functions are long gone and references to them should be removed * C and C++ should have same optimization levels, that is -O3 * BIG-JOINS are not used anywhere, remove them * Make compilation comment nicer (visible via "show variables like 'version%';") * Make -DDEB contain actual distro name, might be of later use and anyway better than just simple '1' (true) value * Not needed to have TAOCRYPT_OPT in CFLAGS, taocrypt is C++ * Libwrap is disabled by default * INFO_BIN and INFO_SRC files are not used anymore, no need to install them. * Use INSTALL_MYSQLTESTDIR instead of manual mv line
1 parent a9bbb0c commit d8fb0f2

File tree

5 files changed

+15
-57
lines changed

5 files changed

+15
-57
lines changed

debian/mariadb-server-10.0.docs

-1
This file was deleted.

debian/mariadb-server-10.0.install

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ usr/lib/mysql/plugin/semisync_master.so
4646
usr/lib/mysql/plugin/semisync_slave.so
4747
usr/lib/mysql/plugin/server_audit.so
4848
usr/lib/mysql/plugin/sql_errlog.so
49-
usr/share/doc/mariadb-server-10.0/INFO_BIN
5049
usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
5150
usr/share/mysql/errmsg-utf8.txt
5251
usr/share/mysql/fill_help_tables.sql

debian/patches/build_reproducibly.patch

-21
This file was deleted.

debian/patches/series

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ fix-spelling-errors.patch
1111
mroonga-disable-switch.patch
1212
mysqld_multi_confd.patch
1313
mysqld_multi.server_lsb-header.patch
14-
build_reproducibly.patch

debian/rules

+15-33
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ include /usr/share/dpkg/buildflags.mk
1111
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
1212
ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
1313
BUILDDIR := builddir
14+
CC := $(DEB_HOST_GNU_TYPE)-gcc
15+
CXX := $(DEB_HOST_GNU_TYPE)-g++
1416
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
1517
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
1618
DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
@@ -25,23 +27,13 @@ DISTRIBUTION := $(shell lsb_release -i -s)
2527
RELEASE := $(shell lsb_release -r -s)
2628
TMP:=$(CURDIR)/debian/tmp
2729

28-
29-
export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc
30-
export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++
31-
32-
# Parallel build support as adviced
30+
# Parallel build support as advised
3331
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
3432
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
3533
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
36-
# Even though at later point the MAKEFLAGS variable will end up
37-
# having the -j option without a parameter, in test builds it has been
38-
# confirmed that the NUMJOBS really doeas has an effect via MAKEFLAGS magic.
39-
# MAKEFLAGS magic will later also add the -jobserver option.
4034
MAKEFLAGS += -j $(NUMJOBS)
4135
endif
4236

43-
# This is removed in mysql-5.6 and a candidate for removal in MariaDB too
44-
USE_ASSEMBLER:=--enable-assembler
4537
ifneq (,$(filter $(ARCH), i386 kfreebsd-i386 hurd-i386))
4638
TAOCRYPT_OPT="-DTAOCRYPT_DISABLE_X86ASM"
4739
endif
@@ -66,8 +58,9 @@ MAKEFLAGS += VERBOSE=1
6658

6759
MAKE_TEST_TARGET:=test-force
6860
ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
69-
# make test-bt is the testsuite run by the MySQL build team
70-
# before a release, but it is long
61+
# Presets related to test-bt are not guarenteed to work in MariaDB as there
62+
# are hard-coded MTR lines insted. See MDEV-8244 for implementation status
63+
# of new test presets.
7164
MAKE_TEST_TARGET:=test-bt
7265
endif
7366

@@ -93,29 +86,28 @@ override_dh_auto_configure:
9386
@echo "RULES.$@"
9487
dh_testdir
9588

96-
( test -d $(BUILDDIR) || mkdir $(BUILDDIR) ) && cd $(BUILDDIR) && \
89+
mkdir -p $(BUILDDIR) && cd $(BUILDDIR) && \
9790
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \
98-
CC=$${MYSQL_BUILD_CC:-gcc} \
99-
CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
100-
CXX=$${MYSQL_BUILD_CXX:-g++} \
101-
CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
91+
CC=${CC} \
92+
CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O3 -fno-strict-aliasing"} \
93+
CXX=${CXX} \
94+
CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -felide-constructors -fno-exceptions -fno-rtti -fno-strict-aliasing ${TAOCRYPT_OPT}"} \
10295
cmake -DCMAKE_INSTALL_PREFIX=/usr \
10396
$(CMAKEFLAGS) \
104-
-DWITH_LIBWRAP=no \
10597
-DWITH_SSL=bundled \
106-
-DCOMPILATION_COMMENT="($(DISTRIBUTION))" \
98+
-DCOMPILATION_COMMENT="$(DISTRIBUTION) $(RELEASE)" \
10799
-DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
108100
-DSYSTEM_TYPE="debian-$(DEB_BUILD_GNU_SYSTEM)" \
109101
-DBUILD_CONFIG=mysql_release \
110102
-DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
111103
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
112-
-DDEB=1 ..'
104+
-DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test \
105+
-DDEB=$(DISTRIBUTION) ..'
113106
touch $@
114107

115108
# This is needed, otherwise 'make test' will run before binaries have been built
116109
override_dh_auto_build:
117110
@echo "RULES.$@"
118-
@echo "MAKEFLAGS: $(value MAKEFLAGS)"
119111
cd $(BUILDDIR) && $(MAKE)
120112
touch $@
121113

@@ -144,13 +136,6 @@ override_dh_auto_install:
144136
# make install
145137
cd $(BUILDDIR) && $(MAKE) install DESTDIR=$(TMP)
146138

147-
# mariadb-server
148-
# INBO_BIN is generated at build time and must thus be installed like this
149-
install -D -m 0644 $(BUILDDIR)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN
150-
rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
151-
$(TMP)/usr/share/mysql/mysql-log-rotate \
152-
$(TMP)/usr/share/mysql/mysql.server \
153-
$(TMP)/usr/share/mysql/binary-configure
154139
# nm numeric soft is not enough, therefore extra sort in command
155140
# to satisfy Debian reproducible build requirements
156141
nm -n $(BUILDDIR)/sql/mysqld | sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
@@ -161,15 +146,12 @@ override_dh_auto_install:
161146
# rename and install Apport hook
162147
install -D -m 644 debian/mariadb-server-10.0.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.0.py
163148

164-
# mariadb-test
165-
mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql
166-
167149
touch $@
168150

169151
override_dh_installlogrotate-arch:
170152
dh_installlogrotate --name mysql-server
171153

172-
# Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
154+
# Start mysql at sequence number 19 before 20 where apache, proftpd etc gets
173155
# started which might depend on a running database server.
174156
override_dh_installinit-arch:
175157
dh_installinit --name=mysql -- defaults 19 21

0 commit comments

Comments
 (0)