1
|
{
|
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
"$id": "https://hydrilla.koszko.org/schemas/package_source-2.schema.json",
|
4
|
"title": "Package source",
|
5
|
"description": "Definition of a Hydrilla source package",
|
6
|
"type": "object",
|
7
|
"required": [
|
8
|
"$schema",
|
9
|
"source_name",
|
10
|
"copyright",
|
11
|
"upstream_url",
|
12
|
"definitions"
|
13
|
],
|
14
|
"properties": {
|
15
|
"$schema": {
|
16
|
"description": "Mark this instance as conforming to package source schema 2.x",
|
17
|
"type": "string",
|
18
|
"pattern": "^https://hydrilla\\.koszko\\.org/schemas/package_source-2\\.(([1-9][0-9]*|0)\\.)*schema\\.json$"
|
19
|
},
|
20
|
"source_name": {
|
21
|
"$ref": "./common_definitions-2.schema.json#/definitions/source_name"
|
22
|
},
|
23
|
"copyright": {
|
24
|
"description": "Which files from the source package indicate its license terms and should be included in the distribution packages",
|
25
|
"$ref": "./common_definitions-2.schema.json#/definitions/file_ref_list"
|
26
|
},
|
27
|
"upstream_url": {
|
28
|
"description": "Where this software/work initially comes from",
|
29
|
"type": "string"
|
30
|
},
|
31
|
"piggyback_on": {
|
32
|
"description": "Specify packages from other software system that should be used for constructing this package",
|
33
|
"anyOf": [{
|
34
|
"$ref": "#/definitions/piggyback_apt"
|
35
|
}]
|
36
|
},
|
37
|
"comment": {
|
38
|
"$ref": "./common_definitions-2.schema.json#/definitions/comment"
|
39
|
},
|
40
|
"definitions": {
|
41
|
"description": "Definitions of site resources and pattern->payload mappings (possibly combined together)",
|
42
|
"type": "array",
|
43
|
"items": {
|
44
|
"$ref": "#/definitions/item_definition"
|
45
|
}
|
46
|
},
|
47
|
"additional_files": {
|
48
|
"description": "Files which should be included in the source archive produced by Hydrilla builder in addition to script and copyright files",
|
49
|
"$ref": "./common_definitions-2.schema.json#/definitions/file_ref_list",
|
50
|
"default": []
|
51
|
},
|
52
|
"reuse_generate_spdx_report": {
|
53
|
"description": "Should report.spdx be automatically generated for the package using REUSE tool",
|
54
|
"type": "boolean",
|
55
|
"default": false
|
56
|
}
|
57
|
},
|
58
|
"definitions": {
|
59
|
"piggyback_apt": {
|
60
|
"description": "Specify packages from APT software system that should be used for constructing this package",
|
61
|
"type": "object",
|
62
|
"required": [
|
63
|
"system",
|
64
|
"packages",
|
65
|
"dependencies"
|
66
|
],
|
67
|
"properties": {
|
68
|
"system": {
|
69
|
"description": "Which software system to use",
|
70
|
"const": "apt"
|
71
|
},
|
72
|
"distribution": {
|
73
|
"description": "Which pre-defined APT-based distribution to use (currently the only available one is Trisquel 10 Nabia)",
|
74
|
"const": "nabia"
|
75
|
},
|
76
|
"sources_list": {
|
77
|
"description": "What lines should be added to the sources.list file that will be generated; those will be used together with pre-defined lines for chosen distribution (if any)",
|
78
|
"type": "array",
|
79
|
"items": {
|
80
|
"description": "A sources.list line like \"deb-src http://archive.trisquel.info/trisquel/ nabia main\"",
|
81
|
"type": "string",
|
82
|
"pattern": "^deb(-src)?(\\s+[^\\s]+){3}$"
|
83
|
},
|
84
|
"default": []
|
85
|
},
|
86
|
"trusted_keys": {
|
87
|
"description": "Fingerprints of additional PGP keys that should be used with supplied sources.list entries",
|
88
|
"type": "array",
|
89
|
"items": {
|
90
|
"description": "A PGP fingerprint (40 hexadecimal characters)",
|
91
|
"type": "string",
|
92
|
"pattern": "^[0-9A-E]{40}$"
|
93
|
},
|
94
|
"default": []
|
95
|
},
|
96
|
"packages": {
|
97
|
"description": "Specifiers of packages that should be used, can include version constraints",
|
98
|
"type": "array",
|
99
|
"items": {
|
100
|
"description": "A package specifier like \"libjs-jquery=3.3.1~dfsg-3\"",
|
101
|
"type": "string"
|
102
|
},
|
103
|
"minItems": 1
|
104
|
},
|
105
|
"dependencies": {
|
106
|
"description": "Boolean indicating whether dependent APT packages should also be downloaded and used",
|
107
|
"type": "boolean"
|
108
|
},
|
109
|
"depend_on_base_packages": {
|
110
|
"description": "Boolean indicating whether the resulting resource packages should depend on 'apt-common-licenses' Haketilo package",
|
111
|
"type": "boolean",
|
112
|
"default": true
|
113
|
}
|
114
|
}
|
115
|
},
|
116
|
"item_definition": {
|
117
|
"description": "Definition of either a site resource, a pattern->payload mapping or both combined together",
|
118
|
"if": {
|
119
|
"type": "object",
|
120
|
"required": ["type"],
|
121
|
"properties": {
|
122
|
"type": {
|
123
|
"const": "resource"
|
124
|
}
|
125
|
}
|
126
|
},
|
127
|
"then": {
|
128
|
"$ref": "./common_definitions-2.schema.json#/definitions/resource_definition_base"
|
129
|
},
|
130
|
"else": {
|
131
|
"if": {
|
132
|
"type": "object",
|
133
|
"required": ["type"],
|
134
|
"properties": {
|
135
|
"type": {
|
136
|
"const": "mapping"
|
137
|
}
|
138
|
}
|
139
|
},
|
140
|
"then": {
|
141
|
"$ref": "./common_definitions-2.schema.json#/definitions/mapping_definition_base"
|
142
|
},
|
143
|
"else": {
|
144
|
"allOf": [{
|
145
|
"type": "object",
|
146
|
"required": ["type"],
|
147
|
"properties": {
|
148
|
"type": {
|
149
|
"const": "mapping_and_resource"
|
150
|
}
|
151
|
}
|
152
|
}, {
|
153
|
"$ref": "#/definitions/combined_mapping_resource_definition"
|
154
|
}]
|
155
|
}
|
156
|
}
|
157
|
},
|
158
|
"combined_mapping_resource_definition": {
|
159
|
"allOf": [{
|
160
|
"$ref": "./common_definitions-2.schema.json#/definitions/mapping_definition_base"
|
161
|
}, {
|
162
|
"$ref": "./common_definitions-2.schema.json#/definitions/resource_definition_base"
|
163
|
}]
|
164
|
}
|
165
|
}
|
166
|
}
|