ganapathi / rpms / mariadb

Forked from rpms/mariadb 3 years ago
Clone

Blame SOURCES/mariadb-file-contents.patch

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