Blame SOURCES/mysql-file-contents.patch

80384c
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
80384c
breaks at least two packaging commandments, so we put them into $libdir
80384c
instead.  That means we have to hack the file_contents regression test
80384c
to know about this.
80384c
80384c
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
80384c
80384c
80384c
diff -up mysql-5.6.22/mysql-test/t/file_contents.test.file-contents mysql-5.6.22/mysql-test/t/file_contents.test
80384c
--- mysql-5.6.22/mysql-test/t/file_contents.test.file-contents	2014-12-03 15:05:18.629731527 +0100
80384c
+++ mysql-5.6.22/mysql-test/t/file_contents.test	2014-12-03 15:09:36.082081039 +0100
80384c
@@ -11,7 +11,7 @@
80384c
 --perl
80384c
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
80384c
 $dir_bin = $ENV{'MYSQL_BINDIR'};
80384c
-if ($dir_bin =~ m|/usr/|) {
80384c
+if ($dir_bin =~ m|.*/usr/$|) {
80384c
   # RPM package
80384c
   $dir_docs = $dir_bin;
80384c
   $dir_docs =~ s|/lib|/share/doc|;
80384c
@@ -30,7 +30,7 @@ if ($dir_bin =~ m|/usr/|) {
80384c
       }
80384c
     }
80384c
   }
80384c
-} elsif ($dir_bin =~ m|/usr$|) {
80384c
+} elsif ($dir_bin =~ m|.*/usr$|) {
80384c
   # RPM build during development
80384c
   $dir_docs = "$dir_bin/share/doc";
80384c
   if(-d "$dir_docs/packages") {
80384c
@@ -47,6 +47,15 @@ if ($dir_bin =~ m|/usr/|) {
80384c
         $dir_docs = glob "$dir_bin/share/mysql/docs";
80384c
       }
80384c
     }
80384c
+
80384c
+    # All the above is entirely wacko, because these files are not docs;
80384c
+    # they should be kept in libdir instead.  mtr does not provide a nice
80384c
+    # way to find libdir though, so we have to kluge it like this:
80384c
+    if (-d "$dir_bin/lib64/mysql") {
80384c
+       $dir_docs = "$dir_bin/lib64/mysql";
80384c
+    } else {
80384c
+       $dir_docs = "$dir_bin/lib/mysql";
80384c
+    }
80384c
   }
80384c
 } else {
80384c
   # tar.gz package, Windows, or developer work (in git)