Create symlinks during configure time and install them. This is
necessary as Alias support from systemd service file was dropped with:
6af0bd6907
* Also ignore the generated symlinks in gitignore
Drop Aliases from the service file directive. Aliases in the service
file only take effect when the service is enabled. This is the case
because Aliases in service files do not have to be unique across various
services.
Shipping symlinks guarantees that one can always enable mariadb service
using `systemctl enable mysql` or `systemctl enable mysqld` and makes
the commands indempotent.
In main.index_merge_myisam we remove the test that was added in
commit a2d24def8c because
it duplicates the test case that was added in
commit 5af12e4635.
When trying to start mariadb via systemctl, WSREP failed
to start mysqld for wsrep recovery, because the binary
"galera-recovery" is neither searching the mysqld in the
same folder as the binary itself nor in the path variable
but instead expects the root to be /usr/local/mysql.
This fix changes the current directory to the desired
directory before starting mysqld.
It took me a long time to debug why my configs were not being loaded,
and judging from online discussions I'm not the only one. Make the
comment in the default my.cnf a bit more helpful.
The !includedir directive is implemented in mysys/my_default.c.
- f_extensions[] is a list of file extensions. It includes .ini and .cnf
on Windows, and only .cnf on all other platforms.
- search_default_file_with_ext() contains the !includedir directive. It
filters files in the directory to those matching f_extensions[].
This file should only be applicable on Unix-like platforms, so only
files with the .cnf extension are read.
Closes#1485
..as they have their own tools that parses those files, such as
opensysusers[1] that handles sysusers file and opentmpfiles[2] that
handles tmpfiles.d settings
Because of this. Move both sysusers and tmpfiles 'if' function
outside systemd function, allowing independent install
Signed-off-by: Rafli Akmal <thefallenrat@artixlinux.org>
[1] - https://github.com/artix-linux/opensysusers
[2] - https://github.com/OpenRC/opentmpfiles
Changes done by vicentiu@mariadb.org, from original author patch:
Installing sysusers and tmpfiles without checking for systemd existence
means that by default, cmake will ALWAYS install these files. Our
general policy is we do not install things which are not needed.
However, there is a valid use case when these files are useful, as is
described above.
To allow this, provide an extra switch that can be enabled during
configuring by doing -DINSTALL_SYSTEMD_{SYSUSERS|TMPFILES}=True
This will use the default path INSTALL_SYSTEMD_{SYSUSERS|TMPFILES}DIR
fetched from install_layout.cmake for rpm & deb based layouts
respectively, or they must be overriden if the install_layout is
standalone.
Example:
cmake . -DINSTALL_SYSTEMD_SYSUSERS=True -DINSTALL_SYSTEMD_SYSUSERSDIR=/etc/sysusers.d
These files were installed to:
${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf
${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
Instead rename the files to more descriptive file names 'mariadb.conf'.
don't let mysql_install_db set SUID bit for auth_pam_tool in rpm/deb
packages - instead package files with correct permissions and
only fix the ownership of auth_pam_tool_dir (which can only be done
after mysql user is created, so in post-install).
keep old mysql_install_db behavior for bintars
A conflict between MDEV-19514 (b42294bc64)
and MDEV-20934 (d7a2401750)
was resolved. We will not invoke the function ibuf_delete_recs()
from ibuf_merge_or_delete_for_page(). Instead, we will add that
logic to the function ibuf_read_merge_pages().
chkconfig --add and --del [might] invoke /sbin/insserv
and even if chkconfig exists, insserv might not (SLES15).
Ignore chkconfig --del errors - it's a "best effort" cleanup anyway
The arg was introduced as part of 75bcf1f9ad
to fix a SELinux problem caused by mysqld_safe accessing files it should
not be via the my_which function.
The root cause for this was fixed in 10.3, via
355ee6877b which eliminated the my_which
function from mysqld_safe entirely. Thus, in 10.3, this --basedir flag
is not necessary.