Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4854aec9
Unverified
Commit
4854aec9
authored
Apr 28, 2024
by
Dave Miller
Committed by
GitHub
Apr 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1851354: blocklist MySQL 8+, offer MariaDB (#143)
parent
c2902b75
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
12 deletions
+37
-12
Constants.pm
Bugzilla/Constants.pm
+10
-1
DB.pm
Bugzilla/DB.pm
+17
-1
Requirements.pm
Bugzilla/Install/Requirements.pm
+4
-4
essential-post-install-config.rst
docs/en/rst/installing/essential-post-install-config.rst
+1
-1
004template.t
t/004template.t
+2
-2
config.js.tmpl
template/en/default/config.js.tmpl
+2
-2
strings.txt.pl
template/en/default/setup/strings.txt.pl
+1
-1
No files found.
Bugzilla/Constants.pm
View file @
4854aec9
...
...
@@ -540,7 +540,16 @@ use constant INSTALLATION_MODE_NON_INTERACTIVE => 1;
use
constant
DB_MODULE
=>
{
# MySQL 5.0.15 was the first production 5.0.x release.
mysql
=>
{
db
=>
'Bugzilla::DB::Mysql'
,
db_version
=>
'5.0.15'
,
name
=>
'MySQL'
},
# We blocklist MySQL 8.0 and newer, and explicitly list MariaDB as an
# alternative. The db_blklst_str is shown in the auto-generated release notes
# instead of the regexp. We can't tell Maria apart from MySQL in our check
# and MariaDB skipped versions from 5 to 10, so we'll blocklist 8 and 9 for
# MariaDB as well just in case someone configured for 'mariadb' but actually
# has MySQL installed. See https://bugzilla.mozilla.org/show_bug.cgi?id=1851354
mysql
=>
{
db
=>
'Bugzilla::DB::Mysql'
,
db_version
=>
'5.0.15'
,
name
=>
'MySQL'
,
db_blocklist
=>
[
'^[89]\.'
],
db_blklst_str
=>
'>= 8.0'
},
mariadb
=>
{
db
=>
'Bugzilla::DB::Mysql'
,
db_version
=>
'5.1'
,
name
=>
'MariaDB'
,
db_blocklist
=>
[
'^[89]\.'
]},
pg
=>
{
db
=>
'Bugzilla::DB::Pg'
,
db_version
=>
'9.00.0000'
,
name
=>
'PostgreSQL'
},
oracle
=>
...
...
Bugzilla/DB.pm
View file @
4854aec9
...
...
@@ -187,7 +187,13 @@ sub bz_check_server_version {
$self
->
disconnect
;
my
$sql_want
=
$db
->
{
db_version
};
my
$sql_dontwant
=
exists
$db
->
{
db_blocklist
}
?
$db
->
{
db_blocklist
}
:
[]
;
my
$version_ok
=
vers_cmp
(
$sql_vers
,
$sql_want
)
>
-
1
?
1
:
0
;
my
$blocklisted
;
if
(
$version_ok
)
{
$blocklisted
=
grep
(
$sql_vers
=~
/$_/
,
@$sql_dontwant
);
$version_ok
=
0
if
$blocklisted
;
}
my
$sql_server
=
$db
->
{
name
};
if
(
$output
)
{
...
...
@@ -195,12 +201,22 @@ sub bz_check_server_version {
package
=>
$sql_server
,
wanted
=>
$sql_want
,
found
=>
$sql_vers
,
ok
=>
$version_ok
ok
=>
$version_ok
,
blocklisted
=>
$blocklisted
});
}
# Check what version of the database server is installed and let
# the user know if the version is too old to be used with Bugzilla.
if
(
$blocklisted
)
{
die
<<EOT;
Your $sql_server v$sql_vers is blocklisted. Please check the
release notes for details or try a different database engine
or version.
EOT
}
if
(
!
$version_ok
)
{
die
<<EOT;
...
...
Bugzilla/Install/Requirements.pm
View file @
4854aec9
...
...
@@ -296,8 +296,8 @@ sub check_font_file {
sub
_checking_for
{
my
(
$params
)
=
@_
;
my
(
$package
,
$ok
,
$wanted
,
$bl
a
cklisted
,
$found
)
=
@$params
{
qw(package ok wanted bl
a
cklisted found)
};
my
(
$package
,
$ok
,
$wanted
,
$bl
o
cklisted
,
$found
)
=
@$params
{
qw(package ok wanted bl
o
cklisted found)
};
my
$ok_string
=
$ok
?
install_string
(
'module_ok'
)
:
''
;
...
...
@@ -325,10 +325,10 @@ sub _checking_for {
$ok_string
=
install_string
(
'module_not_found'
);
}
my
$bl
ack_string
=
$blacklisted
?
install_string
(
'bla
cklisted'
)
:
''
;
my
$bl
ock_string
=
$blocklisted
?
install_string
(
'blo
cklisted'
)
:
''
;
my
$want_string
=
$wanted
?
"$wanted"
:
install_string
(
'any'
);
my
$str
=
sprintf
"%s %20s %-11s $ok_string $bl
a
ck_string\n"
,
my
$str
=
sprintf
"%s %20s %-11s $ok_string $bl
o
ck_string\n"
,
(
' '
x
$checking_for_indent
)
.
install_string
(
'checking_for'
),
$package
,
"($want_string)"
;
print
$ok
?
$str
:
colored
(
$str
,
COLOR_ERROR
);
...
...
docs/en/rst/installing/essential-post-install-config.rst
View file @
4854aec9
...
...
@@ -90,7 +90,7 @@ This section corresponds to choosing a :param:`mail_delivery_method` of
:paramval:`Sendmail`.
Unless you know what you are doing, and can deal with the possible problems
of spam, bounces and bl
a
cklists, it is probably unwise to set up your own
of spam, bounces and bl
o
cklists, it is probably unwise to set up your own
mail server just for Bugzilla. However, if you wish to do so, some guidance
follows.
...
...
t/004template.t
View file @
4854aec9
...
...
@@ -123,10 +123,10 @@ foreach my $include_path (@include_paths) {
# Forbid single quotes to delimit URLs, see bug 926085.
if ($data =~ /href=\\?'/) {
ok(0, "$path contains bl
a
cklisted constructs: href='...'");
ok(0, "$path contains bl
o
cklisted constructs: href='...'");
}
else {
ok(1, "$path contains no bl
a
cklisted constructs");
ok(1, "$path contains no bl
o
cklisted constructs");
}
# Forbid cgi.param(). cgi_param() must be used instead.
...
...
template/en/default/config.js.tmpl
View file @
4854aec9
...
...
@@ -64,7 +64,7 @@ var [% cf.name FILTER js %] = [ [% FOREACH x = cf.legal_values %]'[% x.name FILT
// =======================
//
// It is not necessary to list all products and components here.
// Instead, you can define a "bl
a
cklist" for some commonly used words
// Instead, you can define a "bl
o
cklist" for some commonly used words
// or word fragments that occur in a product or component name
// but should _not_ trigger product/component search.
...
...
@@ -84,7 +84,7 @@ var target_milestone = new Object();
// Product and Component Exceptions
// ================================
//
// A bl
acklist for some commonly used words or word fragments
// A bl
ocklist for some commonly used words or word fragments
// that occur in a product or component name but should *not*
// trigger product/component search in QuickSearch.
...
...
template/en/default/setup/strings.txt.pl
View file @
4854aec9
...
...
@@ -32,7 +32,7 @@ END
The
file
##file## must point to a TrueType or OpenType font file
(
its
extension
must
be
.
ttf
or
.
otf
)
.
END
bl
acklisted
=>
'(bla
cklisted)'
,
bl
ocklisted
=>
'(blo
cklisted)'
,
bz_schema_exists_before_220
=>
<<
'END'
,
You
are
upgrading
from
a
version
before
2.20
,
but
the
bz_schema
table
already
exists
.
This
means
that
you
restored
a
mysqldump
into
the
Bugzilla
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment