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
e3cf843d
Commit
e3cf843d
authored
Aug 01, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 346594: Move GraphViz check into Bugzilla::Install::Requirements
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=myk
parent
e47049d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
22 deletions
+42
-22
Requirements.pm
Bugzilla/Install/Requirements.pm
+41
-0
checksetup.pl
checksetup.pl
+1
-22
No files found.
Bugzilla/Install/Requirements.pm
View file @
e3cf843d
...
...
@@ -31,6 +31,7 @@ our @EXPORT = qw(
MOD_PERL_MODULES
check_requirements
check_graphviz
have_vers
vers_cmp
install_command
...
...
@@ -347,6 +348,36 @@ sub check_requirements {
}
sub
check_graphviz
{
my
(
$output
)
=
@_
;
return
1
if
(
Bugzilla
->
params
->
{
'webdotbase'
}
=~
/^https?:/
);
printf
(
"Checking for %15s %-9s "
,
"GraphViz"
,
"(any)"
)
if
$output
;
my
$return
=
0
;
if
(
-
x
Bugzilla
->
params
->
{
'webdotbase'
})
{
print
"ok: found\n"
if
$output
;
$return
=
1
;
}
else
{
print
"not a valid executable: "
.
Bugzilla
->
params
->
{
'webdotbase'
}
.
"\n"
;
}
my
$webdotdir
=
bz_locations
()
->
{
'webdotdir'
};
# Check .htaccess allows access to generated images
if
(
-
e
"$webdotdir/.htaccess"
)
{
my
$htaccess
=
new
IO::
File
(
"$webdotdir/.htaccess"
,
'r'
)
||
die
"$webdotdir/.htaccess: "
.
$!
;
if
(
!
grep
(
/png/
,
$htaccess
->
getlines
))
{
print
"Dependency graph images are not accessible.\n"
;
print
"delete $webdotdir/.htaccess and re-run checksetup.pl to fix.\n"
;
}
$htaccess
->
close
;
}
return
$return
;
}
# This was originally clipped from the libnet Makefile.PL, adapted here to
# use the below vers_cmp routine for accurate version checking.
...
...
@@ -499,6 +530,16 @@ represent the name of the module and the version that we require.
C<optional> - Which optional modules are installed and
up-to-date enough for Bugzilla.
=item C<check_graphviz($output)>
Description: Checks if the graphviz binary specified in the
C<webdotbase> parameter is a valid binary, or a valid URL.
Params: C<$output> - C<$true> if you want the function to
print out information about what it's doing.
Returns: C<1> if the check was successful, C<0> otherwise.
=item C<vers_cmp($a, $b)>
Description: This is a comparison function, like you would use in
...
...
checksetup.pl
View file @
e3cf843d
...
...
@@ -375,7 +375,6 @@ create_htaccess() if $lc_hash->{'create_htaccess'};
# XXX Some parts of checksetup still need these, right now.
my
$datadir
=
bz_locations
()
->
{
'datadir'
};
my
$webdotdir
=
bz_locations
()
->
{
'webdotdir'
};
# Remove parameters from the params file that no longer exist in Bugzilla,
# and set the defaults for new ones
...
...
@@ -402,27 +401,7 @@ fix_all_file_permissions(!$silent);
# If we are using a local 'dot' binary, verify the specified binary exists
# and that the generated images are accessible.
#
if
(
Bugzilla
->
params
->
{
'webdotbase'
}
&&
Bugzilla
->
params
->
{
'webdotbase'
}
!~
/^https?:/
)
{
printf
(
"Checking for %15s %-9s "
,
"GraphViz"
,
"(any)"
)
unless
$silent
;
if
(
-
x
Bugzilla
->
params
->
{
'webdotbase'
})
{
print
"ok: found\n"
unless
$silent
;
}
else
{
print
"not a valid executable: "
.
Bugzilla
->
params
->
{
'webdotbase'
}
.
"\n"
;
}
# Check .htaccess allows access to generated images
if
(
-
e
"$webdotdir/.htaccess"
)
{
open
HTACCESS
,
"$webdotdir/.htaccess"
;
if
(
!
grep
(
/png/
,
<
HTACCESS
>
))
{
print
"Dependency graph images are not accessible.\n"
;
print
"delete $webdotdir/.htaccess and re-run checksetup.pl to fix.\n"
;
}
close
HTACCESS
;
}
print
"\n"
unless
$silent
;
}
check_graphviz
(
!
$silent
)
if
Bugzilla
->
params
->
{
'webdotbase'
};
###########################################################################
# Populate groups table
...
...
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