diff options
author | Frank Becker | 2013-02-18 19:27:02 +0000 |
---|---|---|
committer | Frank Becker | 2013-03-03 16:03:18 +0000 |
commit | c69360ed98fe8cb445566ca336a793f387a9a9f8 (patch) | |
tree | 541cda854eeb8c0e497c218863ad3ddc9dc50ee8 /org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp | |
parent | 985b510ea6142d3fa8969ce5d23bb0f2013e7c32 (diff) | |
download | org.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.tar.gz org.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.tar.xz org.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.zip |
399803: add service file (trac and bugzilla); buzilla cleanup and use
title in more places
Change-Id: I08a418a65437f45835732f9e378f00c922211468
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399803
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp | 22 |
1 files changed, 14 insertions, 8 deletions
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 af4b8552d..2cd760298 100644 --- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp +++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp @@ -13,12 +13,12 @@ define bugzilla::site ( $major, $minor, $branch = " ", - $bugz_dbname = "$title", + $bugz_dbname = regsubst($title, '([^.-]+)([.-]+)', '\1_', 'G'), $bugz_user = $bugzilla::dbuser, $bugz_password = $bugzilla::dbuserPassword, $www_url = "$title", $version = "$title", - $branchTag = "bugzilla-stable", + $branchTag = "$title", $custom_wf = false, $custom_wf_and_status = false, $xmlrpc_enabled = true, @@ -29,12 +29,13 @@ define bugzilla::site ( $userGroup = $bugzilla::userGroup, $envversion = "${major}.${minor}", $envdefault = "0", + $clearDB = $bugzilla::clearDB, ) { include "bugzilla" $confDir = "$base/conf.d" - + if $branch == "trunk" { $envinfo = "trunk" } else { @@ -52,6 +53,7 @@ define bugzilla::site ( $envinfo = "XML-RPC disabled" } } + if $major == "3" { if $minor == "6" { $VersionCreateName = "name" @@ -125,23 +127,28 @@ define bugzilla::site ( "/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}'", command => "/usr/bin/mysql --verbose --user=root -e \"GRANT ALL ON ${bugz_dbname}.* TO '${bugzilla::dbuser}'@localhost\" \ ; /usr/bin/mysqladmin --verbose --user=root flush-privileges", -## logoutput => true, require => Exec["post extract bugzilla $version"] } + if $clearDB { exec { "mysql-dropdb-$version": onlyif => "/usr/bin/mysql --user=root '${bugz_dbname}'", command => "/usr/bin/mysqladmin -v --user=root --force drop '${bugz_dbname}'", -## logoutput => true, require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"] } exec { "mysql-createdb-$version": unless => "/usr/bin/mysql --user=root '${bugz_dbname}'", command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'", -## logoutput => true, require => Exec["mysql-dropdb-$version"] } + } else { + exec { "mysql-createdb-$version": + unless => "/usr/bin/mysql --user=root '${bugz_dbname}'", + command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'", + require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"] + } + } file { "$base/$version/callchecksetup.pl": content => template('bugzilla/callchecksetup.pl.erb'), @@ -193,14 +200,13 @@ define bugzilla::site ( exec { "update bugzilla_checksetup $version": command => "$base/$version/callchecksetup.pl", cwd => "$base/$version", + logoutput => true, user => "$userOwner", -# 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/localconfig"], ] } |