Defined Type: package_builder::pbuilder_hook

Defined in:
modules/package_builder/manifests/pbuilder_hook.pp

Overview

Definition pbuilder_hook

Parameters:

  • distribution (String) (defaults to: 'stretch')
  • components (String) (defaults to: 'main')
  • mirror (Stdlib::Httpurl) (defaults to: 'http://apt.wikimedia.org/wikimedia')
  • upstream_mirror (Stdlib::Httpurl) (defaults to: 'http://mirrors.wikimedia.org/debian')
  • basepath (Stdlib::Unixpath) (defaults to: '/var/cache/pbuilder')


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'modules/package_builder/manifests/pbuilder_hook.pp', line 2

define package_builder::pbuilder_hook(
    String $distribution='stretch',
    String $components='main',
    Stdlib::Httpurl $mirror='http://apt.wikimedia.org/wikimedia',
    Stdlib::Httpurl $upstream_mirror='http://mirrors.wikimedia.org/debian',
    Stdlib::Unixpath $basepath='/var/cache/pbuilder',
) {
    file { "${basepath}/hooks/${distribution}":
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    file { "${basepath}/hooks/${distribution}/C10shell.wikimedia.org":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/C10shell.wikimedia.org.erb'),
    }

    file { "${basepath}/hooks/${distribution}/D01apt.wikimedia.org":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/D01apt.wikimedia.org.erb'),
    }

    file { "${basepath}/hooks/${distribution}/D01security":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/D01security.erb'),
    }

    file { "${basepath}/hooks/${distribution}/D02backports":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/D02backports.erb'),
    }

    file { "${basepath}/hooks/${distribution}/D02archive":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/D02archive.erb'),
    }

    file { "${basepath}/hooks/${distribution}/D05localsources":
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('package_builder/D05localsources.erb'),
    }

    # on stretch, add a hook for building php 7.2 packages, T208433
    # TODO: remove this addition once we move off stretch.
    file { "${basepath}/hooks/${distribution}/D04php72":
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/package_builder/hooks/D04php72'
    }

    # on stretch and buster, add a hook for building Spicerack dependencies from a dedicated component
    file { "${basepath}/hooks/${distribution}/D03spicerack":
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/package_builder/hooks/D03spicerack'
    }

    # on stretch, add a hook for building VP9/ffmpeg dependencies from a dedicated component
    file { "${basepath}/hooks/${distribution}/D04vp9":
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/package_builder/hooks/D04vp9'
    }

    # on buster, add a hook for building JDK 8 forward port dependencies from a dedicated component
    file { "${basepath}/hooks/${distribution}/D04java8":
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/package_builder/hooks/D04java8'
    }

    # on buster, add a hook for building cergen with some dependencies in a dedicated component
    file { "${basepath}/hooks/${distribution}/D04cergen":
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/package_builder/hooks/D04cergen'
    }

    # Dependency info
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/C10shell.wikimedia.org"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D01apt.wikimedia.org"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D02backports"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D05localsources"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D04php72"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D03spicerack"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D04vp9"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D04java8"]
    File["${basepath}/hooks/${distribution}"] -> File["${basepath}/hooks/${distribution}/D04cergen"]
}