diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:06:43 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:06:43 +0000 |
commit | d0430fa7a7a032d92ed00634f321ca0f0322bf8d (patch) | |
tree | ada0f0f9dafe0ae3f406f9ea64e1fe626c585976 /deployment | |
parent | 4ff7fabb70a0b83e343ce444931e645bac22c7c1 (diff) | |
download | puppet-d0430fa7a7a032d92ed00634f321ca0f0322bf8d.tar puppet-d0430fa7a7a032d92ed00634f321ca0f0322bf8d.tar.gz puppet-d0430fa7a7a032d92ed00634f321ca0f0322bf8d.tar.bz2 puppet-d0430fa7a7a032d92ed00634f321ca0f0322bf8d.tar.xz puppet-d0430fa7a7a032d92ed00634f321ca0f0322bf8d.zip |
buildsystem: Change youri submit configuration
The youri submit configuration has been changed. The following two
template files :
- youri/submit-todo.conf
- youri/submit-upload.conf
have been replaced by a common template file for youri submit-todo and
youri submit-upload :
- youri/submit.conf
This new template file does not contain any specific configuration.
Instead the youri configuration is now created using informations from
the following hash variables :
- the $youri_conf_default hash from buildsystem::var::youri, containing
default configuration for the repository, the checks, actions and
posts.
- the $youri_conf parameter from buildsystem::var::youri, overriding
infos from the default configuration defined in $youri_conf_default.
- the distros specific configuration is defined in the $distros
parameter from buildsystem::var::distros.
All those variables contain configuration for both youri submit-todo
and youri submit-upload.
This change allows moving all Mageia specific configuration outside the
buildsystem module to the class mga_buildsystem::config, while still
keeping common configuration in the buildsystem module.
The following checks definitions have also been removed from youri
submit-todo configuration, because they are not used in the current
configuration :
- history
- precedence
- section
- svn
The 'version' check options for infra_1 and infra_2 have been moved from
youri submit-upload to submit-todo configuration.
Diffstat (limited to 'deployment')
-rw-r--r-- | deployment/mga_buildsystem/manifests/config.pp | 360 |
1 files changed, 355 insertions, 5 deletions
diff --git a/deployment/mga_buildsystem/manifests/config.pp b/deployment/mga_buildsystem/manifests/config.pp index 31cbe195..de81bb2c 100644 --- a/deployment/mga_buildsystem/manifests/config.pp +++ b/deployment/mga_buildsystem/manifests/config.pp @@ -18,10 +18,6 @@ class mga_buildsystem::config { }, } include buildsystem::var::repository - class { 'buildsystem::var::youri': - packages_archivedir => "${buildsystem::var::scheduler::homedir}/old", - } - class { 'buildsystem::var::binrepo': uploadmail_from => "root@${::domain}", uploadmail_to => "packages-commits@ml.${::domain}", @@ -118,6 +114,219 @@ class mga_buildsystem::config { '10.42.0', '212.85.158.152', #rabbit ] + + # the list of checks, actions, posts for cauldron in youri-upload + $cauldron_youri_upload_targets = { + 'checks' => [ + 'version', + 'tag', + 'acl', + 'rpmlint', + 'recency', + ], + 'actions' => [ + 'markrelease', + 'sign', + 'install', + 'link', + 'unpack_release_notes', + 'unpack_gfxboot_theme', + 'unpack_meta_task', + 'unpack_installer_images', + 'unpack_installer_images_nonfree', + 'unpack_installer_stage2', + 'unpack_installer_advertising', + 'unpack_installer_rescue', + 'unpack_syslinux', + 'archive', + 'mail', + 'maintdb', + ], + 'posts' => [ + 'genhdlist2', + 'clean_rpmsrate', + 'mirror', + ], + } + + # the list of checks, actions, posts for stable distros in youri-upload + $std_youri_upload_targets = { + 'checks' => [ + 'version', + 'tag', + 'acl', + 'rpmlint', + 'recency', + ], + 'actions' => [ + 'sign', + 'install', + 'link', + 'archive', + 'mail', + ], + 'posts' => [ + 'genhdlist2', + 'clean_rpmsrate', + 'mirror', + ], + } + + # the list of checks, actions, posts for infra distros in youri-upload + $infra_youri_upload_targets = { + 'checks' => [ + 'version', + 'tag', + 'acl', + 'rpmlint', + 'recency', + ], + 'actions' => [ + 'sign', + 'install', + 'link', + 'archive', + ], + 'posts' => [ + 'genhdlist2', + ], + } + + # the list of checks, actions, posts for cauldron in youri-todo + $cauldron_youri_todo_targets = { + 'checks' => [ + 'source', + 'deps', + 'version', + 'tag', + 'acl', + 'host', + 'rpmlint', + 'recency', + 'queue_recency', + ], + 'actions' => [ + 'send', + 'rpminfo', + ], + } + + # the list of checks, actions, posts for stable distros in youri-todo + $std_youri_todo_targets = { + 'checks' => [ + 'source', + 'version', + 'tag', + 'acl', + 'host', + 'rpmlint', + 'recency', + 'queue_recency', + ], + 'actions' => [ + 'send', + 'rpminfo', + 'ulri', + ], + } + + # the list of checks, actions, posts for infra distros in youri-todo + $infra_youri_todo_targets = { + 'checks' => [ + 'source', + 'version', + 'tag', + 'acl', + 'rpmlint', + 'recency', + 'queue_recency', + ], + 'actions' => [ + 'send', + 'rpminfo', + 'ulri', + ], + } + + # rpmlint check options for mageia <= 2 + $mga2_rpmlint = { + 'config' => '/usr/share/rpmlint/config.mga2', + 'path' => '/usr/bin/mga2-rpmlint', + } + + # rpmlint check options for cauldron + $cauldron_rpmlint = { + 'config' => '/usr/share/rpmlint/config', + 'path' => '/usr/bin/rpmlint', + 'results' => [ + 'buildprereq-use', + 'no-description-tag', + 'no-summary-tag', + 'non-standard-group', + 'non-xdg-migrated-menu', + 'percent-in-conflicts', + 'percent-in-dependency', + 'percent-in-obsoletes', + 'percent-in-provides', + 'summary-ended-with-dot', + 'unexpanded-macro', + 'unknown-lsb-keyword', + 'malformed-line-in-lsb-comment-block', + 'empty-%postun', + 'empty-%post', + 'invalid-desktopfile', + 'standard-dir-owned-by-package', + 'use-tmp-in-%postun', + 'bogus-variable-use-in-%posttrans', + 'dir-or-file-in-usr-local', + 'dir-or-file-in-tmp', + 'dir-or-file-in-mnt', + 'dir-or-file-in-opt', + 'dir-or-file-in-home', + 'dir-or-file-in-var-local', + 'tmpfiles-conf-in-etc', + 'non-ghost-in-run', + 'non-ghost-in-var-run', + 'non-ghost-in-var-lock', + 'systemd-unit-in-etc', + 'udev-rule-in-etc', + ], + } + + # list of users allowed to submit packages when cauldron is frozen + $cauldron_authorized_users = str_join(group_members('mga-release_managers'), '|') + $cauldron_version_check = { + 'authorized_sections' => '^[a-z]+/updates_testing$', + 'authorized_packages' => '^$', + 'authorized_arches' => 'none', + 'authorized_users' => "^${cauldron_authorized_users}\$", + #'mode' => 'normal', + 'mode' => 'version_freeze', + #'mode' => 'freeze', + } + + # for EOL distributions + $frozen_version_check = { + 'authorized_packages' => 'none_package_authorized', + 'authorized_sections' => 'none_section_authorized', + 'authorized_arches' => 'none', + 'mode' => 'freeze', + } + + # for supported stable distributions + $std_version_check = { + 'authorized_packages' => 'none_package_authorized', + 'authorized_sections' => '^(core|nonfree|tainted)/(updates_testing|backports_testing)$', + 'authorized_arches' => 'none', + 'mode' => 'freeze', + } + + $infra_authorized_users = str_join(group_members('mga-sysadmin'), '|') + $infra_version_check = { + 'authorized_users' => "^${infra_authorized_users}\$", + 'mode' => 'freeze', + } + class { 'buildsystem::var::distros': default_distro => 'cauldron', distros => { @@ -130,6 +339,21 @@ class mga_buildsystem::config { 'submit_allowed' => "${svn_root_packages}/cauldron", 'macros' => $std_macros, 'repo_allow_from' => $repo_allow_from, + 'youri' => { + 'upload' => { + 'targets' => $cauldron_youri_upload_targets, + 'checks' => { + 'rpmlint' => $cauldron_rpmlint, + }, + }, + 'todo' => { + 'targets' => $cauldron_youri_todo_targets, + 'checks' => { + 'rpmlint' => $cauldron_rpmlint, + 'version' => $cauldron_version_check, + }, + }, + }, }, '1' => { @@ -141,6 +365,21 @@ class mga_buildsystem::config { 'submit_allowed' => "${svn_root_packages}/updates/1", 'macros' => $std_macros, 'repo_allow_from' => $repo_allow_from, + 'youri' => { + 'upload' => { + 'targets' => $std_youri_upload_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + }, + }, + 'todo' => { + 'targets' => $std_youri_todo_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + 'version' => $frozen_version_check, + }, + }, + }, }, '2' => { @@ -152,6 +391,21 @@ class mga_buildsystem::config { 'submit_allowed' => "${svn_root_packages}/updates/2", 'macros' => $std_macros, 'repo_allow_from' => $repo_allow_from, + 'youri' => { + 'upload' => { + 'targets' => $std_youri_upload_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + }, + }, + 'todo' => { + 'targets' => $std_youri_todo_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + 'version' => $std_version_check, + }, + }, + }, }, 'infra_1' => { @@ -167,6 +421,21 @@ class mga_buildsystem::config { 'core' => [ 'release', 'updates' ], }, }, + 'youri' => { + 'upload' => { + 'targets' => $infra_youri_upload_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + }, + }, + 'todo' => { + 'targets' => $infra_youri_todo_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + 'version' => $infra_version_check, + }, + }, + }, }, 'infra_2' => { @@ -182,8 +451,89 @@ class mga_buildsystem::config { 'core' => [ 'release', 'updates' ], }, }, + 'youri' => { + 'upload' => { + 'targets' => $infra_youri_upload_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + }, + }, + 'todo' => { + 'targets' => $infra_youri_todo_targets, + 'checks' => { + 'rpmlint' => $mga2_rpmlint, + 'version' => $infra_version_check, + }, + }, + }, + }, + } + } + $checks_tag_options = { + 'tags' => { + 'release' => inline_template("<%= std_macros['distsuffix'] %>\\d+"), + 'distribution' => inline_template("^<%= std_macros['distribution'] %>"), + 'vendor' => inline_template("^<%= std_macros['vendor'] %>$"), + }, + } + class { 'buildsystem::var::youri': + packages_archivedir => "${buildsystem::var::scheduler::homedir}/old", + youri_conf => { + 'upload' => { + 'checks' => { + 'tag' => { + 'options' => $checks_tag_options, + }, + 'rpmlint' => { + 'options' => { + 'results' => [ + 'buildprereq-use', + 'no-description-tag', + 'no-summary-tag', + 'non-standard-group', + 'non-xdg-migrated-menu', + 'percent-in-conflicts', + 'percent-in-dependency', + 'percent-in-obsoletes', + 'percent-in-provides', + 'summary-ended-with-dot', + 'unexpanded-macro', + 'unknown-lsb-keyword', + 'malformed-line-in-lsb-comment-block', + 'empty-%postun', + 'empty-%post', + 'invalid-desktopfile', + 'standard-dir-owned-by-package', + 'use-tmp-in-%postun', + 'bogus-variable-use-in-%posttrans', + 'dir-or-file-in-usr-local', + 'dir-or-file-in-tmp', + 'dir-or-file-in-mnt', + 'dir-or-file-in-opt', + 'dir-or-file-in-home', + 'dir-or-file-in-var-local', + ], + }, + }, + }, + 'actions' => { + 'mail' => { + 'options' => { + 'to' => "changelog@ml.${::domain}", + 'reply_to' => "mageia-dev@${::domain}", + 'from' => "buildsystem-daemon@${::domain}", + 'prefix' => 'RPM', + }, + }, + }, + }, + 'todo' => { + 'checks' => { + 'tag' => { + 'options' => $checks_tag_options, + }, + }, }, } } - } |