|
4 | 4 | "title": "Pyaptly Configuration Schema",
|
5 | 5 | "description": "The schema used for pyaptly configurations. See also https://github.com/adfinis/pyaptly/tree/main/pyaptly/tests for examples using the TOML language.",
|
6 | 6 | "type": "object",
|
| 7 | + "$defs": { |
| 8 | + "timestamp-reference": { |
| 9 | + "description": "if the 'current' (newest) snapshot should be used or the 'previous'ly created (e.g. from a week ago). Useful to delay a publish for a certain period.", |
| 10 | + "enum": [ "current", "previous", 0, 1 ] |
| 11 | + }, |
| 12 | + "snapshot-reference": { |
| 13 | + "description": "A pointer to an existing snapshot.", |
| 14 | + "type": "object", |
| 15 | + "additionalProperties": false, |
| 16 | + "properties": { |
| 17 | + "name": { "type": "string", "description": "name of the snapshot" }, |
| 18 | + "timestamp": { "$ref": "#/$defs/timestamp-reference" } |
| 19 | + } |
| 20 | + } |
| 21 | + }, |
7 | 22 | "examples": [
|
8 | 23 | {
|
9 | 24 | "mirror": {
|
|
79 | 94 | "patternProperties": { ".*": {
|
80 | 95 | "type": "object", "additionalProperties": false,
|
81 | 96 | "properties": {
|
82 |
| - "archive": { "type": "string", "description": "The URL of a remote archive to sync" }, |
83 |
| - "architectures": { "type": "array", "description": "A list of architectures. E.g. ['amd64']", "items": { "type": "string" } }, |
84 |
| - "components": { "type": ["array", "string"], "description": "A single component or list of components to download", "items": { "type": "string" } }, |
85 |
| - "distribution": { "type": "string", "description": "The Distribution of the mirror, e.g. 'squeeze'. Use './' for flat repositories." }, |
| 97 | + "archive": { "type": "string", "description": "The aptly 'archive' argument" }, |
| 98 | + "architectures": { "type": "array", "description": "Set '-architectures' for aptly", "items": { "type": "string" } }, |
| 99 | + "components": { "type": ["array", "string"], "description": "The aptly 'component' arguments", "items": { "type": "string" } }, |
| 100 | + "distribution": { "type": "string", "description": "The aptly 'distribution' argument" }, |
86 | 101 | "gpg-keys": { "type": "array", "description": "List of GPG Key Fingerprints used to sign the packages and metadata", "items": { "type": "string" } },
|
87 | 102 | "gpg-urls": { "type": "array", "description": "List of URLs to retrieve the GPG keys", "items": { "type": "string" } },
|
88 | 103 | "keyserver": { "type": "string", "description": "A PGP Key Server to retrieve keys for verification" },
|
89 |
| - "max-tries": { "type": "integer", "description": "Number of tries when updating package contents" }, |
90 |
| - "sources": { "type": "boolean", "description": "If '-with-sources' should be passed to aptly" }, |
91 |
| - "udeb": { "type": "boolean", "description": "If '-with-udebs' should be passed to aptly" } |
| 104 | + "max-tries": { "type": "integer", "description": "Set '-max-tries' for 'aptly repo update'" }, |
| 105 | + "sources": { "type": "boolean", "description": "Set '-with-sources' for aptly" }, |
| 106 | + "udeb": { "type": "boolean", "description": "Set '-with-udebs' for aptly" } |
92 | 107 | }
|
93 | 108 | } }
|
94 | 109 | },
|
|
111 | 126 | }
|
112 | 127 | }
|
113 | 128 | ],
|
114 |
| - "patternProperties": { ".*": { |
| 129 | + "patternProperties": { |
| 130 | + ".*": { |
115 | 131 | "type": "object", "additionalProperties": false,
|
116 | 132 | "properties": {
|
117 | 133 | "filter": { "type": "object", "additionalProperties": false, "properties": {
|
118 | 134 | "query": { "type": "string" },
|
119 |
| - "source": { "type": "object", "additionalProperties": false, "properties": { |
120 |
| - "name": { "type": "string" }, |
121 |
| - "timestamp": { "type": "string" } |
122 |
| - } } |
123 |
| - } }, |
| 135 | + "source": { "$ref": "#/$defs/snapshot-reference" } |
| 136 | + } |
| 137 | + }, |
124 | 138 | "merge": {
|
125 | 139 | "type": "array",
|
126 | 140 | "items": {
|
127 | 141 | "type": ["string", "object"],
|
128 | 142 | "properties": {
|
129 | 143 | "name": { "type": "string" },
|
130 |
| - "timestamp": { "enum": ["current", "previous", 0] } |
| 144 | + "timestamp": { } |
131 | 145 | }
|
132 | 146 | }
|
133 | 147 | },
|
134 | 148 | "mirror": { "type": "string" },
|
135 | 149 | "timestamp": { "type": "object", "additionalProperties": false, "properties": {
|
136 | 150 | "time": { "type": "string" },
|
137 |
| - "repeat-weekly": { "type": "string" } |
| 151 | + "repeat-weekly": { "enum": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] } |
138 | 152 | }
|
139 | 153 | },
|
140 | 154 | "repo": { "type": "string" }
|
141 | 155 | }
|
142 |
| - } } |
| 156 | + } |
| 157 | + } |
143 | 158 | },
|
144 | 159 | "publish": {
|
145 | 160 | "type": "object", "additionalProperties": false,
|
|
175 | 190 | "patternProperties": { ".*": {
|
176 | 191 | "type": "array", "items": { "type": "object", "additionalProperties": false,
|
177 | 192 | "properties": {
|
178 |
| - "architectures": { "type": "array", "description": "Which architectures should be in the publish", "items": { "type": "string" } }, |
| 193 | + "architectures": { "type": "array", "description": "Set '-architectures' for aptly", "items": { "type": "string" } }, |
179 | 194 | "automatic-update": { "type": "boolean", "description": "If the publish should be updated when it's not explicitly mentioned as argument to pyaptly" },
|
180 |
| - "components": { "type": ["array", "string"], "description": "A single component or list of components to download", "items": { "type": "string" } }, |
181 |
| - "distribution": { "type": "string" }, |
182 |
| - "gpg-key": { "type": "string" }, |
183 |
| - "publish": { "type": "string" }, |
184 |
| - "repo": { "type": "string" }, |
185 |
| - "skip-contents": { "type": "boolean" }, |
186 |
| - "snapshots": { "type": "array", "items": { "type": ["object", "string"], "additionalProperties": false, "properties": { |
187 |
| - "name": { "type": "string" }, |
188 |
| - "timestamp": { "type": "string" }, |
189 |
| - "archive-on-update": { "type": "string" } |
| 195 | + "components": { "type": ["array", "string"], "description": "Set '-component' for aptly", "items": { "type": "string" } }, |
| 196 | + "distribution": { "type": "string", "description": "Set '-distribution' for aptly" }, |
| 197 | + "gpg-key": { "type": "string", "description": "Set '-gpg-key' for aptly" }, |
| 198 | + "publish": { "type": "string", "description": "Use the snapshots of another named publish. Space separated name and component. E.g. 'fakerepo01 main'" }, |
| 199 | + "repo": { "type": "string", "description": "Use 'publish repo' with this repo name" }, |
| 200 | + "skip-contents": { "type": "boolean", "description": "Set '-skip-contents' for aptly" }, |
| 201 | + "snapshots": { "type": "array", "description": "A list of snapshots to be merged", "items": { |
| 202 | + "type": ["object", "string"], "additionalProperties": false, "properties": { |
| 203 | + "name": { "type": "string", "description": "Name of the snapshot" }, |
| 204 | + "timestamp": { "$ref": "#/$defs/timestamp-reference" }, |
| 205 | + "archive-on-update": { "type": "string", "description": "Rename the Snapshot to this and replace %T with the current timestamp on update. E.g. 'archive-snap-%T'" } |
190 | 206 | } } }
|
191 | 207 | } }
|
192 | 208 | } }
|
|
0 commit comments