aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/signbot.pp
blob: 36106584145a4304e711430056f94cdf69fd4534 (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
class buildsystem {
    class signbot {
        $login = "signbot"
        $home_dir = "/var/lib/$login"
        $sign_keydir = "$home_dir/keys"
	    # FIXME: maybe keyid should be defined at an other place
	    $keyid = "80420F66"
        # FIXME refactor with base class ( once variables are placed in a separate module )
        $sched_login = "schedbot"
	
        sshuser { $login:
            homedir => $home_dir,
            comment => "System user used to sign packages",
	        groups => [$sched_login],
        }

    	gnupg::keys{"packages":
            email => "packages@$domain",
	        #FIXME there should be a variable somewhere to change the name of the distribution
  	        key_name => 'Mageia Packages',
	        login => $login,
	        batchdir => "$home_dir/batches",
	        keydir => $sign_keydir,
        }

	    sudo::sudoers_config { "signpackage":
            content => template("buildsystem/signbot/sudoers.signpackage")
        }

        file { "$home_dir/.rpmmacros":
	        content => template("buildsystem/signbot/signbot-rpmmacros")
	    }

        local_script {
            "sign-check-package": content => template("buildsystem/signbot/sign-check-package");
            "mga-signpackage": content => template("buildsystem/signbot/mga-signpackage");
        }
    }
}