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

  ViewVC Help
Powered by ViewVC 1.1.30