mirror of
https://git.freebsd.org/ports.git
synced 2025-06-01 19:06:28 -04:00
Make my.cnf path correct according to hier(7), bump PORTREVISION
PR: 209579 Submitted by: mokhi64@gmail.com Reviewed by: rootservice@gmail.com
This commit is contained in:
parent
79831ac5c0
commit
cad0f5776b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418033
7 changed files with 88 additions and 24 deletions
|
@ -2,7 +2,7 @@
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= mysql
|
PORTNAME= mysql
|
||||||
PORTREVISION?= 0
|
PORTREVISION?= 1
|
||||||
PKGNAMESUFFIX= 57-client
|
PKGNAMESUFFIX= 57-client
|
||||||
|
|
||||||
COMMENT= Multithreaded SQL database (client)
|
COMMENT= Multithreaded SQL database (client)
|
||||||
|
|
|
@ -9,18 +9,48 @@
|
||||||
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
|
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
|
||||||
static const char **default_directories = 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 (strstr(name, "/etc") == name)
|
||||||
if (DEFAULT_SYSCONFDIR[0])
|
|
||||||
+ {
|
+ {
|
||||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
+ fprintf(stderr,
|
||||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
+ "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
|
#endif
|
||||||
@@ -1480,7 +1483,7 @@ int check_file_permissions(const char *f
|
|
||||||
|
@@ -1480,7 +1484,7 @@
|
||||||
MY_STAT stat_info;
|
MY_STAT stat_info;
|
||||||
|
|
||||||
if (!my_stat(file_name,&stat_info,MYF(0)))
|
if (!my_stat(file_name,&stat_info,MYF(0)))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
PORTNAME?= mysql
|
PORTNAME?= mysql
|
||||||
PORTVERSION= 5.7.13
|
PORTVERSION= 5.7.13
|
||||||
PORTREVISION?= 0
|
PORTREVISION?= 1
|
||||||
CATEGORIES= databases ipv6
|
CATEGORIES= databases ipv6
|
||||||
MASTER_SITES= MYSQL/MySQL-5.7
|
MASTER_SITES= MYSQL/MySQL-5.7
|
||||||
PKGNAMESUFFIX?= 57-server
|
PKGNAMESUFFIX?= 57-server
|
||||||
|
@ -51,7 +51,6 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \
|
||||||
-DINSTALL_SHAREDIR="share" \
|
-DINSTALL_SHAREDIR="share" \
|
||||||
-DINSTALL_SUPPORTFILESDIR="share/mysql" \
|
-DINSTALL_SUPPORTFILESDIR="share/mysql" \
|
||||||
-DMYSQL_KEYRINGDIR="${ETCDIR}/keyring" \
|
-DMYSQL_KEYRINGDIR="${ETCDIR}/keyring" \
|
||||||
-DSYSCONFDIR="${ETCDIR}" \
|
|
||||||
-DWITH_BOOST="${WRKSRC}/boost" \
|
-DWITH_BOOST="${WRKSRC}/boost" \
|
||||||
-DWITH_EDITLINE=system \
|
-DWITH_EDITLINE=system \
|
||||||
-DWITH_LIBEVENT=system \
|
-DWITH_LIBEVENT=system \
|
||||||
|
|
|
@ -64,9 +64,11 @@ mysql_prestart()
|
||||||
{
|
{
|
||||||
if [ -f "${mysql_dbdir}/my.cnf" ]; then
|
if [ -f "${mysql_dbdir}/my.cnf" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please keep in mind that the default location for my.cnf will be changed"
|
echo "Please keep in mind that the default location for my.cnf has changed"
|
||||||
echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\" in the near"
|
echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\". "
|
||||||
echo "future. If you do not want to move your my.cnf to the new location then"
|
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 "you must set \"mysql_optfile\" in /etc/rc.conf to \"/var/db/mysql/my.cnf\"."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -9,18 +9,48 @@
|
||||||
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
|
#define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
|
||||||
static const char **default_directories = 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 (strstr(name, "/etc") == name)
|
||||||
if (DEFAULT_SYSCONFDIR[0])
|
|
||||||
+ {
|
+ {
|
||||||
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
|
+ fprintf(stderr,
|
||||||
+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
|
+ "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
|
#endif
|
||||||
@@ -1480,7 +1483,7 @@ int check_file_permissions(const char *f
|
|
||||||
|
@@ -1480,7 +1484,7 @@
|
||||||
MY_STAT stat_info;
|
MY_STAT stat_info;
|
||||||
|
|
||||||
if (!my_stat(file_name,&stat_info,MYF(0)))
|
if (!my_stat(file_name,&stat_info,MYF(0)))
|
||||||
|
|
|
@ -11,9 +11,10 @@ in /root/.mysql_secret
|
||||||
|
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
Please keep in mind that the default location for my.cnf will be changed
|
The default location for my.cnf has changed from "/var/db/mysql/my.cnf" to
|
||||||
from "/var/db/mysql/my.cnf" to "/usr/local/etc/mysql/my.cnf" in the near
|
"/usr/local/etc/mysql/my.cnf". Existing my.cnf files must be merged manually
|
||||||
future. If you do not want to move your my.cnf to the new location then
|
with the new default and moved to the new location. To continue using the
|
||||||
you must set "mysql_optfile" in /etc/rc.conf to "/var/db/mysql/my.cnf".
|
my.cnf file at the old location, set "mysql_optfile" in /etc/rc.conf to
|
||||||
|
point to the location of the existing my.cnf file.
|
||||||
|
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
|
@ -62,6 +62,8 @@ lib/mysql/plugin/rewriter.so
|
||||||
lib/mysql/plugin/semisync_master.so
|
lib/mysql/plugin/semisync_master.so
|
||||||
lib/mysql/plugin/semisync_slave.so
|
lib/mysql/plugin/semisync_slave.so
|
||||||
lib/mysql/plugin/test_security_context.so
|
lib/mysql/plugin/test_security_context.so
|
||||||
|
lib/mysql/plugin/keyring_udf.so
|
||||||
|
lib/mysql/plugin/test_udf_services.so
|
||||||
lib/mysql/plugin/validate_password.so
|
lib/mysql/plugin/validate_password.so
|
||||||
lib/mysql/plugin/version_token.so
|
lib/mysql/plugin/version_token.so
|
||||||
libdata/pkgconfig/LIBMYSQL_OS_OUTPUT_NAME-NOTFOUND.pc
|
libdata/pkgconfig/LIBMYSQL_OS_OUTPUT_NAME-NOTFOUND.pc
|
||||||
|
|
Loading…
Add table
Reference in a new issue