Blame SOURCES/mysql-file-contents.patch

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