aboutsummaryrefslogtreecommitdiff
path: root/utils/mariadb
Commit message (Collapse)AuthorAge
* mariadb: fix compilation with newer fmtRosen Penev2024-02-18
| | | | | | Upstream backport. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mariadb: minor whitespace and typo fixesMichael Heimpold2023-12-22
| | | | Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* mariadb: update to 10.9.8Rosen Penev2023-12-19
| | | | | | | Remove upstreamed patch. Signed-off-by: Rosen Penev <rosenp@gmail.com> Tested-by: Michael Heimpold <mhei@heimpold.de>
* mariadb: fix gcc 13 buildingOskari Rauta2023-05-20
| | | | | | | | | | | fixes: FAILED: tpool/CMakeFiles/tpool.dir/aio_liburing.cc.o /usr/src/openwrt/staging_dir/toolchain-x86_64_gcc-13.1.0_musl/bin/x86_64-openwrt-linux-musl-g++ -DDBUG_TRACE -DHAVE_CONFIG_H -DHAVE_URING -D_FILE_OFFSET_BITS=64 -I/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/wsrep-lib/include -I/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/wsrep-lib/wsrep-API/v26 -I/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/include -I/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/include/providers -I/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/tpool -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3=mariadb-10.9.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/usr/src/openwrt/staging_dir/toolchain-x86_64_gcc-13.1.0_musl/usr/include -I/usr/src/openwrt/staging_dir/toolchain-x86_64_gcc-13.1.0_musl/include/fortify -I/usr/src/openwrt/staging_dir/toolchain-x86_64_gcc-13.1.0_musl/include -DNDEBUG -DDBUG_OFF -std=gnu++11 -DHAVE_IO_URING_MLOCK_SIZE -MD -MT tpool/CMakeFiles/tpool.dir/aio_liburing.cc.o -MF tpool/CMakeFiles/tpool.dir/aio_liburing.cc.o.d -o tpool/CMakeFiles/tpool.dir/aio_liburing.cc.o -c /usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/tpool/aio_liburing.cc /usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/tpool/aio_liburing.cc: In constructor '{anonymous}::aio_uring::aio_uring(tpool::thread_pool*, int)': /usr/src/openwrt/build_dir/target-x86_64_musl/mariadb-10.9.3/tpool/aio_liburing.cc:64:18: error: 'runtime_error' is not a member of 'std' 64 | throw std::runtime_error("aio_uring()"); Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
* mariadb: fix compilation with musl 1.2.4Tianling Shen2023-05-18
| | | | | | | | | musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so just having _GNU_SOURCE defined is not enough anymore. Manually pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
* treewide: remove AUTORELEASEPaul Fertser2023-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically compute and substitute current values for all $(AUTORELEASE) instances as this feature is deprecated and shouldn't be used. The following temporary change was made to the core: diff --git a/rules.mk b/rules.mk index 57d7995d4fa8..f16367de87a8 100644 --- a/rules.mk +++ b/rules.mk @@ -429,7 +429,7 @@ endef abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1)))) COMMITCOUNT = $(if $(DUMP),0,$(call commitcount)) -AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1)) +AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile)) all: FORCE: ; And this command used to fix affected packages: for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \ sed 's^.*/\([^/]*\)/Makefile^\1^';); do make package/$i/download done Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16Andre Heider2023-04-08
| | | | | | | See commit 5c545bdb "treewide: replace PKG_USE_MIPS16:=0 with PKG_BUILD_FLAGS:=no-mips16" on the main repository. Signed-off-by: Andre Heider <a.heider@gmail.com>
* mariadb: Update to the latest version 10.9.3Michal Hrusecky2022-10-25
| | | | | | | | | | | | | | | | | | | | Update to the latest upstream version. For more details, see: https://mariadb.com/kb/en/changes-improvements-in-mariadb-109/ Added new dependency on libfmt. Following two patches dropped as the issues were fixed in upstream. * 130-c11_atomics.patch * 140-mips-connect-unaligned.patch The rest of the patches were refreshed. Don't need to disable cassandra and tokudb anymore as they were dropped from upstream tarball. Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
* mariadb: Drop unused rundir fix socket dir permsMichal Hrusecky2022-10-24
| | | | | | | | | We had been creating "rundir" but it was never used, probably leftover from some removed function. At the same time, we were setting quite strict rights to the socket directory (while comments sugested otherwise). Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
* mariadb: fix compilation with ppc64Rosen Penev2022-09-04
| | | | | | | MariaDB's PPC64 CRC32 support requires AltiVec, which QoriQ does not support. Disable it. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mariadb: Add sudo dependencyMichal Hrusecky2022-01-14
| | | | | | | | During update we use sudo to start an instance. It probably could be workarounded, but given the MariaDB size, dependency on sudo shouldn't be an issue. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Check and fix datadir owner issues during upgradeMichal Hrusecky2022-01-14
| | | | | | | | | If you are migrating to MariaDB package, you might have old datadir stored somewhere using different setup with different users. If you trust us enough to enable autoupgrade, you probably trust us enough to chown your datadir as well. This can prevent some potential issues. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Create compatibility symlinksMichal Hrusecky2021-11-29
| | | | | | | For every mysql* binary create corresponding mariadb binary and vice versa. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Install all supporting sql filesMichal Hrusecky2021-11-29
| | | | | | Do not pick just few random SQL files to install, install all of them. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Tweak default configurationMichal Hrusecky2021-11-29
| | | | | | | | Remove from default configuration options that are compiled in like default paths and character set. On the other hand add few examples of tweak options that might be handy. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Init script improvementsMichal Hrusecky2021-11-29
| | | | | | | | | Update init script so other user/group can be used. Also make sure that init script can actually create an empty database instead of forcing the user to do it by hand. Other new feature is taking care of migration of the database when upgrading the database. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb-common: Drop package and adjust configurationMichal Hrusecky2021-11-29
| | | | | | | | | | | | | The raison d'ĂȘtre of package mariadb-common was to provide common my.cnf config file that was being used to include subdirectories and then to push utf-8 as default everywhere. Let's make this file part of the server package as there we actually set other options as well and drop it from all clients. Instead let's set utf-8 as default in server, client and client libraries. While at it also set socket to the more common path and drop mysqld_safe script from the list of configuration files and do other minor tweaks. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: use liburing if kernel supports itEneas U de Queiroz2021-11-04
| | | | | | | | | | | | liburing is preferred over libaio. So, if liburing has already been built, mariadb will use it, instead of libaio, failing with a missed dependency. If it is not found, then libaio is used. Since it depends on the kernel being built with io_uring support, and it defaults to y unless SMALL_FLASH=y, then we should allow libaio as fallback, checking the CONFIG_KERNEL_IO_URING symbol. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* mariadb: ensure columnstore engine is disabledEneas U de Queiroz2021-11-04
| | | | | | | | | | mariadb may detect boost libraries, if the latter has been built with threads, date_time and chorno support, then it will enable the columnstore engine, which fails to build. Set PKG_RELEASE:=$(AUTORLEASE). Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* mariadb: Update to version 10.6.4Michal Hrusecky2021-10-30
| | | | | | | Update to the latest stable version of MariaDB. Dropped few no longer needed patches. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: fix cmake issueSebastian Kemper2021-06-26
| | | | | | Same fix that went into libmariadb package with commit fd13c12. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* treewide: back to cmake.mkRosen Penev2021-06-12
| | | | | | Ninja was merged to base and therefore we can now use normal cmake.mk Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: build CMake projects with NinjaRosen Penev2021-03-27
| | | | | | | | | | | | | | | | | | | | faster to compile. A small selection of packages was tested going from: Executed in 696.30 secs fish external usr time 82.98 mins 395.00 micros 82.98 mins sys time 9.02 mins 0.00 micros 9.02 mins to: Executed in 592.20 secs fish external usr time 84.84 mins 361.00 micros 84.84 mins sys time 8.85 mins 57.00 micros 8.85 mins Tested by running make -j 12 and wiping staging/build_dir/target_x Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mariadb: update to 10.4.18Rosen Penev2021-02-22
| | | | | | | | Remove uClibc depends. It's gone now. Remove CMAKE_INSTALL to avoid installing to InstallDev. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: Run refresh on all packagesIlya Lipnitskiy2021-02-20
| | | | | | | | | The crude loop I wrote to come up with this changeset: find -L package/feeds/packages/ -name patches | \ sed 's/patches$/refresh/' | sort | xargs make Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* mariadb: Update to 10.4.17Michal Hrusecky2020-11-16
| | | | | | Update to the latest version from 10.4 series Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Cleanup and bumpMichal Hrusecky2020-10-14
| | | | | | | | Remove few no longer needed bits - like checking that datadir is defined or mysqld_safe from server package and bumping revision after all the init script cleanups. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use procd and run as userMichal Hrusecky2020-10-14
| | | | | | Drop mysqld_safe and use procd instead. Also run as a user. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Do not use mysqladmin in initMichal Hrusecky2020-10-13
| | | | | | | Rewrite init script as mysqladmin requires access to the MySQL which is hard to guarantee. Use standard signals instead. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use defaults and change default datadirMichal Hrusecky2020-10-13
| | | | | | | | | | Use /srv/mysql as default datadir as /var/lib/mysql is in tmpfs. This doesn't affect any existing setup as up till now it had to be always specified in configuration. That is addressed in the second part of this commit - init script now uses even defaults as compiled in MariaDB so not everything has to be specified in configuration file. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Add basic testMichal Hrusecky2020-10-12
| | | | | | Add simple to test to try to run MariaDB and get the version. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: fix compilation when selinux is presentRosen Penev2020-10-11
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* mariadb: Update to version 10.4.14Michal Hrusecky2020-10-02
| | | | Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Add shellcheck disable into init scriptMichal Hrusecky2020-10-02
| | | | | | | | | On few places, shellcheck gets confused by how some OpenWrt functions work - especially load ones. Also on few places there are $options variables that need not to be globbed. Could be rewritten better not to need them, but I'll do major rewrites later in separate pull request. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Use double quotes where possibleMichal Hrusecky2020-10-02
| | | | | | | | Just to make sure, add double quotes around strings and various variables. In some cases it could prevent some issues, in other cases it is just a good practice. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: Handle non-existent logger in initMichal Hrusecky2020-10-01
| | | | | | Make sure init script has a fallback when logger is not available. Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
* mariadb: use fakeroot instead of postinst scriptSebastian Kemper2020-09-17
| | | | | | fakeroot support was recently added to OpenWrt. Let's make use of it. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb/libmariadb: Take over as a maintainerMichal Hrusecky2020-07-09
| | | | Signed-off-by: Michal Hrusecky <michal@hrusecky.net>
* mariadb: remove maintainerSebastian Kemper2020-07-08
| | | | Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: move some binariesSebastian Kemper2020-06-13
| | | | | | | | | | | | | | | | | | | | | Even though I think that mysql_upgrade is a client package (it depends on the mysql client and it's in the "client" directory in the source tree, for instance), upstream laid it out differently. Since upstream commit ec586f5 mysql_upgrade is to be considered a part of the server, because the COMPONENT argument in the MYSQL_ADD_EXECUTABLE macro is set to "Server". That means that mysql_upgrade is only installed when the server is. So we need to move it back to the server package, otherwise we will have a build failure when mariadb-client is selected while mariadb-server is not. This particular build failure was recently a topic on openwrt-devel. Some more binaries are moved, following the layout visible in "man/CMakeLists.txt", to make sure we follow upstream's vision with regards to how the binaries are packaged. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: bump to 10.4.13Sebastian Kemper2020-05-17
| | | | | | | | | | | | | Upstream added define INSTALL_PAMDATADIR, so hardcoded path is gone. Fixes: CVE-2020-2752 CVE-2020-2812 CVE-2020-2814 CVE-2020-2760 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: switch init to mysqld_safe and mysqladminSebastian Kemper2020-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld_safe is the recommended way to start the server on non-systemd systems ([1]). For instance, it has a crash detection with auto-restart function, can update ulimits, setup core files, set the niceness of the server etc. It looks like it could also be helpful when trying to set up clusters. It's maintained upstream and adding it means we don't need to add these features into our init script. mysqld_safe is a script itself, so it's added to conffiles in case users want to edit it. It can't be run under procd, so the init script is converted to a normal System V type. To stop the server and to reload the privileges tables mysqladmin is used. To that end mysqladmin is moved into the server package. While changing the init script, the Debian init script was used for ideas. It wasn't copied verbatim and adapted a bit here and there. Thanks to whoever wrote it! This commit removes the support for starting the service as a user other than "mariadb". This makes the init script simpler. If anybody wants to play around with the user then it's up to them to fix the permissions. [1] https://mariadb.com/kb/en/mysqld_safe/ Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: move mysql_upgrade to the client packageSebastian Kemper2020-05-11
| | | | | | | It's really a client. It connects to the running server as a client, to upgrade the DBs. And it depends on both mysql and mysqlcheck. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: update auth_pam handlingSebastian Kemper2020-05-11
| | | | | | | | | | | | | | | With INSTALL_PAMDIR undefined some items necessary for the auth_pam module aren't built. This adds the define so that configuration and shared object become available. This commit also tightens up the installation of the SUID tool. The directory it is copied into gets created on the build host already with u=rwx,g=rx,o=, so it cannot be accessed on target, except by root. The post-install script then changes group ownership of the directory to the "mariadb" group only if the directory is really a directory and owned by "root:root". Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: install config files readable for allSebastian Kemper2020-05-11
| | | | | | | | | | | | Until now $(INSTALL_CONF) is used for configuration files that go into /etc/mysql. This commit replaces that with $(INSTALL_DATA). The configuration files are not only parsed by the server, but also by the clients (which can be anybody). This also removes a comment about a cron job from one of the configuration files. There is no cron job. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: follow up on CVE-2020-7221Sebastian Kemper2020-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today CVE-2020-7221 was publicly discussed on oss-sec [1]. MariaDB upstream had not mentioned this CVE in their last release notes. The CVE is related to auth-pam and the possibility of a local mariadb to root user exploit in the mysql_install_db script. Upstream has made amendments to the script, but according to the oss-sec posts the folder permissions were not updated as they should have been. In OpenWrt the script mysql_install_db is actually patched to never run the commands in question. This has been this way since MariaDB 10.4 was made available. Still, the directory permissions set by the postinstall script are too lax. To quote the discoverer of the issue, Matthias Gerstner from Suse, they exhibit "the dangerous situation of a setuid-root binary residing in a directory owned by an unprivileged user". This commit fixes this by changing the permissions to the following: root:mariadb 0750 /usr/lib/mariadb/plugin/auth_pam_tool_dir This way the setuid-root binary is only available to root and the mariadb user, while at the same time the mariadb user has no ownership of the directory. [1] https://seclists.org/oss-sec/2020/q1/55 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: security bump to 10.4.12Sebastian Kemper2020-01-30
| | | | | | Fixes CVE-2020-2574. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: prevent building against uClibcSebastian Kemper2019-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | MariaDB 10.4 includes some changes in sql/sql_statistics.cc that require std::fmin and std::fmax. But these functions aren't available when libstdc++ is compiled against uClibc, because uClibc doesn't pass the test when libstdc++ checks for C99 math that supports "TR1" facilities (macro: GLIBCXX_CHECK_C99_TR1). Hence compilation fails: [ 90%] Building CXX object sql/CMakeFiles/sql.dir/sql_table.cc.o /builder/shared-workdir/build/sdk/build_dir/target-arc_archs_uClibc/mariadb-10.4.10/sql/sql_statistics.cc: In member function 'void Column_statistics_collected::finish(ha_rows, double)': /builder/shared-workdir/build/sdk/build_dir/target-arc_archs_uClibc/mariadb-10.4.10/sql/sql_statistics.cc:2533:20: error: 'fmax' is not a member of 'std' val = std::fmax(estimate_total_distincts * (rows - nulls) / rows, 1.0); This commit updates package dependencies to prevent a build against uClibc. There is no reason to waste CPU cycles on the build bots. The dependencies are also tidied up. In the past it made sense to define MARIADB_COMMON_DEPENDS and MARIADB_COMMON_DEPENDS_EXE, because the server had different dependencies compared to the library. But since the library is now in its own package we can remove the differentiation. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: small plugins fixesSebastian Kemper2019-11-17
| | | | | | | | | | This adds a few lines to the BuildPlugin routine to install some missing files for auth_pam as well as ha_spider. It also adds a postinstall script that updates the ownership of a directory used by auth_pam. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
* mariadb: move libmariadb into its own packageSebastian Kemper2019-11-17
| | | | | | | | This way when only wanting the library nobody needs to download and compile the server package, saving space and time. Also this way we can avoid sudden SONAME bumps during a server upgrade. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>