Blame SOURCES/mariadb-file-contents.patch

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