Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-28628: Change current Debian package revision scheme #2141

Merged
merged 2 commits into from Jun 14, 2022

Conversation

illuusio
Copy link
Contributor

  • The Jira issue number for this PR is: MDEV-28628

Description

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

How can this PR be tested?

This can be tested manually in Ubuntu or Debian

apt-get install git-buildpackage
mk-build-deps -r -i debian/control -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends"
debian/autobake-deb.sh

If compiling on Debian 11 after that there should be deb packages named: mariadb-*+maria~deb11.deb

This is also testes on 10.9 branch on Salsa-CI:
https://salsa.debian.org/illuusio/mariadb-server/-/pipelines/384410

Basing the PR against the correct MariaDB version

  • This is a bug fix and the PR is based against the earliest branch in which the bug can be reproduced

Backward compatibility

Makes sure that user can upgrade from Buster to Bookworm

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
@grooverdan
Copy link
Member

@ottok this follows your guidance in the MDEV. Any objections?

Copy link
Contributor

@ottok ottok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

For reference, MariaDB versions that are specific for Ubuntu use versions like https://launchpad.net/ubuntu/+source/mariadb-10.5/1:10.5.15-0ubuntu0.21.10.1

@grooverdan grooverdan merged commit c168e16 into MariaDB:10.3 Jun 14, 2022
@illuusio illuusio deleted the 10.3-MDEV-28628-remove-codename branch June 14, 2022 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants