.deb packaging fixes: make mariadb-common a real package, which depends on

mysql-common and places mariadb-specific stuff in /etc/mysql/conf.d/mariadb.cnf.
This should allow to co-exist with default Debian mysql-common package and
help resolve dependencies when installing mariadb among multiple available
versions of MySQL from different repositories.
This commit is contained in:
unknown 2012-01-26 12:55:12 +01:00
parent 6f142ee51c
commit 438ed0408c
8 changed files with 83 additions and 50 deletions

36
debian/additions/mariadb.cnf vendored Normal file
View file

@ -0,0 +1,36 @@
# MariaDB-specific config file.
# Read by /etc/mysql/my.cnf
[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
#default-character-set = utf8
[mysqld]
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
#default-character-set = utf8
#default-collation = utf8_general_ci
#character_set_server = utf8
#collation_server = utf8_general_ci
#
# * Fine Tuning
#
max_connections = 100
connect_timeout = 5
wait_timeout = 600
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
#
# * MyISAM
#
key_buffer_size = 128M
table_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M

View file

@ -1,19 +1,5 @@
# MariaDB database server configuration file.
#
# =================================================================
# Base configuration courtesy of Open Query (http://openquery.com/)
# For production use, case-specific preparation is still required.
# 2009-10-07
#
# This is *not* an optimised config, merely a more sane baseline:
# - InnoDB default (e.g., ACID out-of-the-box, same as on Windows)
# - strict mode (for proper input checks, same as on Windows)
# - various other useful settings
# - make use of MariaDB/Percona/OurDelta enhancements/extensions
#
# For tuning assistance, please see http://openquery.com/services
# =================================================================
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
@ -32,8 +18,6 @@
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Default is Latin1, if you need UTF-8 set this (also in server section)
#default-character-set = utf8
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
@ -58,43 +42,21 @@ lc_messages_dir = /usr/share/mysql
lc_messages = en_US
skip-external-locking
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
#default-character-set = utf8
#default-collation = utf8_general_ci
#character_set_server = utf8
#collation_server = utf8_general_ci
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
max_connections = 100
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M
thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
#
# * MyISAM
#
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched. On error, make copy and try a repair.
myisam_recover = BACKUP
key_buffer_size = 128M
#open-files-limit = 2000
table_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
#
# * Query Cache Configuration
#

View file

@ -71,7 +71,6 @@ Package: mysql-common
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: mariadb-common
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -80,10 +79,19 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
.
This package includes files needed by all versions of the client library
(e.g. /etc/mysql/my.cnf).
Package: mariadb-common
Section: database
Architecture: all
Depends: mysql-common, ${shlibs:Depends}, ${misc:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
Due to libmysqlclient15off package depends, this package has not yet been
renamed to mariadb-common. It does, however, already contain a new my.cnf
file with mariadb-specific configuration options.
This package includes files needed by all versions of the client library
(e.g. /etc/mysql/conf.d/mariadb.cnf).
Package: mariadb-client-core-5.5
Architecture: any

View file

@ -172,11 +172,16 @@ install: build
mv $(TMP)/usr/include/mysql/mysql/*.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/psi $(TMP)/usr/include/mysql/
# mysql-common: We now provide our own config file.
# can't be mariadb-common, other packages insist
# mysql-common: We provide our own version of this package for
# completeness, but we can use an existing version; mariadb-specic
# stuff is in mariadb-common
install -d $(TMP)/etc/mysql
install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
# mariadb-common: MariaDB-specific config stuff.
install -d $(TMP)/etc/mysql/conf.d
install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf
# mariadb-client
install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/

View file

@ -71,7 +71,6 @@ Package: mysql-common
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: mariadb-common
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@ -80,10 +79,19 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
.
This package includes files needed by all versions of the client library
(e.g. /etc/mysql/my.cnf).
Package: mariadb-common
Section: database
Architecture: all
Depends: mysql-common, ${shlibs:Depends}, ${misc:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
.
Due to libmysqlclient15off package depends, this package has not yet been
renamed to mariadb-common. It does, however, already contain a new my.cnf
file with mariadb-specific configuration options.
This package includes files needed by all versions of the client library
(e.g. /etc/mysql/conf.d/mariadb.cnf).
Package: mariadb-client-core-5.5
Architecture: any

View file

@ -172,11 +172,16 @@ install: build
mv $(TMP)/usr/include/mysql/mysql/*.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/psi $(TMP)/usr/include/mysql/
# mysql-common: We now provide our own config file.
# can't be mariadb-common, other packages insist
# mysql-common: We provide our own version of this package for
# completeness, but we can use an existing version; mariadb-specic
# stuff is in mariadb-common
install -d $(TMP)/etc/mysql
install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
# mariadb-common: MariaDB-specific config stuff.
install -d $(TMP)/etc/mysql/conf.d
install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf
# mariadb-client
install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/

1
debian/mariadb-common.files vendored Normal file
View file

@ -0,0 +1 @@
etc/mysql/conf.d/mariadb.cnf

8
debian/mariadb-common.postrm vendored Normal file
View file

@ -0,0 +1,8 @@
#!/bin/bash -e
if [ "$1" = "purge" ]; then
rmdir /etc/mysql/conf.d 2>/dev/null || true
rmdir /etc/mysql 2>/dev/null || true
fi
#DEBHELPER#