/[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 3395 - (show annotations) (download)
Sun Jan 19 03:41:07 2014 UTC (10 years, 2 months ago) by tmb
File size: 16963 byte(s)
leave sucuk to autobuilder
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 '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' => 'drak|^(urpmi|perl-URPM|perl-(Gtk3|Glib(-Object-Introspection)?)|mgaonline|net_monitor)$',
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 'no_media_cfg_update' => true,
432 'medias' => $std_medias,
433 'base_media' => $std_base_media,
434 'branch' => 'Devel',
435 'version' => '4',
436 'submit_allowed' => "${svn_root_packages}/cauldron",
437 'macros' => $std_macros,
438 'repo_allow_from' => $repo_allow_from,
439 'youri' => {
440 'upload' => {
441 'targets' => $cauldron_youri_upload_targets,
442 'checks' => {
443 'rpmlint' => $cauldron_rpmlint,
444 },
445 },
446 'todo' => {
447 'targets' => $cauldron_youri_todo_targets,
448 'checks' => {
449 'rpmlint' => $cauldron_rpmlint,
450 'version' => $cauldron_version_check,
451 },
452 },
453 },
454 },
455
456 '1' => {
457 'arch' => $std_arch,
458 'no_media_cfg_update' => true,
459 'medias' => $std_medias,
460 'base_media' => $std_base_media,
461 'branch' => 'Official',
462 'version' => '1',
463 'submit_allowed' => "${svn_root_packages}/updates/1",
464 'macros' => $std_macros,
465 'repo_allow_from' => $repo_allow_from,
466 'youri' => {
467 'upload' => {
468 'targets' => $std_youri_upload_targets,
469 'checks' => {
470 'rpmlint' => $mga2_rpmlint,
471 },
472 },
473 'todo' => {
474 'targets' => $std_youri_todo_targets,
475 'checks' => {
476 'rpmlint' => $mga2_rpmlint,
477 'version' => $frozen_version_check,
478 },
479 },
480 },
481 },
482
483 '2' => {
484 'arch' => $std_arch,
485 'no_media_cfg_update' => true,
486 'medias' => $std_medias,
487 'base_media' => $std_base_media,
488 'branch' => 'Official',
489 'version' => '2',
490 'submit_allowed' => "${svn_root_packages}/updates/2",
491 'macros' => $std_macros,
492 'repo_allow_from' => $repo_allow_from,
493 'youri' => {
494 'upload' => {
495 'targets' => $std_youri_upload_targets,
496 'checks' => {
497 'rpmlint' => $mga2_rpmlint,
498 },
499 },
500 'todo' => {
501 'targets' => $std_youri_todo_targets,
502 'checks' => {
503 'rpmlint' => $mga2_rpmlint,
504 'version' => $frozen_version_check,
505 },
506 },
507 },
508 },
509
510 '3' => {
511 'arch' => $std_arch,
512 'no_media_cfg_update' => true,
513 'medias' => $std_medias,
514 'base_media' => $std_base_media,
515 'branch' => 'Official',
516 'version' => '3',
517 'submit_allowed' => "${svn_root_packages}/updates/3",
518 'macros' => $std_macros,
519 'repo_allow_from' => $repo_allow_from,
520 'youri' => {
521 'upload' => {
522 'targets' => $std_youri_upload_targets,
523 'checks' => {
524 'rpmlint' => $mga3_rpmlint,
525 },
526 },
527 'todo' => {
528 'targets' => $std_youri_todo_targets,
529 'checks' => {
530 'rpmlint' => $mga3_rpmlint,
531 'version' => $std_version_check,
532 },
533 },
534 },
535 },
536
537 'infra_1' => {
538 'arch' => $std_arch,
539 'medias' => $infra_medias,
540 'base_media' => [ '1/core/release', '1/core/updates', 'infra/updates' ],
541 'branch' => 'Official',
542 'version' => '1',
543 'submit_allowed' => $svn_root_packages,
544 'macros' => $std_macros,
545 'based_on' => {
546 '1' => {
547 'core' => [ 'release', 'updates' ],
548 },
549 },
550 'youri' => {
551 'upload' => {
552 'targets' => $infra_youri_upload_targets,
553 'checks' => {
554 'rpmlint' => $mga2_rpmlint,
555 },
556 },
557 'todo' => {
558 'targets' => $infra_youri_todo_targets,
559 'checks' => {
560 'rpmlint' => $mga2_rpmlint,
561 'version' => $infra_version_check,
562 },
563 },
564 },
565 'no_mirror' => true,
566 },
567
568 'infra_2' => {
569 'arch' => $std_arch,
570 'medias' => $infra_medias,
571 'base_media' => [ '2/core/release', '2/core/updates', 'infra/updates' ],
572 'branch' => 'Official',
573 'version' => '2',
574 'submit_allowed' => $svn_root_packages,
575 'macros' => $std_macros,
576 'based_on' => {
577 '2' => {
578 'core' => [ 'release', 'updates' ],
579 },
580 },
581 'youri' => {
582 'upload' => {
583 'targets' => $infra_youri_upload_targets,
584 'checks' => {
585 'rpmlint' => $mga2_rpmlint,
586 },
587 },
588 'todo' => {
589 'targets' => $infra_youri_todo_targets,
590 'checks' => {
591 'rpmlint' => $mga2_rpmlint,
592 'version' => $infra_version_check,
593 },
594 },
595 },
596 'no_mirror' => true,
597 },
598 }
599 }
600 $checks_tag_options = {
601 'tags' => {
602 'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"),
603 'distribution' => inline_template("^<%= std_macros['distribution'] %>"),
604 'vendor' => inline_template("^<%= std_macros['vendor'] %>$"),
605 },
606 }
607 class { 'buildsystem::var::youri':
608 packages_archivedir => "${buildsystem::var::scheduler::homedir}/old",
609 youri_conf => {
610 'upload' => {
611 'checks' => {
612 'tag' => {
613 'options' => $checks_tag_options,
614 },
615 'rpmlint' => {
616 'options' => {
617 'results' => [
618 'buildprereq-use',
619 'no-description-tag',
620 'no-summary-tag',
621 'non-standard-group',
622 'non-xdg-migrated-menu',
623 'percent-in-conflicts',
624 'percent-in-dependency',
625 'percent-in-obsoletes',
626 'percent-in-provides',
627 'summary-ended-with-dot',
628 'unexpanded-macro',
629 'unknown-lsb-keyword',
630 'malformed-line-in-lsb-comment-block',
631 'empty-%postun',
632 'empty-%post',
633 'invalid-desktopfile',
634 'standard-dir-owned-by-package',
635 'use-tmp-in-%postun',
636 'bogus-variable-use-in-%posttrans',
637 'dir-or-file-in-usr-local',
638 'dir-or-file-in-tmp',
639 'dir-or-file-in-mnt',
640 'dir-or-file-in-opt',
641 'dir-or-file-in-home',
642 'dir-or-file-in-var-local',
643 ],
644 },
645 },
646 },
647 'actions' => {
648 'mail' => {
649 'options' => {
650 'to' => "changelog@ml.${::domain}",
651 'reply_to' => "mageia-dev@${::domain}",
652 'from' => "buildsystem-daemon@${::domain}",
653 'prefix' => 'RPM',
654 },
655 },
656 },
657 },
658 'todo' => {
659 'checks' => {
660 'tag' => {
661 'options' => $checks_tag_options,
662 },
663 },
664 },
665 }
666 }
667 }

  ViewVC Help
Powered by ViewVC 1.1.30