summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTuukka Pasanen <tuukka.pasanen@ilmi.fi>2022-05-23 10:39:31 +0300
committerDaniel Black <daniel@mariadb.org>2022-06-14 10:44:15 +1000
commitc168e16782fc449f61412e5afc1c01d59b77c675 (patch)
tree481085d427b18f3217618925e314d9042bf3ea42 /debian
parente077ce2a68a418d0f4cbe32f9311cf235ee1578c (diff)
downloadmariadb-git-c168e16782fc449f61412e5afc1c01d59b77c675.tar.gz
MDEV-28628: Change current Debian package revision scheme
Current Debian package revision scheme when using debian/autobake-deb.sh script is: '1:VERSION+maria~LSBNAME' For example if VERSION can be like 10.6.8 and LSBNAME is buster then version and revision is: '1:10.6.8+maria~buster' Which can lead to problem as distro code names can be lexical unordered. For example Debian LSBNAME's can be: Codename Buster is Debian version 10 Codename Bookworm is Debian version 11 This happens because in ASCII table Buster first two digits are 'Bu' and they are in hex 0x42 and 0x75 and Bookworm first digits 'Bo' are they are in hex 0x42 and 0x6F When apt is upgrading it means that: 1:10.6.8+maria~buster is bigger than 1:10.6.8+maria~bookworm and that leads to problems in dist-upgrade process To solve problem revision format is changed to: '1:VERSION+maria~(deb|ubu)LSBVERSION' Example for Debian 11 is now: 1:10.6.8+maria~deb11 and for Ubuntu 22.04 is now: 1:10.6.8+maria~ubu2204 There are new Variables * VERSION which contains whole version string * LSBVERSION which contains LSB version of distro * LSBID which contains LSB ID (Debian or Ubuntu) added to debian/autobake-deb.sh. Also CODENAME is change to LSBNAME as it's more declaritive
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/autobake-deb.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index c0026a1b2dd..1714c1a5868 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -17,8 +17,15 @@ export DEB_BUILD_OPTIONS="nocheck"
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders.
-CODENAME="$(lsb_release -sc)"
-case "${CODENAME}" in
+LSBID="$(lsb_release -si | tr '[:upper:]' '[:lower:]')"
+LSBVERSION="$(lsb_release -sr | sed -e "s#\.##g")"
+LSBNAME="$(lsb_release -sc)"
+
+if [ -z "${LSBID}" ]
+then
+ LSBID="unknown"
+fi
+case "${LSBNAME}" in
stretch)
# MDEV-28022 libzstd-dev-1.1.3 minimum version
sed -i -e '/libzstd-dev/d' debian/control
@@ -55,10 +62,11 @@ UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${
PATCHLEVEL="+maria"
LOGSTRING="MariaDB build"
EPOCH="1:"
+VERSION="${EPOCH}${UPSTREAM}${PATCHLEVEL}~${LSBID:0:3}${LSBVERSION}"
-dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}."
+dch -b -D ${LSBNAME} -v "${VERSION}" "Automatic build with ${LOGSTRING}."
-echo "Creating package version ${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... "
+echo "Creating package version ${VERSION} ... "
# Build the package
# Pass -I so that .git and other unnecessary temporary and source control files