/[adm]/puppet/deployment/mga_buildsystem/manifests/config.pp
ViewVC logotype

Contents of /puppet/deployment/mga_buildsystem/manifests/config.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3162 - (show annotations) (download)
Thu May 23 15:06:43 2013 UTC (10 years, 10 months ago) by boklm
File size: 12796 byte(s)
buildsystem: Change youri submit configuration

The youri submit configuration has been changed. The following two
template files :
 - youri/submit-todo.conf
 - youri/submit-upload.conf
have been replaced by a common template file for youri submit-todo and
youri submit-upload :
 - youri/submit.conf

This new template file does not contain any specific configuration.
Instead the youri configuration is now created using informations from
the following hash variables :
 - the $youri_conf_default hash from buildsystem::var::youri, containing
   default configuration for the repository, the checks, actions and
   posts.
 - the $youri_conf parameter from buildsystem::var::youri, overriding
   infos from the default configuration defined in $youri_conf_default.
 - the distros specific configuration is defined in the $distros
   parameter from buildsystem::var::distros.
All those variables contain configuration for both youri submit-todo
and youri submit-upload.

This change allows moving all Mageia specific configuration outside the
buildsystem module to the class mga_buildsystem::config, while still
keeping common configuration in the buildsystem module.

The following checks definitions have also been removed from youri
submit-todo configuration, because they are not used in the current
configuration :
 - history
 - precedence
 - section
 - svn

The 'version' check options for infra_1 and infra_2 have been moved from
youri submit-upload to submit-todo configuration.
1 class mga_buildsystem::config {
2 class { 'buildsystem::var::signbot':
3 keyid => '80420F66',
4 keyemail => "packages@${::domain}",
5 keyname => 'Mageia Packages',
6 }
7
8 class { 'buildsystem::var::groups':
9 packagers => 'mga-packagers',
10 packagers_committers => 'mga-packagers-committers',
11 }
12
13 class { 'buildsystem::var::scheduler' :
14 admin_mail => 'mageia-sysadm@mageia.org',
15 build_nodes => {
16 'i586' => [ 'jonund0', 'ecosse0', 'jonund1', 'ecosse1' ],
17 'x86_64' => [ 'ecosse0', 'jonund0', 'ecosse1', 'jonund1' ],
18 },
19 }
20 include buildsystem::var::repository
21 class { 'buildsystem::var::binrepo':
22 uploadmail_from => "root@${::domain}",
23 uploadmail_to => "packages-commits@ml.${::domain}",
24 }
25
26 $svn_hostname = "svn.$::domain"
27 $svn_root_packages = "svn://${svn_hostname}/svn/packages"
28 $svn_root_packages_ssh = "svn+ssh://${svn_hostname}/svn/packages"
29 class { 'buildsystem::var::mgarepo':
30 submit_host => "pkgsubmit.${::domain}",
31 svn_hostname => $svn_hostname,
32 svn_root_packages => $svn_root_packages,
33 svn_root_packages_ssh => $svn_root_packages_ssh,
34 oldurl => "${svn_root_packages_ssh}/misc",
35 conf => {
36 'global' => {
37 'ldap-server' => "ldap.${::domain}",
38 'ldap-base' => "ou=People,${::dc_suffix}",
39 'ldap-filterformat' => '(&(objectClass=inetOrgPerson)(uid=$username))',
40 'ldap-resultformat' => '$cn <$mail>',
41 }
42 }
43 }
44
45 $std_arch = ['i586', 'x86_64']
46 $std_repos = {
47 'release' => {
48 'media_types' => [ 'release' ],
49 'requires' => [],
50 },
51 'updates_testing' => {
52 'media_types' => [ 'testing' ],
53 'noauto' => '1',
54 'requires' => [ 'updates' ],
55 },
56 'backports_testing' => {
57 'media_types' => [ 'testing' ],
58 'noauto' => '1',
59 'requires' => [ 'backports' ],
60 },
61 'backports' => {
62 'media_types' => [ 'backports' ],
63 'noauto' => '1',
64 'requires' => [ 'updates' ],
65 },
66 'updates' => {
67 'media_types' => [ 'updates' ],
68 'updates_for' => 'release',
69 'requires' => [ 'release' ],
70 },
71 }
72 $std_medias = {
73 'core' => {
74 'repos' => $std_repos,
75 'media_types' => [ 'official', 'free' ],
76 },
77 'nonfree' => {
78 'repos' => $std_repos,
79 'media_types' => [ 'official' ],
80 'noauto' => '1',
81 'requires' => [ 'core' ],
82 },
83 'tainted' => {
84 'repos' => $std_repos,
85 'media_types' => [ 'official' ],
86 'noauto' => '1',
87 'requires' => [ 'core' ],
88 },
89 }
90 $std_base_media = [ 'core/release', 'core/updates' ]
91 $infra_medias = {
92 'infra' => {
93 'repos' => {
94 'updates' => {
95 'media_types' => [ 'updates' ],
96 'requires' => [ 'release' ],
97 },
98 },
99 'media_types' => [ 'infra' ],
100 'requires' => [ 'core' ],
101 },
102 }
103 $std_macros = {
104 'distsuffix' => '.mga',
105 'distribution' => 'Mageia',
106 'vendor' => 'Mageia.Org',
107 '_real_vendor' => 'mageia',
108 }
109 $repo_allow_from = [
110 '2a02:2178:2:7::3/64', # valstar
111 '2a02:2178:2:7::4/64', # ecosse
112 '2a02:2178:2:7::5/64', # jonund
113 ".${::domain}",
114 '10.42.0',
115 '212.85.158.152', #rabbit
116 ]
117
118 # the list of checks, actions, posts for cauldron in youri-upload
119 $cauldron_youri_upload_targets = {
120 'checks' => [
121 'version',
122 'tag',
123 'acl',
124 'rpmlint',
125 'recency',
126 ],
127 'actions' => [
128 'markrelease',
129 'sign',
130 'install',
131 'link',
132 'unpack_release_notes',
133 'unpack_gfxboot_theme',
134 'unpack_meta_task',
135 'unpack_installer_images',
136 'unpack_installer_images_nonfree',
137 'unpack_installer_stage2',
138 'unpack_installer_advertising',
139 'unpack_installer_rescue',
140 'unpack_syslinux',
141 'archive',
142 'mail',
143 'maintdb',
144 ],
145 'posts' => [
146 'genhdlist2',
147 'clean_rpmsrate',
148 'mirror',
149 ],
150 }
151
152 # the list of checks, actions, posts for stable distros in youri-upload
153 $std_youri_upload_targets = {
154 'checks' => [
155 'version',
156 'tag',
157 'acl',
158 'rpmlint',
159 'recency',
160 ],
161 'actions' => [
162 'sign',
163 'install',
164 'link',
165 'archive',
166 'mail',
167 ],
168 'posts' => [
169 'genhdlist2',
170 'clean_rpmsrate',
171 'mirror',
172 ],
173 }
174
175 # the list of checks, actions, posts for infra distros in youri-upload
176 $infra_youri_upload_targets = {
177 'checks' => [
178 'version',
179 'tag',
180 'acl',
181 'rpmlint',
182 'recency',
183 ],
184 'actions' => [
185 'sign',
186 'install',
187 'link',
188 'archive',
189 ],
190 'posts' => [
191 'genhdlist2',
192 ],
193 }
194
195 # the list of checks, actions, posts for cauldron in youri-todo
196 $cauldron_youri_todo_targets = {
197 'checks' => [
198 'source',
199 'deps',
200 'version',
201 'tag',
202 'acl',
203 'host',
204 'rpmlint',
205 'recency',
206 'queue_recency',
207 ],
208 'actions' => [
209 'send',
210 'rpminfo',
211 ],
212 }
213
214 # the list of checks, actions, posts for stable distros in youri-todo
215 $std_youri_todo_targets = {
216 'checks' => [
217 'source',
218 'version',
219 'tag',
220 'acl',
221 'host',
222 'rpmlint',
223 'recency',
224 'queue_recency',
225 ],
226 'actions' => [
227 'send',
228 'rpminfo',
229 'ulri',
230 ],
231 }
232
233 # the list of checks, actions, posts for infra distros in youri-todo
234 $infra_youri_todo_targets = {
235 'checks' => [
236 'source',
237 'version',
238 'tag',
239 'acl',
240 'rpmlint',
241 'recency',
242 'queue_recency',
243 ],
244 'actions' => [
245 'send',
246 'rpminfo',
247 'ulri',
248 ],
249 }
250
251 # rpmlint check options for mageia <= 2
252 $mga2_rpmlint = {
253 'config' => '/usr/share/rpmlint/config.mga2',
254 'path' => '/usr/bin/mga2-rpmlint',
255 }
256
257 # rpmlint check options for cauldron
258 $cauldron_rpmlint = {
259 'config' => '/usr/share/rpmlint/config',
260 'path' => '/usr/bin/rpmlint',
261 'results' => [
262 'buildprereq-use',
263 'no-description-tag',
264 'no-summary-tag',
265 'non-standard-group',
266 'non-xdg-migrated-menu',
267 'percent-in-conflicts',
268 'percent-in-dependency',
269 'percent-in-obsoletes',
270 'percent-in-provides',
271 'summary-ended-with-dot',
272 'unexpanded-macro',
273 'unknown-lsb-keyword',
274 'malformed-line-in-lsb-comment-block',
275 'empty-%postun',
276 'empty-%post',
277 'invalid-desktopfile',
278 'standard-dir-owned-by-package',
279 'use-tmp-in-%postun',
280 'bogus-variable-use-in-%posttrans',
281 'dir-or-file-in-usr-local',
282 'dir-or-file-in-tmp',
283 'dir-or-file-in-mnt',
284 'dir-or-file-in-opt',
285 'dir-or-file-in-home',
286 'dir-or-file-in-var-local',
287 'tmpfiles-conf-in-etc',
288 'non-ghost-in-run',
289 'non-ghost-in-var-run',
290 'non-ghost-in-var-lock',
291 'systemd-unit-in-etc',
292 'udev-rule-in-etc',
293 ],
294 }
295
296 # list of users allowed to submit packages when cauldron is frozen
297 $cauldron_authorized_users = str_join(group_members('mga-release_managers'), '|')
298 $cauldron_version_check = {
299 'authorized_sections' => '^[a-z]+/updates_testing$',
300 'authorized_packages' => '^$',
301 'authorized_arches' => 'none',
302 'authorized_users' => "^${cauldron_authorized_users}\$",
303 #'mode' => 'normal',
304 'mode' => 'version_freeze',
305 #'mode' => 'freeze',
306 }
307
308 # for EOL distributions
309 $frozen_version_check = {
310 'authorized_packages' => 'none_package_authorized',
311 'authorized_sections' => 'none_section_authorized',
312 'authorized_arches' => 'none',
313 'mode' => 'freeze',
314 }
315
316 # for supported stable distributions
317 $std_version_check = {
318 'authorized_packages' => 'none_package_authorized',
319 'authorized_sections' => '^(core|nonfree|tainted)/(updates_testing|backports_testing)$',
320 'authorized_arches' => 'none',
321 'mode' => 'freeze',
322 }
323
324 $infra_authorized_users = str_join(group_members('mga-sysadmin'), '|')
325 $infra_version_check = {
326 'authorized_users' => "^${infra_authorized_users}\$",
327 'mode' => 'freeze',
328 }
329
330 class { 'buildsystem::var::distros':
331 default_distro => 'cauldron',
332 distros => {
333 'cauldron' => {
334 'arch' => $std_arch,
335 'medias' => $std_medias,
336 'base_media' => $std_base_media,
337 'branch' => 'Devel',
338 'version' => '3',
339 'submit_allowed' => "${svn_root_packages}/cauldron",
340 'macros' => $std_macros,
341 'repo_allow_from' => $repo_allow_from,
342 'youri' => {
343 'upload' => {
344 'targets' => $cauldron_youri_upload_targets,
345 'checks' => {
346 'rpmlint' => $cauldron_rpmlint,
347 },
348 },
349 'todo' => {
350 'targets' => $cauldron_youri_todo_targets,
351 'checks' => {
352 'rpmlint' => $cauldron_rpmlint,
353 'version' => $cauldron_version_check,
354 },
355 },
356 },
357 },
358
359 '1' => {
360 'arch' => $std_arch,
361 'medias' => $std_medias,
362 'base_media' => $std_base_media,
363 'branch' => 'Official',
364 'version' => '1',
365 'submit_allowed' => "${svn_root_packages}/updates/1",
366 'macros' => $std_macros,
367 'repo_allow_from' => $repo_allow_from,
368 'youri' => {
369 'upload' => {
370 'targets' => $std_youri_upload_targets,
371 'checks' => {
372 'rpmlint' => $mga2_rpmlint,
373 },
374 },
375 'todo' => {
376 'targets' => $std_youri_todo_targets,
377 'checks' => {
378 'rpmlint' => $mga2_rpmlint,
379 'version' => $frozen_version_check,
380 },
381 },
382 },
383 },
384
385 '2' => {
386 'arch' => $std_arch,
387 'medias' => $std_medias,
388 'base_media' => $std_base_media,
389 'branch' => 'Official',
390 'version' => '2',
391 'submit_allowed' => "${svn_root_packages}/updates/2",
392 'macros' => $std_macros,
393 'repo_allow_from' => $repo_allow_from,
394 'youri' => {
395 'upload' => {
396 'targets' => $std_youri_upload_targets,
397 'checks' => {
398 'rpmlint' => $mga2_rpmlint,
399 },
400 },
401 'todo' => {
402 'targets' => $std_youri_todo_targets,
403 'checks' => {
404 'rpmlint' => $mga2_rpmlint,
405 'version' => $std_version_check,
406 },
407 },
408 },
409 },
410
411 'infra_1' => {
412 'arch' => $std_arch,
413 'medias' => $infra_medias,
414 'base_media' => $std_base_media,
415 'branch' => 'Official',
416 'version' => '1',
417 'submit_allowed' => $svn_root_packages,
418 'macros' => $std_macros,
419 'based_on' => {
420 '1' => {
421 'core' => [ 'release', 'updates' ],
422 },
423 },
424 'youri' => {
425 'upload' => {
426 'targets' => $infra_youri_upload_targets,
427 'checks' => {
428 'rpmlint' => $mga2_rpmlint,
429 },
430 },
431 'todo' => {
432 'targets' => $infra_youri_todo_targets,
433 'checks' => {
434 'rpmlint' => $mga2_rpmlint,
435 'version' => $infra_version_check,
436 },
437 },
438 },
439 },
440
441 'infra_2' => {
442 'arch' => $std_arch,
443 'medias' => $infra_medias,
444 'base_media' => $std_base_media,
445 'branch' => 'Official',
446 'version' => '2',
447 'submit_allowed' => $svn_root_packages,
448 'macros' => $std_macros,
449 'based_on' => {
450 '2' => {
451 'core' => [ 'release', 'updates' ],
452 },
453 },
454 'youri' => {
455 'upload' => {
456 'targets' => $infra_youri_upload_targets,
457 'checks' => {
458 'rpmlint' => $mga2_rpmlint,
459 },
460 },
461 'todo' => {
462 'targets' => $infra_youri_todo_targets,
463 'checks' => {
464 'rpmlint' => $mga2_rpmlint,
465 'version' => $infra_version_check,
466 },
467 },
468 },
469 },
470 }
471 }
472 $checks_tag_options = {
473 'tags' => {
474 'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"),
475 'distribution' => inline_template("^<%= std_macros['distribution'] %>"),
476 'vendor' => inline_template("^<%= std_macros['vendor'] %>$"),
477 },
478 }
479 class { 'buildsystem::var::youri':
480 packages_archivedir => "${buildsystem::var::scheduler::homedir}/old",
481 youri_conf => {
482 'upload' => {
483 'checks' => {
484 'tag' => {
485 'options' => $checks_tag_options,
486 },
487 'rpmlint' => {
488 'options' => {
489 'results' => [
490 'buildprereq-use',
491 'no-description-tag',
492 'no-summary-tag',
493 'non-standard-group',
494 'non-xdg-migrated-menu',
495 'percent-in-conflicts',
496 'percent-in-dependency',
497 'percent-in-obsoletes',
498 'percent-in-provides',
499 'summary-ended-with-dot',
500 'unexpanded-macro',
501 'unknown-lsb-keyword',
502 'malformed-line-in-lsb-comment-block',
503 'empty-%postun',
504 'empty-%post',
505 'invalid-desktopfile',
506 'standard-dir-owned-by-package',
507 'use-tmp-in-%postun',
508 'bogus-variable-use-in-%posttrans',
509 'dir-or-file-in-usr-local',
510 'dir-or-file-in-tmp',
511 'dir-or-file-in-mnt',
512 'dir-or-file-in-opt',
513 'dir-or-file-in-home',
514 'dir-or-file-in-var-local',
515 ],
516 },
517 },
518 },
519 'actions' => {
520 'mail' => {
521 'options' => {
522 'to' => "changelog@ml.${::domain}",
523 'reply_to' => "mageia-dev@${::domain}",
524 'from' => "buildsystem-daemon@${::domain}",
525 'prefix' => 'RPM',
526 },
527 },
528 },
529 },
530 'todo' => {
531 'checks' => {
532 'tag' => {
533 'options' => $checks_tag_options,
534 },
535 },
536 },
537 }
538 }
539 }

  ViewVC Help
Powered by ViewVC 1.1.30