1 |
# The youri configuration files are created using informations from 3 |
2 |
# different hash variables : |
3 |
# - the $youri_conf_default variable defined in this class, containing |
4 |
# the default configuration for youri. It contais the repository |
5 |
# configuration, and the definitions of the checks, actions and posts. |
6 |
# - the $youri_conf parameter passed to this class. The values defined |
7 |
# in this hash override the values defined in the default configuration. |
8 |
# - for each distribution defined in the hash variable $distros from |
9 |
# var::buildsystem::distros the hash defined in index 'youri' contains |
10 |
# some distro specific options for youri checks, actions or posts. It |
11 |
# also contains for each distribution the list of active checks, |
12 |
# actions and posts. |
13 |
# |
14 |
# Each of those variables contain the configuration for youri submit-todo |
15 |
# (in index 'todo') and youri submit-upload (in index 'upload') |
16 |
# |
17 |
# |
18 |
# Parameters : |
19 |
# $tmpl_youri_upload_conf: |
20 |
# template file for youri submi-upload.conf |
21 |
# $tmpl_youri_todo_conf: |
22 |
# template file for youri submit-todo.conf |
23 |
# $packages_archivedir: |
24 |
# the directory where youri will archive old packages when they are |
25 |
# replaced by a new version |
26 |
# $youri_conf: |
27 |
# a hash containing the youri configuration |
28 |
class buildsystem::var::youri( |
29 |
$tmpl_youri_upload_conf = 'buildsystem/youri/submit.conf', |
30 |
$tmpl_youri_todo_conf = 'buildsystem/youri/submit.conf', |
31 |
$packages_archivedir, |
32 |
$youri_conf = {} |
33 |
) { |
34 |
include buildsystem::var::repository |
35 |
include buildsystem::var::mgarepo |
36 |
include buildsystem::var::distros |
37 |
include buildsystem::var::signbot |
38 |
include buildsystem::var::scheduler |
39 |
|
40 |
$check_tag = { 'class' => 'Youri::Submit::Check::Tag', } |
41 |
$check_recency = { 'class' => 'Youri::Submit::Check::Recency', } |
42 |
$check_queue_recency = { 'class' => 'Youri::Submit::Check::Queue_recency', } |
43 |
$check_host = { |
44 |
'class' => 'Youri::Submit::Check::Host', |
45 |
'options' => { |
46 |
'host_file' => '/etc/youri/host.conf', |
47 |
}, |
48 |
} |
49 |
$check_rpmlint = { 'class' => 'Youri::Submit::Check::Rpmlint', } |
50 |
$check_acl = { |
51 |
'class' => 'Youri::Submit::Check::ACL', |
52 |
'options' => { |
53 |
'acl_file' => '/etc/youri/acl.conf', |
54 |
}, |
55 |
} |
56 |
$check_source = { 'class' => 'Youri::Submit::Check::Source', } |
57 |
$check_version = { |
58 |
'class' => 'Youri::Submit::Check::Version', |
59 |
'options' => {}, |
60 |
} |
61 |
|
62 |
$youri_conf_default = { |
63 |
'upload' => { |
64 |
'repository' => { |
65 |
'class' => 'Youri::Repository::Mageia', |
66 |
'options' => { |
67 |
'install_root' => $buildsystem::var::repository::bootstrap_reporoot, |
68 |
'upload_root' => '${home}/uploads/', |
69 |
'archive_root' => $packages_archivedir, |
70 |
'upload_state' => 'queue', |
71 |
'queue' => 'queue', |
72 |
'noarch' => 'i586', |
73 |
'svn' => "${buildsystem::var::mgarepo::svn_root_packages_ssh}/${buildsystem::var::distros::default_distro}", |
74 |
}, |
75 |
}, |
76 |
'checks' => { |
77 |
'tag' => $check_tag, |
78 |
'recency' => $check_recency, |
79 |
'queue_recency' => $check_queue_recency, |
80 |
'host' => $check_host, |
81 |
'section' => { |
82 |
'class' => 'Youri::Submit::Check::Section', |
83 |
}, |
84 |
'rpmlint' => $check_rpmlint, |
85 |
'svn' => { |
86 |
'class' => 'Youri::Submit::Check::SVN', |
87 |
}, |
88 |
'acl' => $check_acl, |
89 |
'history' => { |
90 |
'class' => 'Youri::Submit::Check::History', |
91 |
}, |
92 |
'source' => $check_source, |
93 |
'precedence' => { |
94 |
'class' => 'Youri::Submit::Check::Precedence', |
95 |
'options' => { |
96 |
'target' => $buildsystem::var::distros::default_distro, |
97 |
}, |
98 |
}, |
99 |
'version' => $check_version, |
100 |
}, |
101 |
'actions' => { |
102 |
'install' => { |
103 |
'class' => 'Youri::Submit::Action::Install', |
104 |
}, |
105 |
'markrelease' => { |
106 |
'class' => 'Youri::Submit::Action::Markrelease', |
107 |
}, |
108 |
'link' => { |
109 |
'class' => 'Youri::Submit::Action::Link', |
110 |
}, |
111 |
'archive' => { |
112 |
'class' => 'Youri::Submit::Action::Archive', |
113 |
}, |
114 |
'clean' => { |
115 |
'class' => 'Youri::Submit::Action::Clean', |
116 |
}, |
117 |
'sign' => { |
118 |
'class' => 'Youri::Submit::Action::Sign', |
119 |
'options' => { |
120 |
'signuser' => $buildsystem::var::signbot::login, |
121 |
'path' => $buildsystem::var::signbot::sign_keydir, |
122 |
'name' => $buildsystem::var::signbot::keyid, |
123 |
'signscript' => '/usr/local/bin/sign-check-package', |
124 |
}, |
125 |
}, |
126 |
'unpack_gfxboot_theme' => { |
127 |
'class' => 'Youri::Submit::Action::Unpack', |
128 |
'options' => { |
129 |
'name' => 'mageia-gfxboot-theme', |
130 |
'source_subdir' => '/usr/share/gfxboot/themes/Mageia/install/', |
131 |
'dest_directory' => 'isolinux', |
132 |
'unpack_inside_distribution_root' => '1', |
133 |
}, |
134 |
}, |
135 |
'unpack_meta_task' => { |
136 |
'class' => 'Youri::Submit::Action::Unpack', |
137 |
'options' => { |
138 |
'name' => 'meta-task', |
139 |
'source_subdir' => '/usr/share/meta-task', |
140 |
'dest_directory' => 'media/media_info', |
141 |
'unpack_inside_distribution_root' => '1', |
142 |
}, |
143 |
}, |
144 |
'unpack_installer_images' => { |
145 |
'class' => 'Youri::Submit::Action::Unpack', |
146 |
'options' => { |
147 |
'name' => 'drakx-installer-images', |
148 |
'source_subdir' => '/usr/lib*/drakx-installer-images', |
149 |
'dest_directory' => '.', |
150 |
'preclean_directory' => 'install/images/alternatives', |
151 |
'unpack_inside_distribution_root' => '1', |
152 |
}, |
153 |
}, |
154 |
'unpack_installer_images_nonfree' => { |
155 |
'class' => 'Youri::Submit::Action::Unpack', |
156 |
'options' => { |
157 |
'name' => 'drakx-installer-images-nonfree', |
158 |
'source_subdir' => '/usr/lib*/drakx-installer-images', |
159 |
'dest_directory' => '.', |
160 |
'unpack_inside_distribution_root' => '1', |
161 |
}, |
162 |
}, |
163 |
'unpack_installer_stage2' => { |
164 |
'class' => 'Youri::Submit::Action::Unpack', |
165 |
'options' => { |
166 |
'name' => 'drakx-installer-stage2', |
167 |
'source_subdir' => '/usr/lib*/drakx-installer-stage2', |
168 |
'dest_directory' => '.', |
169 |
'unpack_inside_distribution_root' => '1', |
170 |
}, |
171 |
}, |
172 |
'unpack_installer_advertising' => { |
173 |
'class' => 'Youri::Submit::Action::Unpack', |
174 |
'options' => { |
175 |
'name' => 'drakx-installer-advertising', |
176 |
'source_subdir' => '/usr/share/drakx-installer-advertising', |
177 |
'dest_directory' => '.', |
178 |
'unpack_inside_distribution_root' => '1', |
179 |
}, |
180 |
}, |
181 |
'unpack_installer_rescue' => { |
182 |
'class' => 'Youri::Submit::Action::Unpack', |
183 |
'options' => { |
184 |
'name' => 'drakx-installer-rescue', |
185 |
'source_subdir' => '/usr/lib*/drakx-installer-rescue', |
186 |
'dest_directory' => 'install/stage2', |
187 |
'unpack_inside_distribution_root' => '1', |
188 |
}, |
189 |
}, |
190 |
'unpack_release_notes' => { |
191 |
'class' => 'Youri::Submit::Action::Unpack', |
192 |
'options' => { |
193 |
'name' => 'mageia-release-common', |
194 |
'source_subdir' => '/usr/share/doc/mageia-release-common', |
195 |
'grep_files' => 'release-notes.*', |
196 |
'dest_directory' => '.', |
197 |
'unpack_inside_distribution_root' => '1', |
198 |
}, |
199 |
}, |
200 |
'unpack_syslinux' => { |
201 |
'class' => 'Youri::Submit::Action::Unpack', |
202 |
'options' => { |
203 |
'name' => 'syslinux', |
204 |
'source_subdir' => '/usr/lib/syslinux/', |
205 |
'grep_files' => '\\(hdt\\|ifcpu\\|ldlinux\\|libcom32\\|libgpl\\|libmenu\\|libutil\\).c32', |
206 |
'dest_directory' => 'isolinux', |
207 |
'unpack_inside_distribution_root' => '1', |
208 |
}, |
209 |
}, |
210 |
'mail' => { |
211 |
'class' => 'Youri::Submit::Action::Mail', |
212 |
'options' => { |
213 |
'mta' => '/usr/sbin/sendmail', |
214 |
}, |
215 |
}, |
216 |
'maintdb' => { |
217 |
'class' => 'Youri::Submit::Action::UpdateMaintDb', |
218 |
}, |
219 |
'rebuild' => { |
220 |
'class' => 'Youri::Submit::Action::RebuildPackage', |
221 |
'options' => { |
222 |
'rules' => { |
223 |
'drakx-installer-binaries' => ['drakx-installer-images'], |
224 |
'drakx-kbd-mouse-x11' => ['drakx-installer-stage2'], |
225 |
'drakx-net' => ['drakx-installer-stage2'], |
226 |
'kernel-desktop-latest' => ['drakx-installer-images', 'kmod-virtualbox', 'kmod-xtables-addons'], |
227 |
'kernel-desktop586-latest' => ['drakx-installer-images', 'kmod-virtualbox', 'kmod-xtables-addons'], |
228 |
'kernel-server-latest' => ['kmod-virtualbox', 'kmod-xtables-addons'], |
229 |
'ldetect-lst' => ['drakx-installer-stage2'], |
230 |
'meta-task' => ['drakx-installer-stage2'], |
231 |
'perl' => ['drakx-installer-stage2'], |
232 |
'perl-URPM' => ['drakx-installer-stage2'], |
233 |
'rpm' => ['drakx-installer-stage2'], |
234 |
'rpm-mageia-setup' => ['drakx-installer-stage2'], |
235 |
'urpmi' => ['drakx-installer-stage2'], |
236 |
}, |
237 |
}, |
238 |
}, |
239 |
}, |
240 |
'posts' => { |
241 |
'genhdlist2' => { |
242 |
'class' => 'Youri::Submit::Post::Genhdlist2', |
243 |
'options' => { |
244 |
'command' => '/usr/bin/genhdlist2', |
245 |
}, |
246 |
}, |
247 |
'clean_rpmsrate' => { |
248 |
'class' => 'Youri::Submit::Post::CleanRpmsrate', |
249 |
}, |
250 |
'mirror' => { |
251 |
'class' => 'Youri::Submit::Post::Mirror', |
252 |
'options' => { |
253 |
'destination' => $buildsystem::var::repository::mirror_reporoot, |
254 |
}, |
255 |
}, |
256 |
}, |
257 |
}, |
258 |
'todo' => { |
259 |
'repository' => { |
260 |
'class' => 'Youri::Repository::Mageia', |
261 |
'options' => { |
262 |
'install_root' => $buildsystem::var::repository::bootstrap_reporoot, |
263 |
'upload_root' => '${home}/uploads/', |
264 |
'upload_state' => 'todo done queue', |
265 |
'queue' => 'todo', |
266 |
'noarch' => 'i586', |
267 |
'svn' => "${buildsystem::var::mgarepo::svn_root_packages_ssh}/${buildsystem::var::distros::default_distro}", |
268 |
}, |
269 |
}, |
270 |
'checks' => { |
271 |
'tag' => $check_tag, |
272 |
'recency' => $check_recency, |
273 |
'queue_recency' => $check_queue_recency, |
274 |
'host' => $check_host, |
275 |
'rpmlint' => $check_rpmlint, |
276 |
'acl' => $check_acl, |
277 |
'source' => $check_source, |
278 |
'version' => $check_version, |
279 |
'deps' => { |
280 |
'class' => 'Youri::Submit::Check::Deps', |
281 |
}, |
282 |
}, |
283 |
'actions' => { |
284 |
'send' => { |
285 |
'class' => 'Youri::Submit::Action::Send', |
286 |
'options' => { |
287 |
'user' => $buildsystem::var::scheduler::login, |
288 |
'keep_svn_release' => 'yes', |
289 |
'uphost' => $buildsystem::var::scheduler::pkg_uphost, |
290 |
'root' => '${home}/uploads', |
291 |
'ssh_key' => '${home}/.ssh/id_rsa', |
292 |
}, |
293 |
}, |
294 |
'dependencies' => { |
295 |
'class' => 'Youri::Submit::Action::Dependencies', |
296 |
'options' => { |
297 |
'user' => $buildsystem::var::scheduler::login, |
298 |
'uphost' => $buildsystem::var::scheduler::pkg_uphost, |
299 |
'root' => '${home}/uploads', |
300 |
'ssh_key' => '${home}/.ssh/id_rsa', |
301 |
}, |
302 |
}, |
303 |
'rpminfo' => { |
304 |
'class' => 'Youri::Submit::Action::Rpminfo', |
305 |
'options' => { |
306 |
'user' => $buildsystem::var::scheduler::login, |
307 |
'uphost' => $buildsystem::var::scheduler::pkg_uphost, |
308 |
'root' => '${home}/uploads', |
309 |
'ssh_key' => '${home}/.ssh/id_rsa', |
310 |
}, |
311 |
}, |
312 |
'ulri' => { |
313 |
'class' => 'Youri::Submit::Action::Ulri', |
314 |
'options' => { |
315 |
'user' => $buildsystem::var::scheduler::login, |
316 |
'uphost' => $buildsystem::var::scheduler::pkg_uphost, |
317 |
'ssh_key' => '${home}/.ssh/id_rsa', |
318 |
}, |
319 |
}, |
320 |
}, |
321 |
'posts' => { |
322 |
}, |
323 |
}, |
324 |
} |
325 |
} |