aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bugzilla/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bugzilla/manifests/init.pp')
-rwxr-xr-x[-rw-r--r--]modules/bugzilla/manifests/init.pp179
1 files changed, 155 insertions, 24 deletions
diff --git a/modules/bugzilla/manifests/init.pp b/modules/bugzilla/manifests/init.pp
index 2acb1d95..e66ddf0e 100644..100755
--- a/modules/bugzilla/manifests/init.pp
+++ b/modules/bugzilla/manifests/init.pp
@@ -1,71 +1,202 @@
class bugzilla {
- $bugzilla_location = '/usr/share/bugzilla/template/en/custom'
+ $bugzilla_location = '/usr/share/bugzilla'
- package {['bugzilla',
- 'bugzilla-extension-sitemap',
- 'graphviz',
+ package {['graphviz',
'perl-Template-GD', # needed for graphical_report support
'perl-Test-Taint',
- 'perl-JSON-RPC']: }
+ 'perl-JSON-RPC',
+ 'perl-JSON-XS',
+ 'perl-Email-MIME',
+ 'perl-Email-Sender',
+ 'perl-Math-Random-ISAAC',
+ 'perl-Chart',
+ 'perl-PatchReader',
+ 'perl-ldap',
+ 'perl-SOAP-Lite',
+ 'perl-XMLRPC-Lite',
+ 'perl-CGI',
+ 'perl-HTML-Scrubber',
+ 'perl-Encode-Detect',
+ 'perl-File-MimeInfo',
+ 'perl-Email-Reply',
+ 'perl-HTML-FormatText-WithLinks',
+ 'perl-Cache-Memcached',
+ 'perl-File-Copy-Recursive',
+ 'perl-Daemon-Generic']: }
$pgsql_password = extlookup('bugzilla_pgsql','x')
$ldap_password = extlookup('bugzilla_ldap','x')
+ $bugzilla_secret_key = extlookup('bugzilla_secret_key','x')
postgresql::remote_db_and_user { 'bugs':
description => 'Bugzilla database',
password => $pgsql_password,
}
- file { '/etc/bugzilla/localconfig':
+ file { "$bugzilla_location/localconfig":
group => 'apache',
mode => '0640',
- content => template('bugzilla/localconfig'),
- require => Package['bugzilla'],
+ content => template('bugzilla/localconfig')
}
- file { '/var/lib/bugzilla/params':
+ file { "$bugzilla_location/data/params.json":
group => 'apache',
mode => '0640',
- content => template('bugzilla/params'),
- require => Package['bugzilla'],
+ content => template('bugzilla/params.json')
+ }
+ file { "$bugzilla_location/graphs":
+ ensure => directory,
+ owner => 'apache',
+ group => 'apache',
+ mode => '0770'
}
apache::webapp_other { 'bugzilla':
webapp_file => 'bugzilla/webapp_bugzilla.conf',
}
- $bugs_vhost = "bugs.$::domain"
- $vhost_root = '/usr/share/bugzilla/www'
+ $bugs_vhost = "bugs.${::domain}"
+ $vhost_root = $bugzilla_location
apache::vhost::redirect_ssl { $bugs_vhost: }
apache::vhost::base { $bugs_vhost:
+ content => template('bugzilla/vhost.conf'),
aliases => { '/bugzilla/' => $vhost_root },
use_ssl => true,
location => $vhost_root,
vhost => $bugs_vhost,
+ enable_location => false,
}
- subversion::snapshot { $bugzilla_location:
- source => 'svn://svn.mageia.org/svn/web/templates/bugzilla/trunk',
- require => Package['bugzilla'],
+ git::snapshot { $bugzilla_location:
+ source => "git://git.${::domain}/web/bugs"
}
- file { 'custom':
+ file { 'Mageia':
ensure => directory,
- path => '/usr/share/bugzilla/template/en/custom',
+ path => $bugzilla_location,
group => 'apache',
- mode => '0640',
recurse => true,
- require => Subversion::Snapshot[$bugzilla_location],
+ require => Git::Snapshot[$bugzilla_location],
}
- file { '/usr/share/bugzilla/www/robots.txt':
+ file { ["$bugzilla_location/data",
+ "$bugzilla_location/data/mining"]:
+ ensure => directory,
+ owner => 'apache',
+ group => 'apache',
+ mode => '0770'
+ }
+
+ file { "$bugzilla_location/data/assets":
+ ensure => directory,
+ owner => 'apache',
+ group => 'apache',
+ mode => '0770'
+ }
+
+ file { "$bugzilla_location/robots.txt":
group => 'apache',
- mode => '0640',
- content => template('bugzilla/robots.txt'),
- require => Package['bugzilla-extension-sitemap'],
+ mode => '0640'
+ }
+
+ file { "$bugzilla_location/data/bugzilla-update.xml":
+ owner => 'apache',
+ group => 'apache',
+ mode => '0640'
}
+
+ file { [
+ "$bugzilla_location/admin.cgi",
+ "$bugzilla_location/attachment.cgi",
+ "$bugzilla_location/buglist.cgi",
+ "$bugzilla_location/chart.cgi",
+ "$bugzilla_location/colchange.cgi",
+ "$bugzilla_location/config.cgi",
+ "$bugzilla_location/createaccount.cgi",
+ "$bugzilla_location/describecomponents.cgi",
+ "$bugzilla_location/describekeywords.cgi",
+ "$bugzilla_location/duplicates.cgi",
+ "$bugzilla_location/editclassifications.cgi",
+ "$bugzilla_location/editfields.cgi",
+ "$bugzilla_location/editgroups.cgi",
+ "$bugzilla_location/editmilestones.cgi",
+ "$bugzilla_location/editproducts.cgi",
+ "$bugzilla_location/editusers.cgi",
+ "$bugzilla_location/editversions.cgi",
+ "$bugzilla_location/editworkflow.cgi",
+ "$bugzilla_location/editcomponents.cgi",
+ "$bugzilla_location/editflagtypes.cgi",
+ "$bugzilla_location/editkeywords.cgi",
+ "$bugzilla_location/editparams.cgi",
+ "$bugzilla_location/editsettings.cgi",
+ "$bugzilla_location/editvalues.cgi",
+ "$bugzilla_location/editwhines.cgi",
+ "$bugzilla_location/enter_bug.cgi",
+ "$bugzilla_location/index.cgi",
+ "$bugzilla_location/jsonrpc.cgi",
+ "$bugzilla_location/page.cgi",
+ "$bugzilla_location/post_bug.cgi",
+ "$bugzilla_location/process_bug.cgi",
+ "$bugzilla_location/query.cgi",
+ "$bugzilla_location/quips.cgi",
+ "$bugzilla_location/relogin.cgi",
+ "$bugzilla_location/reports.cgi",
+ "$bugzilla_location/rest.cgi",
+ "$bugzilla_location/search_plugin.cgi",
+ "$bugzilla_location/show_bug.cgi",
+ "$bugzilla_location/showdependencytree.cgi",
+ "$bugzilla_location/testagent.cgi",
+ "$bugzilla_location/userprefs.cgi",
+ "$bugzilla_location/xmlrpc.cgi",
+ "$bugzilla_location/report.cgi",
+ "$bugzilla_location/request.cgi",
+ "$bugzilla_location/sanitycheck.cgi",
+ "$bugzilla_location/show_activity.cgi",
+ "$bugzilla_location/showdependencygraph.cgi",
+ "$bugzilla_location/summarize_time.cgi",
+ "$bugzilla_location/token.cgi",
+ "$bugzilla_location/votes.cgi",
+ "$bugzilla_location/checksetup.pl",
+ "$bugzilla_location/clean-bug-user-last-visit.pl",
+ "$bugzilla_location/collectstats.pl",
+ "$bugzilla_location/email_in.pl",
+ "$bugzilla_location/importxml.pl",
+ "$bugzilla_location/install-module.pl",
+ "$bugzilla_location/jobqueue.pl",
+ "$bugzilla_location/migrate.pl",
+ "$bugzilla_location/runtests.pl",
+ "$bugzilla_location/sanitycheck.pl",
+ "$bugzilla_location/testserver.pl",
+ "$bugzilla_location/whineatnews.pl",
+ "$bugzilla_location/whine.pl",
+ ]:
+ group => 'apache',
+ mode => '0750',
+ }
+
+# Improper file permissions makes this fail, and nobody seems to care
+# cron { 'collectstats':
+# command => "cd $bugzilla_location && ./collectstats.pl",
+# user => 'apache',
+# hour => 2,
+# minute => 30,
+# }
+
+ cron { 'clean-bug-user-last-visit':
+ command => "cd $bugzilla_location && ./clean-bug-user-last-visit.pl",
+ user => 'apache',
+ hour => 3,
+ minute => 0,
+ }
+ cron { 'sanitycheck':
+ command => "cd $bugzilla_location && $bugzilla_location/sanitycheck.pl --login LpSolit@gmail.com",
+ user => 'apache',
+ hour => 21,
+ minute => 0,
+ }
+
}