summaryrefslogtreecommitdiff
path: root/databases/mysql57-server/files
diff options
context:
space:
mode:
authorThomas Zander <riggs@FreeBSD.org>2016-07-04 14:59:15 +0000
committerThomas Zander <riggs@FreeBSD.org>2016-07-04 14:59:15 +0000
commitcad0f5776b4b91e1ae54f2204c5ace5910e772d0 (patch)
treecdcce0b6f0a526e4c9073caccf2042fba125f152 /databases/mysql57-server/files
parentPython flexible slugify function (diff)
Make my.cnf path correct according to hier(7), bump PORTREVISION
PR: 209579 Submitted by: mokhi64@gmail.com Reviewed by: rootservice@gmail.com
Notes
Notes: svn path=/head/; revision=418033
Diffstat (limited to 'databases/mysql57-server/files')
-rw-r--r--databases/mysql57-server/files/mysql-server.in8
-rw-r--r--databases/mysql57-server/files/patch-mysys__ssl_my__default.cc44
2 files changed, 42 insertions, 10 deletions
diff --git a/databases/mysql57-server/files/mysql-server.in b/databases/mysql57-server/files/mysql-server.in
index 1f57e75325b7..03c57e7d15b8 100644
--- a/databases/mysql57-server/files/mysql-server.in
+++ b/databases/mysql57-server/files/mysql-server.in
@@ -64,9 +64,11 @@ mysql_prestart()
{
if [ -f "${mysql_dbdir}/my.cnf" ]; then
echo ""
- echo "Please keep in mind that the default location for my.cnf will be changed"
- echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\" in the near"
- echo "future. If you do not want to move your my.cnf to the new location then"
+ echo "Please keep in mind that the default location for my.cnf has changed"
+ echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\". "
+ echo "Please merge your existing my.cnf with the new default and move"
+ echo "it to \"%%ETCDIR%%/my.cnf\"."
+ echo "If you do not want to move your my.cnf to the new location then"
echo "you must set \"mysql_optfile\" in /etc/rc.conf to \"/var/db/mysql/my.cnf\"."
echo ""
fi
diff --git a/databases/mysql57-server/files/patch-mysys__ssl_my__default.cc b/databases/mysql57-server/files/patch-mysys__ssl_my__default.cc
index ca7dd233539d..0b4ee9e2360e 100644
--- a/databases/mysql57-server/files/patch-mysys__ssl_my__default.cc
+++ b/databases/mysql57-server/files/patch-mysys__ssl_my__default.cc
@@ -9,18 +9,48 @@
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
static const char **default_directories = NULL;
-@@ -1409,7 +1409,10 @@ static const char **init_default_directo
+@@ -909,6 +909,14 @@
+ return 1; /* Ignore wrong files */
+ }
- #if defined(DEFAULT_SYSCONFDIR)
- if (DEFAULT_SYSCONFDIR[0])
++ if (strstr(name, "/etc") == name)
+ {
- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
-+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
++ fprintf(stderr,
++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n",
++ name,name);
++ goto err;
+ }
- #endif /* DEFAULT_SYSCONFDIR */
++
+ while (mysql_file_getline(buff, sizeof(buff) - 1, fp))
+ {
+ line++;
+@@ -1245,7 +1253,8 @@
+ end[(strlen(end)-1)] = ' ';
+ else
+ strxmov(end, conf_file, *ext , " ", NullS);
+- fputs(name, stdout);
++ if (strstr(name, "/etc") != name)
++ fputs(name, stdout);
+ }
+ }
+ }
+@@ -1404,13 +1413,8 @@
+
+ #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);
+-#endif /* DEFAULT_SYSCONFDIR */
++ errors += add_directory(alloc, "/usr/local/etc/", dirs);
++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
#endif
-@@ -1480,7 +1483,7 @@ int check_file_permissions(const char *f
+
+@@ -1480,7 +1484,7 @@
MY_STAT stat_info;
if (!my_stat(file_name,&stat_info,MYF(0)))