diff options
Diffstat (limited to 'debian/dist/Ubuntu')
-rw-r--r-- | debian/dist/Ubuntu/apparmor-profile | 15 | ||||
-rw-r--r-- | debian/dist/Ubuntu/control | 221 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.README.Debian | 109 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.dirs | 10 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.files | 63 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.postinst | 284 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.postrm | 86 | ||||
-rw-r--r-- | debian/dist/Ubuntu/mariadb-server-5.5.py | 52 | ||||
-rwxr-xr-x | debian/dist/Ubuntu/rules | 299 |
9 files changed, 1139 insertions, 0 deletions
diff --git a/debian/dist/Ubuntu/apparmor-profile b/debian/dist/Ubuntu/apparmor-profile new file mode 100644 index 00000000000..4ffb7eab550 --- /dev/null +++ b/debian/dist/Ubuntu/apparmor-profile @@ -0,0 +1,15 @@ +# This file is intensionally empty to disable apparmor by default for newer +# versions of MariaDB, while providing seamless upgrade from older versions +# and from mysql, where apparmor is used. +# +# By default, we do not want to have any apparmor profile for the MariaDB +# server. It does not provide much useful functionality/security, and causes +# several problems for users who often are not even aware that apparmor +# exists and runs on their system. +# +# Users can modify and maintain their own profile, and in this case it will +# be used. +# +# When upgrading from previous version, users who modified the profile +# will be promptet to keep or discard it, while for default installs +# we will automatically disable the profile. diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control new file mode 100644 index 00000000000..c49d1581cb3 --- /dev/null +++ b/debian/dist/Ubuntu/control @@ -0,0 +1,221 @@ +Source: mariadb-5.5 +Section: misc +Priority: optional +Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net> +XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net> +Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net> +Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper +Standards-Version: 3.8.2 +Homepage: http://mariadb.org/ +Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files +Vcs-Bzr: bzr://lp:maria + +Package: libmariadbclient18 +Section: libs +Architecture: any +Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: MariaDB database client library + 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. + . + This package includes the client library. + +Package: libmysqlclient18 +Section: libs +Architecture: any +Depends: libmariadbclient18 (= ${source:Version}) +Replaces: libmysqlclient18 (<< ${source:Version}) +Description: Virtual package to satisfy external depends + This is an empty package that provides an updated "best" version of + libmysqlclient18 that does not conflict with the libmariadbclient18 + package. + . + 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. + +Package: libmariadbd-dev +Architecture: any +Section: libdevel +Depends: libmariadbclient-dev (>= ${source:Version}), ${misc:Depends} +Provides: libmysqld-dev +Conflicts: libmysqld-dev +Replaces: libmysqld-dev +Description: MariaDB embedded database development files + 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. + . + This package includes the embedded server library and header files. + +Package: libmariadbclient-dev +Architecture: any +Section: libdevel +Depends: libmariadbclient18 (>= ${source:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} +Replaces: libmariadbclient16-dev, libmysqlclient16-dev +Conflicts: libmysqlclient-dev, libmariadbclient16-dev, libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev, libmysqlclient16-dev +Provides: libmysqlclient-dev +Description: MariaDB database development files + 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. + . + This package includes development libraries and header files. + +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 + language in the world. The main goals of MariaDB are speed, robustness and + ease of use. + . + This package includes files needed by all versions of the client library + (e.g. /etc/mysql/my.cnf). + . + 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. + +Package: mariadb-client-core-5.5 +Architecture: any +Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5 +Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, + mysql-client-core-5.1, mysql-client-core-5.5, + mariadb-client-5.1, mariadb-client-core-5.1, + mariadb-client-5.2, mariadb-client-core-5.2, + mariadb-client-5.3, mariadb-client-core-5.3 +Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, + mysql-client-core-5.1, mysql-client-core-5.5, + mariadb-client-5.1, mariadb-client-core-5.1, + mariadb-client-5.2, mariadb-client-core-5.2, + mariadb-client-5.3, mariadb-client-core-5.3 +Description: MariaDB database core client binaries + 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. + . + This package includes the core client files, as used by Akonadi. + +Package: mariadb-client-5.5 +Architecture: any +Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mariadb-common, libmariadbclient18 (>= ${source:Version}), mariadb-client-core-5.5 (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} +Provides: virtual-mysql-client, mysql-client, + mysql-client-4.1, mysql-client-5.1, mysql-client-5.5 +Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, + mariadb-client (<< ${source:Version}), + mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3 +Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, + mariadb-client (<< ${source:Version}), + mariadb-client-5.1, mariadb-client-5.2, mariadb-client-5.3 +Description: MariaDB database client binaries + 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. + . + This package includes the client binaries and the additional tools + innotop and mysqlreport. + +Package: mariadb-server-core-5.5 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}) +Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5 +Conflicts: mysql-server-5.0, + mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5, + mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5 +Replaces: mysql-server-5.0, + mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5, + mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5 +Description: MariaDB database core server files + 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. + . + This package includes the core server files, as used by Akonadi. + +Package: mariadb-test-5.5 +Section: database +Architecture: all +Depends: mariadb-server-5.5 (= ${source:Version}), mariadb-client-5.5 (= ${source:Version}) +Conflicts: mariadb-test (<< ${source:Version}), + mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3 +Replaces: mariadb-test (<< ${source:Version}), + mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3 +Description: MariaDB database regression test suite + 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. + . + This package includes the regression test suite. + +Package: mariadb-server-5.5 +Architecture: any +Suggests: tinyca, mailx, mariadb-test +Recommends: libhtml-template-perl +Pre-Depends: mariadb-common, adduser (>= 3.40), debconf +Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}) +Provides: mariadb-server, mysql-server, virtual-mysql-server +Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), + mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, + libmariadbclient16 (<< 5.3.4) +Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), + mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, + libmariadbclient16 (<< 5.3.4), + libmariadbclient-dev (<< 5.5.0) +Description: MariaDB database server binaries + 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. + . + This package includes the server binaries. + +Package: mariadb-server +Section: database +Architecture: all +Depends: mariadb-server-5.5, ${misc:Depends} +Description: MariaDB database server (metapackage depending on the latest version) + This is an empty package that depends on the current "best" version of + mariadb-server (currently mariadb-server-5.5), as determined by the MariaDB + maintainers. Install this package if in doubt about which MariaDB + version you need. That will install the version recommended by the + package maintainers. + . + 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. + +Package: mariadb-client +Section: database +Architecture: all +Depends: mariadb-client-5.5, ${misc:Depends} +Description: MariaDB database client (metapackage depending on the latest version) + This is an empty package that depends on the current "best" version of + mariadb-client (currently mariadb-client-5.5), as determined by the MariaDB + maintainers. Install this package if in doubt about which MariaDB version + you want, as this is the one we consider to be in the best shape. + +Package: mariadb-test +Section: database +Architecture: all +Depends: mariadb-test-5.5 +Description: MariaDB database regression test suite (metapackage depending on the latest version) + This is an empty package that depends on the current "best" version of + mariadb-test (currently mariadb-test-5.5), as determined by the MariaDB + maintainers. diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian b/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian new file mode 100644 index 00000000000..741243f1ec3 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian @@ -0,0 +1,109 @@ +* MYSQL WON'T START OR STOP?: +============================= +You may never ever delete the special mysql user "debian-sys-maint". This +user together with the credentials in /etc/mysql/debian.cnf are used by the +init scripts to stop the server as they would require knowledge of the mysql +root users password else. +So in most of the times you can fix the situation by making sure that the +debian.cnf file contains the right password, e.g. by setting a new one +(remember to do a "flush privileges" then). + +* WHAT TO DO AFTER UPGRADES: +============================ +The privilege tables are automatically updated so all there is left is read +the changelogs on dev.mysql.com to see if any changes affect custom apps. + +* WHAT TO DO AFTER INSTALLATION: +================================ +The MySQL manual describes certain steps to do at this stage in a separate +chapter. They are not necessary as the Debian packages does them +automatically. + +The only thing that is left over for the admin is + - setting the passwords + - creating new users and databases + - read the rest of this text + +* DOWNGRADING TO 4.0 or 4.1: +============================ +Unsupported. Period. +But if you do and get problems or make interesting experiences, mail me, it +might help others. +Ok, if you really want, I would recommend to "mysqldump --opt" all tables, +then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be +carefully, though, with the "mysql" table, you might not simply overwrite that +one as the password for the mysql "debian-sys-maint" user is stored in +/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if +it's alive. + +* SOME APPLICATION CAN NO LONGER CONNECT: +========================================= +This application is probably linked against libmysqlclient12 or below and +somebody has created a mysql user with new-style passwords. +The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the +application that inserted the user has to be changed or the application that +tries to connect updated to libmysqlclient14 or -15. + +* NETWORKING: +============= +For security reasons, the Debian package has enabled networking only on the +loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with +"netstat -tlnp" where it is listening. If your connection is aborted +immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read +hosts_access(5). + +* WHERE IS THE DOCUMENTATION?: +============================== +Unfortunately due to licensing restrictions, debian currently not able +to provide the mysql-doc package in any format. For the most up to date +documentation, please go to http://dev.mysql.com/doc. + +* PASSWORDS: +============ +It is strongly recommended to set a password for the mysql root user (which + /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" + /usr/bin/mysql -u root -e "flush privileges" +If you already had a password set add "-p" before "-u" to the lines above. + + +If you are tired to type the password in every time or want to automate your +scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 +(-rw------- username username .my.cnf) to ensure that nobody else can read +it. Every other configuration parameter can be stored there, too. You will +find an example below and more information in the MySQL manual in +/usr/share/doc/mysql-doc or www.mysql.com. + +ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" +line wherever there is a "password" line, else, the Debian maintenance +scripts, that use /etc/mysql/debian.cnf, will use the username +"debian-sys-maint" but the password that is in root's .my.cnf. Also note, +that every change you make in the /root/.my.cnf will affect the mysql cron +script, too. + + # an example of $HOME/.my.cnf + [client] + user = your-mysql-username + password = enter-your-good-new-password-here + +* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: +========================================= +If you ever run out of rows in a table there is the possibility of building +the package with "-DBIG_ROWS" which, according to a MySQL employee on +packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 +rows) but also to an approx. 5% performance loss. + +* BerkeleyDB Storage Engine +=========================== +Support for BerkeleyDB has been removed in 5.1, and consequently both the +have-bdb and skip-bdb configuration options will cause the server to fail. +Removing the options from /etc/mysql/my.cnf will fix this problem. + +* FURTHER NOTES ON REPLICATION +=============================== +If the MySQL server is acting as a replication slave, you should not +set --tmpdir to point to a directory on a memory-based filesystem or to +a directory that is cleared when the server host restarts. A replication +slave needs some of its temporary files to survive a machine restart so +that it can replicate temporary tables or LOAD DATA INFILE operations. If +files in the temporary file directory are lost when the server restarts, +replication fails. diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.dirs b/debian/dist/Ubuntu/mariadb-server-5.5.dirs new file mode 100644 index 00000000000..40b789231e0 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.dirs @@ -0,0 +1,10 @@ +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-5.3 +var/run/mysqld +var/lib/mysql-upgrade diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.files b/debian/dist/Ubuntu/mariadb-server-5.5.files new file mode 100644 index 00000000000..13d1dc074d0 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.files @@ -0,0 +1,63 @@ +usr/lib/mysql/plugin/ +usr/lib/libhsclient.so.* +etc/apparmor.d/usr.sbin.mysqld +usr/share/apport/package-hooks/source_mariadb-5.5.py +etc/mysql/debian-start +etc/mysql/conf.d/mysqld_safe_syslog.cnf +usr/bin/msql2mysql +usr/bin/my_print_defaults +usr/bin/myisamchk +usr/bin/myisam_ftdump +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/aria_pack +usr/bin/aria_read_log +usr/bin/aria_ftdump +usr/bin/aria_chk +usr/bin/aria_dump_log +usr/bin/mysql_convert_table_format +usr/bin/mysql_install_db +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_upgrade +usr/bin/mysql_zap +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/perror +usr/bin/replace +usr/bin/resolve_stack_dump +usr/bin/resolveip +usr/share/doc/mariadb-server-5.5/mysqld.sym.gz +usr/share/lintian/overrides/mariadb-server-5.5 +usr/share/man/man1/msql2mysql.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisam_ftdump.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysql_convert_table_format.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysqlhotcopy.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_setpermission.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man1/mysql_zap.1 +usr/share/man/man1/perror.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man1/innochecksum.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg.txt +usr/share/mysql/fill_help_tables.sql +usr/share/mysql/mysql_system_tables_data.sql +usr/share/mysql/mysql_system_tables.sql +usr/share/mysql/mysql_test_data_timezone.sql diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.postinst b/debian/dist/Ubuntu/mariadb-server-5.5.postinst new file mode 100644 index 00000000000..68e24a2d833 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.postinst @@ -0,0 +1,284 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + +# This command can be used as pipe to syslog. With "-s" it also logs to stderr. +ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i" +# This will make an error in a logged command immediately apparent by aborting +# the install, rather than failing silently and leaving a broken install. +set -o pipefail + +invoke() { + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --innodb=OFF --pbxt=OFF --default-storage-engine=myisam" + +test_mysql_access() { + mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1 +} + +# call with $1 = "online" to connect to the server, otherwise it bootstraps +set_mysql_rootpw() { + # forget we ever saw the password. don't use reset to keep the seen status + db_set mysql-server/root_password "" + db_set mysql-server/root_password_again "" + + tfile=`mktemp` + if [ ! -f "$tfile" ]; then + return 1 + fi + + # this avoids us having to call "test" or "[" on $rootpw + cat << EOF > $tfile +USE mysql; +UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; +FLUSH PRIVILEGES; +EOF + if grep -q 'PASSWORD("")' $tfile; then + retval=0 + elif [ "$1" = "online" ]; then + mysql --no-defaults -u root -h localhost <$tfile >/dev/null + retval=$? + else + $MYSQL_BOOTSTRAP <$tfile + retval=$? + fi + rm -f $tfile + return $retval +} + +# This is necessary because mysql_install_db removes the pid file in /var/run +# and because changed configuration options should take effect immediately. +# In case the server wasn't running at all it should be ok if the stop +# script fails. I can't tell at this point because of the cleaned /var/run. +set +e; invoke stop; set -e + +case "$1" in + configure) + mysql_datadir=/usr/share/mysql + mysql_statedir=/var/lib/mysql + mysql_rundir=/var/run/mysqld + mysql_logdir=/var/log + mysql_cfgdir=/etc/mysql + mysql_newlogdir=/var/log/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + + # first things first, if the following symlink exists, it is a preserved + # copy the old data dir from a mysql upgrade that would have otherwise + # been replaced by an empty mysql dir. this should restore it. + for dir in DATADIR LOGDIR; do + if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi + savelink="$mysql_upgradedir/$dir.link" + if [ -L "$savelink" ]; then + # If the targetdir was a symlink before we upgraded it is supposed + # to be either still be present or not existing anymore now. + if [ -L "$targetdir" ]; then + rm "$savelink" + elif [ ! -d "$targetdir" ]; then + mv "$savelink" "$targetdir" + else + # this should never even happen, but just in case... + mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX` + echo "this is very strange! see $mysql_tmp/README..." >&2 + mv "$targetdir" "$mysql_tmp" + cat << EOF > "$mysql_tmp/README" + +if you're reading this, it's most likely because you had replaced /var/lib/mysql +with a symlink, then upgraded to a new version of mysql, and then dpkg +removed your symlink (see #182747 and others). the mysql packages noticed +that this happened, and as a workaround have restored it. however, because +/var/lib/mysql seems to have been re-created in the meantime, and because +we don't want to rm -rf something we don't know as much about, we're going +to leave this unexpected directory here. if your database looks normal, +and this is not a symlink to your database, you should be able to blow +this all away. + +EOF + fi + fi + rmdir $mysql_upgradedir 2>/dev/null || true + done + + # Ensure the existence and right permissions for the database and + # log files. + if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi + if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi + if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi + # When creating an ext3 jounal on an already mounted filesystem like e.g. + # /var/lib/mysql, you get a .journal file that is not modifyable by chown. + # The mysql_datadir must not be writable by the mysql user under any + # circumstances as it contains scripts that are executed by root. + set +e + chown -R 0:0 $mysql_datadir + chown -R mysql $mysql_statedir + chown -R mysql $mysql_rundir + chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir; + for i in log err; do + touch $mysql_logdir/mysql.$i + chown mysql:adm $mysql_logdir/mysql.$i + chmod 0640 $mysql_logdir/mysql.$i + done + set -e + + # This is important to avoid dataloss when there is a removed + # mysql-server version from Woody lying around which used the same + # data directory and then somewhen gets purged by the admin. + db_set mysql-server/postrm_remove_database false || true + + # To avoid downgrades. + touch $mysql_statedir/debian-5.5.flag + + # initiate databases. Output is not allowed by debconf :-( + # This will fail if we are upgrading an existing database; in this case + # mysql_upgrade, called from the /etc/init.d/mysql start script, will + # handle things. + # Debian: beware of the bashisms... + # Debian: can safely run on upgrades with existing databases + set +e + /bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER + set -e + + ## On every reconfiguration the maintenance user is recreated. + # + # - It is easier to regenerate the password every time but as people + # use fancy rsync scripts and file alteration monitors, the existing + # password is used and existing files not touched. + # - The mysqld statement is like that in mysql_install_db because the + # server is not already running. This has some implications: + # - The amount of newlines and semicolons in the query is important! + # - GRANT is not possible with --skip-grant-tables and "INSERT + # (user,host..) VALUES" is not --ansi compliant + # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. + # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv + # may not be present as old Woody 3.23 databases did not have it and the + # admin might not already have run mysql_upgrade which adds them. + # As the binlog cron scripts to need at least the Super_priv, I do first + # the old query which always succeeds and then the new which may or may not. + + # recreate the credentials file if not present or without mysql_upgrade stanza + dc=$mysql_cfgdir/debian.cnf; + if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then + pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" + else + pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; + if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi + cat /dev/null > $dc + echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc + echo "[client]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "[mysql_upgrade]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "basedir = /usr" >>$dc + fi + # If this dir chmod go+w then the admin did it. But this file should not. + chown 0:0 $dc + chmod 0600 $dc + + # update privilege tables + password_column_fix_query=`/bin/echo -e \ + "USE mysql\n" \ + "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`; + replace_query=`/bin/echo -e \ + "USE mysql\n" \ + "SET sql_mode='';\n" \ + "REPLACE INTO user SET " \ + " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ + " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ + " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ + " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ + " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ + " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ + " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ + " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ + " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\ + " ssl_cipher='', x509_issuer='', x509_subject='';"`; + # Engines supported by etch should be installed per default. The query sequence is supposed + # to be aborted if the CREATE TABLE fails due to an already existent table in which case the + # admin might already have chosen to remove one or more plugins. Newlines are necessary. + install_plugins=`/bin/echo -e \ + "USE mysql;\n" \ + "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" ` + + # Upgrade password column format before the root password gets set. + echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + + db_get mysql-server/root_password && rootpw="$RET" + if ! set_mysql_rootpw; then + password_error="yes" + fi + + set +e + echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + echo "$install_plugins" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + set -e + + # If there is a real AppArmor profile, we reload it. + # If the default empty profile is installed, then we remove any old + # profile that may be loaded. + # This allows upgrade from old versions (that have an apparmor profile + # on by default) to work both to disable a default profile, and to keep + # any profile installed and maintained by users themselves. + profile="/etc/apparmor.d/usr.sbin.mysqld" + if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then + if grep -q /usr/sbin/mysqld "$profile" 2>/dev/null ; then + apparmor_parser -r "$profile" || true + else + echo "/usr/sbin/mysqld { }" | apparmor_parser --remove 2>/dev/null || true + fi + fi + ;; + + abort-upgrade|abort-remove|abort-configure) + ;; + + *) + echo "postinst called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# here we check to see if we can connect as root without a password +# this should catch upgrades from previous versions where the root +# password wasn't set. if there is a password, or if the connection +# fails for any other reason, nothing happens. +if [ "$1" = "configure" ]; then + if test_mysql_access; then + db_input medium mysql-server/root_password || true + db_go + db_get mysql-server/root_password && rootpw="$RET" + + if ! set_mysql_rootpw "online"; then + password_error="yes" + fi + fi + + if [ "$password_error" = "yes" ]; then + db_input high mysql-server/error_setting_password || true + db_go + fi + +fi + +db_stop # in case invoke failes + +#DEBHELPER# + +exit 0 diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.postrm b/debian/dist/Ubuntu/mariadb-server-5.5.postrm new file mode 100644 index 00000000000..7cee5150ef9 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.postrm @@ -0,0 +1,86 @@ +#!/bin/bash -e + +# It is possible that Debconf has already been removed, too. +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +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 } + +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! +stop_server() { + set +e + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql stop + else + /etc/init.d/mysql stop + fi + errno=$? + set -e + + if [ "$?" != 0 ]; then + echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + exit 1 + fi +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then + stop_server + sleep 2 + fi + ;; + *) + echo "postrm called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# +# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) +# - Remove the mysql user only after all his owned files are purged. +# +if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then + # we remove the mysql user only after all his owned files are purged + rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} + rm -rf /var/log/mysql + + db_input high mysql-server-5.1/postrm_remove_databases || true + db_go || true + db_get mysql-server-5.1/postrm_remove_databases || true + if [ "$RET" = "true" ]; then + # never remove the debian.cnf when the databases are still existing + # else we ran into big trouble on the next install! + rm -f /etc/mysql/debian.cnf + rm -rf /var/lib/mysql + rm -rf /var/run/mysqld + userdel mysql || true + fi + + # (normally) Automatically added by dh_installinit + if [ "$1" = "purge" ] ; then + update-rc.d mysql remove >/dev/null || exit 0 + fi + # (normally) End automatically added section +fi + +# (normally) Automatically added by dh_installdebconf +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# (normally) End automatically added section + +if [ "$1" = "purge" ] ; then + rm -f /etc/apparmor.d/force-complain/usr.sbin.mysqld >/dev/null 2>&1 || true +fi +# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.1 is installed + +exit 0 diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.py b/debian/dist/Ubuntu/mariadb-server-5.5.py new file mode 100644 index 00000000000..e0c59c260e2 --- /dev/null +++ b/debian/dist/Ubuntu/mariadb-server-5.5.py @@ -0,0 +1,52 @@ +'''apport package hook for mariadb-5.3 + +(c) 2009 Canonical Ltd. +Author: Mathias Gug <mathias.gug@canonical.com> +''' + +import os, os.path + +from apport.hookutils import * + +def _add_my_conf_files(report, filename): + key = 'MySQLConf' + path_to_key(filename) + report[key] = "" + for line in read_file(filename).split('\n'): + try: + if 'password' in line.split('=')[0]: + line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0]) + report[key] += line + '\n' + except IndexError: + continue + +def add_info(report): + attach_conffiles(report, 'mariadb-server-5.3', conffiles=None) + key = 'Logs' + path_to_key('/var/log/daemon.log') + report[key] = "" + for line in read_file('/var/log/daemon.log').split('\n'): + try: + if 'mysqld' in line.split()[4]: + report[key] += line + '\n' + except IndexError: + continue + key = 'Logs' + path_to_key('/var/log/kern.log') + report[key] = "" + for line in read_file('/var/log/kern.log').split('\n'): + try: + if '/usr/sbin/mysqld' in string.join(line.split()[4:]): + report[key] += line + '\n' + except IndexError: + continue + _add_my_conf_files(report, '/etc/mysql/my.cnf') + for f in os.listdir('/etc/mysql/conf.d'): + _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f)) + try: + report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql')) + except OSError: + report['MySQLVarLibDirListing'] = unicode(False) + +if __name__ == '__main__': + report = {} + add_info(report) + for key in report: + print '%s: %s' % (key, report[key].split('\n', 1)[0]) diff --git a/debian/dist/Ubuntu/rules b/debian/dist/Ubuntu/rules new file mode 100755 index 00000000000..0bb8837993e --- /dev/null +++ b/debian/dist/Ubuntu/rules @@ -0,0 +1,299 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_HARDENING=1 + +PACKAGE=mariadb-5.5 + +include /usr/share/dpatch/dpatch.make + +TMP=$(CURDIR)/debian/tmp/ + +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' ) + +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-) +DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') +DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p') + +DISTRIBUTION = $(shell lsb_release -i -s) +RELEASE = $(shell lsb_release -r -s) + +MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi) +ifeq (${MAKE_J}, -j0) + MAKE_J = -j1 +endif + +MAKE_TEST_TARGET=test-force +ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),) +# make test-bt is the testsuite run by the MySQL build team +# before a release, but it is long + MAKE_TEST_TARGET=test-bt +endif + +USE_ASSEMBLER=--enable-assembler + +ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390)) + TESTSUITE_FAIL_CMD=exit 1 +else + TESTSUITE_FAIL_CMD=true +endif + +BUILDDIR = builddir +builddir = $(BUILDDIR) + +# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf +# so it is disabled by default although, according to MySQL, it brings >10% +# performance gain if enabled. See #299382. +ifeq ($(STATIC_MYSQLD), 1) + USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static +endif + +configure: patch configure-stamp +configure-stamp: + @echo "RULES.$@" + dh_testdir + +ifneq ($(ARCH_OS),hurd) + if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi +endif + + ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \ + CC=$${MYSQL_BUILD_CC:-gcc} \ + CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ + CXX=$${MYSQL_BUILD_CXX:-g++} \ + CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_SBINDIR=sbin \ + -DMYSQL_DATADIR=/var/lib/mysql \ + -DINSTALL_INCLUDEDIR=include \ + -DINSTALL_INFODIR=share/info \ + -DINSTALL_MANDIR=share/man \ + \ + -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ + -DWITH_COMMENT="(MariaDB - http://mariadb.com/)" \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=DEB \ + \ + -DENABLED_LOCAL_INFILE=1 \ + -DWITH_FAST_MUTEXES=1 \ + \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DMYSQL_USER=mysql \ + \ + -DEXTRA_CHARSETS=all \ + -DWITH_LIBWRAP=1 \ + -DWITH_SSL=system \ + -DWITH_ZLIB=system \ + -DWITH_EMBEDDED_SERVER=1 \ + -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON \ + -DWITH_MAX=1' + + touch $@ + +build: build-stamp + +build-stamp: configure + @echo "RULES.$@" + dh_testdir + + cd $(builddir) && $(MAKE) $(MAKE_J) + +ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),) + # Don't know why the following is necessary... + cp unittest/unit.pl $(builddir)/unittest/ + cp -r mysql-test/* $(builddir)/mysql-test/ + cp -r sql/share/* $(builddir)/sql/share/ + cp -r scripts/*sql $(builddir)/scripts/ + if [ ! -f testsuite-stamp ] ; then \ + cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \ + fi +endif + + touch testsuite-stamp + + touch build-stamp + +clean: clean-patched unpatch + rm -rf debian/patched +clean-patched: + @echo "RULES.clean-patched" + dh_testdir + dh_testroot + rm -f configure-stamp* + rm -f build-stamp* + rm -f testsuite-stamp + # + [ ! -f Makefile ] || $(MAKE) clean + [ ! -d mysql-test/var ] || rm -rf mysql-test/var + # + rm -rf $(BUILDDIR) + + debconf-updatepo + dh_clean -v + + +install: build + @echo "RULES.$@" + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # some self written manpages which hopefully + # gets overwritten sooner or later with upstreams + mkdir -p $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/usr/share/man/man8/ + cp debian/additions/*.1 $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/etc/mysql/conf.d/ + cp debian/additions/mysqld_safe_syslog.cnf $(TMP)/etc/mysql/conf.d/ + + # make install (trailing slash needed for innobase) + cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/ + # + # After installing, remove rpath to make lintian happy. + set +e; \ + find ./debian/tmp/ -type f -print0 \ + | xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \ + | fgrep RPATH= \ + | cut -d: -f 1 \ + | xargs --no-run-if-empty chrpath -d; \ + set -e + + # libmysqlclient-dev: forgotten header file since 3.23.25? + cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ + cp include/my_dir.h $(TMP)/usr/include/mysql/ + + # mysql-common: We now provide our own config file. + # can't be mariadb-common, other packages insist + install -d $(TMP)/etc/mysql + install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf + + # mariadb-client + install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ + install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ + install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/ + + # mariadb-server + install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe + mkdir -p $(TMP)/usr/share/doc/mariadb-server-5.5/examples + # We have a sane my.cnf, cruft not needed (remove my-*.cnf and config-*.cnf) + # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-server-5.3/examples/ + rm -vf $(TMP)/usr/share/mysql/my-*.cnf \ + $(TMP)/usr/share/mysql/config-*.cnf \ + $(TMP)/usr/share/mysql/mi_test_all* \ + $(TMP)/usr/share/mysql/mysql-log-rotate \ + $(TMP)/usr/share/mysql/mysql.server \ + $(TMP)/usr/share/mysql/binary-configure + nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mariadb-server-5.5/mysqld.sym.gz + install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/ + install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/ + install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/ + + # mariadb-test + mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql + + # lintian overrides + mkdir -p $(TMP)/usr/share/lintian/overrides/ + cp debian/mysql-common.lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-common + cp debian/mariadb-server-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-server-5.5 + cp debian/mariadb-client-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-client-5.5 + + # For 5.0 -> 5.5 transition + d=$(TMP)/usr/share/mysql-common/internal-use-only/; \ + mkdir -p $$d; \ + cp debian/mariadb-server-5.5.mysql.init $$d/_etc_init.d_mysql; \ + cp debian/mariadb-server-5.5.mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \ + cp debian/additions/debian-start $$d/_etc_mysql_debian-start; + + # install AppArmor profile + install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld + # install Apport hook + install -D -m 644 debian/mariadb-server-5.5.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-5.5.py + + dh_movefiles + +# Build architecture-independent files here. +binary-indep: build install + @echo "RULES.binary-indep" + dh_testdir -i + dh_testroot -i + dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i + dh_installmenu -i + dh_installlogrotate -i + dh_installinit -i + dh_installcron -i + dh_installman -i + dh_installinfo -i + dh_installlogcheck -i + dh_installchangelogs -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + @echo "RULES.binary-arch" + dh_testdir + dh_testroot + + dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installlogrotate -a --name mysql-server + # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets + # started which might depend on a running database server. + dh_installinit -a --name=mysql -- defaults 19 21 + dh_installcron -a --name mysql-server + dh_installman -a + dh_installinfo -a + dh_installlogcheck -a + dh_installchangelogs -a + dh_strip -a + dh_link -a # .so muss nach .so.1.2.3 installier werden! + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a + dh_makeshlibs -plibmariadbclient18 -V'libmariadbclient18 (>= 5.5.1-1)' + dh_installdeb -a + dh_perl -a + dh_shlibdeps -a -l debian/libmariadbclient18/usr/lib -L libmariadbclient18 + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch + +get-orig-source: + @wget -nv -T10 -t3 \ + -O /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz \ + http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @tar xfz /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz -C /tmp + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/Docs + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/debian + @mv /tmp/mysql-$(DEB_UPSTREAM_VERSION) /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @cd /tmp ; tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + +.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch + +# vim: ts=8 |