mysql8.4/mysql-file-contents.patch

46 lines
1.5 KiB
Diff
Raw Normal View History

Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which
breaks at least two packaging commandments, so we put them into $libdir
instead. That means we have to hack the file_contents regression test
to know about this.
Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425
2018-04-25 08:13:27 +00:00
diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test
index 75f8c93..973291c 100644
--- a/mysql-test/t/file_contents.test
+++ b/mysql-test/t/file_contents.test
@@ -12,7 +12,7 @@
--perl
print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
$dir_bin = $ENV{'MYSQL_BINDIR'};
2018-04-25 08:13:27 +00:00
-if ($dir_bin =~ m|^/usr/|) {
+if ($dir_bin =~ m|.*/usr/$|) {
# RPM package
$dir_docs = $dir_bin;
$dir_docs =~ s|/lib|/share/doc|;
2018-04-25 08:13:27 +00:00
@@ -35,7 +35,7 @@ if ($dir_bin =~ m|^/usr/|) {
2014-12-03 14:01:06 +00:00
}
}
}
-} elsif ($dir_bin =~ m|/usr$|) {
+} elsif ($dir_bin =~ m|.*/usr$|) {
# RPM build during development
$dir_docs = "$dir_bin/share/doc";
if(-d "$dir_docs/packages") {
2018-04-25 08:13:27 +00:00
@@ -55,6 +55,15 @@ if ($dir_bin =~ m|^/usr/|) {
$dir_docs = glob "$dir_bin/share/mysql-*/docs";
2014-12-03 14:01:06 +00:00
}
2013-12-10 12:28:18 +00:00
}
+
2012-02-28 02:44:12 +00:00
+ # All the above is entirely wacko, because these files are not docs;
+ # they should be kept in libdir instead. mtr does not provide a nice
+ # way to find libdir though, so we have to kluge it like this:
+ if (-d "$dir_bin/lib64/mysql") {
+ $dir_docs = "$dir_bin/lib64/mysql";
2012-02-28 02:44:12 +00:00
+ } else {
+ $dir_docs = "$dir_bin/lib/mysql";
2012-02-28 02:44:12 +00:00
+ }
}
} else {
# tar.gz package, Windows, or developer work (in git)