Project

General

Profile

Download (4.66 KB) Statistics
| Branch: | Tag: | Revision:

hydrilla-json-schemas / package_source-2.schema.json @ 4b4da5a0

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
    "allOf": [{
7
	"description": "Definition of a Hydrilla source package - validation rules common for all minor schema versions",
8
	"type": "object",
9
	"required": [
10
	    "$schema",
11
	    "source_name",
12
	    "copyright",
13
	    "upstream_url",
14
	    "definitions"
15
	],
16
	"properties": {
17
	    "$schema": {
18
		"description": "Mark this instance as conforming to package source schema 1.x or 2.x",
19
		"type": "string",
20
		"pattern": "^https://hydrilla\\.koszko\\.org/schemas/package_source-[12]\\.(([1-9][0-9]*|0)\\.)*schema\\.json$"
21
	    },
22
	    "source_name": {
23
		"$ref": "./common_definitions-1.0.1.schema.json#/definitions/source_name"
24
	    },
25
	    "copyright":  {
26
		"description": "Which files from the source package indicate its license terms and should be included in the distribution packages",
27
		"$ref": "./common_definitions-1.0.1.schema.json#/definitions/file_ref_list"
28
	    },
29
	    "upstream_url": {
30
		"description": "Where this software/work initially comes from",
31
		"type": "string"
32
	    },
33
	    "comment": {
34
		"$ref": "./common_definitions-1.0.1.schema.json#/definitions/comment"
35
	    },
36
	    "definitions": {
37
		"description": "Definitions of site resources and pattern->payload mappings",
38
		"type": "array",
39
		"items": {
40
		    "anyOf": [{
41
			"$ref": "./common_definitions-1.0.1.schema.json#/definitions/resource_definition_base"
42
		    }, {
43
			"$ref": "./common_definitions-1.0.1.schema.json#/definitions/mapping_definition_base"
44
		    }]
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-1.0.1.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
    }, {
59
	"description": "Definition of a Hydrilla source package - validation rules common for versions 2 and higher",
60
	"if": {
61
	    "type": "object",
62
	    "properties": {
63
		"$schema": {
64
		    "description": "Select instances that specify schema version 1.0.x",
65
		    "type": "string",
66
		    "pattern": "^https://hydrilla\\.koszko\\.org/schemas/package_source-2\\..*schema\\.json$"
67
		}
68
	    }
69
	},
70
	"else": {
71
	    "description": "Validate the piggybacking correctness",
72
	    "type": "object",
73
	    "properties": {
74
		"piggyback_on": {
75
		    "anyOf": [{
76
			"$ref": "#/definitions/piggyback_apt"
77
		    }]
78
		}
79
	    }
80
	}
81
    }],
82
    "definitions": {
83
	"piggyback_apt": {
84
	    "description": "Specify packages from APT software system that should be used for constructing this package",
85
	    "type": "object",
86
	    "required": [
87
		"system",
88
		"packages",
89
		"dependencies"
90
	    ],
91
	    "properties": {
92
		"system": {
93
		    "description": "Which software system to use",
94
		    "const": "apt"
95
		},
96
		"distribution": {
97
		    "description": "Which pre-defined APT-based distribution to use (currently the only available one is Trisquel 10 Nabia)",
98
		    "const": "nabia"
99
		},
100
		"sources_list": {
101
		    "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)",
102
		    "type": "array",
103
		    "items": {
104
			"description": "A sources.list line like \"deb-src http://archive.trisquel.info/trisquel/ nabia main\"",
105
			"type": "string",
106
			"pattern": "^deb(-src)?(\\s+[^\\s]+){3}$"
107
		    },
108
		    "default": []
109
		},
110
		"trusted_keys": {
111
		    "description": "Fingerprints of additional PGP keys that should be used with supplied sources.list entries",
112
		    "type": "array",
113
		    "items": {
114
			"description": "A PGP fingerprint (40 hexadecimal characters)",
115
			"type": "string",
116
			"pattern": "^[0-9A-E]{40}$"
117
		    },
118
		    "default": []
119
		},
120
		"packages": {
121
		    "description": "Specifiers of packages that should be used, can include version constraints",
122
		    "type": "array",
123
		    "items": {
124
			"description": "A package specifier like \"libjs-jquery=3.3.1~dfsg-3\"",
125
			"type": "string"
126
		    },
127
		    "minItems": 1
128
		},
129
		"dependencies": {
130
		    "description": "Boolean indicating whether dependent APT packages should also be downloaded and used",
131
		    "type": "boolean"
132
		},
133
		"depend_on_base_packages": {
134
		    "description": "Boolean indicating whether the resulting resource packages should depend on 'apt-common-licenses' Haketilo package",
135
		    "type": "boolean",
136
		    "default": true
137
		}
138
	    }
139
	}
140
    }
141
}
(11-11/12)