mysql/community-mysql-paths.patch

75 lines
2.6 KiB
Diff
Raw Normal View History

Some hard-coded paths make problems when package is built into chroot like
Software Collections. Removing these hard-coded paths should fix it.
Upstream report: https://mariadb.atlassian.net/browse/MDEV-6485
2018-04-25 08:13:27 +00:00
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
index ec2b492..43e4ccd 100644
--- a/cmake/install_layout.cmake
+++ b/cmake/install_layout.cmake
@@ -114,7 +114,7 @@ IF(UNIX)
" Choose between ${VALID_INSTALL_LAYOUTS}" )
ENDIF()
- SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
+ SET(SYSCONFDIR "/etc"
CACHE PATH "config directory (for my.cnf)")
MARK_AS_ADVANCED(SYSCONFDIR)
ENDIF()
2018-04-25 08:13:27 +00:00
@@ -318,6 +318,7 @@ SET(INSTALL_SECURE_FILE_PRIVDIR_TARGZ ${secure_file_priv_path})
#
SET(INSTALL_BINDIR_RPM "bin")
SET(INSTALL_SBINDIR_RPM "sbin")
+SET(INSTALL_SYSCONFDIR_RPM "/etc")
#
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
SET(INSTALL_LIBDIR_RPM "lib64")
2018-04-25 08:13:27 +00:00
diff --git a/mysys_ssl/my_default.cc b/mysys_ssl/my_default.cc
index 2d76700..02c5885 100644
--- a/mysys_ssl/my_default.cc
+++ b/mysys_ssl/my_default.cc
@@ -1733,12 +1733,12 @@ static const char **init_default_directories(MEM_ROOT *alloc)
#else
- errors += add_directory(alloc, "/etc/", dirs);
- errors += add_directory(alloc, "/etc/mysql/", dirs);
-
#if defined(DEFAULT_SYSCONFDIR)
if (DEFAULT_SYSCONFDIR[0])
+ {
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
+ }
#endif /* DEFAULT_SYSCONFDIR */
#endif
2018-04-25 08:13:27 +00:00
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index c66a910..af9bc9e 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -324,7 +324,7 @@ ELSE()
2015-09-23 10:31:06 +00:00
ENDIF()
SET(prefix "${CMAKE_INSTALL_PREFIX}")
-SET(sysconfdir ${prefix})
+SET(sysconfdir ${SYSCONFDIR})
SET(bindir ${prefix}/${INSTALL_BINDIR})
SET(libexecdir ${prefix}/${INSTALL_SBINDIR})
2018-04-25 08:13:27 +00:00
SET(datadir ${prefix}/${INSTALL_MYSQLSHAREDIR})
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 5ad36e7..5dd032f 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -572,9 +572,7 @@ sub list_defaults_files
my %seen; # Don't list the same file more than once
return grep { defined $_ and not $seen{$_}++ and -f $_ and -r $_ }
- ('/etc/my.cnf',
- '/etc/mysql/my.cnf',
- '@sysconfdir@/my.cnf',
+ ('@sysconfdir@/my.cnf',
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
$opt{'extra-file'},
($ENV{HOME} ? "$ENV{HOME}/.my.cnf" : undef));