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
a50aaa37
Commit
a50aaa37
authored
Dec 14, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 360710: checksetup.pl needs to blacklist some non-working external modules
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
parent
5cafe3a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
14 deletions
+34
-14
Constants.pm
Bugzilla/Constants.pm
+13
-2
DB.pm
Bugzilla/DB.pm
+4
-3
Requirements.pm
Bugzilla/Install/Requirements.pm
+17
-9
No files found.
Bugzilla/Constants.pm
View file @
a50aaa37
...
@@ -359,10 +359,21 @@ use constant INSTALLATION_MODE_NON_INTERACTIVE => 1;
...
@@ -359,10 +359,21 @@ use constant INSTALLATION_MODE_NON_INTERACTIVE => 1;
# Data about what we require for different databases.
# Data about what we require for different databases.
use
constant
DB_MODULE
=>
{
use
constant
DB_MODULE
=>
{
'mysql'
=>
{
db
=>
'Bugzilla::DB::Mysql'
,
db_version
=>
'4.1.2'
,
'mysql'
=>
{
db
=>
'Bugzilla::DB::Mysql'
,
db_version
=>
'4.1.2'
,
dbd
=>
'DBD::mysql'
,
dbd_version
=>
'2.9003'
,
dbd
=>
{
package
=>
'DBD-mysql'
,
module
=>
'DBD::mysql'
,
version
=>
'2.9003'
,
# Certain versions are broken, development versions are
# always disallowed.
blacklist
=>
[
'^3\.000[3-6]'
,
'_'
],
},
name
=>
'MySQL'
},
name
=>
'MySQL'
},
'pg'
=>
{
db
=>
'Bugzilla::DB::Pg'
,
db_version
=>
'8.00.0000'
,
'pg'
=>
{
db
=>
'Bugzilla::DB::Pg'
,
db_version
=>
'8.00.0000'
,
dbd
=>
'DBD::Pg'
,
dbd_version
=>
'1.45'
,
dbd
=>
{
package
=>
'DBD-Pg'
,
module
=>
'DBD::Pg'
,
version
=>
'1.45'
,
},
name
=>
'PostgreSQL'
},
name
=>
'PostgreSQL'
},
};
};
...
...
Bugzilla/DB.pm
View file @
a50aaa37
...
@@ -136,16 +136,17 @@ sub bz_check_requirements {
...
@@ -136,16 +136,17 @@ sub bz_check_requirements {
# Check the existence and version of the DBD that we need.
# Check the existence and version of the DBD that we need.
my
$dbd
=
$db
->
{
dbd
};
my
$dbd
=
$db
->
{
dbd
};
my
$dbd_ver
=
$db
->
{
dbd_version
};
my
$sql_server
=
$db
->
{
name
};
my
$sql_server
=
$db
->
{
name
};
my
$sql_want
=
$db
->
{
db_version
};
my
$sql_want
=
$db
->
{
db_version
};
unless
(
have_vers
(
{
module
=>
$dbd
,
version
=>
$dbd_ver
}
,
$output
))
{
unless
(
have_vers
(
$dbd
,
$output
))
{
my
$command
=
install_command
(
$dbd
);
my
$command
=
install_command
(
$dbd
);
my
$root
=
ROOT_USER
;
my
$root
=
ROOT_USER
;
my
$dbd_mod
=
$dbd
->
{
module
};
my
$dbd_ver
=
$dbd
->
{
version
};
my
$version
=
$dbd_ver
?
" $dbd_ver or higher"
:
''
;
my
$version
=
$dbd_ver
?
" $dbd_ver or higher"
:
''
;
print
<<EOT;
print
<<EOT;
For $sql_server, Bugzilla requires that perl's $
{dbd}${version}
be
For $sql_server, Bugzilla requires that perl's $
dbd_mod $dbd_ver
be
installed. To install this module, run the following command (as $root):
installed. To install this module, run the following command (as $root):
$command
$command
...
...
Bugzilla/Install/Requirements.pm
View file @
a50aaa37
...
@@ -51,6 +51,10 @@ use Bugzilla::Constants;
...
@@ -51,6 +51,10 @@ use Bugzilla::Constants;
# of the actual module we load with "require" to see if the package is
# of the actual module we load with "require" to see if the package is
# installed or not. "version" is the version we need, or 0 if we'll accept
# installed or not. "version" is the version we need, or 0 if we'll accept
# any version.
# any version.
#
# "blacklist" is an arrayref of regular expressions that describe versions that
# are 'blacklisted'--that is, even if the version is high enough, Bugzilla
# will refuse to say that it's OK to run with that version.
sub
REQUIRED_MODULES
{
sub
REQUIRED_MODULES
{
my
@modules
=
(
my
@modules
=
(
{
{
...
@@ -272,9 +276,8 @@ sub check_requirements {
...
@@ -272,9 +276,8 @@ sub check_requirements {
my
$have_one_dbd
=
0
;
my
$have_one_dbd
=
0
;
my
$db_modules
=
DB_MODULE
;
my
$db_modules
=
DB_MODULE
;
foreach
my
$db
(
keys
%
$db_modules
)
{
foreach
my
$db
(
keys
%
$db_modules
)
{
my
%
info
=
(
module
=>
$db_modules
->
{
$db
}
->
{
dbd
},
my
$dbd
=
$db_modules
->
{
$db
}
->
{
dbd
};
version
=>
$db_modules
->
{
$db
}
->
{
dbd_version
});
$have_one_dbd
=
1
if
have_vers
(
$dbd
,
$output
);
$have_one_dbd
=
1
if
have_vers
(
\%
info
,
$output
);
}
}
print
"\nThe following Perl modules are optional:\n"
if
$output
;
print
"\nThe following Perl modules are optional:\n"
if
$output
;
...
@@ -379,13 +382,10 @@ EOT
...
@@ -379,13 +382,10 @@ EOT
my
%
db_modules
=
%
{
DB_MODULE
()};
my
%
db_modules
=
%
{
DB_MODULE
()};
foreach
my
$db
(
keys
%
db_modules
)
{
foreach
my
$db
(
keys
%
db_modules
)
{
my
$command
=
install_command
(
my
$command
=
install_command
(
$db_modules
{
$db
}
->
{
dbd
});
{
module
=>
$db_modules
{
$db
}
->
{
dbd
},
package
=>
$db_modules
{
$db
}
->
{
dbd
}
});
printf
"%10s: \%s\n"
,
$db_modules
{
$db
}
->
{
name
},
$command
;
printf
"%10s: \%s\n"
,
$db_modules
{
$db
}
->
{
name
},
$command
;
print
' '
x
12
.
"Minimum version required: "
print
' '
x
12
.
"Minimum version required: "
.
$db_modules
{
$db
}
->
{
dbd
_
version
}
.
"\n"
;
.
$db_modules
{
$db
}
->
{
dbd
}
->
{
version
}
.
"\n"
;
}
}
print
"\n"
;
print
"\n"
;
}
}
...
@@ -525,7 +525,15 @@ sub have_vers {
...
@@ -525,7 +525,15 @@ sub have_vers {
}
}
my
$vok
=
(
vers_cmp
(
$vnum
,
$wanted
)
>
-
1
);
my
$vok
=
(
vers_cmp
(
$vnum
,
$wanted
)
>
-
1
);
print
(((
$vok
)
?
"ok: "
:
" "
),
"$vstr\n"
)
if
$output
;
my
$blacklisted
;
if
(
$vok
&&
$params
->
{
blacklist
})
{
$blacklisted
=
grep
(
$vnum
=~
/$_/
,
@
{
$params
->
{
blacklist
}});
$vok
=
0
if
$blacklisted
;
}
my
$ok
=
$vok
?
"ok:"
:
""
;
my
$black_string
=
$blacklisted
?
"(blacklisted)"
:
""
;
print
"$ok $vstr $black_string\n"
if
$output
;
return
$vok
?
1
:
0
;
return
$vok
?
1
:
0
;
}
}
...
...
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