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' => '3', |
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 |
'infra_1' => { |
428 |
'arch' => $std_arch, |
429 |
'medias' => $infra_medias, |
430 |
'base_media' => $std_base_media, |
431 |
'branch' => 'Official', |
432 |
'version' => '1', |
433 |
'submit_allowed' => $svn_root_packages, |
434 |
'macros' => $std_macros, |
435 |
'based_on' => { |
436 |
'1' => { |
437 |
'core' => [ 'release', 'updates' ], |
438 |
}, |
439 |
}, |
440 |
'youri' => { |
441 |
'upload' => { |
442 |
'targets' => $infra_youri_upload_targets, |
443 |
'checks' => { |
444 |
'rpmlint' => $mga2_rpmlint, |
445 |
}, |
446 |
}, |
447 |
'todo' => { |
448 |
'targets' => $infra_youri_todo_targets, |
449 |
'checks' => { |
450 |
'rpmlint' => $mga2_rpmlint, |
451 |
'version' => $infra_version_check, |
452 |
}, |
453 |
}, |
454 |
}, |
455 |
}, |
456 |
|
457 |
'infra_2' => { |
458 |
'arch' => $std_arch, |
459 |
'medias' => $infra_medias, |
460 |
'base_media' => $std_base_media, |
461 |
'branch' => 'Official', |
462 |
'version' => '2', |
463 |
'submit_allowed' => $svn_root_packages, |
464 |
'macros' => $std_macros, |
465 |
'based_on' => { |
466 |
'2' => { |
467 |
'core' => [ 'release', 'updates' ], |
468 |
}, |
469 |
}, |
470 |
'youri' => { |
471 |
'upload' => { |
472 |
'targets' => $infra_youri_upload_targets, |
473 |
'checks' => { |
474 |
'rpmlint' => $mga2_rpmlint, |
475 |
}, |
476 |
}, |
477 |
'todo' => { |
478 |
'targets' => $infra_youri_todo_targets, |
479 |
'checks' => { |
480 |
'rpmlint' => $mga2_rpmlint, |
481 |
'version' => $infra_version_check, |
482 |
}, |
483 |
}, |
484 |
}, |
485 |
}, |
486 |
} |
487 |
} |
488 |
$checks_tag_options = { |
489 |
'tags' => { |
490 |
'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"), |
491 |
'distribution' => inline_template("^<%= std_macros['distribution'] %>"), |
492 |
'vendor' => inline_template("^<%= std_macros['vendor'] %>$"), |
493 |
}, |
494 |
} |
495 |
class { 'buildsystem::var::youri': |
496 |
packages_archivedir => "${buildsystem::var::scheduler::homedir}/old", |
497 |
youri_conf => { |
498 |
'upload' => { |
499 |
'checks' => { |
500 |
'tag' => { |
501 |
'options' => $checks_tag_options, |
502 |
}, |
503 |
'rpmlint' => { |
504 |
'options' => { |
505 |
'results' => [ |
506 |
'buildprereq-use', |
507 |
'no-description-tag', |
508 |
'no-summary-tag', |
509 |
'non-standard-group', |
510 |
'non-xdg-migrated-menu', |
511 |
'percent-in-conflicts', |
512 |
'percent-in-dependency', |
513 |
'percent-in-obsoletes', |
514 |
'percent-in-provides', |
515 |
'summary-ended-with-dot', |
516 |
'unexpanded-macro', |
517 |
'unknown-lsb-keyword', |
518 |
'malformed-line-in-lsb-comment-block', |
519 |
'empty-%postun', |
520 |
'empty-%post', |
521 |
'invalid-desktopfile', |
522 |
'standard-dir-owned-by-package', |
523 |
'use-tmp-in-%postun', |
524 |
'bogus-variable-use-in-%posttrans', |
525 |
'dir-or-file-in-usr-local', |
526 |
'dir-or-file-in-tmp', |
527 |
'dir-or-file-in-mnt', |
528 |
'dir-or-file-in-opt', |
529 |
'dir-or-file-in-home', |
530 |
'dir-or-file-in-var-local', |
531 |
], |
532 |
}, |
533 |
}, |
534 |
}, |
535 |
'actions' => { |
536 |
'mail' => { |
537 |
'options' => { |
538 |
'to' => "changelog@ml.${::domain}", |
539 |
'reply_to' => "mageia-dev@${::domain}", |
540 |
'from' => "buildsystem-daemon@${::domain}", |
541 |
'prefix' => 'RPM', |
542 |
}, |
543 |
}, |
544 |
}, |
545 |
}, |
546 |
'todo' => { |
547 |
'checks' => { |
548 |
'tag' => { |
549 |
'options' => $checks_tag_options, |
550 |
}, |
551 |
}, |
552 |
}, |
553 |
} |
554 |
} |
555 |
} |