aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/mgarepo.pp
blob: 3f9e2f40a19dd4d298a248ae7dfc9826fc28fa0a (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
class buildsystem::mgarepo {
    include buildsystem::var::scheduler
    include buildsystem::var::groups
    include buildsystem::var::binrepo
    include buildsystem::create_upload_dir
    $sched_login = $buildsystem::var::scheduler::login
    $sched_home_dir = $buildsystem::var::scheduler::homedir

    package { ['mgarepo','rpm-build']: }

    file { '/etc/mgarepo.conf':
	content => template('buildsystem/mgarepo.conf'),
    }

    file { "$sched_home_dir/repsys":
        ensure  => 'directory',
        owner   => $sched_login,
        require => File[$sched_home_dir],
    }

    file { ["$sched_home_dir/repsys/tmp", "$sched_home_dir/repsys/srpms"]:
        ensure  => 'directory',
        owner   => $sched_login,
        group   => $buildsystem::var::groups::packagers,
        mode    => '1775',
        require => File["$sched_home_dir/repsys"],
    }

    # FIXME: disabled temporarly as upload dir is a symlink to /var/lib/repsys/uploads
    #file { "$sched_home_dir/uploads":
    #    ensure  => "directory",
    #    owner   => $sched_login,
    #    require => File[$sched_home_dir],
    #}

    tidy { "$sched_home_dir/uploads":
        type    => 'ctime',
        recurse => true,
        age     => '2w',
    }

}