View | Details | Raw Unified | Return to bug 209338 | Differences between
and this patch

Collapse All | Expand All

(-)databases/mysql56-client/files/patch-mysys_ssl_my_default.cc (-10 / +40 lines)
Lines 1-6 Link Here
1
--- mysys_ssl/my_default.cc.orig	2013-01-22 17:54:49.000000000 +0100
1
--- mysys_ssl/my_default.cc.orig	2016-03-28 18:06:12 UTC
2
+++ mysys_ssl/my_default.cc	2013-02-13 11:08:15.000000000 +0100
2
+++ mysys_ssl/my_default.cc
3
@@ -119,7 +119,7 @@
3
@@ -118,7 +118,7 @@
4
 
4
 
5
 /* Which directories are searched for options (and in which order) */
5
 /* Which directories are searched for options (and in which order) */
6
 
6
 
Lines 9-26 Link Here
9
 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1)  /* Terminate with NULL */
9
 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1)  /* Terminate with NULL */
10
 static const char **default_directories = NULL;
10
 static const char **default_directories = NULL;
11
 
11
 
12
@@ -1395,7 +1395,10 @@
12
@@ -894,6 +894,14 @@
13
       return 1;                                 /* Ignore wrong files */
14
   }
13
 
15
 
14
 #if defined(DEFAULT_SYSCONFDIR)
16
+  if (strstr(name, "/etc") == name)
15
   if (DEFAULT_SYSCONFDIR[0])
16
+  {
17
+  {
17
     errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
18
+    fprintf(stderr,
18
+    errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
19
+             "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n",
20
+             name,name);
21
+      goto err;
19
+  }
22
+  }
20
 #endif /* DEFAULT_SYSCONFDIR */
23
+
24
   while (mysql_file_getline(buff, sizeof(buff) - 1, fp))
25
   {
26
     line++;
27
@@ -1230,7 +1238,8 @@
28
             end[(strlen(end)-1)] = ' ';
29
           else
30
             strxmov(end, conf_file, *ext , " ",  NullS);
31
-          fputs(name, stdout);
32
+          if (strstr(name, "/etc") != name)
33
+            fputs(name, stdout);
34
         }
35
       }
36
     }
37
@@ -1389,13 +1398,8 @@
38
 
39
 #else
40
 
41
-  errors += add_directory(alloc, "/etc/", dirs);
42
-  errors += add_directory(alloc, "/etc/mysql/", dirs);
43
-
44
-#if defined(DEFAULT_SYSCONFDIR)
45
-  if (DEFAULT_SYSCONFDIR[0])
46
-    errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
47
-#endif /* DEFAULT_SYSCONFDIR */
48
+  errors += add_directory(alloc, "/usr/local/etc/", dirs);
49
+  errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
21
 
50
 
22
 #endif
51
 #endif
23
@@ -1466,7 +1469,7 @@
52
 
53
@@ -1465,7 +1469,7 @@
24
   MY_STAT stat_info;
54
   MY_STAT stat_info;
25
 
55
 
26
   if (!my_stat(file_name,&stat_info,MYF(0)))
56
   if (!my_stat(file_name,&stat_info,MYF(0)))
(-)databases/mysql56-server/Makefile (+6 lines)
Lines 79-84 Link Here
79
79
80
USE_RC_SUBR=	mysql-server
80
USE_RC_SUBR=	mysql-server
81
81
82
SUB_FILES=	my.cnf.sample
83
82
USERS=		mysql
84
USERS=		mysql
83
GROUPS=		mysql
85
GROUPS=		mysql
84
86
Lines 144-149 Link Here
144
	@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt
146
	@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt
145
147
146
.if !defined(CLIENT_ONLY)
148
.if !defined(CLIENT_ONLY)
149
post-install:
150
	${MKDIR} ${STAGEDIR}${ETCDIR}
151
	${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample
152
147
post-stage:
153
post-stage:
148
	${MKDIR} ${STAGEDIR}${MY_DBDIR}
154
	${MKDIR} ${STAGEDIR}${MY_DBDIR}
149
	${MKDIR} ${STAGEDIR}${MY_SECDIR}
155
	${MKDIR} ${STAGEDIR}${MY_SECDIR}
(-)databases/mysql56-server/files/my.cnf.sample.in (+64 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
[client]
4
port                            = 3306
5
socket                          = /tmp/mysql.sock
6
7
[mysql]
8
prompt                          = \u@\h [\d]>\_
9
no_auto_rehash
10
11
[mysqld]
12
user                            = mysql
13
port                            = 3306
14
socket                          = /tmp/mysql.sock
15
bind-address                    = 127.0.0.1
16
basedir                         = %%PREFIX%%
17
datadir                         = %%MY_DBDIR%%
18
tmpdir                          = %%MY_TMPDIR%%
19
slave-load-tmpdir               = %%MY_TMPDIR%%
20
secure-file-priv                = %%MY_SECDIR%%
21
log-bin                         = mysql-bin
22
log-output                      = TABLE
23
master-info-repository          = TABLE
24
relay-log-info-repository       = TABLE
25
relay-log-recovery              = 1
26
slow-query-log                  = 1
27
server-id                       = 1
28
sync_binlog                     = 1
29
sync_relay_log                  = 1
30
binlog_cache_size               = 16M
31
expire_logs_days                = 30
32
log-slave-updates               = 1
33
enforce-gtid-consistency        = 1
34
gtid-mode                       = ON
35
safe-user-create                = 1
36
lower_case_table_names          = 1
37
explicit-defaults-for-timestamp = 1
38
myisam-recover-options          = BACKUP,FORCE
39
open_files_limit                = 32768
40
table_open_cache                = 16384
41
table_definition_cache          = 8192
42
net_retry_count                 = 16384
43
key_buffer_size                 = 256M
44
max_allowed_packet              = 64M
45
query_cache_type                = 0
46
query_cache_size                = 0
47
long_query_time                 = 0.5
48
innodb_buffer_pool_size         = 1G
49
innodb_data_home_dir            = %%MY_DBDIR%%
50
innodb_log_group_home_dir       = %%MY_DBDIR%%
51
innodb_data_file_path           = ibdata1:128M:autoextend
52
innodb_flush_method             = O_DIRECT
53
innodb_log_file_size            = 256M
54
innodb_log_buffer_size          = 16M
55
innodb_write_io_threads         = 8
56
innodb_read_io_threads          = 8
57
innodb_autoinc_lock_mode        = 2
58
skip-symbolic-links
59
60
[mysqldump]
61
max_allowed_packet              = 256M
62
quote_names
63
quick
64
(-)databases/mysql56-server/files/mysql-server.in (-4 / +20 lines)
Lines 14-23 Link Here
14
# mysql_limits (bool):	Set to "NO" by default.
14
# mysql_limits (bool):	Set to "NO" by default.
15
#			Set it to yes to run `limits -e -U mysql`
15
#			Set it to yes to run `limits -e -U mysql`
16
#			just before mysql starts.
16
#			just before mysql starts.
17
# mysql_dbdir (str):	Default to "/var/db/mysql"
17
# mysql_dbdir (str):	Default to "%%MY_DBDIR%%"
18
#			Base database directory.
18
#			Base database directory.
19
# mysql_confdir (str):	Default to "%%ETCDIR%%"
20
#			Base configuration directory.
19
# mysql_optfile (str):	Server-specific option file.
21
# mysql_optfile (str):	Server-specific option file.
20
#			Default to "${mysql_dbdir}/my.cnf".
22
#			Default to "${mysql_confdir}/my.cnf".
21
# mysql_pidfile (str):	Custum PID file path and name.
23
# mysql_pidfile (str):	Custum PID file path and name.
22
#			Default to "${mysql_dbdir}/${hostname}.pid".
24
#			Default to "${mysql_dbdir}/${hostname}.pid".
23
# mysql_args (str):	Custom additional arguments to be passed
25
# mysql_args (str):	Custom additional arguments to be passed
Lines 33-40 Link Here
33
35
34
: ${mysql_enable="NO"}
36
: ${mysql_enable="NO"}
35
: ${mysql_limits="NO"}
37
: ${mysql_limits="NO"}
36
: ${mysql_dbdir="/var/db/mysql"}
38
: ${mysql_dbdir="%%MY_DBDIR%%"}
39
: ${mysql_confdir="%%ETCDIR%%"}
40
if [ -f "${mysql_dbdir}/my.cnf" ]; then
37
: ${mysql_optfile="${mysql_dbdir}/my.cnf"}
41
: ${mysql_optfile="${mysql_dbdir}/my.cnf"}
42
else
43
: ${mysql_optfile="${mysql_confdir}/my.cnf"}
44
fi
38
45
39
mysql_user="mysql"
46
mysql_user="mysql"
40
mysql_limits_args="-e -U ${mysql_user}"
47
mysql_limits_args="-e -U ${mysql_user}"
Lines 55-61 Link Here
55
62
56
mysql_prestart()
63
mysql_prestart()
57
{
64
{
58
	if [ ! -d "${mysql_dbdir}/mysql/." ]; then
65
	if [ -f "${mysql_dbdir}/my.cnf" ]; then
66
		echo ""
67
		echo "Please keep in mind that the default location for my.cnf will be changed"
68
		echo "from \"%%MY_DBDIR%%/my.cnf\" to \"%%ETCDIR%%/my.cnf\" in the near"
69
		echo "future.  If you do not want to move your my.cnf to the new location then"
70
		echo "you must set \"mysql_optfile\" in /etc/rc.conf to \"/var/db/mysql/my.cnf\"."
71
		echo ""
72
	fi
73
74
	if [ ! -d "${mysql_dbdir}/mysql" ]; then
59
		mysql_create_auth_tables || return 1
75
		mysql_create_auth_tables || return 1
60
	fi
76
	fi
61
	if checkyesno mysql_limits; then
77
	if checkyesno mysql_limits; then
(-)databases/mysql56-server/files/patch-mysys_ssl_my_default.cc (-10 / +40 lines)
Lines 1-6 Link Here
1
--- mysys_ssl/my_default.cc.orig	2013-01-22 17:54:49.000000000 +0100
1
--- mysys_ssl/my_default.cc.orig	2016-03-28 18:06:12 UTC
2
+++ mysys_ssl/my_default.cc	2013-02-13 11:08:15.000000000 +0100
2
+++ mysys_ssl/my_default.cc
3
@@ -119,7 +119,7 @@
3
@@ -118,7 +118,7 @@
4
 
4
 
5
 /* Which directories are searched for options (and in which order) */
5
 /* Which directories are searched for options (and in which order) */
6
 
6
 
Lines 9-26 Link Here
9
 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1)  /* Terminate with NULL */
9
 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1)  /* Terminate with NULL */
10
 static const char **default_directories = NULL;
10
 static const char **default_directories = NULL;
11
 
11
 
12
@@ -1395,7 +1395,10 @@
12
@@ -894,6 +894,14 @@
13
       return 1;                                 /* Ignore wrong files */
14
   }
13
 
15
 
14
 #if defined(DEFAULT_SYSCONFDIR)
16
+  if (strstr(name, "/etc") == name)
15
   if (DEFAULT_SYSCONFDIR[0])
16
+  {
17
+  {
17
     errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
18
+    fprintf(stderr,
18
+    errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
19
+             "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n",
20
+             name,name);
21
+      goto err;
19
+  }
22
+  }
20
 #endif /* DEFAULT_SYSCONFDIR */
23
+
24
   while (mysql_file_getline(buff, sizeof(buff) - 1, fp))
25
   {
26
     line++;
27
@@ -1230,7 +1238,8 @@
28
             end[(strlen(end)-1)] = ' ';
29
           else
30
             strxmov(end, conf_file, *ext , " ",  NullS);
31
-          fputs(name, stdout);
32
+          if (strstr(name, "/etc") != name)
33
+            fputs(name, stdout);
34
         }
35
       }
36
     }
37
@@ -1389,13 +1398,8 @@
38
 
39
 #else
40
 
41
-  errors += add_directory(alloc, "/etc/", dirs);
42
-  errors += add_directory(alloc, "/etc/mysql/", dirs);
43
-
44
-#if defined(DEFAULT_SYSCONFDIR)
45
-  if (DEFAULT_SYSCONFDIR[0])
46
-    errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
47
-#endif /* DEFAULT_SYSCONFDIR */
48
+  errors += add_directory(alloc, "/usr/local/etc/", dirs);
49
+  errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
21
 
50
 
22
 #endif
51
 #endif
23
@@ -1466,7 +1469,7 @@
52
 
53
@@ -1465,7 +1469,7 @@
24
   MY_STAT stat_info;
54
   MY_STAT stat_info;
25
 
55
 
26
   if (!my_stat(file_name,&stat_info,MYF(0)))
56
   if (!my_stat(file_name,&stat_info,MYF(0)))
(-)databases/mysql56-server/pkg-message (-2 / +15 lines)
Lines 1-6 Link Here
1
************************************************************************
1
*****************************************************************************
2
2
3
Remember to run mysql_upgrade the first time you start the MySQL server
3
Remember to run mysql_upgrade the first time you start the MySQL server
4
after an upgrade from an earlier version.
4
after an upgrade from an earlier version.
5
5
6
************************************************************************
6
Initial password for first time use of MySQL is saved in $HOME/.mysql_secret
7
ie. when you want to use "mysql -u root -p" first you should see password
8
in /root/.mysql_secret
9
10
*****************************************************************************
11
12
*****************************************************************************
13
14
Please keep in mind that the default location for my.cnf will be changed
15
from "/var/db/mysql/my.cnf" to "/usr/local/etc/mysql/my.cnf" in the near
16
future.  If you do not want to move your my.cnf to the new location then
17
you must set "mysql_optfile" in /etc/rc.conf to "/var/db/mysql/my.cnf".
18
19
*****************************************************************************
(-)databases/mysql56-server/pkg-plist (+1 lines)
Lines 129-134 Link Here
129
%%DATADIR%%/spanish/errmsg.sys
129
%%DATADIR%%/spanish/errmsg.sys
130
%%DATADIR%%/swedish/errmsg.sys
130
%%DATADIR%%/swedish/errmsg.sys
131
%%DATADIR%%/ukrainian/errmsg.sys
131
%%DATADIR%%/ukrainian/errmsg.sys
132
@sample(root,wheel,0644) %%ETCDIR%%/my.cnf.sample
132
@dir(mysql,mysql,0755) %%MY_DBDIR%%
133
@dir(mysql,mysql,0755) %%MY_DBDIR%%
133
@dir(mysql,mysql,0750) %%MY_SECDIR%%
134
@dir(mysql,mysql,0750) %%MY_SECDIR%%
134
@dir(mysql,mysql,0750) %%MY_TMPDIR%%
135
@dir(mysql,mysql,0750) %%MY_TMPDIR%%

Return to bug 209338