Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
#
|
|
|
|
# Testing files that were built to be packaged, both for existence and for contents
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Bug #42969: Create MANIFEST files
|
|
|
|
#
|
|
|
|
# Use a Perl script to verify that files "docs/INFO_BIN" and "docs/INFO_SRC" do exist
|
|
|
|
# and have the expected contents.
|
|
|
|
|
|
|
|
--perl
|
|
|
|
print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
|
2011-03-11 16:00:53 +01:00
|
|
|
$dir_bin = $ENV{'MYSQL_BINDIR'};
|
|
|
|
if ($dir_bin =~ m|/usr/|) {
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
# RPM package
|
2011-03-11 16:00:53 +01:00
|
|
|
$dir_docs = $dir_bin;
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
$dir_docs =~ s|/lib|/share/doc|;
|
2011-10-10 14:03:29 +02:00
|
|
|
if(-d "$dir_docs/packages") {
|
|
|
|
# SuSE: "packages/" in the documentation path
|
|
|
|
$dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
} else {
|
|
|
|
# RedHat: version number in directory name
|
|
|
|
$dir_docs = glob "$dir_docs/MySQL-server*";
|
|
|
|
}
|
2011-03-11 16:00:53 +01:00
|
|
|
} elsif ($dir_bin =~ m|/usr$|) {
|
|
|
|
# RPM build during development
|
|
|
|
$dir_docs = "$dir_bin/share/doc";
|
2011-10-10 14:03:29 +02:00
|
|
|
if(-d "$dir_docs/packages") {
|
|
|
|
# SuSE: "packages/" in the documentation path
|
|
|
|
$dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
2011-03-11 16:00:53 +01:00
|
|
|
} else {
|
|
|
|
# RedHat: version number in directory name
|
|
|
|
$dir_docs = glob "$dir_docs/MySQL-server*";
|
|
|
|
}
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
} else {
|
|
|
|
# tar.gz package, Windows, or developer work (in BZR)
|
2011-03-11 16:00:53 +01:00
|
|
|
$dir_docs = $dir_bin;
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
$dir_docs =~ s|/lib||;
|
|
|
|
if(-d "$dir_docs/docs") {
|
|
|
|
$dir_docs = "$dir_docs/docs"; # package
|
|
|
|
} else {
|
|
|
|
$dir_docs = "$dir_docs/Docs"; # development tree
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$found_version = "No line 'MySQL source #.#.#'";
|
|
|
|
$found_revision = "No line 'revision-id: .....'";
|
2011-03-11 16:00:53 +01:00
|
|
|
open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n";
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
while(defined ($line = <I_SRC>)) {
|
|
|
|
if ($line =~ m|^MySQL source \d\.\d\.\d+|) {$found_version = "Found MySQL version number";}
|
|
|
|
if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";}
|
|
|
|
}
|
|
|
|
close I_SRC;
|
|
|
|
print "INFO_SRC: $found_version / $found_revision\n";
|
|
|
|
$found_compiler = "No line about compiler information";
|
|
|
|
$found_features = "No line 'Feature flags'";
|
2011-03-11 16:00:53 +01:00
|
|
|
open(I_BIN,"<","$dir_docs/INFO_BIN") or print "Cannot open 'INFO_BIN' in '$dir_docs' (starting from bindir '$dir_bin')\n";
|
Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".
"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.
"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.
The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.
2011-02-11 15:55:25 +01:00
|
|
|
while(defined ($line = <I_BIN>)) {
|
|
|
|
# "generator" on Windows, "flags" on Unix:
|
|
|
|
if (($line =~ m| Compiler / generator used: |) ||
|
|
|
|
($line =~ m| Compiler flags used |)) {$found_compiler = "Found 'Compiler ... used' line";}
|
|
|
|
if ($line =~ m| Feature flags used:|) {$found_features = "Found 'Feature flags' line";}
|
|
|
|
}
|
|
|
|
close I_BIN;
|
|
|
|
print "INFO_BIN: $found_compiler / $found_features\n";
|
|
|
|
EOF
|
|
|
|
|
|
|
|
--echo
|
|
|
|
--echo End of tests
|