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

  ViewVC Help
Powered by ViewVC 1.1.26