jjanco / rpms / mariadb

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