Skip to content

Update default sysconfdir to /etc/mariadb - #5649

Open
lvoytek wants to merge 1 commit into
MariaDB:mainfrom
lvoytek:set-new-default-etc-dir
Open

Update default sysconfdir to /etc/mariadb#5649
lvoytek wants to merge 1 commit into
MariaDB:mainfrom
lvoytek:set-new-default-etc-dir

Conversation

@lvoytek

@lvoytek lvoytek commented Sep 8, 2026

Copy link
Copy Markdown

As with #5059 and #5646, move another directory away from the mysql namespace to mariadb. This moves the /etc/mysql default sysconfdir to /etc/mariadb, which also allows us to get rid of the mysql-common package. When updating on Debian, this will also move config files to the new directory and drop alternatives symlinks with /etc/mysql/my.cnf

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Sep 9, 2026

@gkodinov gkodinov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your contribution! This is a preliminary review.

Please consider squashing the 20 commits into a single one, complete with a commit message compliant to the coding standards.

There are also failures in buildbot, e.g. https://buildbot.mariadb.org/#/builders/554/builds/26262/steps/3/logs/stdio:

	cp --reflink=auto -a debian/tmp/usr/lib/mysql/plugin/test_pam_modules debian/mariadb-test-data//usr/lib/mysql/plugin/
	install -m0755 -d debian/mariadb-test-data//usr/share/mariadb/mariadb-test
	cp --reflink=auto -a debian/tmp/usr/share/mariadb/mariadb-test/collections debian/tmp/usr/share/mariadb/mariadb-test/include debian/tmp/usr/share/mariadb/mariadb-test/main debian/tmp/usr/share/mariadb/mariadb-test/plugin debian/tmp/usr/share/mariadb/mariadb-test/std_data debian/tmp/usr/share/mariadb/mariadb-test/suite debian/mariadb-test-data//usr/share/mariadb/mariadb-test/
dh_install: warning: Cannot find (any matches for) "etc/mysql/mariadb.conf.d/columnstore.cnf" (tried in ., debian/tmp)
dh_install: warning: mariadb-plugin-columnstore missing files: etc/mysql/mariadb.conf.d/columnstore.cnf
	install -m0755 -d debian/mariadb-plugin-columnstore//etc/columnstore
	cp --reflink=auto -a debian/tmp/etc/columnstore/Columnstore.xml debian/tmp/etc/columnstore/ErrorMessage.txt debian/tmp/etc/columnstore/MessageFile.txt debian/tmp/etc/columnstore/storagemanager.cnf debian/mariadb-plugin-columnstore//etc/columnstore/
dh_install: error: missing files, aborting
make: *** [debian/rules:207: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Please rectify.

@gkodinov

gkodinov commented Sep 9, 2026

Copy link
Copy Markdown
Member

I'd also appreciate if you maybe merge this, #5059 and #5646 into a single PR that conforms to the (extended) spec in https://jira.mariadb.org/browse/MDEV-40964.

Swap the /etc/mysql sysconfdir to /etc/mariadb. This includes updating
usage and documentation of the directory and its subdirectory. In the
Debian packaging, move existing configurations to the new directory and
remove the mysql-common package which is no longer needed.
@lvoytek

lvoytek commented Sep 9, 2026

Copy link
Copy Markdown
Author

Reduced to 1 commit here too. Looks like to solve the build issue mariadb-columnstore-engine will need an update to have its MYCNFDIR match

@lvoytek
lvoytek force-pushed the set-new-default-etc-dir branch from d3e7c52 to 31ba492 Compare September 9, 2026 21:41

@ottok ottok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have not tested this, but based on reviewing the Debian packaging part, it looks solid. Renaming etc/mysql to etc/mariadb is probably due now in next major MariaDB release, and as a side effect we can clean away a whole lot of MySQL-compatiblity code, such as the mysql-common package in Debian packaging and the update-alternatives usage that was needed for sharing etc/mysql between MySQL and MariaDB.

Doing this change is way more invasive than the run/mysql-> run/mariadb rename in the other PR form Lena, and thus I think it makes sense to have this as a separate PR. Having this as a separate PR also makes it easier for @vuvova (as the likely final decision maker) on when the renaming of etc is approved and merged.

@ottok

ottok commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

In commit 2413216 the upgrade (in Debian) automatically migrates any existing etc/mysql usage to use etc/mariadb - ie we are not trying to continue using existing paths on old installs, but both new and upgraded installs will start using etc/mariadb. I am fine with this, it just needs to be very clear in the release notes so that DBAs know to update all their own local scripts and configs. In commit 3edbbde the package mariadb-common stops using etc/mysql via update-alternatives, which makes sense.

@ottok
ottok requested a review from gkodinov September 10, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants