aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/youri_submit.pp
blob: f55402d841e6efe7d9b27b8226ed330714104351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class buildsystem::youri_submit {
    include sudo
    include buildsystem::rpmlint
    include buildsystem::repository
    include buildsystem::var::scheduler
    include buildsystem::var::youri

    mga-common::local_script {
        'mga-youri-submit':
            content => template('buildsystem/mga-youri-submit');
        'mga-youri-submit.wrapper':
            content => template('buildsystem/mga-youri-submit.wrapper');
        'submit_package':
            content => template('buildsystem/submit_package.pl');
        'mga-clean-distrib':
            content => template('buildsystem/cleaner.rb');
    }

    sudo::sudoers_config { 'mga-youri-submit':
        content => template('buildsystem/sudoers.youri')
    }
    # ordering is automatic :
    # http://docs.puppetlabs.com/learning/ordering.html#autorequire
    file {
        '/etc/youri/':
            ensure => 'directory';
        '/etc/youri/submit-todo.conf':
            content => template($buildsystem::var::youri::tmpl_youri_todo_conf);
        '/etc/youri/submit-upload.conf':
            content => template($buildsystem::var::youri::tmpl_youri_upload_conf);
        '/etc/youri/acl.conf':
            content => template('buildsystem/youri/acl.conf');
    }

    file { $buildsystem::var::youri::packages_archivedir:
        ensure  => 'directory',
        owner   => $buildsystem::var::scheduler::login,
        require => File[$buildsystem::var::scheduler::homedir],
    }

    tidy { $buildsystem::var::youri::packages_archivedir:
        type    => 'ctime',
        recurse => true,
        age     => '1w',
        matches => '*.rpm',
    }

    include mga-common::var::perl
    file { [ "${mga-common::var::perl::site_perl_dir}/Youri",
             "${mga-common::var::perl::site_perl_dir}/Youri/Repository"]:
        ensure => directory,
        mode => 0755,
        owner => root,
        group => root,
    }
    file { "${mga-common::var::perl::site_perl_dir}/Youri/Repository/Mageia.pm":
        source => 'puppet:///modules/buildsystem/Mageia.pm',
    }

    $package_list= ['perl-SVN',
                    'mdv-distrib-tools',
                    'perl-Youri-Media',
                    'perl-Youri-Package',
                    'perl-Youri-Repository',
                    'perl-Youri-Utils',
                    'perl-Youri-Config',
                    'mga-youri-submit']

    package { $package_list: }
}