aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-16 22:47:03 +0000
committerMichael Scherer <misc@mageia.org>2012-03-16 22:47:03 +0000
commit1d20c44d422aa8c6dea577eca256c857f985190c (patch)
tree400bae72ed80916ffe85ffbb484e49f3bbecc7db /modules/buildsystem
parentbc9d9e24b44c7ba3efeca8d6485ba9097a808d4b (diff)
downloadpuppet-1d20c44d422aa8c6dea577eca256c857f985190c.tar
puppet-1d20c44d422aa8c6dea577eca256c857f985190c.tar.gz
puppet-1d20c44d422aa8c6dea577eca256c857f985190c.tar.bz2
puppet-1d20c44d422aa8c6dea577eca256c857f985190c.tar.xz
puppet-1d20c44d422aa8c6dea577eca256c857f985190c.zip
refactor and split all operation for the repository ( ie /distrib/bootstrap, that should be renamed one day, since that's not longer a bootstrap ) in one submodule, thus emptying a little bit more mainnode.pp
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/base.pp2
-rw-r--r--modules/buildsystem/manifests/mainnode.pp5
-rw-r--r--modules/buildsystem/manifests/media_cfg.pp3
-rw-r--r--modules/buildsystem/manifests/repository.pp6
-rw-r--r--modules/buildsystem/manifests/youri_submit.pp8
5 files changed, 13 insertions, 11 deletions
diff --git a/modules/buildsystem/manifests/base.pp b/modules/buildsystem/manifests/base.pp
index 0838da90..05adc53c 100644
--- a/modules/buildsystem/manifests/base.pp
+++ b/modules/buildsystem/manifests/base.pp
@@ -3,8 +3,6 @@ class buildsystem::base {
$sched_login = 'schedbot'
$sched_home_dir = "/var/lib/$sched_login"
- $repository_root = '/distrib/bootstrap'
-
$packagers_group = 'mga-packagers'
$packagers_committers_group = 'mga-packagers-committers'
diff --git a/modules/buildsystem/manifests/mainnode.pp b/modules/buildsystem/manifests/mainnode.pp
index caf51038..07e052aa 100644
--- a/modules/buildsystem/manifests/mainnode.pp
+++ b/modules/buildsystem/manifests/mainnode.pp
@@ -11,7 +11,6 @@ class buildsystem::mainnode {
$sched_home_dir = $buildsystem::scheduler::homedir
$build_login = $buildsystem::iurt::user::login
- $repository_root = $buildsystem::base::repository_root
ssh::auth::client { $sched_login: }
@@ -22,10 +21,6 @@ class buildsystem::mainnode {
vhost_file => 'buildsystem/vhost_repository.conf',
}
- file { $repository_root:
- ensure => directory,
- }
-
buildsystem::media_cfg { ['i586','x86_64']: }
cron { 'dispatch jobs':
diff --git a/modules/buildsystem/manifests/media_cfg.pp b/modules/buildsystem/manifests/media_cfg.pp
index 9f7b6870..07d34118 100644
--- a/modules/buildsystem/manifests/media_cfg.pp
+++ b/modules/buildsystem/manifests/media_cfg.pp
@@ -1,6 +1,7 @@
define buildsystem::media_cfg() {
+ include buildsystem::repository
$arch = $name
- file { "$buildsystem::base::repository_root/distrib/cauldron/$arch/media/media_info/media.cfg":
+ file { "$buildsystem::repository::root/distrib/cauldron/$arch/media/media_info/media.cfg":
owner => $buildsystem::base::sched_login,
group => $buildsystem::base::sched_login,
source => "puppet:///modules/buildsystem/$arch/media.cfg",
diff --git a/modules/buildsystem/manifests/repository.pp b/modules/buildsystem/manifests/repository.pp
new file mode 100644
index 00000000..19e69eff
--- /dev/null
+++ b/modules/buildsystem/manifests/repository.pp
@@ -0,0 +1,6 @@
+class buildsystem::repository {
+ $dir = '/distrib/bootstrap'
+ file { $dir:
+ ensure => directory,
+ }
+}
diff --git a/modules/buildsystem/manifests/youri_submit.pp b/modules/buildsystem/manifests/youri_submit.pp
index 9b5feb51..7fcfbed4 100644
--- a/modules/buildsystem/manifests/youri_submit.pp
+++ b/modules/buildsystem/manifests/youri_submit.pp
@@ -1,11 +1,13 @@
class buildsystem::youri_submit {
+ include sudo
+ include buildsystem::rpmlint
+ include buildsystem::repository
+
+ $repository_root = $buildsystem::repository::dir
$sched_home_dir = $buildsystem::base::sched_home_dir
$sched_login = $buildsystem::base::sched_login
$packages_archivedir = "$sched_home_dir/old"
- include sudo
- include buildsystem::rpmlint
-
local_script {
'mga-youri-submit':
content => template('buildsystem/mga-youri-submit');