summaryrefslogtreecommitdiff
path: root/mdbp/build_schema.json
blob: 90e4a36344a19042f145a3d9b8edd411c96e8dce (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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
  "$schema": "http://json-schema.org/schema#",
  "type": "object",
  "required": [ "input", "distribution", "output" ],
  "additionalProperties": false,
  "properties": {
    "input": {
      "type": "object",
      "oneOf": [ {
        "required": [ "dscpath" ],
        "additionalProperties": false,
        "properties": {
          "dscpath": {
            "type": "string",
            "description": "path to the .dsc file that is to be built, can be relative to the location of this json file"
          }
        }
      }, {
        "required": [ "dscuri" ],
        "additionalProperties": false,
        "properties": {
          "dscuri": {
            "type": "string",
            "format": "uri",
            "description": "uri for downloading the .dsc file"
          },
          "checksums": {
            "type": "object",
            "patternProperties": { ".*": { "type": "string" } },
            "default": {},
            "description": "a mapping of checksum algorithms to the expected values"
          }
        }
      } ]
    },
    "distribution": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$",
      "description": "selects the base chroot used for building"
    },
    "extrarepositories": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(deb|deb-src) "
      },
      "default": [],
      "description": "extra repository specifications to be added to sources.list"
    },
    "type": {
      "type": "string",
      "enum": [ "any", "all", "binary" ],
      "default": "binary",
      "description": "select an arch-only, indep-only or full build"
    },
    "buildarch": {
      "type": "string",
      "minLength": 2,
      "pattern": "^[a-z0-9-]+$",
      "description": "build architecture, defaults to the native architecure"
    },
    "hostarch": {
      "type": "string",
      "minLength": 2,
      "pattern": "^[a-z0-9-]+$",
      "description": "host architecture, defaults to the build architecture"
    },
    "profiles": {
      "type": "array",
      "items": { "type": "string", "pattern": "^[a-z0-9.-]+$" },
      "uniqueItems": true,
      "default": [],
      "description": "select build profiles to enabled"
    },
    "options": {
      "type": "array",
      "items": { "type": "string", "pattern": "^[a-z0-9.=_-]+$" },
      "uniqueItems": true,
      "default": [],
      "description": "values of DEB_BUILD_OPTIONS"
    },
    "environment": {
      "type": "object",
      "propertyNames": { "pattern": "^[^=-][^=]*$" },
      "patternProperties": { ".*": { "type": "string" } },
      "default": [],
      "description": "extra environment variables"
    },
    "buildpath": {
      "type": "string",
      "description": "the path inside the chroot to peform the build"
    },
    "lintian": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "run": {
          "type": "boolean",
          "default": false,
          "description": "whether to run lintian after the build"
        },
        "options": {
          "type": "array",
          "items": { "type": "string" },
          "default": [],
          "description": "extra options to pass to lintian"
        }
      }
    },
    "bd-uninstallable-explainer": {
      "enum": [ "apt", "dose3" ],
      "description": "When installing Build-Depends fails, an explainer can be used to give details. Without this property, no explainer is run."
    },
    "network": {
      "enum": [ "enable", "disable", "try-disable", "try-enable" ],
      "description": "Decide whether the build should be able to access the internet. Without this property, the backend picks its own default. A try-prefixed value does not cause a failure when the request cannot be fulfilled."
    },
    "output": {
      "type": "object",
      "required": [ "directory" ],
      "additionalProperties": false,
      "properties": {
        "directory": {
          "type": "string",
          "description": "target directory to place output artifacts, can be specified relative to the location of this json file"
        },
        "log": {
          "type": "boolean",
          "default": true,
          "description": "whether to output the build log on the stdout file descriptor"
        }
      }
    }
  }
}