summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2022-04-30 23:27:39 -0700
committerDaniel Black <daniel@mariadb.org>2022-05-05 12:06:56 +1000
commita82cdb0690543f061be3c7debdb4829e538fde96 (patch)
treebafdb622485a4c9ff761b96e44ff7b70a43a294a
parentdde59883068c01b6b790cc24d5d9c9d8cea7ed72 (diff)
downloadmariadb-git-a82cdb0690543f061be3c7debdb4829e538fde96.tar.gz
Deb: Finalize the version less Debian package transition
In addition to the binary .deb packages, also remove the version string from the Debian source package. Also clean away excess use of __MARIADB_MAJOR_VER__ constant and add inline note that the whole debian-XX.X.flag file thing should be removed and replaced by using the new MariaDB server mysql_upgrade_info file.
-rw-r--r--debian/changelog2
-rw-r--r--debian/control2
-rw-r--r--debian/mariadb-server.install2
-rw-r--r--debian/mariadb-server.postinst7
-rw-r--r--debian/mariadb-server.postrm9
-rw-r--r--debian/mariadb-server.preinst9
-rwxr-xr-xdebian/rules3
7 files changed, 14 insertions, 20 deletions
diff --git a/debian/changelog b/debian/changelog
index b532a1bdcd2..0ebfb0a61c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mariadb-10.9 (1:10.9.0) unstable; urgency=medium
+mariadb (1:10.9.0) unstable; urgency=medium
* Initial Release
diff --git a/debian/control b/debian/control
index b22cae5ac60..0d6ada10ce0 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: mariadb-10.9
+Source: mariadb
Section: database
Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
diff --git a/debian/mariadb-server.install b/debian/mariadb-server.install
index d342e96b774..f75fdb46d47 100644
--- a/debian/mariadb-server.install
+++ b/debian/mariadb-server.install
@@ -53,7 +53,7 @@ usr/lib/mysql/plugin/simple_password_check.so
usr/lib/mysql/plugin/sql_errlog.so
usr/lib/mysql/plugin/type_mysql_json.so
usr/lib/mysql/plugin/wsrep_info.so
-usr/share/doc/mariadb-server-10.9/mariadbd.sym.gz
+usr/share/doc/mariadb-server/mariadbd.sym.gz
usr/share/man/man1/aria_chk.1
usr/share/man/man1/aria_dump_log.1
usr/share/man/man1/aria_ftdump.1
diff --git a/debian/mariadb-server.postinst b/debian/mariadb-server.postinst
index da09a0abde1..9cf0821eb10 100644
--- a/debian/mariadb-server.postinst
+++ b/debian/mariadb-server.postinst
@@ -3,16 +3,13 @@ set -e
. /usr/share/debconf/confmodule
-# This set by debian/rules during 'override_dh_auto_configure'
-MAJOR_VER="__MARIADB_MAJOR_VER__"
-
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 mariadb-server-$MAJOR_VER.postinst -i"
+ERR_LOGGER="logger -p daemon.err -t mariadb-server.postinst -i"
# Specify syslog tag name so it is clear the entry came from this postinst script.
# This will make an error in a logged command immediately apparent by aborting
# the install, rather than failing silently and leaving a broken install.
@@ -161,7 +158,7 @@ EOF
# Clean up old flags before setting new one
rm -f $mysql_datadir/debian-*.flag
# Flag data dir to avoid downgrades
- touch "$mysql_datadir/debian-$MAJOR_VER.flag"
+ touch "$mysql_datadir/debian-__MARIADB_MAJOR_VER__.flag"
# initiate databases. Output is not allowed by debconf :-(
# This will fail if we are upgrading an existing database; in this case
diff --git a/debian/mariadb-server.postrm b/debian/mariadb-server.postrm
index 043e4ee0821..0d21955439f 100644
--- a/debian/mariadb-server.postrm
+++ b/debian/mariadb-server.postrm
@@ -3,9 +3,6 @@ set -e
. /usr/share/debconf/confmodule
-# This set by debian/rules during 'override_dh_auto_configure'
-MAJOR_VER="__MARIADB_MAJOR_VER__"
-
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
@@ -56,14 +53,14 @@ esac
# - Remove the mysql user only after all his owned files are purged.
# - Cleanup the initscripts only if this was the last provider of them
#
-if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-$MAJOR_VER.flag" ]; then
+if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-__MARIADB_MAJOR_VER__.flag" ]; 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 "mariadb-server-$MAJOR_VER/postrm_remove_databases" || true
+ db_input high "mariadb-server/postrm_remove_databases" || true
db_go || true
- db_get "mariadb-server-$MAJOR_VER/postrm_remove_databases" || true
+ db_get "mariadb-server/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!
diff --git a/debian/mariadb-server.preinst b/debian/mariadb-server.preinst
index de123df7ee8..313a12ab5e7 100644
--- a/debian/mariadb-server.preinst
+++ b/debian/mariadb-server.preinst
@@ -9,9 +9,6 @@
. /usr/share/debconf/confmodule
-# This set by debian/rules during 'override_dh_auto_configure'
-MAJOR_VER="__MARIADB_MAJOR_VER__"
-
# Just kill the invalid insserv.conf.d directory without fallback
if [ -d "/etc/insserv.conf.d/mariadb/" ]; then
rm -rf "/etc/insserv.conf.d/mariadb/"
@@ -52,7 +49,9 @@ stop_server() {
################################ main() ##########################
-this_version=$MAJOR_VER
+# @TODO: Rewrite this to use the new upstream /var/lib/mysql_upgrade_info file
+# instead of the legacy /var/lib/debian-XX.X.flag file
+this_version=__MARIADB_MAJOR_VER__
max_upgradeable_version=5.7
# Check if a flag file is found that indicates a previous MariaDB or MySQL
@@ -125,7 +124,7 @@ fi
# Instead simply move the old datadir and create a new for this_version.
if [ ! -z "$downgrade_detected" ]
then
- db_input critical "mariadb-server-$MAJOR_VER/old_data_directory_saved" || true
+ db_input critical "mariadb-server/old_data_directory_saved" || true
db_go
echo "The file $mysql_datadir/debian-$found_version.flag indicates a" 1>&2
echo "version that cannot automatically be upgraded. Therefore the" 1>&2
diff --git a/debian/rules b/debian/rules
index b690a7ad5b0..814c7e8494f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -164,7 +164,8 @@ endif
# nm numeric soft is not enough, therefore extra sort in command
# to satisfy Debian reproducible build requirements
- nm --defined-only $(BUILDDIR)/sql/mariadbd | LC_ALL=C sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.9/mariadbd.sym.gz
+ mkdir -p $(TMP)/usr/share/doc/mariadb-server
+ nm --defined-only $(BUILDDIR)/sql/mariadbd | LC_ALL=C sort | gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server/mariadbd.sym.gz
# Rename and install AppArmor profile
install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mariadbd