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

  ViewVC Help
Powered by ViewVC 1.1.30