/[adm]/puppet/modules/buildsystem/templates/upload.conf
ViewVC logotype

Annotation of /puppet/modules/buildsystem/templates/upload.conf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3176 - (hide annotations) (download)
Thu May 23 15:07:22 2013 UTC (10 years, 10 months ago) by boklm
File size: 4266 byte(s)
buildsystem/upload.conf: add arch and mandatory_arch

Add arch and mandatory_arch settings in iurt/upload.conf template.
The arch setting is used by ulri to know the list of architectures for
which the packages need to be built. The mandatory_arch setting is used
by emi to know the list of architectures for which a package needs to be
built successfully before it can be installed in the repository.
1 blino 430 ###
2     #
3     # Do not disable the host without appropriate warning
4     # to somebody able to fix the machine
5     #
6     # Please run 'perl -cw .upload.conf' in order to check the file is OK.
7     #
8     ###
9    
10 boklm 3157 <%-
11     build_nodes = scope.lookupvar('buildsystem::var::scheduler::build_nodes')
12     -%>
13 blino 434 my %nodes = (
14 boklm 3157 <%-
15     build_nodes.keys.sort.each{|arch|
16     -%>
17     <%= arch -%> => [ '<%= build_nodes[arch].join("', '") -%>' ],
18     <%-
19     }
20     -%>
21 blino 434 );
22 boklm 3144 my $repository = "http://<%= scope.lookupvar('buildsystem::var::repository::hostname') %>/<%= scope.lookupvar('buildsystem::var::repository::distribdir') %>/";
23 boklm 3102 my $homedir = "<%= scope.lookupvar('buildsystem::var::iurt::homedir') %>";
24 blino 434
25 blino 430 {
26 blino 434 bot => {
27     (map {
28     my $arch = $_;
29     $arch => {
30     map {
31     my $node = $_;
32     ($node => {
33     iurt => {
34 boklm 3102 user => '<%= scope.lookupvar('buildsystem::var::iurt::login') %>',
35 blino 430 # (spuk, 2007-08-16) disabled iurt_cache additional media, locks trying to mount -o bind
36 blino 465 # 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__",
37 pterjan 1677 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__",
38 blino 445 packages => "$homedir/iurt/",
39 blino 434 },
40     });
41     } @{$nodes{$arch}},
42     };
43     } keys %nodes),
44 blino 430 },
45     media => {
46 boklm 3155 <%-
47     def repo_deps(distros, dname, mname, rname)
48     deps = {}
49     distro = distros[dname]
50     if distro['based_on'] != nil
51     distro['based_on'].each{|bdistro, bmedias|
52     if bmedias[mname] != nil and \
53     bmedias[mname].include?(rname) then
54     deps[ [ bdistro, mname, rname ].join('/') ] = 1
55     end
56     }
57     end
58     if distro['medias'][mname] != nil \
59     and distro['medias'][mname]['repos'][rname] != nil
60     then
61     deps[ [ mname, rname ].join('/') ] = 1
62     else
63     return deps
64     end
65     mlist = distro['medias'][mname]['requires']
66     mlist = mlist == nil ? [ mname ] : [ mname ] + mlist
67     mlist.each{|mreq|
68     rlist = distro['medias'][mname]['repos'][rname]['requires']
69     rlist = [] if rlist == nil
70     rlist += [ rname ] if mreq != mname
71     rlist.each{|rreq|
72     deps.merge!(repo_deps(distros, dname, mreq, rreq))
73     }
74     }
75     return deps
76     end
77     distros = scope.lookupvar('buildsystem::var::distros::distros')
78     distros.keys.sort.each{|distroname|
79     -%>
80     '<%= distroname -%>' => {
81     <%-
82     distro = distros[distroname]
83     distro['medias'].keys.sort.each{|medianame|
84     media = distro['medias'][medianame]
85     media['repos'].keys.sort.each{|reponame|
86     deps = repo_deps(distros, distroname, medianame, reponame)
87     -%>
88     "<%= [ medianame, reponame ].join('/') %>" => [ "<%=
89     deps.keys.sort.join('", "')
90     %>" ],
91     <%-
92     }
93     }
94     -%>
95     },
96     <%-
97     }
98     -%>
99 blino 430 },
100 boklm 3156 admin => '<%= scope.lookupvar('buildsystem::var::scheduler::admin_mail') %>',
101 boklm 3128 http_queue => 'http://<%= scope.lookupvar('buildsystem::var::webstatus::hostname') %>/uploads',
102 boklm 3102 upload_user => '<%= scope.lookupvar('buildsystem::var::scheduler::login') %>',
103 pterjan 2118 email_domain => '<%= domain %>',
104 boklm 3176 arch => {
105     <%-
106     distros.keys.sort.each{|distroname|
107     -%>
108     <%= distroname -%> => [ '<%= distros[distroname]['arch'].join("', '") %>' ],
109     <%-
110     }
111     -%>
112     default => [ 'i586', 'x86_64' ],
113     },
114     mandatory_arch => {
115     <%-
116     distros.keys.sort.each{|distroname|
117     if distros[distroname]['mandatory_arch'] != nil
118     march = distros[distroname]['mandatory_arch']
119     else
120     march = distros[distroname]['arch']
121     end
122     -%>
123     <%= distroname -%> => [ '<%= march.join("', '") %>' ],
124     <%-
125     }
126     -%>
127     default => [ 'i586', 'x86_64' ],
128     },
129 blino 430 }

  ViewVC Help
Powered by ViewVC 1.1.30