Commit 73f1c655 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

MDEV-6284: Import most of downstream Debian packaging

These changes update the contents and behaviour of current packages
to match the current packaging in Debian official repos.

Keep mtr test scope small.

Updating maintainer scripts also required regenerating the translations.

Rules based on modern dh_* buildtools.

Update control file with new Debian conventions:
- Provide virtual-mysql-* virtual packages
- Recommends perl modules instead of Depends
parent a59655a3
...@@ -7,13 +7,19 @@ ...@@ -7,13 +7,19 @@
source /usr/share/mysql/debian-start.inc.sh source /usr/share/mysql/debian-start.inc.sh
if [ -f /etc/default/mysql ]; then
. /etc/default/mysql
fi
MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent" MYCHECK_PARAMS="--all-databases --fast --silent"
MYCHECK_RCPT="root" MYCHECK_RCPT="${MYCHECK_RCPT:-root}"
## Checking for corrupt, not cleanly closed (only for MyISAM and Aria engines) and upgrade needing tables.
# The following commands should be run when the server is up but in background # The following commands should be run when the server is up but in background
# where they do not block the server start and in one shell instance so that # where they do not block the server start and in one shell instance so that
...@@ -21,7 +27,6 @@ MYCHECK_RCPT="root" ...@@ -21,7 +27,6 @@ MYCHECK_RCPT="root"
# If you want to disable the check for crashed tables comment # If you want to disable the check for crashed tables comment
# "check_for_crashed_tables" out. # "check_for_crashed_tables" out.
# (There may be no output to stdout inside the background process!) # (There may be no output to stdout inside the background process!)
echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
# Need to ignore SIGHUP, as otherwise a SIGHUP can sometimes abort the upgrade # Need to ignore SIGHUP, as otherwise a SIGHUP can sometimes abort the upgrade
# process in the middle. # process in the middle.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# This file is included by /etc/mysql/debian-start # This file is included by /etc/mysql/debian-start
# #
## Check all unclosed tables. ## Check MyISAM and Aria unclosed tables.
# - Requires the server to be up. # - Requires the server to be up.
# - Is supposed to run silently in background. # - Is supposed to run silently in background.
function check_for_crashed_tables() { function check_for_crashed_tables() {
...@@ -11,20 +11,27 @@ function check_for_crashed_tables() { ...@@ -11,20 +11,27 @@ function check_for_crashed_tables() {
set -u set -u
# But do it in the background to not stall the boot process. # But do it in the background to not stall the boot process.
logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables" logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables"
# Checking for $? is unreliable so the size of the output is checked. # Checking for $? is unreliable so the size of the output is checked.
# Some table handlers like HEAP do not support CHECK TABLE. # Some table handlers like HEAP do not support CHECK TABLE.
tempfile=`tempfile` tempfile=`tempfile`
# We have to use xargs in this case, because a for loop barfs on the # We have to use xargs in this case, because a for loop barfs on the
# spaces in the thing to be looped over. # spaces in the thing to be looped over.
# If a crashed table is encountered, the "mysql" command will return with a status different from 0
set +e
LC_ALL=C $MYSQL --skip-column-names --batch -e ' LC_ALL=C $MYSQL --skip-column-names --batch -e '
select concat('\''select count(*) into @discard from `'\'', select concat('\''select count(*) into @discard from `'\'',
TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'')
from information_schema.TABLES where ENGINE='\''MyISAM'\' | \ from information_schema.TABLES where TABLE_SCHEMA<>'\''INFORMATION_SCHEMA'\'' and TABLE_SCHEMA<>'\''PERFORMANCE_SCHEMA'\'' and ( ENGINE='\''MyISAM'\'' or ENGINE='\''Aria'\'' )' | \
xargs -i $MYSQL --skip-column-names --silent --batch \ xargs -i $MYSQL --skip-column-names --silent --batch \
--force -e "{}" >$tempfile --force -e "{}" &>$tempfile
if [ -s $tempfile ]; then set -e
if [ -s "$tempfile" ]; then
( (
/bin/echo -e "\n" \ /bin/echo -e "\n" \
"Improperly closed tables are also reported if clients are accessing\n" \ "Improperly closed tables are also reported if clients are accessing\n" \
......
File mode changed from 100644 to 100755
...@@ -71,9 +71,10 @@ Description: Virtual package to satisfy external depends ...@@ -71,9 +71,10 @@ Description: Virtual package to satisfy external depends
Package: libmariadbd-dev Package: libmariadbd-dev
Architecture: any Architecture: any
Section: libdevel Section: libdevel
Depends: libmariadbclient-dev (>= ${binary:Version}), ${misc:Depends}
Provides: libmysqld-dev Provides: libmysqld-dev
Conflicts: libmysqld-dev Pre-Depends: ${misc:Pre-Depends}
Depends: libmariadbd18 (= ${binary:Version}), libmariadbclient-dev (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
Breaks: libmysqld-dev
Replaces: libmysqld-dev Replaces: libmysqld-dev
Description: MariaDB embedded database, development files Description: MariaDB embedded database, development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
...@@ -81,7 +82,7 @@ Description: MariaDB embedded database, development files ...@@ -81,7 +82,7 @@ Description: MariaDB embedded database, development files
language in the world. The main goals of MariaDB are speed, robustness and language in the world. The main goals of MariaDB are speed, robustness and
ease of use. ease of use.
. .
This package includes the embedded server library and header files. This package includes the embedded server library development and header files.
Package: libmariadbclient-dev Package: libmariadbclient-dev
Architecture: any Architecture: any
...@@ -193,15 +194,12 @@ Description: MariaDB database core client binaries ...@@ -193,15 +194,12 @@ Description: MariaDB database core client binaries
Package: mariadb-client-10.2 Package: mariadb-client-10.2
Architecture: any Architecture: any
Depends: debianutils (>=1.6), Depends: debianutils (>=1.6),
libdbd-mysql-perl (>= 1.2202),
libdbi-perl,
libmariadbclient18 (>= ${source:Version}), libmariadbclient18 (>= ${source:Version}),
mariadb-client-core-10.2 (>= ${source:Version}), mariadb-client-core-10.2 (>= ${source:Version}),
mariadb-common, mariadb-common,
${misc:Depends}, ${misc:Depends},
${perl:Depends}, ${perl:Depends},
${shlibs:Depends} ${shlibs:Depends}
Suggests: libterm-readkey-perl
Provides: mysql-client, Provides: mysql-client,
mysql-client-4.1, mysql-client-4.1,
mysql-client-5.1, mysql-client-5.1,
...@@ -234,6 +232,9 @@ Replaces: mariadb-client (<< ${source:Version}), ...@@ -234,6 +232,9 @@ Replaces: mariadb-client (<< ${source:Version}),
mysql-client-5.5, mysql-client-5.5,
mysql-client-5.6, mysql-client-5.6,
virtual-mysql-client virtual-mysql-client
Recommends: libdbd-mysql-perl (>= 1.2202),
libdbi-perl,
libterm-readkey-perl
Description: MariaDB database client binaries Description: MariaDB database client binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query server. SQL (Structured Query Language) is the most popular database query
...@@ -322,8 +323,11 @@ Package: mariadb-server-10.2 ...@@ -322,8 +323,11 @@ Package: mariadb-server-10.2
Architecture: any Architecture: any
Suggests: mailx, mariadb-test, netcat-openbsd, tinyca Suggests: mailx, mariadb-test, netcat-openbsd, tinyca
Recommends: libhtml-template-perl Recommends: libhtml-template-perl
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf Pre-Depends: adduser (>= 3.40), debconf, mariadb-common (>= ${source:Version})
Depends: galera-3 (>=25.3), Depends: bsdutils,
coreutils,
findutils,
galera-3 (>=25.3),
gawk, gawk,
iproute, iproute,
libdbi-perl, libdbi-perl,
...@@ -383,7 +387,7 @@ Description: MariaDB database server binaries ...@@ -383,7 +387,7 @@ Description: MariaDB database server binaries
Package: mariadb-server Package: mariadb-server
Architecture: all Architecture: all
Depends: mariadb-server-10.2 (= ${source:Version}), ${misc:Depends} Depends: mariadb-server-10.2 (>= ${source:Version}), ${misc:Depends}
Description: MariaDB database server (metapackage depending on the latest version) Description: MariaDB database server (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of This is an empty package that depends on the current "best" version of
mariadb-server (currently mariadb-server-10.2), as determined by the MariaDB mariadb-server (currently mariadb-server-10.2), as determined by the MariaDB
...@@ -398,7 +402,7 @@ Description: MariaDB database server (metapackage depending on the latest versio ...@@ -398,7 +402,7 @@ Description: MariaDB database server (metapackage depending on the latest versio
Package: mariadb-client Package: mariadb-client
Architecture: all Architecture: all
Depends: mariadb-client-10.2 (= ${source:Version}), ${misc:Depends} Depends: mariadb-client-10.2 (>= ${source:Version}), ${misc:Depends}
Description: MariaDB database client (metapackage depending on the latest version) Description: MariaDB database client (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of This is an empty package that depends on the current "best" version of
mariadb-client (currently mariadb-client-10.2), as determined by the MariaDB mariadb-client (currently mariadb-client-10.2), as determined by the MariaDB
......
The examples directory includes files that might be needed by some The examples directory includes files that might be needed by some
developers: developers:
- header files not installed by default
- the example file udf_example.c - the example file udf_example.c
usr/bin/mysql_config usr/bin/mysql_config
usr/include/mysql usr/include/mysql/*
usr/include/mariadb usr/include/mariadb
usr/lib/mariadb/libmariadbclient.a usr/lib/*/libmariadb.so
usr/lib/libmysqlservices.a usr/lib/*/libmariadbclient.a
usr/lib/*/libmysqlservices.a
usr/share/aclocal/mysql.m4 usr/share/aclocal/mysql.m4
usr/share/pkgconfig/mariadb.pc usr/share/pkgconfig/mariadb.pc
usr/share/man/man1/mysql_config.1 usr/share/man/man1/mysql_config.1
debian/tmp/usr/share/man/man1/mysql_config.1
usr/lib/mariadb/libmariadb.so.* usr/lib/mariadb/libmariadb.so.*
usr/lib/mysql/plugin/mysql_clear_password.so
usr/lib/mysql/plugin/dialog.so usr/lib/mysql/plugin/dialog.so
usr/lib/mysql/plugin/mysql_clear_password.so
usr/lib/mysql/*.a usr/lib/*/libmysqld.a
usr/lib/mysql/*.la usr/lib/*/libmysqld.so
usr/lib/*/libmysqld.so.18
FAQ: FAQ:
Q: My <tab> completion is gone, why? Q: My <tab> completition is gone, why?
A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf! A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf!
usr/bin/innochecksum debian/additions/innotop/innotop usr/bin/
usr/bin/innotop debian/additions/mysqlreport usr/bin/
usr/bin/mysql_find_rows
usr/bin/mysql_fix_extensions
usr/bin/mysql_waitpid
usr/bin/mysqlaccess usr/bin/mysqlaccess
usr/bin/mysqladmin usr/bin/mysqladmin
usr/bin/mysqldump usr/bin/mysqldump
usr/bin/mysqldumpslow usr/bin/mysqldumpslow
usr/bin/mysql_find_rows
usr/bin/mysql_fix_extensions
usr/bin/mysqlimport usr/bin/mysqlimport
usr/bin/mysqlreport
usr/bin/mysqlshow usr/bin/mysqlshow
usr/bin/mysqlslap usr/bin/mysqlslap
usr/bin/mysql_waitpid
usr/share/man/man1/innotop.1
usr/share/man/man1/mysqlaccess.1
usr/share/man/man1/mysqladmin.1
usr/share/man/man1/mysqldump.1
usr/share/man/man1/mysqldumpslow.1
usr/share/man/man1/mysql_find_rows.1
usr/share/man/man1/mysql_fix_extensions.1
usr/share/man/man1/mysqlimport.1
usr/share/man/man1/mysqlreport.1
usr/share/man/man1/mysqlshow.1
usr/share/man/man1/mysqlslap.1
usr/share/man/man1/mysql_waitpid.1
debian/additions/innotop/innotop.1
debian/tmp/usr/share/man/man1/mysqlaccess.1
debian/tmp/usr/share/man/man1/mysqladmin.1
debian/tmp/usr/share/man/man1/mysqldump.1
debian/tmp/usr/share/man/man1/mysqldumpslow.1
debian/tmp/usr/share/man/man1/mysql_find_rows.1
debian/tmp/usr/share/man/man1/mysql_fix_extensions.1
debian/tmp/usr/share/man/man1/mysqlimport.1
debian/additions/mysqlreport.1
debian/tmp/usr/share/man/man1/mysqlshow.1
debian/tmp/usr/share/man/man1/mysqlslap.1
debian/tmp/usr/share/man/man1/mysql_waitpid.1
# According to /usr/share/menu/ policy 1.4, not /usr/share/doc/debian-policy/ # According to /usr/share/menu/ policy 1.4, not /usr/share/doc/debian-policy/
?package(innotop):needs="text" section="Applications/Data Management"\ ?package(mariadb-client-10.2):needs="text" section="Applications/Data Management"\
title="innotop" command="/usr/bin/innotop" title="Innotop" command="/usr/bin/innotop"
usr/bin/mysql usr/bin/mysql
usr/bin/mysqlcheck usr/bin/mysqlcheck
usr/share/man/man1/mysql.1
usr/share/man/man1/mysqlcheck.1
debian/tmp/usr/share/man/man1/mysql.1
debian/tmp/usr/share/man/man1/mysqlcheck.1
etc/mysql/conf.d/mariadb.cnf debian/additions/mariadb.cnf etc/mysql/conf.d
#!/bin/bash -e #!/bin/bash
set -e
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
CNF=/etc/mysql/my.cnf
# Beware that there are two ypwhich one of them needs the 2>/dev/null! # Beware that there are two ypwhich one of them needs the 2>/dev/null!
if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
db_input high mysql-server-5.1/nis_warning || true db_input high mariadb-server-10.0/nis_warning || true
db_go db_go
fi fi
# only ask this question on fresh installs, during "reconfiguration" and when # only ask this question on fresh installs, during "reconfiguration" and when
# not upgrading from an existing 5.0 installation. # not upgrading from an existing 5.0 installation.
# there is also an additional check for empty root passwords in the # there is also an additional check for empty root passwords in the
......
etc/init.d
etc/logrotate.d
etc/mysql/conf.d
usr/bin
usr/sbin
usr/share/man/man8
usr/share/mysql
usr/share/doc/mariadb-server-10.2
var/run/mysqld
var/lib/mysql-upgrade var/lib/mysql-upgrade
...@@ -14,16 +14,31 @@ usr/lib/mysql/plugin/query_cache_info.so ...@@ -14,16 +14,31 @@ usr/lib/mysql/plugin/query_cache_info.so
usr/lib/mysql/plugin/query_response_time.so usr/lib/mysql/plugin/query_response_time.so
usr/lib/mysql/plugin/semisync_master.so usr/lib/mysql/plugin/semisync_master.so
usr/lib/mysql/plugin/semisync_slave.so usr/lib/mysql/plugin/semisync_slave.so
usr/lib/mysql/plugin/auth_pam.so
usr/lib/mysql/plugin/auth_socket.so
usr/lib/mysql/plugin/file_key_management.so
usr/lib/mysql/plugin/ha_archive.so
usr/lib/mysql/plugin/ha_blackhole.so
usr/lib/mysql/plugin/ha_federated.so
usr/lib/mysql/plugin/ha_federatedx.so
usr/lib/mysql/plugin/ha_mroonga.so
usr/lib/mysql/plugin/ha_sphinx.so
usr/lib/mysql/plugin/handlersocket.so
usr/lib/mysql/plugin/locales.so
usr/lib/mysql/plugin/metadata_lock_info.so
usr/lib/mysql/plugin/query_cache_info.so
usr/lib/mysql/plugin/query_response_time.so
usr/lib/mysql/plugin/semisync_master.so
usr/lib/mysql/plugin/semisync_slave.so
usr/lib/mysql/plugin/server_audit.so usr/lib/mysql/plugin/server_audit.so
usr/lib/mysql/plugin/simple_password_check.so usr/lib/mysql/plugin/simple_password_check.so
usr/lib/mysql/plugin/sql_errlog.so usr/lib/mysql/plugin/sql_errlog.so
usr/lib/mysql/plugin/wsrep_info.so usr/lib/mysql/plugin/wsrep_info.so
usr/lib/mysql/plugin/user_variables.so usr/lib/mysql/plugin/user_variables.so
usr/lib/libhsclient.so.*
etc/apparmor.d/usr.sbin.mysqld etc/apparmor.d/usr.sbin.mysqld
usr/share/apport/package-hooks/source_mariadb-10.2.py usr/share/apport/package-hooks/source_mariadb-10.2.py
etc/mysql/debian-start debian/additions/debian-start etc/mysql
etc/mysql/conf.d/mysqld_safe_syslog.cnf debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
usr/bin/msql2mysql usr/bin/msql2mysql
usr/bin/my_print_defaults usr/bin/my_print_defaults
usr/bin/myisamchk usr/bin/myisamchk
...@@ -56,8 +71,6 @@ usr/bin/wsrep_sst_rsync ...@@ -56,8 +71,6 @@ usr/bin/wsrep_sst_rsync
usr/bin/wsrep_sst_xtrabackup usr/bin/wsrep_sst_xtrabackup
usr/bin/wsrep_sst_xtrabackup-v2 usr/bin/wsrep_sst_xtrabackup-v2
usr/share/doc/mariadb-server-10.2/mysqld.sym.gz usr/share/doc/mariadb-server-10.2/mysqld.sym.gz
usr/share/doc/mariadb-server-10.2/INFO_SRC
usr/share/doc/mariadb-server-10.2/INFO_BIN
usr/share/man/man1/msql2mysql.1 usr/share/man/man1/msql2mysql.1
usr/share/man/man1/myisamchk.1 usr/share/man/man1/myisamchk.1
usr/share/man/man1/myisam_ftdump.1 usr/share/man/man1/myisam_ftdump.1
...@@ -79,8 +92,8 @@ usr/share/man/man1/resolveip.1 ...@@ -79,8 +92,8 @@ usr/share/man/man1/resolveip.1
usr/share/man/man1/resolve_stack_dump.1 usr/share/man/man1/resolve_stack_dump.1
usr/share/man/man1/innochecksum.1 usr/share/man/man1/innochecksum.1
usr/share/man/man1/mysql_tzinfo_to_sql.1 usr/share/man/man1/mysql_tzinfo_to_sql.1
usr/share/mysql/debian-start.inc.sh debian/additions/debian-start.inc.sh usr/share/mysql
usr/share/mysql/echo_stderr debian/additions/echo_stderr usr/share/mysql
usr/share/mysql/errmsg-utf8.txt usr/share/mysql/errmsg-utf8.txt
usr/share/mysql/fill_help_tables.sql usr/share/mysql/fill_help_tables.sql
usr/share/mysql/maria_add_gis_sp_bootstrap.sql usr/share/mysql/maria_add_gis_sp_bootstrap.sql
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment