1 Star 0 Fork 55

小小鸟儿/mysql

forked from src-openEuler/mysql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mysql-paths.patch 2.74 KB
一键复制 编辑 原始数据 按行查看 历史
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
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
index 9f7945d8..6734cdfd 100644
--- a/cmake/install_layout.cmake
+++ b/cmake/install_layout.cmake
@@ -105,7 +105,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()
@@ -189,6 +189,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 IN_LIST KNOWN_64BIT_ARCHITECTURES)
SET(INSTALL_LIBDIR_RPM "lib64/mysql")
diff --git a/mysys/my_default.cc b/mysys/my_default.cc
index 290f1666..8403425f 100644
--- a/mysys/my_default.cc
+++ b/mysys/my_default.cc
@@ -1570,12 +1570,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
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 4149a764..b091d5e2 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -288,9 +288,9 @@ IF(UNIX)
ENDIF(UNIX)
SET(prefix "${CMAKE_INSTALL_PREFIX}")
-SET(sysconfdir ${prefix})
+SET(sysconfdir ${SYSCONFDIR})
SET(bindir ${prefix}/${INSTALL_BINDIR})
-SET(libexecdir ${prefix}/${INSTALL_SBINDIR})
+SET(libexecdir ${prefix}/${INSTALL_LIBEXECDIR})
SET(datadir ${prefix}/${INSTALL_MYSQLSHAREDIR})
SET(libsubdir ${INSTALL_LIBDIR})
SET(pkgincludedir ${prefix}/${INSTALL_INCLUDEDIR})
diff --git a/scripts/mysqld_multi.pl.in b/scripts/mysqld_multi.pl.in
index 84dd4d7c..50397ddd 100644
--- a/scripts/mysqld_multi.pl.in
+++ b/scripts/mysqld_multi.pl.in
@@ -586,9 +586,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));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/little-little-bird/mysql.git
git@gitee.com:little-little-bird/mysql.git
little-little-bird
mysql
mysql
master

搜索帮助