1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
###
#
# Do not disable the host without appropriate warning
# to somebody able to fix the machine
#
# Please run 'perl -cw .upload.conf' in order to check the file is OK.
#
###
<%-
build_nodes = scope.lookupvar('buildsystem::var::scheduler::build_nodes')
-%>
my %nodes = (
<%-
build_nodes.keys.sort.each{|arch|
-%>
<%= arch -%> => [ '<%= build_nodes[arch].join("', '") -%>' ],
<%-
}
-%>
);
my $repository = "http://<%= scope.lookupvar('buildsystem::var::repository::hostname') %>/<%= scope.lookupvar('buildsystem::var::repository::distribdir') %>/";
my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
{
bot => {
(map {
my $arch = $_;
$arch => {
map {
my $node = $_;
($node => {
iurt => {
user => '<%= scope.lookupvar('buildsystem::var::iurt::login') %>',
# (spuk, 2007-08-16) disabled iurt_cache additional media, locks trying to mount -o bind
# command => "iurt --copy-srpm --group -v 6 --config local_spool $homedir/iurt/__DIR__ --no_rsync --chrooted-urpmi -m __MEDIA__ -- $repository --additional-media -m __MEDIA__ -- file://$homedir/cache/ -p \"__PACKAGER__\" -r __TARGET__ __ARCH__",
command => "iurt --copy_srpm --group --rpmmacros \"%distro_section __SECTION__\" --config local_spool $homedir/iurt/__DIR__ --no_rsync --chrooted-urpmi -m __MEDIA__ -- $repository -p \"__PACKAGER__\" -r __TARGET__ __ARCH__",
packages => "$homedir/iurt/",
},
});
} @{$nodes{$arch}},
};
} keys %nodes),
},
media => {
<%-
def repo_deps(distros, dname, mname, rname)
deps = {}
distro = distros[dname]
if distro['based_on'] != nil
distro['based_on'].each{|bdistro, bmedias|
if bmedias[mname] != nil and \
bmedias[mname].include?(rname) then
deps[ [ bdistro, mname, rname ].join('/') ] = 1
end
}
end
if distro['medias'][mname] != nil \
and distro['medias'][mname]['repos'][rname] != nil
then
deps[ [ mname, rname ].join('/') ] = 1
else
return deps
end
mlist = distro['medias'][mname]['requires']
mlist = mlist == nil ? [ mname ] : [ mname ] + mlist
mlist.each{|mreq|
rlist = distro['medias'][mname]['repos'][rname]['requires']
rlist = [] if rlist == nil
rlist += [ rname ] if mreq != mname
rlist.each{|rreq|
deps.merge!(repo_deps(distros, dname, mreq, rreq))
}
}
return deps
end
distros = scope.lookupvar('buildsystem::var::distros::distros')
distros.keys.sort.each{|distroname|
-%>
'<%= distroname -%>' => {
<%-
distro = distros[distroname]
distro['medias'].keys.sort.each{|medianame|
media = distro['medias'][medianame]
media['repos'].keys.sort.each{|reponame|
deps = repo_deps(distros, distroname, medianame, reponame)
-%>
"<%= [ medianame, reponame ].join('/') %>" => [ "<%=
deps.keys.sort.join('", "')
%>" ],
<%-
}
}
-%>
},
<%-
}
-%>
},
admin => '<%= scope.lookupvar('buildsystem::var::scheduler::admin_mail') %>',
http_queue => 'http://<%= scope.lookupvar('buildsystem::var::webstatus::hostname') %>/uploads',
upload_user => '<%= scope.lookupvar('buildsystem::var::scheduler::login') %>',
email_domain => '<%= domain %>',
arch => {
<%-
distros.keys.sort.each{|distroname|
-%>
<%= distroname -%> => [ '<%= distros[distroname]['arch'].join("', '") %>' ],
<%-
}
-%>
default => [ 'i586', 'x86_64' ],
},
mandatory_arch => {
<%-
distros.keys.sort.each{|distroname|
if distros[distroname]['mandatory_arch'] != nil
march = distros[distroname]['mandatory_arch']
else
march = distros[distroname]['arch']
end
-%>
<%= distroname -%> => [ '<%= march.join("', '") %>' ],
<%-
}
-%>
default => [ 'i586', 'x86_64' ],
},
}
|