Build Debian MariaDB packages with readline support
I've been frustrated with the use of editline (libedit) instead of readline that MariaDB is now built with in Debian 11. I have found editline to be buggy: its implementation of Ctrl-R and editing of wrapped lines do not work well, plus Ctrl-W not being mapping to delete a word by default is infuriating!
As I understand it, Debian is no longer able to distribute MariaDB built against readline as the former is GPL2 and the latter GPL3, and apparently the 2 are incompatible for distribution.
For Bookworm:
# Ensure that latest source packages are pulled: apt-get update # Install build dependencies apt install build-essential devscripts libreadline-dev apt build-dep mariadb apt build-dep readline su <unpriv user> # Get sources apt source mariadb cd mariadb-10.11.19/
Edit debian/changelog and add new line at top. Version number should be incremented by adding a letter on the end. E.g.
mariadb (1:10.11.19-0+deb12u1a) bookworm-security; urgency=medium * Build against readline instead of libedit -- Andy Beverley <andy@andybev.com> Sat, 17 Oct 2026 09:44:00 +0100
Edit debian/control and change:
libedit-dev, libedit-dev:native,
To
libreadline-dev, libreadline-dev:native,
Edit debian/rules and add -DNOT_FOR_DISTRIBUTION=1 below -DWITH_INNODB_SNAPPY=ON. Then run:
For Bookworm and later, edit cmake/aws_sdk.cmake and change NOT_FOR_DISTRIBUTION to NOT_FOR_DISTRIBUTION1 (this is to stop the AWS SDK from being included which causes the build to fail).
debuild -uc -us -b
