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
5c6c34a0
Commit
5c6c34a0
authored
Jul 20, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 344617: Move data about optional requirements into Bugzilla::Install::Requirements
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, r=wicked, a=justdave
parent
f60ac86c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
33 deletions
+66
-33
Requirements.pm
Bugzilla/Install/Requirements.pm
+40
-0
checksetup.pl
checksetup.pl
+26
-33
No files found.
Bugzilla/Install/Requirements.pm
View file @
5c6c34a0
...
@@ -27,6 +27,7 @@ use strict;
...
@@ -27,6 +27,7 @@ use strict;
use
base
qw(Exporter)
;
use
base
qw(Exporter)
;
our
@EXPORT
=
qw(
our
@EXPORT
=
qw(
REQUIRED_MODULES
REQUIRED_MODULES
OPTIONAL_MODULES
vers_cmp
vers_cmp
have_vers
have_vers
...
@@ -90,6 +91,45 @@ use constant REQUIRED_MODULES => [
...
@@ -90,6 +91,45 @@ use constant REQUIRED_MODULES => [
},
},
];
];
use
constant
OPTIONAL_MODULES
=>
[
{
name
=>
'GD'
,
version
=>
'1.20'
},
{
name
=>
'Chart::Base'
,
version
=>
'1.0'
},
{
name
=>
'GD::Graph'
,
version
=>
0
},
{
name
=>
'GD::Text::Align'
,
version
=>
0
},
{
name
=>
'XML::Twig'
,
version
=>
0
},
{
name
=>
'LWP::UserAgent'
,
version
=>
0
},
{
name
=>
'PatchReader'
,
version
=>
'0.9.4'
},
{
name
=>
'Image::Magick'
,
version
=>
0
},
{
name
=>
'Net::LDAP'
,
version
=>
0
},
];
# Remember that you only have to add modules to this hash if their
# Remember that you only have to add modules to this hash if their
# names are significantly different on ActiveState than on normal perl.
# names are significantly different on ActiveState than on normal perl.
# If it's just a difference between "::" and "-" in the name, don't worry
# If it's just a difference between "::" and "-" in the name, don't worry
...
...
checksetup.pl
View file @
5c6c34a0
...
@@ -242,14 +242,12 @@ foreach my $db (keys %$db_modules) {
...
@@ -242,14 +242,12 @@ foreach my $db (keys %$db_modules) {
}
}
print
"\nThe following Perl modules are optional:\n"
unless
$silent
;
print
"\nThe following Perl modules are optional:\n"
unless
$silent
;
my
$gd
=
have_vers
(
"GD"
,
"1.20"
,
$silent
);
my
$opt_modules
=
OPTIONAL_MODULES
;
my
$chartbase
=
have_vers
(
"Chart::Base"
,
"1.0"
,
$silent
);
my
%
have_mod
;
my
$xmlparser
=
have_vers
(
"XML::Twig"
,
0
,
$silent
);
foreach
my
$module
(
@$opt_modules
)
{
my
$lwp_ua
=
have_vers
(
"LWP::UserAgent"
,
0
,
$silent
);
$have_mod
{
$module
->
{
name
}}
=
my
$gdgraph
=
have_vers
(
"GD::Graph"
,
0
,
$silent
);
have_vers
(
$module
->
{
name
},
$module
->
{
version
},
$silent
);
my
$gdtextalign
=
have_vers
(
"GD::Text::Align"
,
0
,
$silent
);
}
my
$patchreader
=
have_vers
(
"PatchReader"
,
"0.9.4"
,
$silent
);
my
$imagemagick
=
have_vers
(
"Image::Magick"
,
0
,
$silent
);
print
"\n"
unless
$silent
;
print
"\n"
unless
$silent
;
...
@@ -260,27 +258,28 @@ if ($^O =~ /MSWin32/i && !$silent) {
...
@@ -260,27 +258,28 @@ if ($^O =~ /MSWin32/i && !$silent) {
print
" ppm rep add bugzilla http://landfill.bugzilla.org/ppm/\n\n"
;
print
" ppm rep add bugzilla http://landfill.bugzilla.org/ppm/\n\n"
;
}
}
if
((
!
$
gd
||
!
$chartbase
)
&&
!
$silent
)
{
if
((
!
$
have_mod
{
'GD'
}
||
!
$have_mod
{
'Chart::Base'
}
)
&&
!
$silent
)
{
print
"If you you want to see graphical bug charts (plotting historical "
;
print
"If you you want to see graphical bug charts (plotting historical "
;
print
"data over \ntime), you should install libgd and the following Perl "
;
print
"data over \ntime), you should install libgd and the following Perl "
;
print
"modules:\n\n"
;
print
"modules:\n\n"
;
print
"GD: "
.
install_command
(
"GD"
)
.
"\n"
if
!
$gd
;
print
"GD: "
.
install_command
(
"GD"
)
.
"\n"
if
!
$have_mod
{
'GD'
};
print
"Chart: "
.
install_command
(
"Chart::Base"
)
.
"\n"
if
!
$chartbase
;
print
"Chart: "
.
install_command
(
"Chart::Base"
)
.
"\n"
if
!
$have_mod
{
'Chart::Base'
};
print
"\n"
;
print
"\n"
;
}
}
if
(
!
$
xmlparser
&&
!
$silent
)
{
if
(
!
$
have_mod
{
'XML::Twig'
}
&&
!
$silent
)
{
print
"If you want to use the bug import/export feature to move bugs to\n"
,
print
"If you want to use the bug import/export feature to move bugs to\n"
,
"or from other bugzilla installations, you will need to install\n"
,
"or from other bugzilla installations, you will need to install\n"
,
"the XML::Twig module by running (as $::root):\n\n"
,
"the XML::Twig module by running (as $::root):\n\n"
,
" "
.
install_command
(
"XML::Twig"
)
.
"\n\n"
;
" "
.
install_command
(
"XML::Twig"
)
.
"\n\n"
;
}
}
if
(
!
$
lwp_ua
&&
!
$silent
)
{
if
(
!
$
have_mod
{
'LWP::UserAgent'
}
&&
!
$silent
)
{
print
"If you want to use the automatic update notification feature\n"
,
print
"If you want to use the automatic update notification feature\n"
,
"you will need to install the LWP::UserAgent module by running\n"
,
"you will need to install the LWP::UserAgent module by running\n"
,
"(as $::root):\n\n"
,
"(as $::root):\n\n"
,
" "
.
install_command
(
"LWP::UserAgent"
)
.
"\n\n"
;
" "
.
install_command
(
"LWP::UserAgent"
)
.
"\n\n"
;
}
}
if
(
!
$
imagemagick
&&
!
$silent
)
{
if
(
!
$
have_mod
{
'Image::Magick'
}
&&
!
$silent
)
{
print
"If you want to convert BMP image attachments to PNG to conserve\n"
,
print
"If you want to convert BMP image attachments to PNG to conserve\n"
,
"disk space, you will need to install the ImageMagick application\n"
,
"disk space, you will need to install the ImageMagick application\n"
,
"Available from http://www.imagemagick.org, and the Image::Magick\n"
,
"Available from http://www.imagemagick.org, and the Image::Magick\n"
,
...
@@ -288,22 +287,29 @@ if (!$imagemagick && !$silent) {
...
@@ -288,22 +287,29 @@ if (!$imagemagick && !$silent) {
" "
.
install_command
(
"Image::Magick"
)
.
"\n\n"
;
" "
.
install_command
(
"Image::Magick"
)
.
"\n\n"
;
}
}
if
((
!
$gd
||
!
$gdgraph
||
!
$gdtextalign
)
&&
!
$silent
)
{
if
(
(
!
$have_mod
{
'GD'
}
||
!
$have_mod
{
'GD::Graph'
}
print
"If you you want to see graphical bug reports (bar, pie and line "
;
||
!
$have_mod
{
'GD::Text::Align'
})
&&
!
$silent
)
{
print
"If you want to see graphical bug reports (bar, pie and line "
;
print
"charts of \ncurrent data), you should install libgd and the "
;
print
"charts of \ncurrent data), you should install libgd and the "
;
print
"following Perl modules:\n\n"
;
print
"following Perl modules:\n\n"
;
print
"GD: "
.
install_command
(
"GD"
)
.
"\n"
if
!
$
gd
;
print
"GD: "
.
install_command
(
"GD"
)
.
"\n"
if
!
$
have_mod
{
'GD'
}
;
print
"GD::Graph: "
.
install_command
(
"GD::Graph"
)
.
"\n"
print
"GD::Graph: "
.
install_command
(
"GD::Graph"
)
.
"\n"
if
!
$
gdgraph
;
if
!
$
have_mod
{
'GD::Graph'
}
;
print
"GD::Text::Align: "
.
install_command
(
"GD::Text::Align"
)
.
"\n"
print
"GD::Text::Align: "
.
install_command
(
"GD::Text::Align"
)
.
"\n"
if
!
$
gdtextalign
;
if
!
$
have_mod
{
'GD::Text::Align'
}
;
print
"\n"
;
print
"\n"
;
}
}
if
(
!
$
patchreader
&&
!
$silent
)
{
if
(
!
$
have_mod
{
'PatchReader'
}
&&
!
$silent
)
{
print
"If you want to see pretty HTML views of patches, you should "
;
print
"If you want to see pretty HTML views of patches, you should "
;
print
"install the \nPatchReader module:\n"
;
print
"install the \nPatchReader module:\n"
;
print
"PatchReader: "
.
install_command
(
"PatchReader"
)
.
"\n"
;
print
"PatchReader: "
.
install_command
(
"PatchReader"
)
.
"\n"
;
}
}
if
(
!
$have_mod
{
'Net::LDAP'
}
&&
!
$silent
)
{
print
"If you wish to use LDAP authentication, then you must"
,
" install Net::LDAP:\n"
,
"Net::LDAP: "
.
install_command
(
'Net::LDAP'
)
.
"\n"
;
}
if
(
!
$have_one_dbd
)
{
if
(
!
$have_one_dbd
)
{
print
"\n\n"
;
print
"\n\n"
;
...
@@ -1514,19 +1520,6 @@ require Bugzilla::Bug;
...
@@ -1514,19 +1520,6 @@ require Bugzilla::Bug;
import
Bugzilla::
Bug
qw(is_open_state)
;
import
Bugzilla::
Bug
qw(is_open_state)
;
###########################################################################
###########################################################################
# Check for LDAP
###########################################################################
for
my
$verifymethod
(
split
/,\s*/
,
Bugzilla
->
params
->
{
'user_verify_class'
})
{
if
(
$verifymethod
eq
'LDAP'
)
{
my
$netLDAP
=
have_vers
(
"Net::LDAP"
,
0
,
$silent
);
if
(
!
$netLDAP
&&
!
$silent
)
{
print
"If you wish to use LDAP authentication, then you must install Net::LDAP\n\n"
;
}
}
}
###########################################################################
# Check GraphViz setup
# Check GraphViz setup
###########################################################################
###########################################################################
...
...
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