Commit Graph

90 Commits

Author SHA1 Message Date
Sebastian Kemper 88511f13d0 mariadb: move mariadb-common into its own package
This moves mariadb-common into its own (tiny) package in preparation for
moving out libmariadb as well. Otherwise the library would have a
dependency on the big mariadb package.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-11-17 15:54:17 +01:00
Sebastian Kemper a90561a90b mariadb: bump to major version 10.4
Highlights:

- Bump from 10.2.26 to 10.4.10
- auth_pam got replaced with never version, old one still available as
  auth_pam_v1
- semisync plugins were merged into the core
- Upstream now installs symlinks for binaries with mariadb prefix. To
  accommodate that this commit updates Package/mariadb/install/bin
  accordingly.
- Patches are updated with new ones from Debian and Arch (thanks!)
- libedit patch dropped because it's upstream now.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-11-17 15:48:25 +01:00
Sebastian Kemper 2955b355b6 mariadb: security bump to 10.2.26
New upstream release. Addresses:

  CVE-2019-2805
  CVE-2019-2740
  CVE-2019-2739
  CVE-2019-2737
  CVE-2019-2758

Package updates:

  - includes "THIRDPARTY" in PKG_LICENSE_FILES
  - drops client_ed25519 as a dynamic plugin and install it with the lib
    as per upstream decision
  - refreshes patches

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-08-01 21:46:23 +02:00
Eneas U de Queiroz 2593eabd6b treewide: Capitalize submenus
Fixed a typo in tcpreplay.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2019-07-25 09:35:40 +08:00
Sebastian Kemper c571c37e5c mariadb: add dependency on libaio for arc as well
Now that libaio compiles on arc targets we need to add the dependency to
libaio on these targets as well.

resolves #9298

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-06-24 10:38:25 +02:00
Sebastian Kemper 65036add44 mariadb: init script update
- added trailing '--' to logger to make it foolproof
- user is extracted from config instead of using hard-coded value
- log directory is now also extracted from config (if set)
- directory creation is now done via awk script (more robust)
- improved log messages

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-05-10 22:42:40 +02:00
Sebastian Kemper 498ccc192c mariadb: bump to 10.2.24
From Release Notes:

  Security

    MDEV-18686 - Add option to PAM authentication plugin to allow case insensitive username matching
    bugfix - multi-update checked privileges on views incorrectly (commit 5057d4637525eadad438d25ee6a4870a4e6b384c)
    MDEV-19276 - during connect, write error log warning for ER_DBACCESS_DENIED_ERROR, if log_warnings > 1
    MDEV-17456 - Malicious SUPER user can possibly change audit log configuration without leaving traces.

    Fixes for the following security vulnerabilities:
        CVE-2019-2614
        CVE-2019-2627
        CVE-2019-2628

OpenWrt changes:

  - added PKG_CPE_ID
  - shortened default description to make "opkg info" output easier on the eyes
  - refreshed patches

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-05-10 22:27:07 +02:00
Sebastian Kemper 874701cdab mariadb: bump to 10.2.22
From upstream release notes:

- Backport Information Schema CHECK_CONSTRAINTS Table.
- MDEV-17475: Maximum value of table_definition_cache is now 2097152.
- InnoDB ALTER TABLE fixes: MDEV-16499, MDEV-18186, MDEV-18237, MDEV-18222,
  MDEV-18256, MDEV-18016, MDEV-16849
- Mariabackup fixes: MDEV-18185, MDEV-18201, MDEV-18194
- Galera crash recovery fix: MDEV-15740
- Encryption fixes: MDEV-18129, MDEV-18183, MDEV-18279
- Fixes for the following security vulnerabilities:
  - CVE-2019-2510
  - CVE-2019-2537

OpenWrt notes:
- OpenSSL patch dropped as issue fixed upstream

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-02-11 21:49:22 +01:00
Sebastian Kemper f4fda3f7f6 mariadb: fix libmariadb depends
The shared library does not depend on libatomic nor libstdcpp anymore.
This is very good news for the users of said lib.

This commit updates the depends accordingly.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-02-11 21:44:42 +01:00
Sebastian Kemper db9ceb300b mariadb: bump to 10.2.21
Version bump. Adds new upstream plugin caching_sha2_password.so to the
client lib package.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-01-27 16:26:54 +01:00
Sebastian Kemper 9c56b2de11 mariadb: move 50-client.cnf to lib pkg
50-client.cnf is used by the client library, so it should be installed
with the library. This commit moves the configuration file to the
correct package and updates its depend (50-client.cnf is sourced by
my.cnf from mariadb-common).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-01-27 16:20:20 +01:00
Rosen Penev 2fa60e3e6d mariadb: Fix compilation without deprecated OpenSSL APIs
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-01-19 12:52:53 -08:00
Sebastian Kemper 2de1c6c05f mariadb: update init script to use uci
Does away with /etc/default/mysqld, introduces uci configuration
instead. The init script receives some further brushing up, like a
function (copied from Debian) to get mysqld configuration parameters
easily and quickly.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 17:17:24 +01:00
Sebastian Kemper 556ebfec48 mariadb: small miscellaneous enhancements
- correct spelling in comments ("mariadb" to "MariaDB")
- remove mysqld_safe and mysqld_safe_helper (not used)
- add some extra cmake configuration defines
- remove cmake configuration defines that don't exist in the source
- don't disable address sanitizer (ASAN) support

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 17:11:28 +01:00
Sebastian Kemper 6152c9a018 mariadb: add galera support
Add galera support by installing the configuration and including the
wsrep scripts in mariadb-server-extra.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 16:02:13 +01:00
Sebastian Kemper 9b8a68cc7b mariadb: add extra charsets to server base
There is little sense in keeping these charsets in an extra package. The
included sets are of the single byte character set variety. They only
amount to a few kbytes.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 15:57:01 +01:00
Sebastian Kemper cc0a40231d mariadb: improve packaging and configuration
At present there are some flaws related to configuration, also related
to the packaging of mariadb. For starters there are complaints that the
configuration is too static.

To address this a new configuration layout is introduced. The primary
configuration file (my.cnf) is changed so that it now only includes
further configuration files in the directory /etc/mysql/conf.d. More
default configuration files are added for the server and the client.
This is the new default configuration.

With these changes it's possible for the user to select if they want to
change the default configuration (in conf.d/*.cnf) or if they want to
drop their own files into conf.d instead. If the user .cnf files are
read after the default .cnf files (files are included in alphabetical
order), they will overwrite the settings from the default configuration.

The other flaw is that the my.cnf file is included in mariadb-server.
But that doesn't really fit the requirements, as the client also uses
the configuration file(s). To accomodate this a new package
mariadb-common is added. It installs the shared my.cnf file.

The remaining changes add base packages, both for the server and the
client. These are meant as foundation for the packages containing the
respective binaries. In summary they will install the configuration,
small miscellaneous files (SQL scripts etc.) and the user "mariadb".

That means that everything is ready for the binaries, like mysql and
mysqld. If there is not enough space left on flash memory, the user can
just drop the binaries on a pendrive, link them to /usr/bin and get
started.

The ideas and configuration files were copied from Debian. Some
amendments were made.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 15:55:56 +01:00
Sebastian Kemper cacd86009b mariadb: rename share and plugin directories
Rename them from mysql to mariadb. Use variables where possible (also
for /etc/mysql).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 15:53:38 +01:00
Sebastian Kemper c0dba8cfa6 mariadb: refresh plugins
This commit deals with changes related to plugins and how they're built
or disabled.

Currently a lot of plugins are packaged which are merely for tests or
plain examples. Other distros do not bundle these, hence this commit
does away with them.

A few new plugins are added related to PAM and Kerberos (auth_gssapi,
auth_gssapi_client and auth_pam).

The BuildPlugin template is refactored to also allow building of library
plugins (needed for auth_gssapi_client). The template is also cleaned up
- some extraneous dollar signs are removed and the install function is
now defined outside the template.

Unwanted plugins/engines are now turned off efficiently (without using
cmake variables) by blanking CMakeLists.txt files in the associated
folders. The idea was lifted from Gentoo.

ha_sequence is now built into the server. This is an upstream
preference. The plugin is about 30 kbytes in size, so there is no harm
adding it into the server, which weighs in at about 15 Mbytes anyway.

Last but not least the auth_socket plugin is now also built into the
server.  This allows the local root user to login to the database
without a password being set. This makes maintenance easier without
being detrimental to security. The idea was lifted from Debian.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 15:50:18 +01:00
Sebastian Kemper a117d027bc mariadb: use system libedit for mysql
libedit changed its interface a while back. mariadb currently does not
recognize this interface and instead uses a static old readline version.
It does not link in the system readline due to licence incompatibility.

This commit adds a patch that enables mariadb to detect and use the
system libedit. The patch was sent upstream already ([1]).

[1] https://github.com/MariaDB/server/pull/1001

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-12-15 15:48:24 +01:00
Sebastian Kemper 470ee2d94b mariadb: fix build issue
The build breaks when Kerberos is available in staging dir. mariadb
build system exits with error:

CMake Error at libmariadb/cmake/plugins.cmake:43 (message):
  Invalid plugin type NO.  Allowed plugin types are DYNAMIC;STATIC;OFF

It doesn't like the definition "PLUGIN_AUTH_GSSAPI_CLIENT=NO" anymore.
We need to set it to "OFF" to make it happy.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-11-14 21:00:12 +01:00
Sebastian Kemper 3c8c320b3f mariadb: security bump to 10.2.19
Many, many bug fixes, see release notes for details:
https://mariadb.com/kb/en/library/mariadb-10219-release-notes/

Fixed CVEs:

  CVE-2018-3282
  CVE-2016-9843
  CVE-2018-3174
  CVE-2018-3143
  CVE-2018-3156
  CVE-2018-3251
  CVE-2018-3185
  CVE-2018-3277
  CVE-2018-3162
  CVE-2018-3173
  CVE-2018-3200
  CVE-2018-3284

OpenWrt package changes:

  - include sha256_password in libmariadb package
  - upstream provided new pkgconfig file libmariadb.pc
  - refreshed one patch, dropped two others (included in upstream source
    now)

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-11-13 21:43:35 +01:00
Sebastian Kemper 581a19c0b8 mariadb: fix pthread_detach
Include fix from upstream for MDEV-17200. musl-1.1.20 segfaults when
pthread_detach() is called for already detached threads.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-11-11 01:23:44 +01:00
Sebastian Kemper a6761ac20b mariadb: bump to 10.2.17
From Release Notes:

 - New variable innodb_log_optimize_ddl for avoiding delay due to page flushing and allowing concurrent backup
 - InnoDB updated to 5.7.23
 - ALTER TABLE fixes:
    MDEV-14637 - Fix hang due to DDL with FOREIGN KEY or persistent statistics
    MDEV-15953 - Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir
    MDEV-16515 - InnoDB: Failing assertion: ++retries < 10000 in file dict0dict.cc line 2737
    MDEV-16809 - Allow full redo logging for ALTER TABLE
 - Temporary tables: MDEV-16713 - InnoDB hang with repeating log entry
 - indexed virtual columns: MDEV-15855 - Deadlock between purge thread and DDL statement
 - locking: MDEV-16664 - Change the default to innodb_lock_schedule_algorithm=fcfs
 - Galera: MDEV-15822 - WSREP: BF lock wait long for trx
 - Fixes for the following security vulnerabilities:
    CVE-2018-3060
    CVE-2018-3064
    CVE-2018-3063
    CVE-2018-3058
    CVE-2018-3066

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-08-21 23:19:29 +02:00
Sebastian Kemper 5dd920e0e0 mariadb: use nls.mk for consistent iconv handling
@jow- mentioned that depending on libiconv-full on uClibc is not the way
to do it. Instead nls.mk needs to be included and then the correct iconv
lib wil be used as per CONFIG_BUILD_NLS.

Update mariadb Makefile to address this.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-07-12 23:39:56 +02:00
Sebastian Kemper 5702078dd0 mariadb: fix uClibc builds
mariadb 10.2.x depends on iconv. glibc and musl include iconv, uclibc
does not. So for uclibc builds a depend on libiconv-full is required.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-07-08 09:59:18 +02:00
Sebastian Kemper f727222221 mariadb: fix CPPFLAGS handling
The mariadb build system ignores CPPFLAGS. Add them to CFLAGS as a
workaround.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-07-08 09:54:35 +02:00
Sebastian Kemper 94f88d3d83 mariadb: convert init script to procd
Also create a user "mariadb" and use it for running the server. And
add possibility to easily add command line args.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-06-28 21:31:42 +02:00
Sebastian Kemper f8368276fe mariadb: add convenience symlinks
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-06-28 21:28:23 +02:00
Sebastian Kemper cbc2353733 mariadb: fix mysql_config
Correct the socket info in mysql_config.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-06-28 21:26:56 +02:00
Sebastian Kemper 4d6829f0a3 mariadb: add plugins
- ha_sequence: formerly builtin, now a plugin
- ha_sphinx: formerly disabled
- ha_example: was missing in the eval lines

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-06-28 21:25:18 +02:00
Sebastian Kemper c903332493 mariadb: bump to 10.2.x release
Bump to 10.2.x release series which has support for OpenSSL 1.1.x.

- libmariadbclient was replaced by libmaria
- libmaria uses LGPL, hence license info updated
- upstream disabled xtradb engine, innodb is now default (cannot be
  built as plugin anymore)
- complex charsets are now all included (size increase), as otherwise
  compile fails
- patches adapted/refreshed

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-06-28 21:22:37 +02:00
Sebastian Kemper 7053b12912 mariadb: add source mirrors
As suggested by Daniel Engberg, add some mirror servers to offload from
MariaDB's main download server.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-13 11:14:46 +02:00
Sebastian Kemper 13321a5697 mariadb: bump to 10.1.33
Maintenance release. Fixes the following security vulnerabilities:

CVE-2018-2782
CVE-2018-2784
CVE-2018-2787
CVE-2018-2766
CVE-2018-2755
CVE-2018-2819
CVE-2018-2817
CVE-2018-2761
CVE-2018-2781
CVE-2018-2771
CVE-2018-2813

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-13 08:46:19 +02:00
Sebastian Kemper 3bdaa522df mariadb: fix /etc/mysql setup
- create directory /etc/mysql/conf.d as without it the server refuses to
  start
- correct the path to my.cnf in the init script

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-13 08:42:44 +02:00
Sebastian Kemper f1b49babad mariadb: Makefile cleanups
- fix a typo
- remove unnecessary trailing slashes

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-13 08:40:39 +02:00
Sebastian Kemper c64552d2ba mariadb: create symlinks in a portable way
Hannu mentioned that --recursive could not be available always. That is
correct. While GNU coreutils' ln supports this, BSD's ln for example does
not.

This commit addresses that.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-06 17:48:32 +02:00
Sebastian Kemper 1af459bd52 mariadb: install staging libs to lib/mysql as well
Historically programs added /usr/lib/mysql to the library search path when
linking. mariadb does not do so anymore, although even its mysql_config
script suggests to use this path. When an old version of the library still
resides in this directory (like from an old mysql installation) it will be
linked against instead of the current library which is in /usr/lib.

To prevent this simply install symlinks from the staging libs in /usr/lib
into /usr/lib/mysql. This fixes build failures on the build bots which are
seen with libzdb and libdbi-drivers.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-05-06 14:53:18 +02:00
Sebastian Kemper 5033e5bb70 mariadb: fix sporadic build failure
Observed once in about two dozen builds on the bots:

make[6]: *** No rule to make target '/build/lede-snapshots/arm_cortex-a7_neon-vfpv4/build/sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/lib/libevent.so', needed by 'tests/async_queries'.  Stop.

Address this by adding libevent2 to PKG_BUILD_DEPENDS.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-04-29 09:41:35 +02:00
Sebastian Kemper 1b73f267ea mariadb: new package
MariaDB is a drop-in replacement for MySQL. This commit adds a current
and stable version of MariaDB to the tree.

Quite a few ideas/patches were copied from Alpine Linux, Busybox Buildroot
and Debian.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-04-28 14:41:30 +02:00