aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
Diffstat (limited to 'modules/buildsystem')
-rw-r--r--modules/buildsystem/manifests/var/scheduler.pp8
-rw-r--r--modules/buildsystem/manifests/youri_submit.pp2
-rw-r--r--modules/buildsystem/templates/youri/host.conf23
3 files changed, 32 insertions, 1 deletions
diff --git a/modules/buildsystem/manifests/var/scheduler.pp b/modules/buildsystem/manifests/var/scheduler.pp
index 087020bf..02320587 100644
--- a/modules/buildsystem/manifests/var/scheduler.pp
+++ b/modules/buildsystem/manifests/var/scheduler.pp
@@ -5,10 +5,16 @@
# hostname of the server where submitted packages are uploaded
# $build_nodes:
# a hash containing available build nodes indexed by architecture
+# $build_nodes_aliases:
+# a hash containing build nodes indexed by their alias
+# $build_src_node:
+# hostname of the server building the initial src.rpm
class buildsystem::var::scheduler(
$admin_mail = "root@${::domain}",
$pkg_uphost = "pkgsubmit.${::domain}",
- $build_nodes
+ $build_nodes,
+ $build_nodes_aliases = {},
+ $build_src_node
){
$login = 'schedbot'
$homedir = "/var/lib/$login"
diff --git a/modules/buildsystem/manifests/youri_submit.pp b/modules/buildsystem/manifests/youri_submit.pp
index f4e49412..32fc8243 100644
--- a/modules/buildsystem/manifests/youri_submit.pp
+++ b/modules/buildsystem/manifests/youri_submit.pp
@@ -26,6 +26,8 @@ class buildsystem::youri_submit {
ensure => 'directory';
'/etc/youri/acl.conf':
content => template('buildsystem/youri/acl.conf');
+ '/etc/youri/host.conf':
+ content => template('buildsystem/youri/host.conf');
}
buildsystem::youri_submit_conf{ 'upload':
diff --git a/modules/buildsystem/templates/youri/host.conf b/modules/buildsystem/templates/youri/host.conf
new file mode 100644
index 00000000..35f4043b
--- /dev/null
+++ b/modules/buildsystem/templates/youri/host.conf
@@ -0,0 +1,23 @@
+<%-
+ aliases = scope.lookupvar('buildsystem::var::scheduler::build_nodes_aliases')
+ nodes = {}
+ nodes['src'] = scope.lookupvar('buildsystem::var::scheduler::build_src_node')
+ scope.lookupvar('buildsystem::var::scheduler::build_nodes').each{|arch,n|
+ a = arch + '|noarch|src'
+ nodes[a] = []
+ n.each{|node|
+ if aliases[node] != nil
+ nodes[a] += [ aliases[node] ]
+ else
+ nodes[a] += [ node ]
+ end
+ }
+ }
+ str = ''
+ nodes.keys.sort.each{|arch|
+ nodes[arch].sort.uniq.each{|node|
+ str += node + ' ' + arch + "\n"
+ }
+ }
+-%>
+<%= str -%>