Blame SOURCES/mariadb-file-contents.patch

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