Blame SOURCES/mariadb-file-contents.patch

4b4994
Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
4b4994
breaks at least two packaging commandments, so we put them into $libdir
4b4994
instead.  That means we have to hack the file_contents regression test
4b4994
to know about this.
4b4994
4b4994
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
4b4994
4b4994
4b4994
diff -up mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents mariadb-10.0.12/mysql-test/t/file_contents.test.
4b4994
diff -up mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents mariadb-10.0.12/mysql-test/t/file_contents.test
4b4994
--- mariadb-10.0.12/mysql-test/t/file_contents.test.file_contents	2014-06-12 11:26:03.000000000 +0200
4b4994
+++ mariadb-10.0.12/mysql-test/t/file_contents.test	2014-07-24 23:53:49.833176793 +0200
4b4994
@@ -11,7 +11,7 @@
4b4994
 --perl
4b4994
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
4b4994
 $dir_bin = $ENV{'MYSQL_BINDIR'};
4b4994
-if ($dir_bin eq '/usr/') {
4b4994
+if ($dir_bin =~ '.*/usr/$') {
4b4994
   # RPM package
4b4994
   $dir_docs = $dir_bin;
4b4994
   $dir_docs =~ s|/lib|/share/doc|;
4b4994
@@ -22,7 +22,7 @@ if ($dir_bin eq '/usr/') {
4b4994
     # RedHat: version number in directory name
4b4994
     $dir_docs = glob "$dir_docs/MariaDB-server*";
4b4994
   }
4b4994
-} elsif ($dir_bin eq '/usr') {
4b4994
+} elsif ($dir_bin =~ '.*/usr$') {
4b4994
   # RPM build during development
4b4994
   $dir_docs = "$dir_bin/share/doc";
4b4994
   if(-d "$dir_docs/packages") {
4b4994
@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') {
4b4994
     # RedHat/Debian: version number in directory name
4b4994
     $dir_docs = glob "$dir_docs/mariadb-server-*";
4b4994
     $dir_docs = glob "$dir_docs/MariaDB-server*" unless -d $dir_docs;
4b4994
+
4b4994
+    # All the above is entirely wacko, because these files are not docs;
4b4994
+    # they should be kept in libdir instead.  mtr does not provide a nice
4b4994
+    # way to find libdir though, so we have to kluge it like this:
4b4994
+    if (-d "$dir_bin/lib64/mysql") {
4b4994
+       $dir_docs = "$dir_bin/lib64/mysql";
4b4994
+    } else {
4b4994
+       $dir_docs = "$dir_bin/lib/mysql";
4b4994
+    }
4b4994
   }
4b4994
   # Slackware
4b4994
   $dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs;