### # # 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' ], }, ssh_options => "-o ServerAliveInterval=10 -o ConnectTimeout=20 -o BatchMode=yes", faildelay => 360000, }