From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-962518-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 8DDF2139694
	for <garchives@archives.gentoo.org>; Wed, 19 Jul 2017 13:36:00 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C5E33E0B7D;
	Wed, 19 Jul 2017 13:35:59 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 900D5E0B7D
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jul 2017 13:35:59 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id DA8293418FD
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jul 2017 13:35:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A9FB746A
	for <gentoo-commits@lists.gentoo.org>; Wed, 19 Jul 2017 13:35:56 +0000 (UTC)
From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" <grknight@gentoo.org>
Message-ID: <1500471343.7e790fc6dc1d92178aaf2299a370ab0d7d2d8b1c.grknight@gentoo>
Subject: [gentoo-commits] proj/mysql-extras:master commit in: /
X-VCS-Repository: proj/mysql-extras
X-VCS-Files: 20008_all_mysql-tzinfo-symlink-5.6.37.patch
X-VCS-Directories: /
X-VCS-Committer: grknight
X-VCS-Committer-Name: Brian Evans
X-VCS-Revision: 7e790fc6dc1d92178aaf2299a370ab0d7d2d8b1c
X-VCS-Branch: master
Date: Wed, 19 Jul 2017 13:35:56 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 81b7387f-834a-40e2-8b46-9955f5e6c9d4
X-Archives-Hash: ccc5e28678970eb25eaa5540b27eb656

commit:     7e790fc6dc1d92178aaf2299a370ab0d7d2d8b1c
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 13:35:43 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 13:35:43 2017 +0000
URL:        https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=7e790fc6

Respin tzinfo patch for 5.6.37

 20008_all_mysql-tzinfo-symlink-5.6.37.patch | 103 ++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/20008_all_mysql-tzinfo-symlink-5.6.37.patch b/20008_all_mysql-tzinfo-symlink-5.6.37.patch
new file mode 100644
index 0000000..1c6ed0f
--- /dev/null
+++ b/20008_all_mysql-tzinfo-symlink-5.6.37.patch
@@ -0,0 +1,103 @@
+=== modified file 'sql/tztime.cc'
+--- a/sql/tztime.cc	2013-05-07 11:05:09 +0000
++++ b/sql/tztime.cc	2013-11-13 15:16:35 +0000
+@@ -2494,7 +2494,7 @@
+ 
+ */
+ my_bool
+-scan_tz_dir(char * name_end)
++scan_tz_dir(char * name_end, uint symlink_recursion_level)
+ {
+   MY_DIR *cur_dir;
+   char *name_end_tmp;
+@@ -2514,7 +2514,32 @@
+ 
+       if (MY_S_ISDIR(cur_dir->dir_entry[i].mystat->st_mode))
+       {
+-        if (scan_tz_dir(name_end_tmp))
++        my_bool is_symlink;
++        if ((is_symlink= my_is_symlink(fullname, NULL)) &&
++            symlink_recursion_level > 0)
++        {
++          /*
++            The timezone definition data in some Linux distributions
++             (e.g. the "timezone-data-2013f" package in Gentoo)
++            may have synlimks like:
++              /usr/share/zoneinfo/posix/ -> /usr/share/zoneinfo/,
++            so the same timezone files are available under two names
++            (e.g. "CET" and "posix/CET").
++
++            We allow one level of symlink recursion for backward
++            compatibility with earlier timezone data packages that have
++            duplicate copies of the same timezone files inside the root
++            directory and the "posix" subdirectory (instead of symlinking).
++            This makes "posix/CET" still available, but helps to avoid
++            following such symlinks infinitely:
++              /usr/share/zoneinfo/posix/posix/posix/.../posix/
++          */
++          fflush(stdout);
++          fprintf(stderr, "Warning: Skipping directory '%s': "
++                          "to avoid infinite symlink recursion.\n", fullname);
++          continue;
++        }
++        if (scan_tz_dir(name_end_tmp, symlink_recursion_level + is_symlink))
+         {
+           my_dirend(cur_dir);
+           return 1;
+@@ -2526,14 +2551,20 @@
+         if (!tz_load(fullname, &tz_info, &tz_storage))
+           print_tz_as_sql(root_name_end + 1, &tz_info);
+         else
++        {
++          fflush(stdout);
+           fprintf(stderr,
+                   "Warning: Unable to load '%s' as time zone. Skipping it.\n",
+                   fullname);
++        }
+         free_root(&tz_storage, MYF(0));
+       }
+       else
++      {
++        fflush(stdout);
+         fprintf(stderr, "Warning: '%s' is not regular file or directory\n",
+                 fullname);
++      }
+     }
+   }
+ 
+@@ -2566,8 +2597,9 @@
+     printf("TRUNCATE TABLE time_zone_transition;\n");
+     printf("TRUNCATE TABLE time_zone_transition_type;\n");
+ 
+-    if (scan_tz_dir(root_name_end))
++    if (scan_tz_dir(root_name_end, 0))
+     {
++      fflush(stdout);
+       fprintf(stderr, "There were fatal errors during processing "
+                       "of zoneinfo directory\n");
+       return 1;
+@@ -2586,6 +2618,7 @@
+     {
+       if (tz_load(argv[2], &tz_info, &tz_storage))
+       {
++        fflush(stdout);
+         fprintf(stderr, "Problems with zoneinfo file '%s'\n", argv[2]);
+         return 1;
+       }
+@@ -2595,6 +2628,7 @@
+     {
+       if (tz_load(argv[1], &tz_info, &tz_storage))
+       {
++        fflush(stdout);
+         fprintf(stderr, "Problems with zoneinfo file '%s'\n", argv[2]);
+         return 1;
+       }
+@@ -2604,6 +2638,7 @@
+     free_root(&tz_storage, MYF(0));
+   }
+ 
++  my_end(0);
+   return 0;
+ }
+ 
+