aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/var/youri.pp13
-rw-r--r--modules/buildsystem/manifests/youri_submit.pp18
-rwxr-xr-xmodules/buildsystem/templates/cleaner.rb4
-rw-r--r--modules/buildsystem/templates/sudoers.youri1
-rw-r--r--modules/buildsystem/templates/youri/submit-todo.conf3
-rw-r--r--modules/buildsystem/templates/youri/submit-upload.conf5
6 files changed, 30 insertions, 14 deletions
diff --git a/modules/buildsystem/manifests/var/youri.pp b/modules/buildsystem/manifests/var/youri.pp
new file mode 100644
index 00000000..7732c8f5
--- /dev/null
+++ b/modules/buildsystem/manifests/var/youri.pp
@@ -0,0 +1,13 @@
+# $tmpl_youri_upload_conf:
+# template file for youri submi-upload.conf
+# $tmpl_youri_todo_conf:
+# template file for youri submit-todo.conf
+# $packages_archivedir:
+# the directory where youri will archive old packages when they are
+# replaced by a new version
+class buildsystem::var::youri(
+ $tmpl_youri_upload_conf = 'buildsystem/youri/submit-upload.conf',
+ $tmpl_youri_todo_conf = 'buildsystem/youri/submit-todo.conf',
+ $packages_archivedir
+) {
+}
diff --git a/modules/buildsystem/manifests/youri_submit.pp b/modules/buildsystem/manifests/youri_submit.pp
index 5b02a067..f55402d8 100644
--- a/modules/buildsystem/manifests/youri_submit.pp
+++ b/modules/buildsystem/manifests/youri_submit.pp
@@ -3,11 +3,7 @@ class buildsystem::youri_submit {
include buildsystem::rpmlint
include buildsystem::repository
include buildsystem::var::scheduler
-
- $repository_root = $buildsystem::var::repository::bootstrap_root
- $sched_home_dir = $buildsystem::var::scheduler::homedir
- $sched_login = $buildsystem::var::scheduler::login
- $packages_archivedir = "$sched_home_dir/old"
+ include buildsystem::var::youri
mga-common::local_script {
'mga-youri-submit':
@@ -29,20 +25,20 @@ class buildsystem::youri_submit {
'/etc/youri/':
ensure => 'directory';
'/etc/youri/submit-todo.conf':
- content => template('buildsystem/youri/submit-todo.conf');
+ content => template($buildsystem::var::youri::tmpl_youri_todo_conf);
'/etc/youri/submit-upload.conf':
- content => template('buildsystem/youri/submit-upload.conf');
+ content => template($buildsystem::var::youri::tmpl_youri_upload_conf);
'/etc/youri/acl.conf':
content => template('buildsystem/youri/acl.conf');
}
- file { $packages_archivedir:
+ file { $buildsystem::var::youri::packages_archivedir:
ensure => 'directory',
- owner => $sched_login,
- require => File[$sched_home_dir],
+ owner => $buildsystem::var::scheduler::login,
+ require => File[$buildsystem::var::scheduler::homedir],
}
- tidy { $packages_archivedir:
+ tidy { $buildsystem::var::youri::packages_archivedir:
type => 'ctime',
recurse => true,
age => '1w',
diff --git a/modules/buildsystem/templates/cleaner.rb b/modules/buildsystem/templates/cleaner.rb
index 338d66ba..e92c948b 100755
--- a/modules/buildsystem/templates/cleaner.rb
+++ b/modules/buildsystem/templates/cleaner.rb
@@ -25,10 +25,10 @@ opts = GetoptLong.new(
[ '--version', '-v', GetoptLong::REQUIRED_ARGUMENT ]
)
-base_path = "<%= repository_root %>/distrib"
+base_path = "<%= scope.lookupvar('buildsystem::var::repository::bootstrap_root') %>/distrib"
archs = [ "i586", "x86_64" ]
media = "core/release"
-old_path = "<%= packages_archivedir %>"
+old_path = "<%= scope.lookupvar('buildsystem::var::youri::packages_archivedir') %>"
version = "cauldron"
opts.each do |opt, arg|
diff --git a/modules/buildsystem/templates/sudoers.youri b/modules/buildsystem/templates/sudoers.youri
index f3fa35b0..b00b0684 100644
--- a/modules/buildsystem/templates/sudoers.youri
+++ b/modules/buildsystem/templates/sudoers.youri
@@ -1,3 +1,4 @@
+<%- sched_login = scope.lookupvar('buildsystem::var::scheduler::login') -%>
Cmnd_Alias YOURI = /usr/local/bin/mga-youri-submit.wrapper
Defaults!YOURI always_set_home
Defaults!YOURI runas_default = <%= sched_login %>
diff --git a/modules/buildsystem/templates/youri/submit-todo.conf b/modules/buildsystem/templates/youri/submit-todo.conf
index 2d5d18ff..f647f231 100644
--- a/modules/buildsystem/templates/youri/submit-todo.conf
+++ b/modules/buildsystem/templates/youri/submit-todo.conf
@@ -1,5 +1,8 @@
<%
escaped_domain = domain.gsub('.','\.')
+repository_root = scope.lookupvar('buildsystem::var::repository::bootstrap_root')
+sched_home_dir = scope.lookupvar('buildsystem::var::scheduler::homedir')
+sched_login = scope.lookupvar('buildsystem::var::scheduler::login')
%>
home: <%= sched_home_dir %>
diff --git a/modules/buildsystem/templates/youri/submit-upload.conf b/modules/buildsystem/templates/youri/submit-upload.conf
index bab096da..fa9adce3 100644
--- a/modules/buildsystem/templates/youri/submit-upload.conf
+++ b/modules/buildsystem/templates/youri/submit-upload.conf
@@ -1,6 +1,9 @@
<%
Puppet::Parser::Functions.autoloader.loadall
escaped_domain = domain.gsub('.','\.')
+repository_root = scope.lookupvar('buildsystem::var::repository::bootstrap_root')
+sched_home_dir = scope.lookupvar('buildsystem::var::scheduler::homedir')
+sched_login = scope.lookupvar('buildsystem::var::scheduler::login')
%>
home: <%= sched_home_dir %>
@@ -11,7 +14,7 @@ repository:
options:
install_root: <%= repository_root %>/distrib
upload_root: ${home}/uploads/
- archive_root: <%= packages_archivedir %>
+ archive_root: <%= scope.lookupvar('buildsystem::var::youri::packages_archivedir') %>
upload_state: queue
queue: queue
noarch: i586