Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2013-02-07 19:01:58 +0000
committerFrank Becker2013-02-07 19:01:58 +0000
commit47e2efed0f501a86b140b9ec72ec73854f284543 (patch)
tree0fcf0a97da8419fdb0a9f22ac27a60b0f26524f6 /org.eclipse.mylyn.bugzilla.releng/modules
parent9b4d906102d2ff7b822e25851531abd3e67fc898 (diff)
downloadorg.eclipse.mylyn.tasks-47e2efed0f501a86b140b9ec72ec73854f284543.tar.gz
org.eclipse.mylyn.tasks-47e2efed0f501a86b140b9ec72ec73854f284543.tar.xz
org.eclipse.mylyn.tasks-47e2efed0f501a86b140b9ec72ec73854f284543.zip
394053: Bugzilla setup for FixtureConfiguration
Change-Id: Id220e4c6b5a83f8f532dd20d907218501fc97287 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=394053
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng/modules')
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/files/services.cgi17
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp1
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp5
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp64
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/answers.erb1
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/callchecksetup.pl.erb7
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb16
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb12
8 files changed, 92 insertions, 31 deletions
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/files/services.cgi b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/files/services.cgi
new file mode 100644
index 000000000..85c28169f
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/files/services.cgi
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo content-type: application/json
+echo
+
+echo "["
+c=0
+for i in $(find /home/tools -name "service*.json")
+do
+ if [ $c != 0 ]
+ then
+ echo ","
+ fi
+ cat $i
+ c=c+1
+done
+echo "]" \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
index 9b286c0ba..900e7df93 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -60,6 +60,7 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
bugzilla::site { "bugs42":
major => "4",
minor => "2",
+ envdefault => "1"
}
bugzilla::site { "bugs44":
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
index 5f19793fd..bfaeb4bbf 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
@@ -116,4 +116,9 @@ class bugzilla {
require => Package[$requirements],
}
+ file { "/usr/lib/cgi-bin/services":
+ source => "puppet:///modules/bugzilla/services.cgi",
+ mode => 755,
+ require => Package[$requirements],
+ }
}
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
index 6700ee2a9..af4b8552d 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -27,6 +27,8 @@ define bugzilla::site (
$envid = "$title",
$userOwner = $bugzilla::userOwner,
$userGroup = $bugzilla::userGroup,
+ $envversion = "${major}.${minor}",
+ $envdefault = "0",
) {
include "bugzilla"
@@ -90,17 +92,6 @@ define bugzilla::site (
creates => "$base/$version",
require => Exec["prepare $version"]
}
-
- # we need a extras setup because for bughead we need
- # template 2.24 but libtemplate-perl from precise32 is only 2.22
- exec { "post extract bugzilla $version":
- command => "/usr/bin/perl install-module.pl Template >$base/$version/extra.out",
- cwd => "$base/$version",
- creates => "$base/$version/extra.out",
- user => "$userOwner",
- timeout => 300,
- require => Exec["extract bugzilla $version"]
- }
} else {
exec { "extract bugzilla $version":
command => "bzr co -r tag:$branchTag bzr://bzr.mozilla.org/bugzilla/$branchName $version",
@@ -110,19 +101,25 @@ define bugzilla::site (
creates => "$base/$version",
require => Exec["prepare $version"]
}
-
- # we need no extras setup because for bugzilla <= 4.4 all
- # perl libs have the correct version
- exec { "post extract bugzilla $version":
- command => "ls >$base/$version/extra.out",
- cwd => "$base/$version",
- creates => "$base/$version/extra.out",
- user => "$userOwner",
- timeout => 300,
- require => Exec["extract bugzilla $version"]
- }
+ }
+
+ file { "$base/$version/installPerlModules.sh":
+ content => template('bugzilla/installPerlModules.sh.erb'),
+ owner => "$userOwner",
+ group => "$userGroup",
+ mode => 0755,
+ require => Exec["extract bugzilla $version"],
}
+ exec { "post extract bugzilla $version":
+ command => "$base/$version/installPerlModules.sh >$base/$version/CGI.out",
+ cwd => "$base/$version",
+ creates => "$base/$version/CGI.out",
+ user => "$userOwner",
+ timeout => 300,
+ require => File["$base/$version/installPerlModules.sh"]
+ }
+
exec { "mysql-grant-${bugz_dbname}-${bugzilla::dbuser}":
unless =>
"/usr/bin/mysql --user=root --batch -e \"SELECT user FROM db WHERE Host='localhost' and Db='${bugz_dbname}' and User='${bugzilla::dbuser}'\" mysql | /bin/grep '${bugzilla::dbuser}'",
@@ -146,6 +143,14 @@ define bugzilla::site (
require => Exec["mysql-dropdb-$version"]
}
+ file { "$base/$version/callchecksetup.pl":
+ content => template('bugzilla/callchecksetup.pl.erb'),
+ owner => "$userOwner",
+ group => "$userGroup",
+ mode => 0755,
+ require => Exec["post extract bugzilla $version"],
+ }
+
file { "$base/$version/answers":
content => template('bugzilla/answers.erb'),
owner => "$userOwner",
@@ -173,26 +178,30 @@ define bugzilla::site (
}
exec { "init bugzilla_checksetup $version":
- command => "$base/$version/checksetup.pl $base/$version/answers -verbose",
+ command => "$base/$version/callchecksetup.pl",
cwd => "$base/$version",
creates => "$base/$version/localconfig",
user => "$userOwner",
+ logoutput => true,
require => [
Exec["mysql-createdb-$version"],
File["$base/$version/answers"],
+ File["$base/$version/callchecksetup.pl"],
File["$base/$version/extensions/Mylyn/Extension.pm"]]
}
exec { "update bugzilla_checksetup $version":
- command => "$base/$version/checksetup.pl $base/$version/answers -verbose",
+ command => "$base/$version/callchecksetup.pl",
cwd => "$base/$version",
user => "$userOwner",
-## logoutput => true,
+# logoutput => true,
require => [
Exec["mysql-createdb-$version"],
Exec["init bugzilla_checksetup $version"],
File["$base/$version/answers"],
- File["$base/$version/extensions/Mylyn/Extension.pm"]]
+ File["$base/$version/extensions/Mylyn/Extension.pm"],
+# File["$base/$version/localconfig"],
+ ]
}
if !$xmlrpc_enabled {
@@ -225,5 +234,4 @@ define bugzilla::site (
notify => Service["apache2"],
onlyif => "grep -qe '^Include $base/conf.d' /etc/apache2/conf.d/bugzilla.conf; test $? != 0"
}
-
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/answers.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/answers.erb
index 7ed97ed01..2022724ca 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/answers.erb
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/answers.erb
@@ -13,6 +13,7 @@ $answer{'ADMIN_REALNAME'} = 'Mylyn Admin';
$answer{'SMTP_SERVER'} = '';
$answer{'usetargetmilestone'} = '1';
$answer{'mail_delivery_method'} = 'None';
+
$answer{'insidergroup'} = 'bz_canusewhineatothers';
<% if @custom_wf_and_status %>$answer{'duplicate_or_move_bug_status'} = 'CLOSED';<% end %>
$answer{'NO_PAUSE'} = 1
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/callchecksetup.pl.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/callchecksetup.pl.erb
new file mode 100644
index 000000000..2277e55b1
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/callchecksetup.pl.erb
@@ -0,0 +1,7 @@
+#!/bin/bash
+./checksetup.pl ./answers | grep "*** Installation aborted." > /dev/null 2>&1
+if [ $? -eq 0 ];then
+ exit 1
+else
+ exit 0
+fi
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb
new file mode 100644
index 000000000..283b2865e
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/installPerlModules.sh.erb
@@ -0,0 +1,16 @@
+#!/bin/bash
+<% if @operatingsystemrelease == "10.04" %>
+/usr/bin/perl install-module.pl CGI
+/usr/bin/perl install-module.pl Template
+<% if @envversion > "3.6" %>
+/usr/bin/perl install-module.pl Email::MIME
+<% end %>
+<% if @envversion > "4.2" %>
+/usr/bin/perl install-module.pl List::MoreUtils
+<% end %>
+<% end %>
+<% if @operatingsystemrelease = "12.04" && @envversion > "4.4" %>
+/usr/bin/perl install-module.pl Template
+<% end %>
+echo "Ende1"
+
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
index 88c3301b2..a7806f167 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
@@ -1,6 +1,12 @@
{
"type": "<%= envtype %>",
-"url": "/<%= envid %>/",
-"version": "<%= version %>",
-"info": "<%= envinfo %>"
+"url": "/<%= envid %>",
+"version": "<%= envversion %>",
+"info": "<%= envinfo %>" ,
+ "properties":{
+ "custom_wf": "<%= custom_wf %>",
+ "custom_wf_and_status": "<%= custom_wf_and_status %>",
+ "xmlrpc_enabled": "<%= xmlrpc_enabled %>",
+ "default": "<%= envdefault %>"
+ }
}

Back to the top