mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
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.
This commit is contained in:
parent
dde5988306
commit
a82cdb0690
7 changed files with 14 additions and 20 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -1,4 +1,4 @@
|
|||
mariadb-10.9 (1:10.9.0) unstable; urgency=medium
|
||||
mariadb (1:10.9.0) unstable; urgency=medium
|
||||
|
||||
* Initial Release
|
||||
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -1,4 +1,4 @@
|
|||
Source: mariadb-10.9
|
||||
Source: mariadb
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
|
|
2
debian/mariadb-server.install
vendored
2
debian/mariadb-server.install
vendored
|
@ -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
|
||||
|
|
7
debian/mariadb-server.postinst
vendored
7
debian/mariadb-server.postinst
vendored
|
@ -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
|
||||
|
|
9
debian/mariadb-server.postrm
vendored
9
debian/mariadb-server.postrm
vendored
|
@ -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!
|
||||
|
|
9
debian/mariadb-server.preinst
vendored
9
debian/mariadb-server.preinst
vendored
|
@ -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
|
||||
|
|
3
debian/rules
vendored
3
debian/rules
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue