Skip to content

Update default datadir for debian to be /var/lib/mariadb#5059

Open
lvoytek wants to merge 1 commit intoMariaDB:mainfrom
lvoytek:set-new-default-datadir-debian
Open

Update default datadir for debian to be /var/lib/mariadb#5059
lvoytek wants to merge 1 commit intoMariaDB:mainfrom
lvoytek:set-new-default-datadir-debian

Conversation

@lvoytek
Copy link
Copy Markdown

@lvoytek lvoytek commented May 8, 2026

Match the existing datadir setting for Debian and Ubuntu, which was changed from /var/lib/mysql to /var/lib/mariadb in 1:11.8.6-5.

Existing Debian patch: https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/debian/latest/debian/patches/set-default-datadir-to-var-lib-mariadb.patch

Match the existing datadir setting for Debian and Ubuntu, which was
changed from /var/lib/mysql to /var/lib/mariadb in 1:11.8.6-5.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 8, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the default data directory for Debian-based installations in cmake/install_layout.cmake by changing INSTALL_MYSQLDATADIR_DEB from /var/lib/mysql to /var/lib/mariadb. No review comments were provided for this change, and I have no feedback to provide.

@vuvova
Copy link
Copy Markdown
Member

vuvova commented May 8, 2026

Questions:

  • this is the main branch, so 13.0. A bit too late for Ubuntu?
  • what about upgrades 12.3→13.0 ? May be not a problem for Ubuntu, but the change affects our (vendor) packages too.
  • How does Ubuntu build MariaDB packages? You likely don't use our autobake.sh script, do you? In that case
    • we can set INSTALL_MYSQLDATADIR=/var/lib/mysql from our autobake.sh and keep the old path in vendor builds and the new path in Ubuntu builds
    • or Ubuntu can set INSTALL_MYSQLDATADIR=/var/lib/mariadb and get a new path without affecting vendor builds. I think the first approach might be easier.
    • or we can change all, Ubuntu and vendor, builds, and then pre/post-inst scriptlets need to handle the upgrade and move the data to the new location

@ottok, what do you think?

@vuvova vuvova requested review from ottok and vuvova May 8, 2026 21:08
@grooverdan
Copy link
Copy Markdown
Member

Thanks @lvoytek

Questions:

* this is the `main` branch, so 13.0. A bit too late for Ubuntu?

Ubuntu 26.04 already carrying the patch for 11.8_+
bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2148632

* what about upgrades 12.3→13.0 ? May be not a problem for Ubuntu, but the change affects our (vendor) packages too.

I opened https://jira.mariadb.org/browse/MDEV-39461

But yes, we'll need the scripts too.

* How does Ubuntu build MariaDB packages? You likely don't use our `autobake.sh` script, do you? In that case

Like Debian - straight from debian/rules

  * we can set `INSTALL_MYSQLDATADIR=/var/lib/mysql` from our `autobake.sh` and keep the old path in vendor builds and the new path in Ubuntu builds
  * or Ubuntu can set `INSTALL_MYSQLDATADIR=/var/lib/mariadb` and get a new path without affecting vendor builds. I think the first approach might be easier.
  * or we can change all, Ubuntu and vendor, builds, and then pre/post-inst scriptlets need to handle the upgrade and move the data to the new location

I do like the last plan.

Question is, do we stop on Deb changes or include RPM too?

@ottok, what do you think?

Its already in Debian sid.

https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/155

I was hoping to see more of the script changes from that here.

Having a modified subset in 11.8 to handle Ubuntu upgrade to our vendor ones would be good too to solve MDEV-39461. Probably like a earlier version in salsa merge request 155 that dropped the config file in the post install without changing the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants