/[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 3341 - (show annotations) (download)
Sun Sep 29 18:07:47 2013 UTC (6 years, 1 month ago) by pterjan
File size: 16896 byte(s)
Enable auto rebuild for a few packages
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 'rebuild',
175 ],
176 'posts' => [
177 'genhdlist2',
178 'clean_rpmsrate',
179 'mirror',
180 ],
181 }
182
183 # the list of checks, actions, posts for stable distros in youri-upload
184 $std_youri_upload_targets = {
185 'checks' => [
186 'version',
187 'tag',
188 'acl',
189 'rpmlint',
190 'recency',
191 ],
192 'actions' => [
193 'sign',
194 'install',
195 'link',
196 'archive',
197 'mail',
198 ],
199 'posts' => [
200 'genhdlist2',
201 'clean_rpmsrate',
202 'mirror',
203 ],
204 }
205
206 # the list of checks, actions, posts for infra distros in youri-upload
207 $infra_youri_upload_targets = {
208 'checks' => [
209 'version',
210 'tag',
211 'acl',
212 'rpmlint',
213 'recency',
214 ],
215 'actions' => [
216 'sign',
217 'install',
218 'link',
219 'archive',
220 ],
221 'posts' => [
222 'genhdlist2',
223 ],
224 }
225
226 # the list of checks, actions, posts for cauldron in youri-todo
227 $cauldron_youri_todo_targets = {
228 'checks' => [
229 'source',
230 'deps',
231 'version',
232 'tag',
233 'acl',
234 'host',
235 'rpmlint',
236 'recency',
237 'queue_recency',
238 ],
239 'actions' => [
240 'send',
241 'rpminfo',
242 ],
243 }
244
245 # the list of checks, actions, posts for stable distros in youri-todo
246 $std_youri_todo_targets = {
247 'checks' => [
248 'source',
249 'version',
250 'tag',
251 'acl',
252 'host',
253 'rpmlint',
254 'recency',
255 'queue_recency',
256 ],
257 'actions' => [
258 'send',
259 'rpminfo',
260 'ulri',
261 ],
262 }
263
264 # the list of checks, actions, posts for infra distros in youri-todo
265 $infra_youri_todo_targets = {
266 'checks' => [
267 'source',
268 'version',
269 'tag',
270 'acl',
271 'rpmlint',
272 'recency',
273 'queue_recency',
274 ],
275 'actions' => [
276 'send',
277 'rpminfo',
278 'ulri',
279 ],
280 }
281
282 # rpmlint check options for mageia <= 2
283 $mga2_rpmlint = {
284 'config' => '/usr/share/rpmlint/config.mga2',
285 'path' => '/usr/bin/mga2-rpmlint',
286 'results' => [
287 'buildprereq-use',
288 'no-description-tag',
289 'no-summary-tag',
290 'non-standard-group',
291 'non-xdg-migrated-menu',
292 'percent-in-conflicts',
293 'percent-in-dependency',
294 'percent-in-obsoletes',
295 'percent-in-provides',
296 'summary-ended-with-dot',
297 'unexpanded-macro',
298 'unknown-lsb-keyword',
299 'malformed-line-in-lsb-comment-block',
300 'empty-%postun',
301 'empty-%post',
302 'invalid-desktopfile',
303 'standard-dir-owned-by-package',
304 'use-tmp-in-%postun',
305 'bogus-variable-use-in-%posttrans',
306 'dir-or-file-in-usr-local',
307 'dir-or-file-in-tmp',
308 'dir-or-file-in-mnt',
309 'dir-or-file-in-opt',
310 'dir-or-file-in-home',
311 'dir-or-file-in-var-local',
312 ],
313 }
314
315 # rpmlint check options for Mageia 3
316 $mga3_rpmlint = {
317 'config' => '/usr/share/rpmlint/config',
318 'path' => '/usr/bin/rpmlint',
319 'results' => [
320 'buildprereq-use',
321 'no-description-tag',
322 'no-summary-tag',
323 'non-standard-group',
324 'non-xdg-migrated-menu',
325 'percent-in-conflicts',
326 'percent-in-dependency',
327 'percent-in-obsoletes',
328 'percent-in-provides',
329 'summary-ended-with-dot',
330 'unexpanded-macro',
331 'unknown-lsb-keyword',
332 'malformed-line-in-lsb-comment-block',
333 'empty-%postun',
334 'empty-%post',
335 'invalid-desktopfile',
336 'standard-dir-owned-by-package',
337 'use-tmp-in-%postun',
338 'bogus-variable-use-in-%posttrans',
339 'dir-or-file-in-usr-local',
340 'dir-or-file-in-tmp',
341 'dir-or-file-in-mnt',
342 'dir-or-file-in-opt',
343 'dir-or-file-in-home',
344 'dir-or-file-in-var-local',
345 'tmpfiles-conf-in-etc',
346 'non-ghost-in-run',
347 'non-ghost-in-var-run',
348 'non-ghost-in-var-lock',
349 'systemd-unit-in-etc',
350 'udev-rule-in-etc',
351 ],
352 }
353
354 # rpmlint check options for cauldron
355 $cauldron_rpmlint = {
356 'config' => '/usr/share/rpmlint/config',
357 'path' => '/usr/bin/rpmlint',
358 'results' => [
359 'buildprereq-use',
360 'no-description-tag',
361 'no-summary-tag',
362 'non-standard-group',
363 'non-xdg-migrated-menu',
364 'percent-in-conflicts',
365 'percent-in-dependency',
366 'percent-in-obsoletes',
367 'percent-in-provides',
368 'summary-ended-with-dot',
369 'unexpanded-macro',
370 'unknown-lsb-keyword',
371 'malformed-line-in-lsb-comment-block',
372 'empty-%postun',
373 'empty-%post',
374 'invalid-desktopfile',
375 'standard-dir-owned-by-package',
376 'use-tmp-in-%postun',
377 'bogus-variable-use-in-%posttrans',
378 'dir-or-file-in-usr-local',
379 'dir-or-file-in-tmp',
380 'dir-or-file-in-mnt',
381 'dir-or-file-in-opt',
382 'dir-or-file-in-home',
383 'dir-or-file-in-var-local',
384 'tmpfiles-conf-in-etc',
385 'non-ghost-in-run',
386 'non-ghost-in-var-run',
387 'non-ghost-in-var-lock',
388 'systemd-unit-in-etc',
389 'udev-rule-in-etc',
390 ],
391 }
392
393 # list of users allowed to submit packages when cauldron is frozen
394 $cauldron_authorized_users = str_join(group_members('mga-release_managers'), '|')
395 $cauldron_version_check = {
396 'authorized_sections' => '^[a-z]+/updates_testing$',
397 'authorized_packages' => '^$',
398 'authorized_arches' => 'none',
399 'authorized_users' => "^${cauldron_authorized_users}\$",
400 'mode' => 'normal',
401 #'mode' => 'version_freeze',
402 #'mode' => 'freeze',
403 }
404
405 # for EOL distributions
406 $frozen_version_check = {
407 'authorized_packages' => 'none_package_authorized',
408 'authorized_sections' => 'none_section_authorized',
409 'authorized_arches' => 'none',
410 'mode' => 'freeze',
411 }
412
413 # for supported stable distributions
414 $std_version_check = {
415 'authorized_packages' => 'none_package_authorized',
416 'authorized_sections' => '^(core|nonfree|tainted)/(updates_testing|backports_testing)$',
417 'authorized_arches' => 'none',
418 'mode' => 'freeze',
419 }
420
421 $infra_authorized_users = str_join(group_members('mga-sysadmin'), '|')
422 $infra_version_check = {
423 'authorized_users' => "^${infra_authorized_users}\$",
424 'mode' => 'freeze',
425 }
426
427 class { 'buildsystem::var::distros':
428 default_distro => 'cauldron',
429 distros => {
430 'cauldron' => {
431 'arch' => $std_arch,
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' => $std_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.26