Skip to content
/ server Public

MDEV-39126: Feedback plugin to use /etc/os-release#4829

Open
itzanway wants to merge 2 commits intoMariaDB:10.11from
itzanway:mdev-39126-os-release
Open

MDEV-39126: Feedback plugin to use /etc/os-release#4829
itzanway wants to merge 2 commits intoMariaDB:10.11from
itzanway:mdev-39126-os-release

Conversation

@itzanway
Copy link

Description

This PR resolves MDEV-39126 by updating the feedback plugin to use /etc/os-release instead of the obsolete /etc/lsb-release for OS discovery.

As noted in the issue, /etc/lsb-release is outdated (Debian now isolates it to its own package), while /etc/os-release is the modern, portable standard across Linux distributions.

Implementation Details

  • Primary Check: Modified prepare_linux_info() in plugin/feedback/utils.cc to attempt opening /etc/os-release first.
  • Parsing: Added logic to parse the PRETTY_NAME= field and safely strip the wrapping double quotes to extract a clean, human-readable distribution name.
  • Fallback Maintained: To ensure backwards compatibility with older systems that may not have /etc/os-release, the original /etc/lsb-release and wildcard mask (/etc/*-release) checks have been retained as fallbacks.

Testing

  • Confirmed the C++ syntax and parsing logic.
  • Relying on Buildbot CI to verify cross-platform compilation and ensure no regressions on older build environments.

@itzanway itzanway force-pushed the mdev-39126-os-release branch from ff55a8a to 363c513 Compare March 20, 2026 21:17
@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 23, 2026
Copy link
Member

@gkodinov gkodinov left a comment

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.

First of all: please squash your two commits into a single one and add a commit message that's complaint to MariaDB condig standards (you can find the .md file with these in the repository).

Secondly (and optionally, at least for the preliminary review): would you please consider implementing a test for this?

I'd give it a day or two and go about it by checking in mtr if I'm running on a suitable platform (otherwise skip). Then I'd inspect the contents of the https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-feedback-table and try to find the info from os_release there.

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.

2 participants