/[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 3340 - (show annotations) (download)
Fri Sep 27 15:51:52 2013 UTC (10 years, 7 months ago) by tmb
File size: 16880 byte(s)
free up rabbit for iso builds
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', 'sucuk0', 'jonund1', 'ecosse1', 'sucuk1' ],
22 'x86_64' => [ 'ecosse0', 'jonund0', 'sucuk0', 'ecosse1', 'jonund1', 'sucuk1' ],
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 'rpminfo',
241 ],
242 }
243
244 # the list of checks, actions, posts for stable distros in youri-todo
245 $std_youri_todo_targets = {
246 'checks' => [
247 'source',
248 'version',
249 'tag',
250 'acl',
251 'host',
252 'rpmlint',
253 'recency',
254 'queue_recency',
255 ],
256 'actions' => [
257 'send',
258 'rpminfo',
259 'ulri',
260 ],
261 }
262
263 # the list of checks, actions, posts for infra distros in youri-todo
264 $infra_youri_todo_targets = {
265 'checks' => [
266 'source',
267 'version',
268 'tag',
269 'acl',
270 'rpmlint',
271 'recency',
272 'queue_recency',
273 ],
274 'actions' => [
275 'send',
276 'rpminfo',
277 'ulri',
278 ],
279 }
280
281 # rpmlint check options for mageia <= 2
282 $mga2_rpmlint = {
283 'config' => '/usr/share/rpmlint/config.mga2',
284 'path' => '/usr/bin/mga2-rpmlint',
285 'results' => [
286 'buildprereq-use',
287 'no-description-tag',
288 'no-summary-tag',
289 'non-standard-group',
290 'non-xdg-migrated-menu',
291 'percent-in-conflicts',
292 'percent-in-dependency',
293 'percent-in-obsoletes',
294 'percent-in-provides',
295 'summary-ended-with-dot',
296 'unexpanded-macro',
297 'unknown-lsb-keyword',
298 'malformed-line-in-lsb-comment-block',
299 'empty-%postun',
300 'empty-%post',
301 'invalid-desktopfile',
302 'standard-dir-owned-by-package',
303 'use-tmp-in-%postun',
304 'bogus-variable-use-in-%posttrans',
305 'dir-or-file-in-usr-local',
306 'dir-or-file-in-tmp',
307 'dir-or-file-in-mnt',
308 'dir-or-file-in-opt',
309 'dir-or-file-in-home',
310 'dir-or-file-in-var-local',
311 ],
312 }
313
314 # rpmlint check options for Mageia 3
315 $mga3_rpmlint = {
316 'config' => '/usr/share/rpmlint/config',
317 'path' => '/usr/bin/rpmlint',
318 'results' => [
319 'buildprereq-use',
320 'no-description-tag',
321 'no-summary-tag',
322 'non-standard-group',
323 'non-xdg-migrated-menu',
324 'percent-in-conflicts',
325 'percent-in-dependency',
326 'percent-in-obsoletes',
327 'percent-in-provides',
328 'summary-ended-with-dot',
329 'unexpanded-macro',
330 'unknown-lsb-keyword',
331 'malformed-line-in-lsb-comment-block',
332 'empty-%postun',
333 'empty-%post',
334 'invalid-desktopfile',
335 'standard-dir-owned-by-package',
336 'use-tmp-in-%postun',
337 'bogus-variable-use-in-%posttrans',
338 'dir-or-file-in-usr-local',
339 'dir-or-file-in-tmp',
340 'dir-or-file-in-mnt',
341 'dir-or-file-in-opt',
342 'dir-or-file-in-home',
343 'dir-or-file-in-var-local',
344 'tmpfiles-conf-in-etc',
345 'non-ghost-in-run',
346 'non-ghost-in-var-run',
347 'non-ghost-in-var-lock',
348 'systemd-unit-in-etc',
349 'udev-rule-in-etc',
350 ],
351 }
352
353 # rpmlint check options for cauldron
354 $cauldron_rpmlint = {
355 'config' => '/usr/share/rpmlint/config',
356 'path' => '/usr/bin/rpmlint',
357 'results' => [
358 'buildprereq-use',
359 'no-description-tag',
360 'no-summary-tag',
361 'non-standard-group',
362 'non-xdg-migrated-menu',
363 'percent-in-conflicts',
364 'percent-in-dependency',
365 'percent-in-obsoletes',
366 'percent-in-provides',
367 'summary-ended-with-dot',
368 'unexpanded-macro',
369 'unknown-lsb-keyword',
370 'malformed-line-in-lsb-comment-block',
371 'empty-%postun',
372 'empty-%post',
373 'invalid-desktopfile',
374 'standard-dir-owned-by-package',
375 'use-tmp-in-%postun',
376 'bogus-variable-use-in-%posttrans',
377 'dir-or-file-in-usr-local',
378 'dir-or-file-in-tmp',
379 'dir-or-file-in-mnt',
380 'dir-or-file-in-opt',
381 'dir-or-file-in-home',
382 'dir-or-file-in-var-local',
383 'tmpfiles-conf-in-etc',
384 'non-ghost-in-run',
385 'non-ghost-in-var-run',
386 'non-ghost-in-var-lock',
387 'systemd-unit-in-etc',
388 'udev-rule-in-etc',
389 ],
390 }
391
392 # list of users allowed to submit packages when cauldron is frozen
393 $cauldron_authorized_users = str_join(group_members('mga-release_managers'), '|')
394 $cauldron_version_check = {
395 'authorized_sections' => '^[a-z]+/updates_testing$',
396 'authorized_packages' => '^$',
397 'authorized_arches' => 'none',
398 'authorized_users' => "^${cauldron_authorized_users}\$",
399 'mode' => 'normal',
400 #'mode' => 'version_freeze',
401 #'mode' => 'freeze',
402 }
403
404 # for EOL distributions
405 $frozen_version_check = {
406 'authorized_packages' => 'none_package_authorized',
407 'authorized_sections' => 'none_section_authorized',
408 'authorized_arches' => 'none',
409 'mode' => 'freeze',
410 }
411
412 # for supported stable distributions
413 $std_version_check = {
414 'authorized_packages' => 'none_package_authorized',
415 'authorized_sections' => '^(core|nonfree|tainted)/(updates_testing|backports_testing)$',
416 'authorized_arches' => 'none',
417 'mode' => 'freeze',
418 }
419
420 $infra_authorized_users = str_join(group_members('mga-sysadmin'), '|')
421 $infra_version_check = {
422 'authorized_users' => "^${infra_authorized_users}\$",
423 'mode' => 'freeze',
424 }
425
426 class { 'buildsystem::var::distros':
427 default_distro => 'cauldron',
428 distros => {
429 'cauldron' => {
430 'arch' => $std_arch,
431 'medias' => $std_medias,
432 'base_media' => $std_base_media,
433 'branch' => 'Devel',
434 'version' => '4',
435 'submit_allowed' => "${svn_root_packages}/cauldron",
436 'macros' => $std_macros,
437 'repo_allow_from' => $repo_allow_from,
438 'youri' => {
439 'upload' => {
440 'targets' => $cauldron_youri_upload_targets,
441 'checks' => {
442 'rpmlint' => $cauldron_rpmlint,
443 },
444 },
445 'todo' => {
446 'targets' => $cauldron_youri_todo_targets,
447 'checks' => {
448 'rpmlint' => $cauldron_rpmlint,
449 'version' => $cauldron_version_check,
450 },
451 },
452 },
453 },
454
455 '1' => {
456 'arch' => $std_arch,
457 'no_media_cfg_update' => true,
458 'medias' => $std_medias,
459 'base_media' => $std_base_media,
460 'branch' => 'Official',
461 'version' => '1',
462 'submit_allowed' => "${svn_root_packages}/updates/1",
463 'macros' => $std_macros,
464 'repo_allow_from' => $repo_allow_from,
465 'youri' => {
466 'upload' => {
467 'targets' => $std_youri_upload_targets,
468 'checks' => {
469 'rpmlint' => $mga2_rpmlint,
470 },
471 },
472 'todo' => {
473 'targets' => $std_youri_todo_targets,
474 'checks' => {
475 'rpmlint' => $mga2_rpmlint,
476 'version' => $frozen_version_check,
477 },
478 },
479 },
480 },
481
482 '2' => {
483 'arch' => $std_arch,
484 'no_media_cfg_update' => true,
485 'medias' => $std_medias,
486 'base_media' => $std_base_media,
487 'branch' => 'Official',
488 'version' => '2',
489 'submit_allowed' => "${svn_root_packages}/updates/2",
490 'macros' => $std_macros,
491 'repo_allow_from' => $repo_allow_from,
492 'youri' => {
493 'upload' => {
494 'targets' => $std_youri_upload_targets,
495 'checks' => {
496 'rpmlint' => $mga2_rpmlint,
497 },
498 },
499 'todo' => {
500 'targets' => $std_youri_todo_targets,
501 'checks' => {
502 'rpmlint' => $mga2_rpmlint,
503 'version' => $std_version_check,
504 },
505 },
506 },
507 },
508
509 '3' => {
510 'arch' => $std_arch,
511 'no_media_cfg_update' => true,
512 'medias' => $std_medias,
513 'base_media' => $std_base_media,
514 'branch' => 'Official',
515 'version' => '3',
516 'submit_allowed' => "${svn_root_packages}/updates/3",
517 'macros' => $std_macros,
518 'repo_allow_from' => $repo_allow_from,
519 'youri' => {
520 'upload' => {
521 'targets' => $std_youri_upload_targets,
522 'checks' => {
523 'rpmlint' => $mga3_rpmlint,
524 },
525 },
526 'todo' => {
527 'targets' => $std_youri_todo_targets,
528 'checks' => {
529 'rpmlint' => $mga3_rpmlint,
530 'version' => $std_version_check,
531 },
532 },
533 },
534 },
535
536 'infra_1' => {
537 'arch' => $std_arch,
538 'medias' => $infra_medias,
539 'base_media' => [ '1/core/release', '1/core/updates', 'infra/updates' ],
540 'branch' => 'Official',
541 'version' => '1',
542 'submit_allowed' => $svn_root_packages,
543 'macros' => $std_macros,
544 'based_on' => {
545 '1' => {
546 'core' => [ 'release', 'updates' ],
547 },
548 },
549 'youri' => {
550 'upload' => {
551 'targets' => $infra_youri_upload_targets,
552 'checks' => {
553 'rpmlint' => $mga2_rpmlint,
554 },
555 },
556 'todo' => {
557 'targets' => $infra_youri_todo_targets,
558 'checks' => {
559 'rpmlint' => $mga2_rpmlint,
560 'version' => $infra_version_check,
561 },
562 },
563 },
564 'no_mirror' => true,
565 },
566
567 'infra_2' => {
568 'arch' => $std_arch,
569 'medias' => $infra_medias,
570 'base_media' => [ '2/core/release', '2/core/updates', 'infra/updates' ],
571 'branch' => 'Official',
572 'version' => '2',
573 'submit_allowed' => $svn_root_packages,
574 'macros' => $std_macros,
575 'based_on' => {
576 '2' => {
577 'core' => [ 'release', 'updates' ],
578 },
579 },
580 'youri' => {
581 'upload' => {
582 'targets' => $infra_youri_upload_targets,
583 'checks' => {
584 'rpmlint' => $mga2_rpmlint,
585 },
586 },
587 'todo' => {
588 'targets' => $infra_youri_todo_targets,
589 'checks' => {
590 'rpmlint' => $mga2_rpmlint,
591 'version' => $infra_version_check,
592 },
593 },
594 },
595 'no_mirror' => true,
596 },
597 }
598 }
599 $checks_tag_options = {
600 'tags' => {
601 'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"),
602 'distribution' => inline_template("^<%= std_macros['distribution'] %>"),
603 'vendor' => inline_template("^<%= std_macros['vendor'] %>$"),
604 },
605 }
606 class { 'buildsystem::var::youri':
607 packages_archivedir => "${buildsystem::var::scheduler::homedir}/old",
608 youri_conf => {
609 'upload' => {
610 'checks' => {
611 'tag' => {
612 'options' => $checks_tag_options,
613 },
614 'rpmlint' => {
615 'options' => {
616 'results' => [
617 'buildprereq-use',
618 'no-description-tag',
619 'no-summary-tag',
620 'non-standard-group',
621 'non-xdg-migrated-menu',
622 'percent-in-conflicts',
623 'percent-in-dependency',
624 'percent-in-obsoletes',
625 'percent-in-provides',
626 'summary-ended-with-dot',
627 'unexpanded-macro',
628 'unknown-lsb-keyword',
629 'malformed-line-in-lsb-comment-block',
630 'empty-%postun',
631 'empty-%post',
632 'invalid-desktopfile',
633 'standard-dir-owned-by-package',
634 'use-tmp-in-%postun',
635 'bogus-variable-use-in-%posttrans',
636 'dir-or-file-in-usr-local',
637 'dir-or-file-in-tmp',
638 'dir-or-file-in-mnt',
639 'dir-or-file-in-opt',
640 'dir-or-file-in-home',
641 'dir-or-file-in-var-local',
642 ],
643 },
644 },
645 },
646 'actions' => {
647 'mail' => {
648 'options' => {
649 'to' => "changelog@ml.${::domain}",
650 'reply_to' => "mageia-dev@${::domain}",
651 'from' => "buildsystem-daemon@${::domain}",
652 'prefix' => 'RPM',
653 },
654 },
655 },
656 },
657 'todo' => {
658 'checks' => {
659 'tag' => {
660 'options' => $checks_tag_options,
661 },
662 },
663 },
664 }
665 }
666 }

  ViewVC Help
Powered by ViewVC 1.1.30