|
|
05db4b |
Some hard-coded paths make problems when package is built into chroot like
|
|
|
05db4b |
Software Collections. Removing these hard-coded paths should fix it.
|
|
|
05db4b |
|
|
|
05db4b |
Upstream report: https://mariadb.atlassian.net/browse/MDEV-6485
|
|
|
05db4b |
|
|
|
05db4b |
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
|
|
|
05db4b |
index 9f7945d8..6734cdfd 100644
|
|
|
05db4b |
--- a/cmake/install_layout.cmake
|
|
|
05db4b |
+++ b/cmake/install_layout.cmake
|
|
|
05db4b |
@@ -105,7 +105,7 @@ IF(UNIX)
|
|
|
05db4b |
" Choose between ${VALID_INSTALL_LAYOUTS}" )
|
|
|
05db4b |
ENDIF()
|
|
|
05db4b |
|
|
|
05db4b |
- SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
|
|
|
05db4b |
+ SET(SYSCONFDIR "/etc"
|
|
|
05db4b |
CACHE PATH "config directory (for my.cnf)")
|
|
|
05db4b |
MARK_AS_ADVANCED(SYSCONFDIR)
|
|
|
05db4b |
ENDIF()
|
|
|
05db4b |
@@ -189,6 +189,7 @@ SET(INSTALL_SECURE_FILE_PRIVDIR_TARGZ ${secure_file_priv_path})
|
|
|
05db4b |
#
|
|
|
05db4b |
SET(INSTALL_BINDIR_RPM "bin")
|
|
|
05db4b |
SET(INSTALL_SBINDIR_RPM "sbin")
|
|
|
05db4b |
+SET(INSTALL_SYSCONFDIR_RPM "/etc")
|
|
|
05db4b |
#
|
|
|
05db4b |
IF(CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_64BIT_ARCHITECTURES)
|
|
|
05db4b |
SET(INSTALL_LIBDIR_RPM "lib64/mysql")
|
|
|
05db4b |
diff --git a/mysys/my_default.cc b/mysys/my_default.cc
|
|
|
05db4b |
index 290f1666..8403425f 100644
|
|
|
05db4b |
--- a/mysys/my_default.cc
|
|
|
05db4b |
+++ b/mysys/my_default.cc
|
|
|
05db4b |
@@ -1570,12 +1570,12 @@ static const char **init_default_directories(MEM_ROOT *alloc) {
|
|
|
05db4b |
|
|
|
05db4b |
#else
|
|
|
05db4b |
|
|
|
05db4b |
- errors += add_directory(alloc, "/etc/", dirs);
|
|
|
05db4b |
- errors += add_directory(alloc, "/etc/mysql/", dirs);
|
|
|
05db4b |
-
|
|
|
05db4b |
#if defined(DEFAULT_SYSCONFDIR)
|
|
|
05db4b |
if (DEFAULT_SYSCONFDIR[0])
|
|
|
05db4b |
+ {
|
|
|
05db4b |
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
|
|
05db4b |
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
|
|
05db4b |
+ }
|
|
|
05db4b |
#endif /* DEFAULT_SYSCONFDIR */
|
|
|
05db4b |
|
|
|
05db4b |
#endif
|
|
|
05db4b |
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
|
|
|
05db4b |
index 4149a764..b091d5e2 100644
|
|
|
05db4b |
--- a/scripts/CMakeLists.txt
|
|
|
05db4b |
+++ b/scripts/CMakeLists.txt
|
|
|
05db4b |
@@ -288,9 +288,9 @@ IF(UNIX)
|
|
|
05db4b |
ENDIF(UNIX)
|
|
|
05db4b |
|
|
|
05db4b |
SET(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
|
05db4b |
-SET(sysconfdir ${prefix})
|
|
|
05db4b |
+SET(sysconfdir ${SYSCONFDIR})
|
|
|
05db4b |
SET(bindir ${prefix}/${INSTALL_BINDIR})
|
|
|
05db4b |
-SET(libexecdir ${prefix}/${INSTALL_SBINDIR})
|
|
|
05db4b |
+SET(libexecdir ${prefix}/${INSTALL_LIBEXECDIR})
|
|
|
05db4b |
SET(datadir ${prefix}/${INSTALL_MYSQLSHAREDIR})
|
|
|
05db4b |
SET(libsubdir ${INSTALL_LIBDIR})
|
|
|
05db4b |
SET(pkgincludedir ${prefix}/${INSTALL_INCLUDEDIR})
|
|
|
05db4b |
diff --git a/scripts/mysqld_multi.pl.in b/scripts/mysqld_multi.pl.in
|
|
|
05db4b |
index 84dd4d7c..50397ddd 100644
|
|
|
05db4b |
--- a/scripts/mysqld_multi.pl.in
|
|
|
05db4b |
+++ b/scripts/mysqld_multi.pl.in
|
|
|
05db4b |
@@ -586,9 +586,7 @@ sub list_defaults_files
|
|
|
05db4b |
|
|
|
05db4b |
my %seen; # Don't list the same file more than once
|
|
|
05db4b |
return grep { defined $_ and not $seen{$_}++ and -f $_ and -r $_ }
|
|
|
05db4b |
- ('/etc/my.cnf',
|
|
|
05db4b |
- '/etc/mysql/my.cnf',
|
|
|
05db4b |
- '@sysconfdir@/my.cnf',
|
|
|
05db4b |
+ ('@sysconfdir@/my.cnf',
|
|
|
05db4b |
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
|
|
|
05db4b |
$opt{'extra-file'},
|
|
|
05db4b |
($ENV{HOME} ? "$ENV{HOME}/.my.cnf" : undef));
|