/[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 3165 - (show annotations) (download)
Thu May 23 15:06:52 2013 UTC (10 years, 11 months ago) by boklm
File size: 13028 byte(s)
buildsystem: add /etc/youri/host.conf

The host.conf config file for youri contains the hostnames of the nodes
that are building packages for each architecture. The variable
$build_src_node has been added to buildsystem::var::scheduler to contain
the hostname of the server building the initial src.rpm. The variable
$build_nodes_aliases has been added to buildsystem::var::scheduler to be
used to find the real hostnames of the nodes building the packages for
each architecture.
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::scheduler' :
14 admin_mail => 'mageia-sysadm@mageia.org',
15 build_nodes => {
16 'i586' => [ 'jonund0', 'ecosse0', 'jonund1', 'ecosse1' ],
17 'x86_64' => [ 'ecosse0', 'jonund0', 'ecosse1', 'jonund1' ],
18 },
19 build_nodes_aliases => {
20 'jonund0' => "jonund.${::domain}",
21 'jonund1' => "jonund.${::domain}",
22 'ecosse0' => "ecosse.${::domain}",
23 'ecosse1' => "ecosse.${::domain}",
24 },
25 build_src_node => "valstar.${::domain}",
26 }
27 include buildsystem::var::repository
28 class { 'buildsystem::var::binrepo':
29 uploadmail_from => "root@${::domain}",
30 uploadmail_to => "packages-commits@ml.${::domain}",
31 }
32
33 $svn_hostname = "svn.$::domain"
34 $svn_root_packages = "svn://${svn_hostname}/svn/packages"
35 $svn_root_packages_ssh = "svn+ssh://${svn_hostname}/svn/packages"
36 class { 'buildsystem::var::mgarepo':
37 submit_host => "pkgsubmit.${::domain}",
38 svn_hostname => $svn_hostname,
39 svn_root_packages => $svn_root_packages,
40 svn_root_packages_ssh => $svn_root_packages_ssh,
41 oldurl => "${svn_root_packages_ssh}/misc",
42 conf => {
43 'global' => {
44 'ldap-server' => "ldap.${::domain}",
45 'ldap-base' => "ou=People,${::dc_suffix}",
46 'ldap-filterformat' => '(&(objectClass=inetOrgPerson)(uid=$username))',
47 'ldap-resultformat' => '$cn <$mail>',
48 }
49 }
50 }
51
52 $std_arch = ['i586', 'x86_64']
53 $std_repos = {
54 'release' => {
55 'media_types' => [ 'release' ],
56 'requires' => [],
57 },
58 'updates_testing' => {
59 'media_types' => [ 'testing' ],
60 'noauto' => '1',
61 'requires' => [ 'updates' ],
62 },
63 'backports_testing' => {
64 'media_types' => [ 'testing' ],
65 'noauto' => '1',
66 'requires' => [ 'backports' ],
67 },
68 'backports' => {
69 'media_types' => [ 'backports' ],
70 'noauto' => '1',
71 'requires' => [ 'updates' ],
72 },
73 'updates' => {
74 'media_types' => [ 'updates' ],
75 'updates_for' => 'release',
76 'requires' => [ 'release' ],
77 },
78 }
79 $std_medias = {
80 'core' => {
81 'repos' => $std_repos,
82 'media_types' => [ 'official', 'free' ],
83 },
84 'nonfree' => {
85 'repos' => $std_repos,
86 'media_types' => [ 'official' ],
87 'noauto' => '1',
88 'requires' => [ 'core' ],
89 },
90 'tainted' => {
91 'repos' => $std_repos,
92 'media_types' => [ 'official' ],
93 'noauto' => '1',
94 'requires' => [ 'core' ],
95 },
96 }
97 $std_base_media = [ 'core/release', 'core/updates' ]
98 $infra_medias = {
99 'infra' => {
100 'repos' => {
101 'updates' => {
102 'media_types' => [ 'updates' ],
103 'requires' => [ 'release' ],
104 },
105 },
106 'media_types' => [ 'infra' ],
107 'requires' => [ 'core' ],
108 },
109 }
110 $std_macros = {
111 'distsuffix' => '.mga',
112 'distribution' => 'Mageia',
113 'vendor' => 'Mageia.Org',
114 '_real_vendor' => 'mageia',
115 }
116 $repo_allow_from = [
117 '2a02:2178:2:7::3/64', # valstar
118 '2a02:2178:2:7::4/64', # ecosse
119 '2a02:2178:2:7::5/64', # jonund
120 ".${::domain}",
121 '10.42.0',
122 '212.85.158.152', #rabbit
123 ]
124
125 # the list of checks, actions, posts for cauldron in youri-upload
126 $cauldron_youri_upload_targets = {
127 'checks' => [
128 'version',
129 'tag',
130 'acl',
131 'rpmlint',
132 'recency',
133 ],
134 'actions' => [
135 'markrelease',
136 'sign',
137 'install',
138 'link',
139 'unpack_release_notes',
140 'unpack_gfxboot_theme',
141 'unpack_meta_task',
142 'unpack_installer_images',
143 'unpack_installer_images_nonfree',
144 'unpack_installer_stage2',
145 'unpack_installer_advertising',
146 'unpack_installer_rescue',
147 'unpack_syslinux',
148 'archive',
149 'mail',
150 'maintdb',
151 ],
152 'posts' => [
153 'genhdlist2',
154 'clean_rpmsrate',
155 'mirror',
156 ],
157 }
158
159 # the list of checks, actions, posts for stable distros in youri-upload
160 $std_youri_upload_targets = {
161 'checks' => [
162 'version',
163 'tag',
164 'acl',
165 'rpmlint',
166 'recency',
167 ],
168 'actions' => [
169 'sign',
170 'install',
171 'link',
172 'archive',
173 'mail',
174 ],
175 'posts' => [
176 'genhdlist2',
177 'clean_rpmsrate',
178 'mirror',
179 ],
180 }
181
182 # the list of checks, actions, posts for infra distros in youri-upload
183 $infra_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 ],
197 'posts' => [
198 'genhdlist2',
199 ],
200 }
201
202 # the list of checks, actions, posts for cauldron in youri-todo
203 $cauldron_youri_todo_targets = {
204 'checks' => [
205 'source',
206 'deps',
207 'version',
208 'tag',
209 'acl',
210 'host',
211 'rpmlint',
212 'recency',
213 'queue_recency',
214 ],
215 'actions' => [
216 'send',
217 'rpminfo',
218 ],
219 }
220
221 # the list of checks, actions, posts for stable distros in youri-todo
222 $std_youri_todo_targets = {
223 'checks' => [
224 'source',
225 'version',
226 'tag',
227 'acl',
228 'host',
229 'rpmlint',
230 'recency',
231 'queue_recency',
232 ],
233 'actions' => [
234 'send',
235 'rpminfo',
236 'ulri',
237 ],
238 }
239
240 # the list of checks, actions, posts for infra distros in youri-todo
241 $infra_youri_todo_targets = {
242 'checks' => [
243 'source',
244 'version',
245 'tag',
246 'acl',
247 'rpmlint',
248 'recency',
249 'queue_recency',
250 ],
251 'actions' => [
252 'send',
253 'rpminfo',
254 'ulri',
255 ],
256 }
257
258 # rpmlint check options for mageia <= 2
259 $mga2_rpmlint = {
260 'config' => '/usr/share/rpmlint/config.mga2',
261 'path' => '/usr/bin/mga2-rpmlint',
262 }
263
264 # rpmlint check options for cauldron
265 $cauldron_rpmlint = {
266 'config' => '/usr/share/rpmlint/config',
267 'path' => '/usr/bin/rpmlint',
268 'results' => [
269 'buildprereq-use',
270 'no-description-tag',
271 'no-summary-tag',
272 'non-standard-group',
273 'non-xdg-migrated-menu',
274 'percent-in-conflicts',
275 'percent-in-dependency',
276 'percent-in-obsoletes',
277 'percent-in-provides',
278 'summary-ended-with-dot',
279 'unexpanded-macro',
280 'unknown-lsb-keyword',
281 'malformed-line-in-lsb-comment-block',
282 'empty-%postun',
283 'empty-%post',
284 'invalid-desktopfile',
285 'standard-dir-owned-by-package',
286 'use-tmp-in-%postun',
287 'bogus-variable-use-in-%posttrans',
288 'dir-or-file-in-usr-local',
289 'dir-or-file-in-tmp',
290 'dir-or-file-in-mnt',
291 'dir-or-file-in-opt',
292 'dir-or-file-in-home',
293 'dir-or-file-in-var-local',
294 'tmpfiles-conf-in-etc',
295 'non-ghost-in-run',
296 'non-ghost-in-var-run',
297 'non-ghost-in-var-lock',
298 'systemd-unit-in-etc',
299 'udev-rule-in-etc',
300 ],
301 }
302
303 # list of users allowed to submit packages when cauldron is frozen
304 $cauldron_authorized_users = str_join(group_members('mga-release_managers'), '|')
305 $cauldron_version_check = {
306 'authorized_sections' => '^[a-z]+/updates_testing$',
307 'authorized_packages' => '^$',
308 'authorized_arches' => 'none',
309 'authorized_users' => "^${cauldron_authorized_users}\$",
310 #'mode' => 'normal',
311 'mode' => 'version_freeze',
312 #'mode' => 'freeze',
313 }
314
315 # for EOL distributions
316 $frozen_version_check = {
317 'authorized_packages' => 'none_package_authorized',
318 'authorized_sections' => 'none_section_authorized',
319 'authorized_arches' => 'none',
320 'mode' => 'freeze',
321 }
322
323 # for supported stable distributions
324 $std_version_check = {
325 'authorized_packages' => 'none_package_authorized',
326 'authorized_sections' => '^(core|nonfree|tainted)/(updates_testing|backports_testing)$',
327 'authorized_arches' => 'none',
328 'mode' => 'freeze',
329 }
330
331 $infra_authorized_users = str_join(group_members('mga-sysadmin'), '|')
332 $infra_version_check = {
333 'authorized_users' => "^${infra_authorized_users}\$",
334 'mode' => 'freeze',
335 }
336
337 class { 'buildsystem::var::distros':
338 default_distro => 'cauldron',
339 distros => {
340 'cauldron' => {
341 'arch' => $std_arch,
342 'medias' => $std_medias,
343 'base_media' => $std_base_media,
344 'branch' => 'Devel',
345 'version' => '3',
346 'submit_allowed' => "${svn_root_packages}/cauldron",
347 'macros' => $std_macros,
348 'repo_allow_from' => $repo_allow_from,
349 'youri' => {
350 'upload' => {
351 'targets' => $cauldron_youri_upload_targets,
352 'checks' => {
353 'rpmlint' => $cauldron_rpmlint,
354 },
355 },
356 'todo' => {
357 'targets' => $cauldron_youri_todo_targets,
358 'checks' => {
359 'rpmlint' => $cauldron_rpmlint,
360 'version' => $cauldron_version_check,
361 },
362 },
363 },
364 },
365
366 '1' => {
367 'arch' => $std_arch,
368 'medias' => $std_medias,
369 'base_media' => $std_base_media,
370 'branch' => 'Official',
371 'version' => '1',
372 'submit_allowed' => "${svn_root_packages}/updates/1",
373 'macros' => $std_macros,
374 'repo_allow_from' => $repo_allow_from,
375 'youri' => {
376 'upload' => {
377 'targets' => $std_youri_upload_targets,
378 'checks' => {
379 'rpmlint' => $mga2_rpmlint,
380 },
381 },
382 'todo' => {
383 'targets' => $std_youri_todo_targets,
384 'checks' => {
385 'rpmlint' => $mga2_rpmlint,
386 'version' => $frozen_version_check,
387 },
388 },
389 },
390 },
391
392 '2' => {
393 'arch' => $std_arch,
394 'medias' => $std_medias,
395 'base_media' => $std_base_media,
396 'branch' => 'Official',
397 'version' => '2',
398 'submit_allowed' => "${svn_root_packages}/updates/2",
399 'macros' => $std_macros,
400 'repo_allow_from' => $repo_allow_from,
401 'youri' => {
402 'upload' => {
403 'targets' => $std_youri_upload_targets,
404 'checks' => {
405 'rpmlint' => $mga2_rpmlint,
406 },
407 },
408 'todo' => {
409 'targets' => $std_youri_todo_targets,
410 'checks' => {
411 'rpmlint' => $mga2_rpmlint,
412 'version' => $std_version_check,
413 },
414 },
415 },
416 },
417
418 'infra_1' => {
419 'arch' => $std_arch,
420 'medias' => $infra_medias,
421 'base_media' => $std_base_media,
422 'branch' => 'Official',
423 'version' => '1',
424 'submit_allowed' => $svn_root_packages,
425 'macros' => $std_macros,
426 'based_on' => {
427 '1' => {
428 'core' => [ 'release', 'updates' ],
429 },
430 },
431 'youri' => {
432 'upload' => {
433 'targets' => $infra_youri_upload_targets,
434 'checks' => {
435 'rpmlint' => $mga2_rpmlint,
436 },
437 },
438 'todo' => {
439 'targets' => $infra_youri_todo_targets,
440 'checks' => {
441 'rpmlint' => $mga2_rpmlint,
442 'version' => $infra_version_check,
443 },
444 },
445 },
446 },
447
448 'infra_2' => {
449 'arch' => $std_arch,
450 'medias' => $infra_medias,
451 'base_media' => $std_base_media,
452 'branch' => 'Official',
453 'version' => '2',
454 'submit_allowed' => $svn_root_packages,
455 'macros' => $std_macros,
456 'based_on' => {
457 '2' => {
458 'core' => [ 'release', 'updates' ],
459 },
460 },
461 'youri' => {
462 'upload' => {
463 'targets' => $infra_youri_upload_targets,
464 'checks' => {
465 'rpmlint' => $mga2_rpmlint,
466 },
467 },
468 'todo' => {
469 'targets' => $infra_youri_todo_targets,
470 'checks' => {
471 'rpmlint' => $mga2_rpmlint,
472 'version' => $infra_version_check,
473 },
474 },
475 },
476 },
477 }
478 }
479 $checks_tag_options = {
480 'tags' => {
481 'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"),
482 'distribution' => inline_template("^<%= std_macros['distribution'] %>"),
483 'vendor' => inline_template("^<%= std_macros['vendor'] %>$"),
484 },
485 }
486 class { 'buildsystem::var::youri':
487 packages_archivedir => "${buildsystem::var::scheduler::homedir}/old",
488 youri_conf => {
489 'upload' => {
490 'checks' => {
491 'tag' => {
492 'options' => $checks_tag_options,
493 },
494 'rpmlint' => {
495 'options' => {
496 'results' => [
497 'buildprereq-use',
498 'no-description-tag',
499 'no-summary-tag',
500 'non-standard-group',
501 'non-xdg-migrated-menu',
502 'percent-in-conflicts',
503 'percent-in-dependency',
504 'percent-in-obsoletes',
505 'percent-in-provides',
506 'summary-ended-with-dot',
507 'unexpanded-macro',
508 'unknown-lsb-keyword',
509 'malformed-line-in-lsb-comment-block',
510 'empty-%postun',
511 'empty-%post',
512 'invalid-desktopfile',
513 'standard-dir-owned-by-package',
514 'use-tmp-in-%postun',
515 'bogus-variable-use-in-%posttrans',
516 'dir-or-file-in-usr-local',
517 'dir-or-file-in-tmp',
518 'dir-or-file-in-mnt',
519 'dir-or-file-in-opt',
520 'dir-or-file-in-home',
521 'dir-or-file-in-var-local',
522 ],
523 },
524 },
525 },
526 'actions' => {
527 'mail' => {
528 'options' => {
529 'to' => "changelog@ml.${::domain}",
530 'reply_to' => "mageia-dev@${::domain}",
531 'from' => "buildsystem-daemon@${::domain}",
532 'prefix' => 'RPM',
533 },
534 },
535 },
536 },
537 'todo' => {
538 'checks' => {
539 'tag' => {
540 'options' => $checks_tag_options,
541 },
542 },
543 },
544 }
545 }
546 }

  ViewVC Help
Powered by ViewVC 1.1.30