Merge lp:~barry/ubuntu-system-image/lp1373467 into lp:~registry/ubuntu-system-image/client
- lp1373467
- Merge into client
Proposed by
Barry Warsaw
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 296 | ||||
Proposed branch: | lp:~barry/ubuntu-system-image/lp1373467 | ||||
Merge into: | lp:~registry/ubuntu-system-image/client | ||||
Diff against target: |
8905 lines (+4167/-1538) 90 files modified
.bzrignore (+2/-0) cli-manpage.rst (+13/-14) dbus-manpage.rst (+14/-14) ini-manpage.rst (+25/-24) systemimage/api.py (+0/-5) systemimage/config.py (+141/-99) systemimage/data/client.ini (+0/-35) systemimage/dbus.py (+2/-2) systemimage/helpers.py (+34/-24) systemimage/keyring.py (+2/-2) systemimage/main.py (+5/-13) systemimage/scores.py (+1/-0) systemimage/service.py (+5/-11) systemimage/state.py (+18/-15) systemimage/testing/controller.py (+7/-6) systemimage/testing/dbus.py (+1/-0) systemimage/testing/helpers.py (+109/-52) systemimage/testing/nose.py (+6/-1) systemimage/tests/data/00.ini (+0/-1) systemimage/tests/data/01.ini (+0/-1) systemimage/tests/data/api.channels_01.json (+13/-0) systemimage/tests/data/api.index_01.json (+36/-0) systemimage/tests/data/api.index_02.json (+251/-0) systemimage/tests/data/candidates.index_01.json (+6/-0) systemimage/tests/data/candidates.index_02.json (+23/-0) systemimage/tests/data/candidates.index_08.json (+244/-0) systemimage/tests/data/candidates.index_10.json (+36/-0) systemimage/tests/data/candidates.index_11.json (+37/-0) systemimage/tests/data/candidates.index_13.json (+244/-0) systemimage/tests/data/channel.channels_01.json (+23/-0) systemimage/tests/data/channel.channels_02.json (+38/-0) systemimage/tests/data/channel.channels_03.json (+70/-0) systemimage/tests/data/channel.channels_04.json (+56/-0) systemimage/tests/data/channel.channels_05.json (+23/-0) systemimage/tests/data/channel_06.ini (+0/-8) systemimage/tests/data/channel_07.ini (+0/-8) systemimage/tests/data/config.config_01.ini (+34/-0) systemimage/tests/data/config.config_02.ini (+2/-3) systemimage/tests/data/config.config_03.ini (+2/-3) systemimage/tests/data/config.config_04.ini (+36/-0) systemimage/tests/data/config.config_05.ini (+2/-3) systemimage/tests/data/config.config_06.ini (+2/-3) systemimage/tests/data/config.config_07.ini (+0/-1) systemimage/tests/data/config.config_08.ini (+0/-1) systemimage/tests/data/config.config_09.ini (+0/-3) systemimage/tests/data/config.config_10.ini (+2/-2) systemimage/tests/data/config_04.ini (+0/-36) systemimage/tests/data/dbus.index_03.json (+36/-0) systemimage/tests/data/download.index_01.json (+6/-0) systemimage/tests/data/gpg.channels_01.json (+23/-0) systemimage/tests/data/helpers.config_01.ini (+7/-0) systemimage/tests/data/helpers.config_02.ini (+6/-0) systemimage/tests/data/index.channels_01.json (+9/-0) systemimage/tests/data/index.channels_02.json (+13/-0) systemimage/tests/data/index.channels_05.json (+9/-0) systemimage/tests/data/index.index_01.json (+251/-0) systemimage/tests/data/index.index_04.json (+244/-0) systemimage/tests/data/index_26.json (+0/-245) systemimage/tests/data/main.channels_01.json (+13/-0) systemimage/tests/data/main.channels_03.json (+13/-0) systemimage/tests/data/main.config_01.ini (+3/-4) systemimage/tests/data/main.config_05.ini (+7/-0) systemimage/tests/data/main.config_07.ini (+1/-1) systemimage/tests/data/main.index_04.json (+36/-0) systemimage/tests/data/main.index_05.json (+36/-0) systemimage/tests/data/scores.index_01.json (+245/-0) systemimage/tests/data/scores.index_05.json (+245/-0) systemimage/tests/data/state.channel_01.ini (+6/-0) systemimage/tests/data/state.channels_01.json (+64/-0) systemimage/tests/data/state.channels_02.json (+13/-0) systemimage/tests/data/state.index_01.json (+244/-0) systemimage/tests/data/state.index_02.json (+245/-0) systemimage/tests/data/state.index_03.json (+36/-0) systemimage/tests/data/state.index_04.json (+37/-0) systemimage/tests/test_api.py (+20/-13) systemimage/tests/test_candidates.py (+20/-20) systemimage/tests/test_channel.py (+18/-18) systemimage/tests/test_config.py (+117/-170) systemimage/tests/test_dbus.py (+88/-121) systemimage/tests/test_download.py (+31/-32) systemimage/tests/test_gpg.py (+12/-12) systemimage/tests/test_helpers.py (+110/-128) systemimage/tests/test_index.py (+31/-25) systemimage/tests/test_main.py (+203/-267) systemimage/tests/test_scores.py (+10/-10) systemimage/tests/test_settings.py (+2/-5) systemimage/tests/test_state.py (+71/-58) systemimage/tests/test_winner.py (+21/-17) tools/demo.ini (+0/-1) tools/mkvenv.py (+0/-1) |
||||
To merge this branch: | bzr merge lp:~barry/ubuntu-system-image/lp1373467 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Registry Administrators | Pending | ||
Review via email: mp+246660@code.launchpad.net |
Commit message
Description of the change
This finally passes all tests and I think is ready for merging to trunk. I predict the diff will be enormous and conflicty ;).
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2014-11-03 21:36:27 +0000 |
3 | +++ .bzrignore 2015-01-15 22:43:25 +0000 |
4 | @@ -12,3 +12,5 @@ |
5 | coverage.xml |
6 | htmlcov |
7 | coverage-* |
8 | +py34-curl |
9 | +py34-udm |
10 | |
11 | === modified file 'cli-manpage.rst' |
12 | --- cli-manpage.rst 2014-10-25 01:12:08 +0000 |
13 | +++ cli-manpage.rst 2015-01-15 22:43:25 +0000 |
14 | @@ -7,9 +7,9 @@ |
15 | ------------------------------------------------ |
16 | |
17 | :Author: Barry Warsaw <barry@ubuntu.com> |
18 | -:Date: 2014-10-23 |
19 | -:Copyright: 2013-2014 Canonical Ltd. |
20 | -:Version: 2.5.1 |
21 | +:Date: 2015-01-15 |
22 | +:Copyright: 2013-2015 Canonical Ltd. |
23 | +:Version: 3.0 |
24 | :Manual section: 1 |
25 | |
26 | |
27 | @@ -84,10 +84,13 @@ |
28 | enabled. With two ``-v`` (or ``-vv``), logging both to the console and to |
29 | the log file are output at ``DEBUG`` level. |
30 | |
31 | --C FILE, --config FILE |
32 | - Use the given configuration file, otherwise use the default. The program |
33 | - will optionally also read a ``channel.ini`` file in the same directory as |
34 | - ``FILE``. |
35 | +-C DIR, --config DIR |
36 | + Use the given configuration directory, otherwise use the system default. |
37 | + The program will read all the files in this directory that begin with a |
38 | + number, followed by an underscore, and ending in ``.ini`` |
39 | + (e.g. ``03_myconfig.ini``). The files are read in sorted numerical order |
40 | + from lowest prefix number to highest, with later configuration files able |
41 | + to override any variable in any section. |
42 | |
43 | --factory-reset |
44 | Wipes the data partition and issues a reboot into recovery. This |
45 | @@ -112,15 +115,11 @@ |
46 | FILES |
47 | ===== |
48 | |
49 | -/etc/system-image/client.ini |
50 | - Default configuration file. |
51 | - |
52 | -/etc/system-image/channel.ini |
53 | - Optional configuration file overrides (for the ``[service]`` section |
54 | - only). |
55 | +/etc/system-image/[0-9]+*.ini |
56 | + Default configuration files. |
57 | |
58 | |
59 | SEE ALSO |
60 | ======== |
61 | |
62 | -client.ini(5), system-image-dbus(8) |
63 | +system-image.ini(5), system-image-dbus(8) |
64 | |
65 | === modified file 'dbus-manpage.rst' |
66 | --- dbus-manpage.rst 2014-11-10 16:17:36 +0000 |
67 | +++ dbus-manpage.rst 2015-01-15 22:43:25 +0000 |
68 | @@ -7,9 +7,9 @@ |
69 | ----------------------------------------- |
70 | |
71 | :Author: Barry Warsaw <barry@ubuntu.com> |
72 | -:Date: 2014-09-29 |
73 | -:Copyright: 2013-2014 Canonical Ltd. |
74 | -:Version: 2.5 |
75 | +:Date: 2015-01-15 |
76 | +:Copyright: 2013-2015 Canonical Ltd. |
77 | +:Version: 3.0 |
78 | :Manual section: 8 |
79 | |
80 | |
81 | @@ -42,10 +42,13 @@ |
82 | enabled. With two ``-v`` (or ``-vv``), logging both to the console and to |
83 | the log file are output at ``DEBUG`` level. |
84 | |
85 | --C FILE, --config FILE |
86 | - Use the given configuration file, otherwise use the default. The program |
87 | - will optionally also read a ``channel.ini`` file in the same directory as |
88 | - ``FILE``. |
89 | +-C DIR, --config DIR |
90 | + Use the given configuration directory, otherwise use the system default. |
91 | + The program will read all the files in this directory that begin with a |
92 | + number, followed by an underscore, and ending in ``.ini`` |
93 | + (e.g. ``03_myconfig.ini``). The files are read in sorted numerical order |
94 | + from lowest prefix number to highest, with later configuration files able |
95 | + to override any variable in any section. |
96 | |
97 | |
98 | D-BUS API |
99 | @@ -311,12 +314,8 @@ |
100 | FILES |
101 | ===== |
102 | |
103 | -/etc/system-image/client.ini |
104 | - Default configuration file. |
105 | - |
106 | -/etc/system-image/channel.ini |
107 | - Optional configuration file overrides (for the ``[service]`` section |
108 | - only). |
109 | +/etc/system-image/[0-9]+*.ini |
110 | + Default configuration files. |
111 | |
112 | /etc/dbus-1/system.d/com.canonical.SystemImage.conf |
113 | DBus service permissions file. |
114 | @@ -328,6 +327,7 @@ |
115 | SEE ALSO |
116 | ======== |
117 | |
118 | -client.ini(5), system-image-cli(1) |
119 | +system-image.ini(5), system-image-cli(1) |
120 | + |
121 | |
122 | .. _`ISO 8601`: http://en.wikipedia.org/wiki/ISO_8601 |
123 | |
124 | === modified file 'ini-manpage.rst' |
125 | --- ini-manpage.rst 2014-09-29 14:05:29 +0000 |
126 | +++ ini-manpage.rst 2015-01-15 22:43:25 +0000 |
127 | @@ -1,39 +1,43 @@ |
128 | -========== |
129 | -client.ini |
130 | -========== |
131 | - |
132 | - |
133 | ------------------------------------------------ |
134 | -Ubuntu System Image Upgrader configuration file |
135 | ------------------------------------------------ |
136 | +================ |
137 | +system-image.ini |
138 | +================ |
139 | + |
140 | + |
141 | +------------------------------------------------ |
142 | +Ubuntu System Image Upgrader configuration files |
143 | +------------------------------------------------ |
144 | |
145 | :Author: Barry Warsaw <barry@ubuntu.com> |
146 | -:Date: 2014-09-29 |
147 | -:Copyright: 2013-2014 Canonical Ltd. |
148 | -:Version: 2.5 |
149 | +:Date: 2015-01-15 |
150 | +:Copyright: 2013-2015 Canonical Ltd. |
151 | +:Version: 3.0 |
152 | :Manual section: 5 |
153 | |
154 | |
155 | DESCRIPTION |
156 | =========== |
157 | |
158 | -``/etc/system-image/client.ini`` is the configuration file for the system |
159 | -image upgrader. It is an ini-style configuration file with sections that |
160 | +``/etc/system-image/`` is the default configuration directory for the system |
161 | +image upgrader. It contains ini-style configuration files with sections that |
162 | define the service to connect to, as well as local system resources. |
163 | Generally, the options never need to be changed. |
164 | |
165 | -The system image upgrader will also optionally read a |
166 | -``/etc/system-image/channel.ini`` file with the same format as ``client.ini``. |
167 | -This file should only contain a ``[service]`` section for overriding in the |
168 | -``client.ini`` file. All other sections are ignored. |
169 | +The system image upgrader will read a all files in this directory that start |
170 | +with a numeric prefix, followed by an underscore, and then any alphanumeric |
171 | +suffix, ending in ``.ini``. E.g. ``07_myconfig.ini``. |
172 | + |
173 | +The files are read in sorted numerical order, from lowest prefix number to |
174 | +highest, with later configuration files able to override any variable in any |
175 | +section. |
176 | |
177 | |
178 | SYNTAX |
179 | ====== |
180 | |
181 | -Sections are delimited by square brackets, e.g. ``[service]``. Variables |
182 | -inside the service separate the variable name and value by a colon. Blank |
183 | -lines and lines that start with a ``#`` are ignored. |
184 | +Sections in the ``.ini`` files are delimited by square brackets, |
185 | +e.g. ``[service]``. Variables inside the service separate the variable name |
186 | +and value by a colon. Blank lines and lines that start with a ``#`` are |
187 | +ignored. |
188 | |
189 | |
190 | THE SERVICE SECTION |
191 | @@ -82,10 +86,6 @@ |
192 | |
193 | This section contains the following variables: |
194 | |
195 | -build_file |
196 | - The file on the local file system containing the system's current build |
197 | - number. |
198 | - |
199 | tempdir |
200 | The base temporary directory on the local file system. When any of the |
201 | system-image processes run, a secure subdirectory inside `tempdir` will be |
202 | @@ -204,6 +204,7 @@ |
203 | |
204 | system-image-cli(1) |
205 | |
206 | + |
207 | [1]: https://wiki.ubuntu.com/ImageBasedUpgrades/Server |
208 | |
209 | [2]: https://wiki.ubuntu.com/ImageBasedUpgrades/GPG |
210 | |
211 | === modified file 'systemimage/api.py' |
212 | --- systemimage/api.py 2014-08-08 19:06:47 +0000 |
213 | +++ systemimage/api.py 2015-01-15 22:43:25 +0000 |
214 | @@ -24,7 +24,6 @@ |
215 | |
216 | import logging |
217 | |
218 | -from systemimage.helpers import last_update_date |
219 | from systemimage.reboot import factory_reset |
220 | from systemimage.state import State |
221 | from unittest.mock import patch |
222 | @@ -62,10 +61,6 @@ |
223 | # No winners. |
224 | return '' |
225 | |
226 | - @property |
227 | - def last_update_date(self): |
228 | - return last_update_date() |
229 | - |
230 | |
231 | class Mediator: |
232 | """This is the DBus API mediator. |
233 | |
234 | === modified file 'systemimage/config.py' |
235 | --- systemimage/config.py 2014-10-29 15:26:04 +0000 |
236 | +++ systemimage/config.py 2015-01-15 22:43:25 +0000 |
237 | @@ -17,7 +17,6 @@ |
238 | |
239 | __all__ = [ |
240 | 'Configuration', |
241 | - 'DISABLED', |
242 | 'config', |
243 | ] |
244 | |
245 | @@ -27,82 +26,175 @@ |
246 | |
247 | from configparser import ConfigParser |
248 | from contextlib import ExitStack |
249 | -from pkg_resources import resource_filename |
250 | +from pathlib import Path |
251 | from systemimage.bag import Bag |
252 | from systemimage.helpers import ( |
253 | - as_loglevel, as_object, as_timedelta, makedirs, temporary_directory) |
254 | - |
255 | - |
256 | -DISABLED = object() |
257 | + NO_PORT, as_loglevel, as_object, as_port, as_stripped, as_timedelta, |
258 | + makedirs, temporary_directory) |
259 | + |
260 | + |
261 | +SECTIONS = ('service', 'system', 'gpg', 'updater', 'hooks', 'dbus') |
262 | |
263 | |
264 | def expand_path(path): |
265 | return os.path.abspath(os.path.expanduser(path)) |
266 | |
267 | |
268 | -def port_value_converter(value): |
269 | - if value.lower() in ('disabled', 'disable'): |
270 | - return DISABLED |
271 | - result = int(value) |
272 | - if result < 0: |
273 | - raise ValueError(value) |
274 | - return result |
275 | - |
276 | - |
277 | -def device_converter(value): |
278 | - return value.strip() |
279 | +class SafeConfigParser(ConfigParser): |
280 | + """Like ConfigParser, but with default empty sections. |
281 | + |
282 | + This makes the **style of loading keys/values into the Bag objects a |
283 | + little cleaner since it doesn't have to worry about KeyErrors when a |
284 | + configuration file doesn't contain a section, which is allowed. |
285 | + """ |
286 | + |
287 | + def __init__(self, *args, **kws): |
288 | + super().__init__(args, **kws) |
289 | + for section in SECTIONS: |
290 | + self[section] = {} |
291 | |
292 | |
293 | class Configuration: |
294 | - def __init__(self, ini_file=None): |
295 | - # Defaults. |
296 | - self.config_file = None |
297 | - self.service = Bag() |
298 | - self.system = Bag() |
299 | - if ini_file is None: |
300 | - ini_file = resource_filename('systemimage.data', 'client.ini') |
301 | - self.load(ini_file) |
302 | - self._override = False |
303 | + def __init__(self, directory=None): |
304 | + self._set_defaults() |
305 | # 2013-10-14 BAW This is a placeholder for rendezvous between the |
306 | - # downloader and the D-Bus service. When running udner D-Bus and we |
307 | + # downloader and the D-Bus service. When running under D-Bus and we |
308 | # get a `paused` signal from the download manager, we need this to |
309 | # plumb through an UpdatePaused signal to our clients. It rather |
310 | # sucks that we need a global for this, but I can't get the plumbing |
311 | # to work otherwise. This seems like the least horrible place to |
312 | # stash this global. |
313 | self.dbus_service = None |
314 | - # Cache/overrides. |
315 | + # Cache. |
316 | self._device = None |
317 | self._build_number = None |
318 | + self.build_number_override = False |
319 | self._channel = None |
320 | # This is used only to override the phased percentage via command line |
321 | # and the property setter. |
322 | self._phase_override = None |
323 | self._tempdir = None |
324 | + self.config_d = None |
325 | + self.ini_files = [] |
326 | + self.http_base = None |
327 | + self.https_base = None |
328 | + if directory is not None: |
329 | + self.load(directory) |
330 | + self._calculate_http_bases() |
331 | self._resources = ExitStack() |
332 | atexit.register(self._resources.close) |
333 | |
334 | - def load(self, path, *, override=False): |
335 | - parser = ConfigParser() |
336 | - files_read = parser.read(path) |
337 | - if files_read != [path]: |
338 | + def _set_defaults(self): |
339 | + self.service = Bag( |
340 | + base='system-image.ubuntu.com', |
341 | + http_port=80, |
342 | + https_port=443, |
343 | + channel='daily', |
344 | + build_number=0, |
345 | + ) |
346 | + self.system = Bag( |
347 | + timeout=as_timedelta('1h'), |
348 | + tempdir='/tmp', |
349 | + logfile='/var/log/system-image/client.log', |
350 | + loglevel=as_loglevel('info'), |
351 | + settings_db='/var/lib/system-image/settings.db', |
352 | + ) |
353 | + self.gpg = Bag( |
354 | + archive_master='/etc/system-image/archive-master.tar.xz', |
355 | + image_master='/var/lib/system-image/keyrings/image-master.tar.xz', |
356 | + image_signing= |
357 | + '/var/lib/system-image/keyrings/image-signing.tar.xz', |
358 | + device_signing= |
359 | + '/var/lib/system-image/keyrings/device-signing.tar.xz', |
360 | + ) |
361 | + self.updater = Bag( |
362 | + cache_partition='/android/cache/recovery', |
363 | + data_partition='/var/lib/system-image', |
364 | + ) |
365 | + self.hooks = Bag( |
366 | + device=as_object('systemimage.device.SystemProperty'), |
367 | + scorer=as_object('systemimage.scores.WeightedScorer'), |
368 | + reboot=as_object('systemimage.reboot.Reboot'), |
369 | + ) |
370 | + self.dbus = Bag( |
371 | + lifetime=as_timedelta('10m'), |
372 | + ) |
373 | + |
374 | + def _load_file(self, path): |
375 | + parser = SafeConfigParser() |
376 | + str_path = str(path) |
377 | + files_read = parser.read(str_path) |
378 | + if files_read != [str_path]: |
379 | raise FileNotFoundError(path) |
380 | - self.config_file = path |
381 | - self.service.update(converters=dict(http_port=port_value_converter, |
382 | - https_port=port_value_converter, |
383 | + self.ini_files.append(path) |
384 | + self.service.update(converters=dict(http_port=as_port, |
385 | + https_port=as_port, |
386 | build_number=int, |
387 | - device=device_converter, |
388 | + device=as_stripped, |
389 | ), |
390 | - **parser['service']) |
391 | - if (self.service.http_port is DISABLED and |
392 | - self.service.https_port is DISABLED): |
393 | + **parser['service']) |
394 | + self.system.update(converters=dict(timeout=as_timedelta, |
395 | + loglevel=as_loglevel, |
396 | + settings_db=expand_path, |
397 | + tempdir=expand_path), |
398 | + **parser['system']) |
399 | + self.gpg.update(**parser['gpg']) |
400 | + self.updater.update(**parser['updater']) |
401 | + self.hooks.update(converters=dict(device=as_object, |
402 | + scorer=as_object, |
403 | + reboot=as_object), |
404 | + **parser['hooks']) |
405 | + self.dbus.update(converters=dict(lifetime=as_timedelta), |
406 | + **parser['dbus']) |
407 | + |
408 | + def load(self, directory): |
409 | + """Load up the configuration from a config.d directory.""" |
410 | + # Look for all the files in the given directory with .ini or .cfg |
411 | + # suffixes. The files must start with a number, and the files are |
412 | + # loaded in numeric order. |
413 | + if self.config_d is not None: |
414 | + raise RuntimeError('Configuration already loaded; use .reload()') |
415 | + self.config_d = directory |
416 | + if not Path(directory).is_dir(): |
417 | + raise TypeError( |
418 | + '.load() requires a directory: {}'.format(directory)) |
419 | + candidates = [] |
420 | + for child in Path(directory).glob('*.ini'): |
421 | + order, _, base = child.stem.partition('_') |
422 | + # XXX 2014-10-03: The logging system isn't initialized when we get |
423 | + # here, so we can't log that these files are being ignored. |
424 | + if len(_) == 0: |
425 | + continue |
426 | + try: |
427 | + serial = int(order) |
428 | + except ValueError: |
429 | + continue |
430 | + candidates.append((serial, child)) |
431 | + for serial, path in sorted(candidates): |
432 | + self._load_file(path) |
433 | + self._calculate_http_bases() |
434 | + |
435 | + def reload(self): |
436 | + """Reload the configuration directory.""" |
437 | + # Reset some cached attributes. |
438 | + directory = self.config_d |
439 | + self.ini_files = [] |
440 | + self.config_d = None |
441 | + self._build_number = None |
442 | + # Now load the defaults, then reload the previous config.d directory. |
443 | + self._set_defaults() |
444 | + self.load(directory) |
445 | + |
446 | + def _calculate_http_bases(self): |
447 | + if (self.service.http_port is NO_PORT and |
448 | + self.service.https_port is NO_PORT): |
449 | raise ValueError('Cannot disable both http and https ports') |
450 | # Construct the HTTP and HTTPS base urls, which most applications will |
451 | - # actually use. We do this in two steps, in order to support |
452 | - # disabling one or the other (but not both) protocols. |
453 | + # actually use. We do this in two steps, in order to support disabling |
454 | + # one or the other (but not both) protocols. |
455 | if self.service.http_port == 80: |
456 | http_base = 'http://{}'.format(self.service.base) |
457 | - elif self.service.http_port is DISABLED: |
458 | + elif self.service.http_port is NO_PORT: |
459 | http_base = None |
460 | else: |
461 | http_base = 'http://{}:{}'.format( |
462 | @@ -110,7 +202,7 @@ |
463 | # HTTPS. |
464 | if self.service.https_port == 443: |
465 | https_base = 'https://{}'.format(self.service.base) |
466 | - elif self.service.https_port is DISABLED: |
467 | + elif self.service.https_port is NO_PORT: |
468 | https_base = None |
469 | else: |
470 | https_base = 'https://{}:{}'.format( |
471 | @@ -122,45 +214,13 @@ |
472 | if https_base is None: |
473 | assert http_base is not None |
474 | https_base = http_base |
475 | - self.service['http_base'] = http_base |
476 | - self.service['https_base'] = https_base |
477 | - try: |
478 | - self.system.update(converters=dict(timeout=as_timedelta, |
479 | - build_file=expand_path, |
480 | - loglevel=as_loglevel, |
481 | - settings_db=expand_path, |
482 | - tempdir=expand_path), |
483 | - **parser['system']) |
484 | - except KeyError: |
485 | - # If we're overriding via a channel.ini file, it's okay if the |
486 | - # [system] section is missing. However, the main configuration |
487 | - # ini file must include all sections. |
488 | - if not override: |
489 | - raise |
490 | - # Short-circuit, since we're loading a channel.ini file. |
491 | - self._override = override |
492 | - if override: |
493 | - return |
494 | - self.gpg = Bag(**parser['gpg']) |
495 | - self.updater = Bag(**parser['updater']) |
496 | - self.hooks = Bag(converters=dict(device=as_object, |
497 | - scorer=as_object, |
498 | - reboot=as_object), |
499 | - **parser['hooks']) |
500 | - self.dbus = Bag(converters=dict(lifetime=as_timedelta), |
501 | - **parser['dbus']) |
502 | + self.http_base = http_base |
503 | + self.https_base = https_base |
504 | |
505 | @property |
506 | def build_number(self): |
507 | if self._build_number is None: |
508 | - if self._override: |
509 | - return self.service.build_number |
510 | - else: |
511 | - try: |
512 | - with open(self.system.build_file, encoding='utf-8') as fp: |
513 | - return int(fp.read().strip()) |
514 | - except FileNotFoundError: |
515 | - return 0 |
516 | + self._build_number = self.service.build_number |
517 | return self._build_number |
518 | |
519 | @build_number.setter |
520 | @@ -169,24 +229,18 @@ |
521 | raise ValueError( |
522 | 'integer is required, got: {}'.format(type(value).__name__)) |
523 | self._build_number = value |
524 | + self.build_number_override = True |
525 | |
526 | @build_number.deleter |
527 | def build_number(self): |
528 | self._build_number = None |
529 | |
530 | @property |
531 | - def build_number_cli(self): |
532 | - return self._build_number |
533 | - |
534 | - @property |
535 | def device(self): |
536 | if self._device is None: |
537 | # Start by looking for a [service]device setting. Use this if it |
538 | # exists, otherwise fall back to calling the hook. |
539 | self._device = getattr(self.service, 'device', None) |
540 | - # The key could exist in the channel.ini file, but its value could |
541 | - # be empty. That's semantically equivalent to a missing |
542 | - # [service]device setting. |
543 | if not self._device: |
544 | self._device = self.hooks.device().get_device() |
545 | return self._device |
546 | @@ -227,20 +281,8 @@ |
547 | return self._tempdir |
548 | |
549 | |
550 | -# Define the global configuration object. Normal use can be as simple as: |
551 | -# |
552 | -# from systemimage.config import config |
553 | -# build_file = config.system.build_file |
554 | -# |
555 | -# In the test suite though, the actual configuration object can be easily |
556 | -# patched by doing something like this: |
557 | -# |
558 | -# test_config = Configuration(...) |
559 | -# with unittest.mock.patch('config._config', test_config): |
560 | -# run_test() |
561 | -# |
562 | -# and now every module which does the first code example will get build_file |
563 | -# from the mocked Configuration instance. |
564 | +# Define the global configuration object. We use a proxy here so that |
565 | +# post-object creation loading will work. |
566 | |
567 | _config = Configuration() |
568 | |
569 | |
570 | === removed file 'systemimage/data/client.ini' |
571 | --- systemimage/data/client.ini 2013-11-12 19:57:39 +0000 |
572 | +++ systemimage/data/client.ini 1970-01-01 00:00:00 +0000 |
573 | @@ -1,35 +0,0 @@ |
574 | -# Default and example .ini configuration file. |
575 | -# Edit this and put it in /etc/system-image/client.ini |
576 | - |
577 | -[service] |
578 | -base: system-image.ubuntu.com |
579 | -http_port: 80 |
580 | -https_port: 443 |
581 | -channel: daily |
582 | -build_number: 0 |
583 | - |
584 | -[system] |
585 | -timeout: 1h |
586 | -build_file: /etc/ubuntu-build |
587 | -tempdir: /tmp |
588 | -logfile: /var/log/system-image/client.log |
589 | -loglevel: info |
590 | -settings_db: /var/lib/system-image/settings.db |
591 | - |
592 | -[gpg] |
593 | -archive_master: /etc/system-image/archive-master.tar.xz |
594 | -image_master: /var/lib/system-image/keyrings/image-master.tar.xz |
595 | -image_signing: /var/lib/system-image/keyrings/image-signing.tar.xz |
596 | -device_signing: /var/lib/system-image/keyrings/device-signing.tar.xz |
597 | - |
598 | -[updater] |
599 | -cache_partition: /android/cache/recovery |
600 | -data_partition: /var/lib/system-image |
601 | - |
602 | -[hooks] |
603 | -device: systemimage.device.SystemProperty |
604 | -scorer: systemimage.scores.WeightedScorer |
605 | -reboot: systemimage.reboot.Reboot |
606 | - |
607 | -[dbus] |
608 | -lifetime: 10m |
609 | |
610 | === modified file 'systemimage/dbus.py' |
611 | --- systemimage/dbus.py 2014-10-30 20:47:36 +0000 |
612 | +++ systemimage/dbus.py 2015-01-15 22:43:25 +0000 |
613 | @@ -126,7 +126,7 @@ |
614 | downloading, |
615 | self._update.version, |
616 | self._update.size, |
617 | - self._update.last_update_date, |
618 | + last_update_date(), |
619 | self._update.error) |
620 | # Stop GLib from calling this method again. |
621 | return False |
622 | @@ -161,7 +161,7 @@ |
623 | self._downloading, |
624 | self._update.version, |
625 | self._update.size, |
626 | - self._update.last_update_date, |
627 | + last_update_date(), |
628 | "") |
629 | log.info('checking lock not acquired') |
630 | return |
631 | |
632 | === modified file 'systemimage/helpers.py' |
633 | --- systemimage/helpers.py 2014-12-02 01:12:41 +0000 |
634 | +++ systemimage/helpers.py 2015-01-15 22:43:25 +0000 |
635 | @@ -20,6 +20,8 @@ |
636 | 'MiB', |
637 | 'as_loglevel', |
638 | 'as_object', |
639 | + 'as_port', |
640 | + 'as_stripped', |
641 | 'as_timedelta', |
642 | 'atomic', |
643 | 'calculate_signature', |
644 | @@ -50,6 +52,7 @@ |
645 | DEFAULT_DIRMODE = 0o02700 |
646 | MiB = 1 << 20 |
647 | EMPTYSTRING = '' |
648 | +NO_PORT = object() |
649 | |
650 | |
651 | def calculate_signature(fp, hash_class=None): |
652 | @@ -78,7 +81,7 @@ |
653 | """Like os.remove() but don't complain if the file doesn't exist.""" |
654 | try: |
655 | os.remove(path) |
656 | - except (FileNotFoundError, IsADirectoryError): |
657 | + except (FileNotFoundError, IsADirectoryError, PermissionError): |
658 | pass |
659 | |
660 | |
661 | @@ -194,13 +197,26 @@ |
662 | dbus = 'ERROR' |
663 | main_level = getattr(logging, main, None) |
664 | if main_level is None or not isinstance(main_level, int): |
665 | - raise ValueError |
666 | + raise ValueError(value) |
667 | dbus_level = getattr(logging, dbus, None) |
668 | if dbus_level is None or not isinstance(dbus_level, int): |
669 | - raise ValueError |
670 | + raise ValueError(value) |
671 | return main_level, dbus_level |
672 | |
673 | |
674 | +def as_port(value): |
675 | + if value.lower() in ('disabled', 'disable'): |
676 | + return NO_PORT |
677 | + result = int(value) |
678 | + if result < 0: |
679 | + raise ValueError(value) |
680 | + return result |
681 | + |
682 | + |
683 | +def as_stripped(value): |
684 | + return value.strip() |
685 | + |
686 | + |
687 | @contextmanager |
688 | def temporary_directory(*args, **kws): |
689 | """A context manager that creates a temporary directory. |
690 | @@ -226,30 +242,24 @@ |
691 | def last_update_date(): |
692 | """Return the last update date. |
693 | |
694 | - Taken from the mtime of the following files, in order: |
695 | - |
696 | - - /userdata/.last_update |
697 | - - /etc/system-image/channel.ini |
698 | - - /etc/ubuntu-build |
699 | - |
700 | - First existing path wins. |
701 | + If /userdata/.last_update exists, we use this file's mtime. If it doesn't |
702 | + exist, then we use the latest mtime of any of the files in |
703 | + /etc/system-image/config.d/*.ini (or whatever directory was given with the |
704 | + -C/--config option). |
705 | """ |
706 | # Avoid circular imports. |
707 | from systemimage.config import config |
708 | - channel_ini = os.path.join( |
709 | - os.path.dirname(config.config_file), 'channel.ini') |
710 | - ubuntu_build = config.system.build_file |
711 | - for path in (LAST_UPDATE_FILE, channel_ini, ubuntu_build): |
712 | - try: |
713 | - # Local time, since we can't know the timezone. |
714 | - timestamp = datetime.fromtimestamp(os.stat(path).st_mtime) |
715 | - # Seconds resolution. |
716 | - timestamp = timestamp.replace(microsecond=0) |
717 | - return str(timestamp) |
718 | - except (FileNotFoundError, PermissionError): |
719 | - pass |
720 | - else: |
721 | - return 'Unknown' |
722 | + try: |
723 | + timestamp = datetime.fromtimestamp(os.stat(LAST_UPDATE_FILE).st_mtime) |
724 | + except (FileNotFoundError, PermissionError): |
725 | + # We fall back to the latest mtime of the config.d/*.ini files. |
726 | + timestamps = sorted( |
727 | + datetime.fromtimestamp(path.stat().st_mtime) |
728 | + for path in config.ini_files) |
729 | + if len(timestamps) == 0: |
730 | + return 'Unknown' |
731 | + timestamp = timestamps[-1] |
732 | + return str(timestamp.replace(microsecond=0)) |
733 | |
734 | |
735 | def version_detail(details_string=None): |
736 | |
737 | === modified file 'systemimage/keyring.py' |
738 | --- systemimage/keyring.py 2014-09-26 09:32:29 +0000 |
739 | +++ systemimage/keyring.py 2015-01-15 22:43:25 +0000 |
740 | @@ -86,8 +86,8 @@ |
741 | else: |
742 | srcurl = urls |
743 | ascurl = urls + '.asc' |
744 | - tarxz_src = urljoin(config.service.https_base, srcurl) |
745 | - ascxz_src = urljoin(config.service.https_base, ascurl) |
746 | + tarxz_src = urljoin(config.https_base, srcurl) |
747 | + ascxz_src = urljoin(config.https_base, ascurl) |
748 | # Calculate the local paths to the temporary download files. The |
749 | # blacklist goes to the data partition and all the other files go to the |
750 | # cache partition. |
751 | |
752 | === modified file 'systemimage/main.py' |
753 | --- systemimage/main.py 2014-10-25 01:12:08 +0000 |
754 | +++ systemimage/main.py 2015-01-15 22:43:25 +0000 |
755 | @@ -21,7 +21,6 @@ |
756 | ] |
757 | |
758 | |
759 | -import os |
760 | import sys |
761 | import logging |
762 | import argparse |
763 | @@ -42,12 +41,11 @@ |
764 | __version__ = resource_bytes( |
765 | 'systemimage', 'version.txt').decode('utf-8').strip() |
766 | |
767 | -DEFAULT_CONFIG_FILE = '/etc/system-image/client.ini' |
768 | +DEFAULT_CONFIG_D = '/etc/system-image/config.d' |
769 | COLON = ':' |
770 | |
771 | |
772 | def main(): |
773 | - global config |
774 | parser = argparse.ArgumentParser( |
775 | prog='system-image-cli', |
776 | description='Ubuntu System Image Upgrader') |
777 | @@ -55,7 +53,7 @@ |
778 | action='version', |
779 | version='system-image-cli {}'.format(__version__)) |
780 | parser.add_argument('-C', '--config', |
781 | - default=DEFAULT_CONFIG_FILE, action='store', |
782 | + default=DEFAULT_CONFIG_D, action='store', |
783 | metavar='FILE', |
784 | help="""Use the given configuration file instead of |
785 | the default""") |
786 | @@ -137,16 +135,10 @@ |
787 | args = parser.parse_args(sys.argv[1:]) |
788 | try: |
789 | config.load(args.config) |
790 | - except FileNotFoundError as error: |
791 | - parser.error('\nConfiguration file not found: {}'.format(error)) |
792 | + except (TypeError, FileNotFoundError): |
793 | + parser.error('\nConfiguration directory not found: {}'.format( |
794 | + args.config)) |
795 | assert 'parser.error() does not return' # pragma: no cover |
796 | - # Load the optional channel.ini file, which must live next to the |
797 | - # configuration file. It's okay if this file does not exist. |
798 | - channel_ini = os.path.join(os.path.dirname(args.config), 'channel.ini') |
799 | - try: |
800 | - config.load(channel_ini, override=True) |
801 | - except FileNotFoundError: |
802 | - pass |
803 | |
804 | # Perform a factory reset. |
805 | if args.factory_reset: |
806 | |
807 | === modified file 'systemimage/scores.py' |
808 | --- systemimage/scores.py 2014-10-25 01:12:08 +0000 |
809 | +++ systemimage/scores.py 2015-01-15 22:43:25 +0000 |
810 | @@ -53,6 +53,7 @@ |
811 | :rtype: list |
812 | """ |
813 | if len(candidates) == 0: |
814 | + log.debug('No candidates, so no winner') |
815 | return [] |
816 | # We want to zip together the score for each candidate path, plus the |
817 | # candidate path, so that when we sort the sequence, we'll always get |
818 | |
819 | === modified file 'systemimage/service.py' |
820 | --- systemimage/service.py 2014-10-17 16:10:07 +0000 |
821 | +++ systemimage/service.py 2015-01-15 22:43:25 +0000 |
822 | @@ -20,7 +20,6 @@ |
823 | ] |
824 | |
825 | |
826 | -import os |
827 | import sys |
828 | import dbus |
829 | import logging |
830 | @@ -33,7 +32,8 @@ |
831 | from systemimage.dbus import Loop |
832 | from systemimage.helpers import makedirs |
833 | from systemimage.logging import initialize |
834 | -from systemimage.main import DEFAULT_CONFIG_FILE |
835 | +from systemimage.main import DEFAULT_CONFIG_D |
836 | + |
837 | |
838 | # --testing is only enabled when the systemimage.testing package is |
839 | # available. This will be the case for the upstream source package, and when |
840 | @@ -60,7 +60,7 @@ |
841 | action='version', |
842 | version='system-image-dbus {}'.format(__version__)) |
843 | parser.add_argument('-C', '--config', |
844 | - default=DEFAULT_CONFIG_FILE, action='store', |
845 | + default=DEFAULT_CONFIG_D, action='store', |
846 | metavar='FILE', |
847 | help="""Use the given configuration file instead of |
848 | the default""") |
849 | @@ -80,15 +80,8 @@ |
850 | try: |
851 | config.load(args.config) |
852 | except FileNotFoundError as error: |
853 | - parser.error('\nConfiguration file not found: {}'.format(error)) |
854 | + parser.error('\nConfiguration directory not found: {}'.format(error)) |
855 | assert 'parser.error() does not return' # pragma: no cover |
856 | - # Load the optional channel.ini file, which must live next to the |
857 | - # configuration file. It's okay if this file does not exist. |
858 | - channel_ini = os.path.join(os.path.dirname(args.config), 'channel.ini') |
859 | - try: |
860 | - config.load(channel_ini, override=True) |
861 | - except FileNotFoundError: |
862 | - pass |
863 | |
864 | # Create the temporary directory if it doesn't exist. |
865 | makedirs(config.system.tempdir) |
866 | @@ -121,6 +114,7 @@ |
867 | else: |
868 | from systemimage.dbus import Service |
869 | config.dbus_service = Service(system_bus, '/Service', loop) |
870 | + |
871 | try: |
872 | loop.run() |
873 | except KeyboardInterrupt: # pragma: no cover |
874 | |
875 | === modified file 'systemimage/state.py' |
876 | --- systemimage/state.py 2014-11-05 14:59:14 +0000 |
877 | +++ systemimage/state.py 2015-01-15 22:43:25 +0000 |
878 | @@ -214,7 +214,7 @@ |
879 | # I think it makes no sense to check the blacklist when we're |
880 | # downloading a blacklist file. |
881 | log.info('Looking for blacklist: {}'.format( |
882 | - urljoin(config.service.https_base, url))) |
883 | + urljoin(config.https_base, url))) |
884 | get_keyring('blacklist', url, 'image-master') |
885 | except SignatureError: |
886 | log.exception('No signed blacklist found') |
887 | @@ -250,7 +250,7 @@ |
888 | url = 'gpg/blacklist.tar.xz' |
889 | try: |
890 | log.info('Looking for blacklist again: {}', |
891 | - urljoin(config.service.https_base, url)) |
892 | + urljoin(config.https_base, url)) |
893 | get_keyring('blacklist', url, 'image-master') |
894 | except FileNotFoundError: |
895 | log.info('No blacklist found on second attempt') |
896 | @@ -276,9 +276,9 @@ |
897 | get_keyring( |
898 | 'image-signing', 'gpg/image-signing.tar.xz', 'image-master', |
899 | self.blacklist) |
900 | - channels_url = urljoin(config.service.https_base, 'channels.json') |
901 | + channels_url = urljoin(config.https_base, 'channels.json') |
902 | channels_path = os.path.join(config.tempdir, 'channels.json') |
903 | - asc_url = urljoin(config.service.https_base, 'channels.json.asc') |
904 | + asc_url = urljoin(config.https_base, 'channels.json.asc') |
905 | asc_path = os.path.join(config.tempdir, 'channels.json.asc') |
906 | log.info('Looking for: {}', channels_url) |
907 | with ExitStack() as stack: |
908 | @@ -332,8 +332,8 @@ |
909 | self._next.append(partial(self._get_index, device.index)) |
910 | |
911 | def _get_device_keyring(self, keyring): |
912 | - keyring_url = urljoin(config.service.https_base, keyring.path) |
913 | - asc_url = urljoin(config.service.https_base, keyring.signature) |
914 | + keyring_url = urljoin(config.https_base, keyring.path) |
915 | + asc_url = urljoin(config.https_base, keyring.signature) |
916 | log.info('getting device keyring: {}', keyring_url) |
917 | get_keyring( |
918 | 'device-signing', (keyring_url, asc_url), 'image-signing', |
919 | @@ -381,7 +381,7 @@ |
920 | |
921 | def _get_index(self, index): |
922 | """Get and verify the index.json file.""" |
923 | - index_url = urljoin(config.service.https_base, index) |
924 | + index_url = urljoin(config.https_base, index) |
925 | asc_url = index_url + '.asc' |
926 | index_path = os.path.join(config.tempdir, 'index.json') |
927 | asc_path = index_path + '.asc' |
928 | @@ -413,7 +413,7 @@ |
929 | # winner. Otherwise, trust the configured build number. |
930 | channel = self.channels[config.channel] |
931 | # channel_target is the channel we're on based on the alias mapping in |
932 | - # our channel.ini file. channel_alias is the alias mapping in the |
933 | + # our config files. channel_alias is the alias mapping in the |
934 | # channel.json file, i.e. the channel an update will put us on. |
935 | channel_target = getattr(config.service, 'channel_target', None) |
936 | channel_alias = getattr(channel, 'alias', None) |
937 | @@ -421,14 +421,17 @@ |
938 | channel_target is None or |
939 | channel_alias == channel_target): |
940 | build_number = config.build_number |
941 | - elif config.build_number_cli is not None: |
942 | - # An explicit --build on the command line still takes precedence. |
943 | - build_number = config.build_number_cli |
944 | else: |
945 | - # This is a channel switch caused by a new alias. |
946 | - build_number = 0 |
947 | + # This is a channel switch caused by a new alias. Unless the |
948 | + # build number has been explicitly overridden on the command line |
949 | + # via --build/-b, use build number 0 to force a full update. |
950 | + build_number = (config.build_number |
951 | + if config.build_number_override |
952 | + else 0) |
953 | self.channel_switch = (channel_target, channel_alias) |
954 | candidates = get_candidates(self.index, build_number) |
955 | + log.debug('Candidates from build# {}: {}'.format( |
956 | + build_number, len(candidates))) |
957 | if self._filter is not None: |
958 | candidates = self._filter(candidates) |
959 | self.winner = config.hooks.scorer().choose( |
960 | @@ -480,11 +483,11 @@ |
961 | else: |
962 | # Add the data file, which has a checksum. |
963 | downloads.append(Record( |
964 | - urljoin(config.service.http_base, filerec.path), |
965 | + urljoin(config.http_base, filerec.path), |
966 | dst, checksum)) |
967 | # Add the signature file, which does not have a checksum. |
968 | downloads.append(Record( |
969 | - urljoin(config.service.http_base, filerec.signature), |
970 | + urljoin(config.http_base, filerec.signature), |
971 | asc)) |
972 | signatures.append((dst, asc)) |
973 | checksums.append((dst, checksum)) |
974 | |
975 | === modified file 'systemimage/testing/controller.py' |
976 | --- systemimage/testing/controller.py 2015-01-13 15:20:40 +0000 |
977 | +++ systemimage/testing/controller.py 2015-01-15 22:43:25 +0000 |
978 | @@ -35,7 +35,7 @@ |
979 | from pkg_resources import resource_string as resource_bytes |
980 | from systemimage.helpers import temporary_directory |
981 | from systemimage.testing.helpers import ( |
982 | - data_path, find_dbus_process, reset_envar) |
983 | + data_path, find_dbus_process, makedirs, reset_envar) |
984 | from unittest.mock import patch |
985 | |
986 | |
987 | @@ -148,7 +148,6 @@ |
988 | # Public. |
989 | self.tmpdir = self._stack.enter_context(temporary_directory()) |
990 | self.config_path = os.path.join(self.tmpdir, 'dbus-system.conf') |
991 | - self.ini_path = None |
992 | self.serverdir = self._stack.enter_context(temporary_directory()) |
993 | self.daemon_pid = None |
994 | self.mode = 'live' |
995 | @@ -169,10 +168,12 @@ |
996 | ini_logfile = (os.path.join(ini_tmpdir, 'client.log') |
997 | if logfile is None |
998 | else logfile) |
999 | - self.ini_path = os.path.join(self.tmpdir, 'client.ini') |
1000 | + self.ini_path = os.path.join(self.tmpdir, 'config.d') |
1001 | + makedirs(self.ini_path) |
1002 | template = resource_bytes( |
1003 | - 'systemimage.tests.data', 'config_03.ini').decode('utf-8') |
1004 | - with open(self.ini_path, 'w', encoding='utf-8') as fp: |
1005 | + 'systemimage.tests.data', '01.ini').decode('utf-8') |
1006 | + defaults = os.path.join(self.ini_path, '00_defaults.ini') |
1007 | + with open(defaults, 'w', encoding='utf-8') as fp: |
1008 | print(template.format(tmpdir=ini_tmpdir, |
1009 | vardir=ini_vardir, |
1010 | logfile=ini_logfile, |
1011 | @@ -245,7 +246,7 @@ |
1012 | daemon_exe, |
1013 | #'/usr/lib/x86_64-linux-gnu/dbus-1.0/debug-build/bin/dbus-daemon', |
1014 | '--fork', |
1015 | - '--config-file=' + self.config_path, |
1016 | + '--config-file=' + str(self.config_path), |
1017 | # Return the address and pid on stdout. |
1018 | '--print-address=1', |
1019 | '--print-pid=1', |
1020 | |
1021 | === modified file 'systemimage/testing/dbus.py' |
1022 | --- systemimage/testing/dbus.py 2014-10-17 16:10:07 +0000 |
1023 | +++ systemimage/testing/dbus.py 2015-01-15 22:43:25 +0000 |
1024 | @@ -71,6 +71,7 @@ |
1025 | @log_and_exit |
1026 | @method('com.canonical.SystemImage') |
1027 | def Reset(self): |
1028 | + config.reload() |
1029 | self._api = Mediator() |
1030 | try: |
1031 | self._checking.release() |
1032 | |
1033 | === modified file 'systemimage/testing/helpers.py' |
1034 | --- systemimage/testing/helpers.py 2014-11-05 14:59:14 +0000 |
1035 | +++ systemimage/testing/helpers.py 2015-01-15 22:43:25 +0000 |
1036 | @@ -49,7 +49,7 @@ |
1037 | import unittest |
1038 | |
1039 | from contextlib import ExitStack, contextmanager, suppress |
1040 | -from functools import partial, wraps |
1041 | +from functools import partial, partialmethod, wraps |
1042 | from http.server import HTTPServer, SimpleHTTPRequestHandler |
1043 | from pathlib import Path |
1044 | from pkg_resources import resource_filename, resource_string as resource_bytes |
1045 | @@ -58,7 +58,6 @@ |
1046 | from systemimage.config import Configuration, config |
1047 | from systemimage.helpers import MiB, atomic, makedirs, temporary_directory |
1048 | from systemimage.index import Index |
1049 | -from systemimage.state import State |
1050 | from threading import Thread |
1051 | from unittest.mock import patch |
1052 | |
1053 | @@ -208,47 +207,98 @@ |
1054 | return resources.pop_all() |
1055 | |
1056 | |
1057 | -def configuration(function): |
1058 | - """Decorator that produces a temporary configuration for testing. |
1059 | - |
1060 | - The config_00.ini template is copied to a temporary file and the the |
1061 | - various file system locations are filled in with the location for a, |
1062 | - er, temporary temporary directory. This temporary configuration |
1063 | - file is loaded up and the global configuration object is patched so |
1064 | - that all other code will see it instead of the default global |
1065 | - configuration object. |
1066 | - |
1067 | - Everything is properly cleaned up after the test method exits. |
1068 | - """ |
1069 | - @wraps(function) |
1070 | - def wrapper(*args, **kws): |
1071 | - with ExitStack() as resources: |
1072 | - etc_dir = resources.enter_context(temporary_directory()) |
1073 | - ini_file = os.path.join(etc_dir, 'client.ini') |
1074 | - temp_tmpdir = resources.enter_context(temporary_directory()) |
1075 | - temp_vardir = resources.enter_context(temporary_directory()) |
1076 | +# This defines the @configuration decorator used in various test suites to |
1077 | +# create a temporary config.d/ directory for a test. This is all fairly |
1078 | +# complicated, but here's what's going on. |
1079 | +# |
1080 | +# The _wrapper() function is the inner part of the decorator, and it does the |
1081 | +# heart of the operation, which is to create a temporary directory for |
1082 | +# config.d, along with temporary var and tmp directories. These latter two |
1083 | +# will be interpolated into any configuration file copied into config.d. |
1084 | +# |
1085 | +# The outer decorator function differs depending on whether @configuration was |
1086 | +# given without arguments, or called with arguments at the time of the |
1087 | +# function definition. |
1088 | +# |
1089 | +# In the former case, e.g. |
1090 | +# |
1091 | +# @configuration |
1092 | +# def test_something(self): |
1093 | +# |
1094 | +# The default 00.ini file is interpolated and copied into config.d. Simple. |
1095 | +# |
1096 | +# In the latter case, e.g. |
1097 | +# |
1098 | +# @configuration('some-config.ini') |
1099 | +# def test_something(self): |
1100 | +# |
1101 | +# There's actually another level of interior function, because the outer |
1102 | +# decorator itself is getting called. Here, any named configuration file is |
1103 | +# additionally copied to the config.d directory, renaming it sequentionally to |
1104 | +# something like 01_override.ini, with the numeric part incrementing |
1105 | +# monotonically. |
1106 | +# |
1107 | +# The implementation is tricky because we want the call sites to be simple. |
1108 | +def _wrapper(self, function, ini_files, *args, **kws): |
1109 | + start = 0 |
1110 | + with ExitStack() as resources: |
1111 | + # Create the config.d directory and copy all the source ini files to |
1112 | + # this directory in sequential order, interpolating in the temporary |
1113 | + # tmp and var directories. |
1114 | + config_d = resources.enter_context(temporary_directory()) |
1115 | + temp_tmpdir = resources.enter_context(temporary_directory()) |
1116 | + temp_vardir = resources.enter_context(temporary_directory()) |
1117 | + for ini_file in ini_files: |
1118 | + dst = os.path.join(config_d, '{:02d}_override.ini'.format(start)) |
1119 | + start += 1 |
1120 | template = resource_bytes( |
1121 | - 'systemimage.tests.data', 'config_00.ini').decode('utf-8') |
1122 | - with atomic(ini_file) as fp: |
1123 | + 'systemimage.tests.data', ini_file).decode('utf-8') |
1124 | + with atomic(dst) as fp: |
1125 | print(template.format(tmpdir=temp_tmpdir, |
1126 | vardir=temp_vardir), file=fp) |
1127 | - config = Configuration(ini_file) |
1128 | - resources.enter_context( |
1129 | - patch('systemimage.config._config', config)) |
1130 | - resources.enter_context( |
1131 | - patch('systemimage.device.check_output', |
1132 | - return_value='nexus7')) |
1133 | - # Make sure the cache_partition and data_partition exist. |
1134 | - makedirs(config.updater.cache_partition) |
1135 | - makedirs(config.updater.data_partition) |
1136 | - # The method under test is allowed to specify some additional |
1137 | - # keyword arguments, in order to pass some variables in from the |
1138 | - # wrapper. |
1139 | - signature = inspect.signature(function) |
1140 | - if 'ini_file' in signature.parameters: |
1141 | - kws['ini_file'] = ini_file |
1142 | - return function(*args, **kws) |
1143 | - return wrapper |
1144 | + # Patch the global configuration object so that it can be used |
1145 | + # directly, which is good enough in most cases. Also patch the bit of |
1146 | + # code that detects the device name. |
1147 | + config = Configuration(config_d) |
1148 | + resources.enter_context( |
1149 | + patch('systemimage.config._config', config)) |
1150 | + resources.enter_context( |
1151 | + patch('systemimage.device.check_output', |
1152 | + return_value='nexus7')) |
1153 | + # Make sure the cache_partition and data_partition exist. |
1154 | + makedirs(config.updater.cache_partition) |
1155 | + makedirs(config.updater.data_partition) |
1156 | + # The method under test is allowed to specify some additional |
1157 | + # keyword arguments, in order to pass some variables in from the |
1158 | + # wrapper. |
1159 | + signature = inspect.signature(function) |
1160 | + if 'config_d' in signature.parameters: |
1161 | + kws['config_d'] = config_d |
1162 | + if 'config' in signature.parameters: |
1163 | + kws['config'] = config |
1164 | + # Call the function with the given arguments and return the result. |
1165 | + return function(self, *args, **kws) |
1166 | + |
1167 | + |
1168 | +def configuration(*args): |
1169 | + """Outer decorator which can be called or not at function definition time. |
1170 | + |
1171 | + If called, the arguments are positional only, and name the test data .ini |
1172 | + files which are to be copied to config.d directory. If none are given, |
1173 | + then 00.ini is used. |
1174 | + """ |
1175 | + if len(args) == 1 and callable(args[0]): |
1176 | + # We assume this was the bare @configuration decorator flavor. |
1177 | + function = args[0] |
1178 | + inner = partialmethod(_wrapper, function, ('00.ini',)) |
1179 | + return wraps(function)(inner) |
1180 | + else: |
1181 | + # We assume this was the called @configuration(...) decorator flavor, |
1182 | + # so create the actual decorator that wraps the _wrapper function. |
1183 | + def decorator(function): |
1184 | + inner = partialmethod(_wrapper, function, args) |
1185 | + return wraps(function)(inner) |
1186 | + return decorator |
1187 | |
1188 | |
1189 | def sign(filename, pubkey_ring): |
1190 | @@ -259,6 +309,8 @@ |
1191 | with. This keyring must contain only one key, and its key id must |
1192 | exist in the master secret keyring. |
1193 | """ |
1194 | + # filename could be a Path object. For now, just str-ify it. |
1195 | + filename = str(filename) |
1196 | with ExitStack() as resources: |
1197 | home = resources.enter_context(temporary_directory()) |
1198 | secring = data_path('master-secring.gpg') |
1199 | @@ -278,7 +330,7 @@ |
1200 | |
1201 | def copy(filename, todir, dst=None): |
1202 | src = data_path(filename) |
1203 | - dst = os.path.join(todir, filename if dst is None else dst) |
1204 | + dst = os.path.join(str(todir), filename if dst is None else dst) |
1205 | makedirs(os.path.dirname(dst)) |
1206 | shutil.copy(src, dst) |
1207 | |
1208 | @@ -405,21 +457,24 @@ |
1209 | os.chmod(path, old_mode) |
1210 | |
1211 | |
1212 | -def touch_build(version, timestamp=None): |
1213 | +def touch_build(version, timestamp=None, use_config=None): |
1214 | # LP: #1220238 - assert that no old-style version numbers are being used. |
1215 | assert 0 <= version < (1 << 16), ( |
1216 | - 'old style version number: {}'.format(version)) |
1217 | - with open(config.system.build_file, 'w', encoding='utf-8') as fp: |
1218 | - print(version, file=fp) |
1219 | + 'Old style version number: {}'.format(version)) |
1220 | + if use_config is None: |
1221 | + use_config = config |
1222 | + override = Path(use_config.config_d) / '99_build.ini' |
1223 | + with override.open('wt', encoding='utf-8') as fp: |
1224 | + print("""\ |
1225 | +[service] |
1226 | +build_number: {} |
1227 | +""".format(version), file=fp) |
1228 | + # We have to touch the mtimes for all the files in the config directory. |
1229 | if timestamp is not None: |
1230 | timestamp = int(timestamp) |
1231 | - os.utime(config.system.build_file, (timestamp, timestamp)) |
1232 | - channel_ini = os.path.join( |
1233 | - os.path.dirname(config.config_file), 'channel.ini') |
1234 | - try: |
1235 | - os.utime(channel_ini, (timestamp, timestamp)) |
1236 | - except FileNotFoundError: |
1237 | - pass |
1238 | + for path in Path(use_config.config_d).iterdir(): |
1239 | + os.utime(str(path), (timestamp, timestamp)) |
1240 | + use_config.reload() |
1241 | |
1242 | |
1243 | def write_bytes(path, size_in_mib): |
1244 | @@ -497,6 +552,8 @@ |
1245 | SystemImagePlugin.controller.set_mode(cert_pem='cert.pem') |
1246 | |
1247 | def setUp(self): |
1248 | + # Avoid circular imports. |
1249 | + from systemimage.state import State |
1250 | self._resources = ExitStack() |
1251 | self._state = State() |
1252 | try: |
1253 | |
1254 | === modified file 'systemimage/testing/nose.py' |
1255 | --- systemimage/testing/nose.py 2014-09-17 22:34:27 +0000 |
1256 | +++ systemimage/testing/nose.py 2015-01-15 22:43:25 +0000 |
1257 | @@ -90,7 +90,7 @@ |
1258 | 'Set the log file for the test run', |
1259 | nargs=1) |
1260 | def set_dbus_loglevel(level): |
1261 | - self.log_level = 'info:{}'.format(level[0]) |
1262 | + self.log_level = level[0] |
1263 | self.addOption(set_dbus_loglevel, 'M', 'loglevel', |
1264 | 'Set the systemimage.dbus log level', |
1265 | nargs=1) |
1266 | @@ -149,3 +149,8 @@ |
1267 | ## from systemimage.testing.helpers import debug |
1268 | ## with debug() as dlog: |
1269 | ## dlog('^^^^^', event.test) |
1270 | + |
1271 | + def describeTest(self, event): |
1272 | + # This is fucked up. |
1273 | + if 'partial' in event.description: |
1274 | + event.description = event.description[:-73] |
1275 | |
1276 | === renamed file 'systemimage/tests/data/config_00.ini' => 'systemimage/tests/data/00.ini' |
1277 | --- systemimage/tests/data/config_00.ini 2013-11-12 19:57:39 +0000 |
1278 | +++ systemimage/tests/data/00.ini 2015-01-15 22:43:25 +0000 |
1279 | @@ -12,7 +12,6 @@ |
1280 | |
1281 | [system] |
1282 | timeout: 1s |
1283 | -build_file: {tmpdir}/ubuntu-build |
1284 | tempdir: {tmpdir}/tmp |
1285 | logfile: {tmpdir}/client.log |
1286 | loglevel: info |
1287 | |
1288 | === renamed file 'systemimage/tests/data/config_03.ini' => 'systemimage/tests/data/01.ini' |
1289 | --- systemimage/tests/data/config_03.ini 2014-09-11 18:12:50 +0000 |
1290 | +++ systemimage/tests/data/01.ini 2015-01-15 22:43:25 +0000 |
1291 | @@ -12,7 +12,6 @@ |
1292 | |
1293 | [system] |
1294 | timeout: 1s |
1295 | -build_file: {tmpdir}/ubuntu-build |
1296 | tempdir: {tmpdir}/tmp |
1297 | logfile: {logfile} |
1298 | loglevel: {loglevel} |
1299 | |
1300 | === added file 'systemimage/tests/data/api.channels_01.json' |
1301 | --- systemimage/tests/data/api.channels_01.json 1970-01-01 00:00:00 +0000 |
1302 | +++ systemimage/tests/data/api.channels_01.json 2015-01-15 22:43:25 +0000 |
1303 | @@ -0,0 +1,13 @@ |
1304 | +{ |
1305 | + "stable": { |
1306 | + "devices": { |
1307 | + "nexus7": { |
1308 | + "index": "/stable/nexus7/index.json", |
1309 | + "keyring": { |
1310 | + "path": "/stable/nexus7/device-signing.tar.xz", |
1311 | + "signature": "/stable/nexus7/device-signing.tar.xz.asc" |
1312 | + } |
1313 | + } |
1314 | + } |
1315 | + } |
1316 | +} |
1317 | |
1318 | === added file 'systemimage/tests/data/api.index_01.json' |
1319 | --- systemimage/tests/data/api.index_01.json 1970-01-01 00:00:00 +0000 |
1320 | +++ systemimage/tests/data/api.index_01.json 2015-01-15 22:43:25 +0000 |
1321 | @@ -0,0 +1,36 @@ |
1322 | +{ |
1323 | + "global": { |
1324 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
1325 | + }, |
1326 | + "images": [ |
1327 | + { |
1328 | + "description": "Full", |
1329 | + "files": [ |
1330 | + { |
1331 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
1332 | + "order": 3, |
1333 | + "path": "/3/4/5.txt", |
1334 | + "signature": "/3/4/5.txt.asc", |
1335 | + "size": 104857600 |
1336 | + }, |
1337 | + { |
1338 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
1339 | + "order": 1, |
1340 | + "path": "/4/5/6.txt", |
1341 | + "signature": "/4/5/6.txt.asc", |
1342 | + "size": 104857600 |
1343 | + }, |
1344 | + { |
1345 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
1346 | + "order": 2, |
1347 | + "path": "/5/6/7.txt", |
1348 | + "signature": "/5/6/7.txt.asc", |
1349 | + "size": 104857600 |
1350 | + } |
1351 | + ], |
1352 | + "type": "full", |
1353 | + "version": 1600, |
1354 | + "bootme": true |
1355 | + } |
1356 | + ] |
1357 | +} |
1358 | |
1359 | === added file 'systemimage/tests/data/api.index_02.json' |
1360 | --- systemimage/tests/data/api.index_02.json 1970-01-01 00:00:00 +0000 |
1361 | +++ systemimage/tests/data/api.index_02.json 2015-01-15 22:43:25 +0000 |
1362 | @@ -0,0 +1,251 @@ |
1363 | +{ |
1364 | + "global": { |
1365 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
1366 | + }, |
1367 | + "images": [ |
1368 | + { |
1369 | + "bootme": true, |
1370 | + "description": "Full A", |
1371 | + "files": [ |
1372 | + { |
1373 | + "checksum": "abc", |
1374 | + "order": 1, |
1375 | + "path": "/a/b/c.txt", |
1376 | + "signature": "/a/b/c.txt.asc", |
1377 | + "size": 104857600 |
1378 | + |
1379 | + }, |
1380 | + { |
1381 | + "checksum": "bcd", |
1382 | + "order": 1, |
1383 | + "path": "/b/c/d.txt", |
1384 | + "signature": "/b/c/d.txt.asc", |
1385 | + "size": 104857600 |
1386 | + }, |
1387 | + { |
1388 | + "checksum": "cde", |
1389 | + "order": 1, |
1390 | + "path": "/c/d/e.txt", |
1391 | + "signature": "/c/d/e.txt.asc", |
1392 | + "size": 104857600 |
1393 | + } |
1394 | + ], |
1395 | + "type": "full", |
1396 | + "version": 1300 |
1397 | + }, |
1398 | + { |
1399 | + "base": 1300, |
1400 | + "bootme": true, |
1401 | + "description": "Delta A.1", |
1402 | + "files": [ |
1403 | + { |
1404 | + "checksum": "def", |
1405 | + "order": 1, |
1406 | + "path": "/d/e/f.txt", |
1407 | + "signature": "/d/e/f.txt.asc", |
1408 | + "size": 104857600 |
1409 | + }, |
1410 | + { |
1411 | + "checksum": "ef0", |
1412 | + "order": 1, |
1413 | + "path": "/e/f/0.txt", |
1414 | + "signature": "/e/f/0.txt.asc", |
1415 | + "size": 104857600 |
1416 | + }, |
1417 | + { |
1418 | + "checksum": "f01", |
1419 | + "order": 1, |
1420 | + "path": "/f/e/1.txt", |
1421 | + "signature": "/f/e/1.txt.asc", |
1422 | + "size": 104857600 |
1423 | + } |
1424 | + ], |
1425 | + "type": "delta", |
1426 | + "version": 1301 |
1427 | + }, |
1428 | + { |
1429 | + "base": 1301, |
1430 | + "bootme": true, |
1431 | + "description": "Delta A.2", |
1432 | + "files": [ |
1433 | + { |
1434 | + "checksum": "012", |
1435 | + "order": 1, |
1436 | + "path": "/0/1/2.txt", |
1437 | + "signature": "/0/1/2.txt.asc", |
1438 | + "size": 104857600 |
1439 | + }, |
1440 | + { |
1441 | + "checksum": "123", |
1442 | + "order": 1, |
1443 | + "path": "/1/2/3.txt", |
1444 | + "signature": "/1/2/3.txt.asc", |
1445 | + "size": 104857600 |
1446 | + }, |
1447 | + { |
1448 | + "checksum": "234", |
1449 | + "order": 1, |
1450 | + "path": "/2/3/4.txt", |
1451 | + "signature": "/2/3/4.txt.asc", |
1452 | + "size": 104857600 |
1453 | + } |
1454 | + ], |
1455 | + "type": "delta", |
1456 | + "version": 1304 |
1457 | + }, |
1458 | + |
1459 | + { |
1460 | + "description": "Full B", |
1461 | + "description-en": "The full B", |
1462 | + "files": [ |
1463 | + { |
1464 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
1465 | + "order": 1, |
1466 | + "path": "/3/4/5.txt", |
1467 | + "signature": "/3/4/5.txt.asc", |
1468 | + "size": 10000 |
1469 | + }, |
1470 | + { |
1471 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
1472 | + "order": 1, |
1473 | + "path": "/4/5/6.txt", |
1474 | + "signature": "/4/5/6.txt.asc", |
1475 | + "size": 10001 |
1476 | + }, |
1477 | + { |
1478 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
1479 | + "order": 1, |
1480 | + "path": "/5/6/7.txt", |
1481 | + "signature": "/5/6/7.txt.asc", |
1482 | + "size": 10002 |
1483 | + } |
1484 | + ], |
1485 | + "type": "full", |
1486 | + "version": 1200 |
1487 | + }, |
1488 | + { |
1489 | + "base": 1200, |
1490 | + "description": "Delta B.1", |
1491 | + "description-en_US": "This is the delta B.1", |
1492 | + "description-xx": "XX This is the delta B.1", |
1493 | + "description-yy": "YY This is the delta B.1", |
1494 | + "description-yy_ZZ": "YY-ZZ This is the delta B.1", |
1495 | + "files": [ |
1496 | + { |
1497 | + "checksum": "cebe3d9d614ba5c19f633566104315854a11353a333bf96f16b5afa0e90abdc4", |
1498 | + "order": 1, |
1499 | + "path": "/6/7/8.txt", |
1500 | + "signature": "/6/7/8.txt.asc", |
1501 | + "size": 20000 |
1502 | + }, |
1503 | + { |
1504 | + "checksum": "35a9e381b1a27567549b5f8a6f783c167ebf809f1c4d6a9e367240484d8ce281", |
1505 | + "order": 1, |
1506 | + "path": "/7/8/9.txt", |
1507 | + "signature": "/7/8/9.txt.asc", |
1508 | + "size": 20001 |
1509 | + }, |
1510 | + { |
1511 | + "checksum": "6bd6c3f7808391e8b74f5c2d58810809eda5c134aaa7f1b27ddf4b445c421ac5", |
1512 | + "order": 1, |
1513 | + "path": "/8/9/a.txt", |
1514 | + "signature": "/8/9/a.txt.asc", |
1515 | + "size": 20002 |
1516 | + } |
1517 | + ], |
1518 | + "type": "delta", |
1519 | + "version": 1201 |
1520 | + }, |
1521 | + { |
1522 | + "base": 1201, |
1523 | + "description": "Delta B.2", |
1524 | + "description-xx": "Oh delta, my delta", |
1525 | + "description-xx_CC": "This hyar is the delta B.2", |
1526 | + "files": [ |
1527 | + { |
1528 | + "checksum": "8c43d75d5b9f1aa9fc3fabb6b60b6c06553324352399a33febce95a1b588d1d6", |
1529 | + "order": 1, |
1530 | + "path": "/9/a/b.txt", |
1531 | + "signature": "/9/a/b.txt.asc", |
1532 | + "size": 30000 |
1533 | + }, |
1534 | + { |
1535 | + "checksum": "20e796c128096d229ba89bf412a53c3151d170a409c2c8c1dd8e414087b7ffae", |
1536 | + "order": 1, |
1537 | + "path": "/f/e/d.txt", |
1538 | + "signature": "/f/e/d.txt.asc", |
1539 | + "size": 30001 |
1540 | + }, |
1541 | + { |
1542 | + "checksum": "278238e8bafa4709c77aa723e168101acd6ee1fb9fcc1b6eca4762e5c7dad768", |
1543 | + "order": 1, |
1544 | + "path": "/e/d/c.txt", |
1545 | + "signature": "/e/d/c.txt.asc", |
1546 | + "size": 30002 |
1547 | + |
1548 | + } |
1549 | + ], |
1550 | + "type": "delta", |
1551 | + "version": 1304 |
1552 | + }, |
1553 | + |
1554 | + { |
1555 | + "description": "Full C", |
1556 | + "files": [ |
1557 | + { |
1558 | + "checksum": "dcb", |
1559 | + "order": 1, |
1560 | + "path": "/d/c/b.txt", |
1561 | + "signature": "/d/c/b.txt.asc", |
1562 | + "size": 104857600 |
1563 | + }, |
1564 | + { |
1565 | + "checksum": "cba", |
1566 | + "order": 1, |
1567 | + "path": "/c/b/a.txt", |
1568 | + "signature": "/c/b/a.txt.asc", |
1569 | + "size": 104857600 |
1570 | + }, |
1571 | + { |
1572 | + "checksum": "ba9", |
1573 | + "order": 1, |
1574 | + "path": "/b/a/9.txt", |
1575 | + "signature": "/b/a/9.txt.asc", |
1576 | + "size": 104857600 |
1577 | + } |
1578 | + ], |
1579 | + "type": "full", |
1580 | + "version": 1100 |
1581 | + }, |
1582 | + { |
1583 | + "base": 1100, |
1584 | + "description": "Delta C.1", |
1585 | + "files": [ |
1586 | + { |
1587 | + "checksum": "a98", |
1588 | + "order": 1, |
1589 | + "path": "/a/9/8.txt", |
1590 | + "signature": "/a/9/8.txt.asc", |
1591 | + "size": 104857600 |
1592 | + }, |
1593 | + { |
1594 | + "checksum": "987", |
1595 | + "order": 1, |
1596 | + "path": "/9/8/7.txt", |
1597 | + "signature": "/9/8/7.txt.asc", |
1598 | + "size": 104857600 |
1599 | + }, |
1600 | + { |
1601 | + "checksum": "876", |
1602 | + "order": 1, |
1603 | + "path": "/8/7/6.txt", |
1604 | + "signature": "/8/7/6.txt.asc", |
1605 | + "size": 838860800 |
1606 | + |
1607 | + } |
1608 | + ], |
1609 | + "type": "delta", |
1610 | + "version": 1303 |
1611 | + } |
1612 | + ] |
1613 | +} |
1614 | |
1615 | === added file 'systemimage/tests/data/candidates.index_01.json' |
1616 | --- systemimage/tests/data/candidates.index_01.json 1970-01-01 00:00:00 +0000 |
1617 | +++ systemimage/tests/data/candidates.index_01.json 2015-01-15 22:43:25 +0000 |
1618 | @@ -0,0 +1,6 @@ |
1619 | +{ |
1620 | + "global": { |
1621 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
1622 | + }, |
1623 | + "images": [] |
1624 | +} |
1625 | |
1626 | === added file 'systemimage/tests/data/candidates.index_02.json' |
1627 | --- systemimage/tests/data/candidates.index_02.json 1970-01-01 00:00:00 +0000 |
1628 | +++ systemimage/tests/data/candidates.index_02.json 2015-01-15 22:43:25 +0000 |
1629 | @@ -0,0 +1,23 @@ |
1630 | +{ |
1631 | + "global": { |
1632 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
1633 | + }, |
1634 | + "images": [ |
1635 | + { |
1636 | + "bootme": true, |
1637 | + "description": "New full build 1", |
1638 | + "files": [], |
1639 | + "minversion": 600, |
1640 | + "type": "full", |
1641 | + "version": 1300 |
1642 | + }, |
1643 | + { |
1644 | + "bootme": true, |
1645 | + "description": "New full build 2", |
1646 | + "files": [], |
1647 | + "minversion": 1100, |
1648 | + "type": "full", |
1649 | + "version": 1400 |
1650 | + } |
1651 | + ] |
1652 | +} |
1653 | |
1654 | === renamed file 'systemimage/tests/data/index_05.json' => 'systemimage/tests/data/candidates.index_03.json' |
1655 | === renamed file 'systemimage/tests/data/index_03.json' => 'systemimage/tests/data/candidates.index_04.json' |
1656 | === renamed file 'systemimage/tests/data/index_04.json' => 'systemimage/tests/data/candidates.index_05.json' |
1657 | === renamed file 'systemimage/tests/data/index_06.json' => 'systemimage/tests/data/candidates.index_06.json' |
1658 | === renamed file 'systemimage/tests/data/index_07.json' => 'systemimage/tests/data/candidates.index_07.json' |
1659 | === added file 'systemimage/tests/data/candidates.index_08.json' |
1660 | --- systemimage/tests/data/candidates.index_08.json 1970-01-01 00:00:00 +0000 |
1661 | +++ systemimage/tests/data/candidates.index_08.json 2015-01-15 22:43:25 +0000 |
1662 | @@ -0,0 +1,244 @@ |
1663 | +{ |
1664 | + "global": { |
1665 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
1666 | + }, |
1667 | + "images": [ |
1668 | + { |
1669 | + "bootme": true, |
1670 | + "description": "Full A", |
1671 | + "files": [ |
1672 | + { |
1673 | + "checksum": "abc", |
1674 | + "order": 1, |
1675 | + "path": "/a/b/c.txt", |
1676 | + "signature": "/a/b/c.txt.asc", |
1677 | + "size": 104857600 |
1678 | + |
1679 | + }, |
1680 | + { |
1681 | + "checksum": "bcd", |
1682 | + "order": 1, |
1683 | + "path": "/b/c/d.txt", |
1684 | + "signature": "/b/c/d.txt.asc", |
1685 | + "size": 104857600 |
1686 | + }, |
1687 | + { |
1688 | + "checksum": "cde", |
1689 | + "order": 1, |
1690 | + "path": "/c/d/e.txt", |
1691 | + "signature": "/c/d/e.txt.asc", |
1692 | + "size": 104857600 |
1693 | + } |
1694 | + ], |
1695 | + "type": "full", |
1696 | + "version": 1300 |
1697 | + }, |
1698 | + { |
1699 | + "base": 1300, |
1700 | + "bootme": true, |
1701 | + "description": "Delta A.1", |
1702 | + "files": [ |
1703 | + { |
1704 | + "checksum": "def", |
1705 | + "order": 1, |
1706 | + "path": "/d/e/f.txt", |
1707 | + "signature": "/d/e/f.txt.asc", |
1708 | + "size": 104857600 |
1709 | + }, |
1710 | + { |
1711 | + "checksum": "ef0", |
1712 | + "order": 1, |
1713 | + "path": "/e/f/0.txt", |
1714 | + "signature": "/e/f/0.txt.asc", |
1715 | + "size": 104857600 |
1716 | + }, |
1717 | + { |
1718 | + "checksum": "f01", |
1719 | + "order": 1, |
1720 | + "path": "/f/e/1.txt", |
1721 | + "signature": "/f/e/1.txt.asc", |
1722 | + "size": 104857600 |
1723 | + } |
1724 | + ], |
1725 | + "type": "delta", |
1726 | + "version": 1301 |
1727 | + }, |
1728 | + { |
1729 | + "base": 1301, |
1730 | + "bootme": true, |
1731 | + "description": "Delta A.2", |
1732 | + "files": [ |
1733 | + { |
1734 | + "checksum": "012", |
1735 | + "order": 1, |
1736 | + "path": "/0/1/2.txt", |
1737 | + "signature": "/0/1/2.txt.asc", |
1738 | + "size": 104857600 |
1739 | + }, |
1740 | + { |
1741 | + "checksum": "123", |
1742 | + "order": 1, |
1743 | + "path": "/1/2/3.txt", |
1744 | + "signature": "/1/2/3.txt.asc", |
1745 | + "size": 104857600 |
1746 | + }, |
1747 | + { |
1748 | + "checksum": "234", |
1749 | + "order": 1, |
1750 | + "path": "/2/3/4.txt", |
1751 | + "signature": "/2/3/4.txt.asc", |
1752 | + "size": 104857600 |
1753 | + } |
1754 | + ], |
1755 | + "type": "delta", |
1756 | + "version": 1304 |
1757 | + }, |
1758 | + |
1759 | + { |
1760 | + "description": "Full B", |
1761 | + "files": [ |
1762 | + { |
1763 | + "checksum": "345", |
1764 | + "order": 1, |
1765 | + "path": "/3/4/5.txt", |
1766 | + "signature": "/3/4/5.txt.asc", |
1767 | + "size": 104857600 |
1768 | + }, |
1769 | + { |
1770 | + "checksum": "456", |
1771 | + "order": 1, |
1772 | + "path": "/4/5/6.txt", |
1773 | + "signature": "/4/5/6.txt.asc", |
1774 | + "size": 104857600 |
1775 | + }, |
1776 | + { |
1777 | + "checksum": "567", |
1778 | + "order": 1, |
1779 | + "path": "/5/6/7.txt", |
1780 | + "signature": "/5/6/7.txt.asc", |
1781 | + "size": 104857600 |
1782 | + } |
1783 | + ], |
1784 | + "type": "full", |
1785 | + "version": 1200 |
1786 | + }, |
1787 | + { |
1788 | + "base": 1200, |
1789 | + "description": "Delta B.1", |
1790 | + "files": [ |
1791 | + { |
1792 | + "checksum": "678", |
1793 | + "order": 1, |
1794 | + "path": "/6/7/8.txt", |
1795 | + "signature": "/6/7/8.txt.asc", |
1796 | + "size": 104857600 |
1797 | + }, |
1798 | + { |
1799 | + "checksum": "789", |
1800 | + "order": 1, |
1801 | + "path": "/7/8/9.txt", |
1802 | + "signature": "/7/8/9.txt.asc", |
1803 | + "size": 104857600 |
1804 | + }, |
1805 | + { |
1806 | + "checksum": "89a", |
1807 | + "order": 1, |
1808 | + "path": "/8/9/a.txt", |
1809 | + "signature": "/8/9/a.txt.asc", |
1810 | + "size": 104857600 |
1811 | + } |
1812 | + ], |
1813 | + "type": "delta", |
1814 | + "version": 1201 |
1815 | + }, |
1816 | + { |
1817 | + "base": 1201, |
1818 | + "description": "Delta B.2", |
1819 | + "files": [ |
1820 | + { |
1821 | + "checksum": "9ab", |
1822 | + "order": 1, |
1823 | + "path": "/9/a/b.txt", |
1824 | + "signature": "/9/a/b.txt.asc", |
1825 | + "size": 104857600 |
1826 | + }, |
1827 | + { |
1828 | + "checksum": "fed", |
1829 | + "order": 1, |
1830 | + "path": "/f/e/d.txt", |
1831 | + "signature": "/f/e/d.txt.asc", |
1832 | + "size": 104857600 |
1833 | + }, |
1834 | + { |
1835 | + "checksum": "edc", |
1836 | + "order": 1, |
1837 | + "path": "/e/d/c.txt", |
1838 | + "signature": "/e/d/c.txt.asc", |
1839 | + "size": 209715200 |
1840 | + |
1841 | + } |
1842 | + ], |
1843 | + "type": "delta", |
1844 | + "version": 1304 |
1845 | + }, |
1846 | + |
1847 | + { |
1848 | + "description": "Full C", |
1849 | + "files": [ |
1850 | + { |
1851 | + "checksum": "dcb", |
1852 | + "order": 1, |
1853 | + "path": "/d/c/b.txt", |
1854 | + "signature": "/d/c/b.txt.asc", |
1855 | + "size": 104857600 |
1856 | + }, |
1857 | + { |
1858 | + "checksum": "cba", |
1859 | + "order": 1, |
1860 | + "path": "/c/b/a.txt", |
1861 | + "signature": "/c/b/a.txt.asc", |
1862 | + "size": 104857600 |
1863 | + }, |
1864 | + { |
1865 | + "checksum": "ba9", |
1866 | + "order": 1, |
1867 | + "path": "/b/a/9.txt", |
1868 | + "signature": "/b/a/9.txt.asc", |
1869 | + "size": 104857600 |
1870 | + } |
1871 | + ], |
1872 | + "type": "full", |
1873 | + "version": 1100 |
1874 | + }, |
1875 | + { |
1876 | + "base": 1100, |
1877 | + "description": "Delta C.1", |
1878 | + "files": [ |
1879 | + { |
1880 | + "checksum": "a98", |
1881 | + "order": 1, |
1882 | + "path": "/a/9/8.txt", |
1883 | + "signature": "/a/9/8.txt.asc", |
1884 | + "size": 104857600 |
1885 | + }, |
1886 | + { |
1887 | + "checksum": "987", |
1888 | + "order": 1, |
1889 | + "path": "/9/8/7.txt", |
1890 | + "signature": "/9/8/7.txt.asc", |
1891 | + "size": 104857600 |
1892 | + }, |
1893 | + { |
1894 | + "checksum": "876", |
1895 | + "order": 1, |
1896 | + "path": "/8/7/6.txt", |
1897 | + "signature": "/8/7/6.txt.asc", |
1898 | + "size": 838860800 |
1899 | + |
1900 | + } |
1901 | + ], |
1902 | + "type": "delta", |
1903 | + "version": 1303 |
1904 | + } |
1905 | + ] |
1906 | +} |
1907 | |
1908 | === renamed file 'systemimage/tests/data/index_11.json' => 'systemimage/tests/data/candidates.index_09.json' |
1909 | === added file 'systemimage/tests/data/candidates.index_10.json' |
1910 | --- systemimage/tests/data/candidates.index_10.json 1970-01-01 00:00:00 +0000 |
1911 | +++ systemimage/tests/data/candidates.index_10.json 2015-01-15 22:43:25 +0000 |
1912 | @@ -0,0 +1,36 @@ |
1913 | +{ |
1914 | + "global": { |
1915 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
1916 | + }, |
1917 | + "images": [ |
1918 | + { |
1919 | + "description": "Full", |
1920 | + "files": [ |
1921 | + { |
1922 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
1923 | + "order": 3, |
1924 | + "path": "/3/4/5.txt", |
1925 | + "signature": "/3/4/5.txt.asc", |
1926 | + "size": 104857600 |
1927 | + }, |
1928 | + { |
1929 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
1930 | + "order": 1, |
1931 | + "path": "/4/5/6.txt", |
1932 | + "signature": "/4/5/6.txt.asc", |
1933 | + "size": 104857600 |
1934 | + }, |
1935 | + { |
1936 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
1937 | + "order": 2, |
1938 | + "path": "/5/6/7.txt", |
1939 | + "signature": "/5/6/7.txt.asc", |
1940 | + "size": 104857600 |
1941 | + } |
1942 | + ], |
1943 | + "type": "full", |
1944 | + "version": 1600, |
1945 | + "bootme": true |
1946 | + } |
1947 | + ] |
1948 | +} |
1949 | |
1950 | === added file 'systemimage/tests/data/candidates.index_11.json' |
1951 | --- systemimage/tests/data/candidates.index_11.json 1970-01-01 00:00:00 +0000 |
1952 | +++ systemimage/tests/data/candidates.index_11.json 2015-01-15 22:43:25 +0000 |
1953 | @@ -0,0 +1,37 @@ |
1954 | +{ |
1955 | + "global": { |
1956 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
1957 | + }, |
1958 | + "images": [ |
1959 | + { |
1960 | + "base": 100, |
1961 | + "description": "Delta", |
1962 | + "files": [ |
1963 | + { |
1964 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
1965 | + "order": 3, |
1966 | + "path": "/3/4/5.txt", |
1967 | + "signature": "/3/4/5.txt.asc", |
1968 | + "size": 104857600 |
1969 | + }, |
1970 | + { |
1971 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
1972 | + "order": 1, |
1973 | + "path": "/4/5/6.txt", |
1974 | + "signature": "/4/5/6.txt.asc", |
1975 | + "size": 104857600 |
1976 | + }, |
1977 | + { |
1978 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
1979 | + "order": 2, |
1980 | + "path": "/5/6/7.txt", |
1981 | + "signature": "/5/6/7.txt.asc", |
1982 | + "size": 104857600 |
1983 | + } |
1984 | + ], |
1985 | + "type": "delta", |
1986 | + "version": 1600, |
1987 | + "bootme": true |
1988 | + } |
1989 | + ] |
1990 | +} |
1991 | |
1992 | === renamed file 'systemimage/tests/data/index_19.json' => 'systemimage/tests/data/candidates.index_12.json' |
1993 | === added file 'systemimage/tests/data/candidates.index_13.json' |
1994 | --- systemimage/tests/data/candidates.index_13.json 1970-01-01 00:00:00 +0000 |
1995 | +++ systemimage/tests/data/candidates.index_13.json 2015-01-15 22:43:25 +0000 |
1996 | @@ -0,0 +1,244 @@ |
1997 | +{ |
1998 | + "global": { |
1999 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
2000 | + }, |
2001 | + "images": [ |
2002 | + { |
2003 | + "bootme": true, |
2004 | + "description": "Full A", |
2005 | + "files": [ |
2006 | + { |
2007 | + "checksum": "abc", |
2008 | + "order": 1, |
2009 | + "path": "/a/b/c.txt", |
2010 | + "signature": "/a/b/c.txt.asc", |
2011 | + "size": 104857600 |
2012 | + |
2013 | + }, |
2014 | + { |
2015 | + "checksum": "bcd", |
2016 | + "order": 1, |
2017 | + "path": "/b/c/d.txt", |
2018 | + "signature": "/b/c/d.txt.asc", |
2019 | + "size": 104857600 |
2020 | + }, |
2021 | + { |
2022 | + "checksum": "cde", |
2023 | + "order": 1, |
2024 | + "path": "/c/d/e.txt", |
2025 | + "signature": "/c/d/e.txt.asc", |
2026 | + "size": 104857600 |
2027 | + } |
2028 | + ], |
2029 | + "type": "full", |
2030 | + "version": 300 |
2031 | + }, |
2032 | + { |
2033 | + "base": 300, |
2034 | + "bootme": true, |
2035 | + "description": "Delta A.1", |
2036 | + "files": [ |
2037 | + { |
2038 | + "checksum": "def", |
2039 | + "order": 1, |
2040 | + "path": "/d/e/f.txt", |
2041 | + "signature": "/d/e/f.txt.asc", |
2042 | + "size": 104857600 |
2043 | + }, |
2044 | + { |
2045 | + "checksum": "ef0", |
2046 | + "order": 1, |
2047 | + "path": "/e/f/0.txt", |
2048 | + "signature": "/e/f/0.txt.asc", |
2049 | + "size": 104857600 |
2050 | + }, |
2051 | + { |
2052 | + "checksum": "f01", |
2053 | + "order": 1, |
2054 | + "path": "/f/e/1.txt", |
2055 | + "signature": "/f/e/1.txt.asc", |
2056 | + "size": 104857600 |
2057 | + } |
2058 | + ], |
2059 | + "type": "delta", |
2060 | + "version": 301 |
2061 | + }, |
2062 | + { |
2063 | + "base": 301, |
2064 | + "bootme": true, |
2065 | + "description": "Delta A.2", |
2066 | + "files": [ |
2067 | + { |
2068 | + "checksum": "012", |
2069 | + "order": 1, |
2070 | + "path": "/0/1/2.txt", |
2071 | + "signature": "/0/1/2.txt.asc", |
2072 | + "size": 104857600 |
2073 | + }, |
2074 | + { |
2075 | + "checksum": "123", |
2076 | + "order": 1, |
2077 | + "path": "/1/2/3.txt", |
2078 | + "signature": "/1/2/3.txt.asc", |
2079 | + "size": 104857600 |
2080 | + }, |
2081 | + { |
2082 | + "checksum": "234", |
2083 | + "order": 1, |
2084 | + "path": "/2/3/4.txt", |
2085 | + "signature": "/2/3/4.txt.asc", |
2086 | + "size": 104857600 |
2087 | + } |
2088 | + ], |
2089 | + "type": "delta", |
2090 | + "version": 304 |
2091 | + }, |
2092 | + |
2093 | + { |
2094 | + "description": "Full B", |
2095 | + "files": [ |
2096 | + { |
2097 | + "checksum": "345", |
2098 | + "order": 1, |
2099 | + "path": "/3/4/5.txt", |
2100 | + "signature": "/3/4/5.txt.asc", |
2101 | + "size": 104857600 |
2102 | + }, |
2103 | + { |
2104 | + "checksum": "456", |
2105 | + "order": 1, |
2106 | + "path": "/4/5/6.txt", |
2107 | + "signature": "/4/5/6.txt.asc", |
2108 | + "size": 104857600 |
2109 | + }, |
2110 | + { |
2111 | + "checksum": "567", |
2112 | + "order": 1, |
2113 | + "path": "/5/6/7.txt", |
2114 | + "signature": "/5/6/7.txt.asc", |
2115 | + "size": 104857600 |
2116 | + } |
2117 | + ], |
2118 | + "type": "full", |
2119 | + "version": 200 |
2120 | + }, |
2121 | + { |
2122 | + "base": 200, |
2123 | + "description": "Delta B.1", |
2124 | + "files": [ |
2125 | + { |
2126 | + "checksum": "678", |
2127 | + "order": 1, |
2128 | + "path": "/6/7/8.txt", |
2129 | + "signature": "/6/7/8.txt.asc", |
2130 | + "size": 104857600 |
2131 | + }, |
2132 | + { |
2133 | + "checksum": "789", |
2134 | + "order": 1, |
2135 | + "path": "/7/8/9.txt", |
2136 | + "signature": "/7/8/9.txt.asc", |
2137 | + "size": 104857600 |
2138 | + }, |
2139 | + { |
2140 | + "checksum": "89a", |
2141 | + "order": 1, |
2142 | + "path": "/8/9/a.txt", |
2143 | + "signature": "/8/9/a.txt.asc", |
2144 | + "size": 104857600 |
2145 | + } |
2146 | + ], |
2147 | + "type": "delta", |
2148 | + "version": 201 |
2149 | + }, |
2150 | + { |
2151 | + "base": 201, |
2152 | + "description": "Delta B.2", |
2153 | + "files": [ |
2154 | + { |
2155 | + "checksum": "9ab", |
2156 | + "order": 1, |
2157 | + "path": "/9/a/b.txt", |
2158 | + "signature": "/9/a/b.txt.asc", |
2159 | + "size": 104857600 |
2160 | + }, |
2161 | + { |
2162 | + "checksum": "fed", |
2163 | + "order": 1, |
2164 | + "path": "/f/e/d.txt", |
2165 | + "signature": "/f/e/d.txt.asc", |
2166 | + "size": 104857600 |
2167 | + }, |
2168 | + { |
2169 | + "checksum": "edc", |
2170 | + "order": 1, |
2171 | + "path": "/e/d/c.txt", |
2172 | + "signature": "/e/d/c.txt.asc", |
2173 | + "size": 209715200 |
2174 | + |
2175 | + } |
2176 | + ], |
2177 | + "type": "delta", |
2178 | + "version": 304 |
2179 | + }, |
2180 | + |
2181 | + { |
2182 | + "description": "Full C", |
2183 | + "files": [ |
2184 | + { |
2185 | + "checksum": "dcb", |
2186 | + "order": 1, |
2187 | + "path": "/d/c/b.txt", |
2188 | + "signature": "/d/c/b.txt.asc", |
2189 | + "size": 104857600 |
2190 | + }, |
2191 | + { |
2192 | + "checksum": "cba", |
2193 | + "order": 1, |
2194 | + "path": "/c/b/a.txt", |
2195 | + "signature": "/c/b/a.txt.asc", |
2196 | + "size": 104857600 |
2197 | + }, |
2198 | + { |
2199 | + "checksum": "ba9", |
2200 | + "order": 1, |
2201 | + "path": "/b/a/9.txt", |
2202 | + "signature": "/b/a/9.txt.asc", |
2203 | + "size": 104857600 |
2204 | + } |
2205 | + ], |
2206 | + "type": "full", |
2207 | + "version": 100 |
2208 | + }, |
2209 | + { |
2210 | + "base": 100, |
2211 | + "description": "Delta C.1", |
2212 | + "files": [ |
2213 | + { |
2214 | + "checksum": "a98", |
2215 | + "order": 1, |
2216 | + "path": "/a/9/8.txt", |
2217 | + "signature": "/a/9/8.txt.asc", |
2218 | + "size": 104857600 |
2219 | + }, |
2220 | + { |
2221 | + "checksum": "987", |
2222 | + "order": 1, |
2223 | + "path": "/9/8/7.txt", |
2224 | + "signature": "/9/8/7.txt.asc", |
2225 | + "size": 104857600 |
2226 | + }, |
2227 | + { |
2228 | + "checksum": "876", |
2229 | + "order": 1, |
2230 | + "path": "/8/7/6.txt", |
2231 | + "signature": "/8/7/6.txt.asc", |
2232 | + "size": 838860800 |
2233 | + |
2234 | + } |
2235 | + ], |
2236 | + "type": "delta", |
2237 | + "version": 303 |
2238 | + } |
2239 | + ] |
2240 | +} |
2241 | |
2242 | === added file 'systemimage/tests/data/channel.channels_01.json' |
2243 | --- systemimage/tests/data/channel.channels_01.json 1970-01-01 00:00:00 +0000 |
2244 | +++ systemimage/tests/data/channel.channels_01.json 2015-01-15 22:43:25 +0000 |
2245 | @@ -0,0 +1,23 @@ |
2246 | +{ |
2247 | + "daily": { |
2248 | + "devices": { |
2249 | + "nexus7": { |
2250 | + "index": "/daily/nexus7/index.json", |
2251 | + "keyring": { |
2252 | + "path": "/daily/nexus7/device-keyring.tar.xz", |
2253 | + "signature": "/daily/nexus7/device-keyring.tar.xz.asc" |
2254 | + } |
2255 | + }, |
2256 | + "nexus4":{ |
2257 | + "index": "/daily/nexus4/index.json" |
2258 | + } |
2259 | + } |
2260 | + }, |
2261 | + "stable": { |
2262 | + "devices": { |
2263 | + "nexus7":{ |
2264 | + "index": "/stable/nexus7/index.json" |
2265 | + } |
2266 | + } |
2267 | + } |
2268 | +} |
2269 | |
2270 | === added file 'systemimage/tests/data/channel.channels_02.json' |
2271 | --- systemimage/tests/data/channel.channels_02.json 1970-01-01 00:00:00 +0000 |
2272 | +++ systemimage/tests/data/channel.channels_02.json 2015-01-15 22:43:25 +0000 |
2273 | @@ -0,0 +1,38 @@ |
2274 | +{ |
2275 | + "daily": { |
2276 | + "devices": { |
2277 | + "grouper": { |
2278 | + "index": "/daily/grouper/index.json" |
2279 | + }, |
2280 | + "maguro": { |
2281 | + "index": "/daily/maguro/index.json" |
2282 | + }, |
2283 | + "mako": { |
2284 | + "index": "/daily/mako/index.json" |
2285 | + }, |
2286 | + "manta": { |
2287 | + "index": "/daily/manta/index.json" |
2288 | + } |
2289 | + } |
2290 | + }, |
2291 | + "daily-proposed": { |
2292 | + "devices": { |
2293 | + "grouper": { |
2294 | + "index": "/daily-proposed/grouper/index.json", |
2295 | + "keyring": { |
2296 | + "path": "/daily-proposed/grouper/device-signing.tar.xz", |
2297 | + "signature": "/daily-proposed/grouper/device-signing.tar.xz.asc" |
2298 | + } |
2299 | + }, |
2300 | + "maguro": { |
2301 | + "index": "/daily-proposed/maguro/index.json" |
2302 | + }, |
2303 | + "mako": { |
2304 | + "index": "/daily-proposed/mako/index.json" |
2305 | + }, |
2306 | + "manta": { |
2307 | + "index": "/daily-proposed/manta/index.json" |
2308 | + } |
2309 | + } |
2310 | + } |
2311 | +} |
2312 | |
2313 | === added file 'systemimage/tests/data/channel.channels_03.json' |
2314 | --- systemimage/tests/data/channel.channels_03.json 1970-01-01 00:00:00 +0000 |
2315 | +++ systemimage/tests/data/channel.channels_03.json 2015-01-15 22:43:25 +0000 |
2316 | @@ -0,0 +1,70 @@ |
2317 | +{ |
2318 | + "13.10": { |
2319 | + "devices": { |
2320 | + "grouper": { |
2321 | + "index": "/13.10/grouper/index.json" |
2322 | + }, |
2323 | + "maguro": { |
2324 | + "index": "/13.10/maguro/index.json" |
2325 | + }, |
2326 | + "mako": { |
2327 | + "index": "/13.10/mako/index.json" |
2328 | + }, |
2329 | + "manta": { |
2330 | + "index": "/13.10/manta/index.json" |
2331 | + } |
2332 | + } |
2333 | + }, |
2334 | + "13.10-proposed": { |
2335 | + "devices": { |
2336 | + "grouper": { |
2337 | + "index": "/13.10-proposed/grouper/index.json" |
2338 | + }, |
2339 | + "maguro": { |
2340 | + "index": "/13.10-proposed/maguro/index.json" |
2341 | + }, |
2342 | + "mako": { |
2343 | + "index": "/13.10-proposed/mako/index.json" |
2344 | + }, |
2345 | + "manta": { |
2346 | + "index": "/13.10-proposed/manta/index.json" |
2347 | + } |
2348 | + } |
2349 | + }, |
2350 | + "14.04": { |
2351 | + "devices": { |
2352 | + "grouper": { |
2353 | + "index": "/14.04/grouper/index.json" |
2354 | + }, |
2355 | + "maguro": { |
2356 | + "index": "/14.04/maguro/index.json" |
2357 | + }, |
2358 | + "mako": { |
2359 | + "index": "/14.04/mako/index.json" |
2360 | + }, |
2361 | + "manta": { |
2362 | + "index": "/14.04/manta/index.json" |
2363 | + } |
2364 | + } |
2365 | + }, |
2366 | + "14.04-proposed": { |
2367 | + "devices": { |
2368 | + "grouper": { |
2369 | + "index": "/14.04-proposed/grouper/index.json", |
2370 | + "keyring": { |
2371 | + "path": "/14.04-proposed/grouper/device-signing.tar.xz", |
2372 | + "signature": "/14.04-proposed/grouper/device-signing.tar.xz.asc" |
2373 | + } |
2374 | + }, |
2375 | + "maguro": { |
2376 | + "index": "/14.04-proposed/maguro/index.json" |
2377 | + }, |
2378 | + "mako": { |
2379 | + "index": "/14.04-proposed/mako/index.json" |
2380 | + }, |
2381 | + "manta": { |
2382 | + "index": "/14.04-proposed/manta/index.json" |
2383 | + } |
2384 | + } |
2385 | + } |
2386 | +} |
2387 | |
2388 | === added file 'systemimage/tests/data/channel.channels_04.json' |
2389 | --- systemimage/tests/data/channel.channels_04.json 1970-01-01 00:00:00 +0000 |
2390 | +++ systemimage/tests/data/channel.channels_04.json 2015-01-15 22:43:25 +0000 |
2391 | @@ -0,0 +1,56 @@ |
2392 | +{ |
2393 | + "daily": { |
2394 | + "alias": "saucy", |
2395 | + "devices": { |
2396 | + "grouper": { |
2397 | + "index": "/daily/grouper/index.json" |
2398 | + }, |
2399 | + "maguro": { |
2400 | + "index": "/daily/maguro/index.json" |
2401 | + }, |
2402 | + "mako": { |
2403 | + "index": "/daily/mako/index.json" |
2404 | + }, |
2405 | + "manta": { |
2406 | + "index": "/daily/manta/index.json" |
2407 | + } |
2408 | + } |
2409 | + }, |
2410 | + "saucy": { |
2411 | + "devices": { |
2412 | + "grouper": { |
2413 | + "index": "/saucy/grouper/index.json" |
2414 | + }, |
2415 | + "maguro": { |
2416 | + "index": "/saucy/maguro/index.json" |
2417 | + }, |
2418 | + "mako": { |
2419 | + "index": "/saucy/mako/index.json" |
2420 | + }, |
2421 | + "manta": { |
2422 | + "index": "/saucy/manta/index.json", |
2423 | + "keyring": { |
2424 | + "path": "/saucy/manta/device-signing.tar.xz", |
2425 | + "signature": "/saucy/manta/device-signing.tar.xz.asc" |
2426 | + } |
2427 | + } |
2428 | + } |
2429 | + }, |
2430 | + "saucy-proposed": { |
2431 | + "hidden": true, |
2432 | + "devices": { |
2433 | + "grouper": { |
2434 | + "index": "/saucy-proposed/grouper/index.json" |
2435 | + }, |
2436 | + "maguro": { |
2437 | + "index": "/saucy-proposed/maguro/index.json" |
2438 | + }, |
2439 | + "mako": { |
2440 | + "index": "/saucy-proposed/mako/index.json" |
2441 | + }, |
2442 | + "manta": { |
2443 | + "index": "/saucy-proposed/manta/index.json" |
2444 | + } |
2445 | + } |
2446 | + } |
2447 | +} |
2448 | |
2449 | === added file 'systemimage/tests/data/channel.channels_05.json' |
2450 | --- systemimage/tests/data/channel.channels_05.json 1970-01-01 00:00:00 +0000 |
2451 | +++ systemimage/tests/data/channel.channels_05.json 2015-01-15 22:43:25 +0000 |
2452 | @@ -0,0 +1,23 @@ |
2453 | +{ |
2454 | + "daily": { |
2455 | + "devices": { |
2456 | + "nexus7": { |
2457 | + "index": "/daily/nexus7/index.json", |
2458 | + "keyring": { |
2459 | + "path": "/daily/nexus7/device-keyring.tar.xz", |
2460 | + "signature": "/daily/nexus7/device-keyring.tar.xz.asc" |
2461 | + } |
2462 | + }, |
2463 | + "nexus4":{ |
2464 | + "index": "/daily/nexus4/index.json" |
2465 | + } |
2466 | + } |
2467 | + }, |
2468 | + "stable": { |
2469 | + "devices": { |
2470 | + "nexus7":{ |
2471 | + "index": "/stable/nexus7/index.json" |
2472 | + } |
2473 | + } |
2474 | + } |
2475 | +} |
2476 | |
2477 | === removed file 'systemimage/tests/data/channel_06.ini' |
2478 | --- systemimage/tests/data/channel_06.ini 2014-08-08 20:25:17 +0000 |
2479 | +++ systemimage/tests/data/channel_06.ini 1970-01-01 00:00:00 +0000 |
2480 | @@ -1,8 +0,0 @@ |
2481 | -[service] |
2482 | -base: localhost |
2483 | -http_port: 8980 |
2484 | -https_port: 8943 |
2485 | -channel: daily |
2486 | -build_number: 300 |
2487 | -channel_target: saucy |
2488 | -device: shoephone |
2489 | |
2490 | === removed file 'systemimage/tests/data/channel_07.ini' |
2491 | --- systemimage/tests/data/channel_07.ini 2014-08-08 20:25:17 +0000 |
2492 | +++ systemimage/tests/data/channel_07.ini 1970-01-01 00:00:00 +0000 |
2493 | @@ -1,8 +0,0 @@ |
2494 | -[service] |
2495 | -base: localhost |
2496 | -http_port: 8980 |
2497 | -https_port: 8943 |
2498 | -channel: daily |
2499 | -build_number: 300 |
2500 | -channel_target: saucy |
2501 | -device: |
2502 | |
2503 | === added file 'systemimage/tests/data/config.config_01.ini' |
2504 | --- systemimage/tests/data/config.config_01.ini 1970-01-01 00:00:00 +0000 |
2505 | +++ systemimage/tests/data/config.config_01.ini 2015-01-15 22:43:25 +0000 |
2506 | @@ -0,0 +1,34 @@ |
2507 | +# Configuration file for specifying relatively static information about the |
2508 | +# upgrade resolution process. |
2509 | + |
2510 | +[service] |
2511 | +base: phablet.example.com |
2512 | +http_port: 80 |
2513 | +https_port: 443 |
2514 | +channel: stable |
2515 | +build_number: 0 |
2516 | + |
2517 | +[system] |
2518 | +timeout: 10s |
2519 | +tempdir: /tmp |
2520 | +logfile: /var/log/system-image/client.log |
2521 | +loglevel: error |
2522 | +settings_db: /var/lib/phablet/settings.db |
2523 | + |
2524 | +[gpg] |
2525 | +archive_master: /etc/phablet/archive-master.tar.xz |
2526 | +image_master: /etc/phablet/image-master.tar.xz |
2527 | +image_signing: /var/lib/phablet/image-signing.tar.xz |
2528 | +device_signing: /var/lib/phablet/device-signing.tar.xz |
2529 | + |
2530 | +[updater] |
2531 | +cache_partition: {tmpdir}/android/cache |
2532 | +data_partition: {vardir}/lib/phablet/updater |
2533 | + |
2534 | +[hooks] |
2535 | +device: systemimage.device.SystemProperty |
2536 | +scorer: systemimage.scores.WeightedScorer |
2537 | +reboot: systemimage.reboot.Reboot |
2538 | + |
2539 | +[dbus] |
2540 | +lifetime: 2m |
2541 | |
2542 | === renamed file 'systemimage/tests/data/config_10.ini' => 'systemimage/tests/data/config.config_02.ini' |
2543 | --- systemimage/tests/data/config_10.ini 2014-09-11 18:12:50 +0000 |
2544 | +++ systemimage/tests/data/config.config_02.ini 2015-01-15 22:43:25 +0000 |
2545 | @@ -10,7 +10,6 @@ |
2546 | |
2547 | [system] |
2548 | timeout: 10s |
2549 | -build_file: /etc/ubuntu-build |
2550 | tempdir: /tmp |
2551 | logfile: /var/log/system-image/client.log |
2552 | loglevel: critical:debug |
2553 | @@ -23,8 +22,8 @@ |
2554 | device_signing: /var/lib/phablet/device-signing.tar.xz |
2555 | |
2556 | [updater] |
2557 | -cache_partition: /android/cache |
2558 | -data_partition: /var/lib/phablet/updater |
2559 | +cache_partition: {tmpdir}/android/cache |
2560 | +data_partition: {vardir}/lib/phablet/updater |
2561 | |
2562 | [hooks] |
2563 | device: systemimage.device.SystemProperty |
2564 | |
2565 | === renamed file 'systemimage/tests/data/config_02.ini' => 'systemimage/tests/data/config.config_03.ini' |
2566 | --- systemimage/tests/data/config_02.ini 2013-11-12 19:57:39 +0000 |
2567 | +++ systemimage/tests/data/config.config_03.ini 2015-01-15 22:43:25 +0000 |
2568 | @@ -11,7 +11,6 @@ |
2569 | |
2570 | [system] |
2571 | timeout: 10s |
2572 | -build_file: /etc/ubuntu-build |
2573 | tempdir: /tmp |
2574 | logfile: /var/log/system-image/client.log |
2575 | loglevel: error |
2576 | @@ -24,8 +23,8 @@ |
2577 | device_signing: /var/lib/phablet/device-signing.tar.xz |
2578 | |
2579 | [updater] |
2580 | -cache_partition: /android/cache |
2581 | -data_partition: /var/lib/phablet/updater |
2582 | +cache_partition: {tmpdir}/android/cache |
2583 | +data_partition: {vardir}/lib/phablet/updater |
2584 | |
2585 | [hooks] |
2586 | device: systemimage.device.SystemProperty |
2587 | |
2588 | === added file 'systemimage/tests/data/config.config_04.ini' |
2589 | --- systemimage/tests/data/config.config_04.ini 1970-01-01 00:00:00 +0000 |
2590 | +++ systemimage/tests/data/config.config_04.ini 2015-01-15 22:43:25 +0000 |
2591 | @@ -0,0 +1,36 @@ |
2592 | +# TEMPLATE configuration file for specifying relatively static information |
2593 | +# about the upgrade resolution process. |
2594 | +# |
2595 | +# This is used by the DBus tests. |
2596 | + |
2597 | +[service] |
2598 | +base: localhost |
2599 | +http_port: 8980 |
2600 | +https_port: 8943 |
2601 | +channel: stable |
2602 | +build_number: 0 |
2603 | + |
2604 | +[system] |
2605 | +timeout: 1s |
2606 | +tempdir: {tmpdir}/tmp |
2607 | +logfile: {logfile} |
2608 | +loglevel: {loglevel} |
2609 | +settings_db: {vardir}/settings.db |
2610 | + |
2611 | +[gpg] |
2612 | +archive_master: {vardir}/etc/archive-master.tar.xz |
2613 | +image_master: {vardir}/keyrings/image-master.tar.xz |
2614 | +image_signing: {vardir}/keyrings/image-signing.tar.xz |
2615 | +device_signing: {vardir}/keyrings/device-signing.tar.xz |
2616 | + |
2617 | +[updater] |
2618 | +cache_partition: {vardir}/android/cache |
2619 | +data_partition: {vardir}/ubuntu/cache |
2620 | + |
2621 | +[hooks] |
2622 | +device: systemimage.testing.demo.TestingDevice |
2623 | +scorer: systemimage.scores.WeightedScorer |
2624 | +reboot: systemimage.reboot.Reboot |
2625 | + |
2626 | +[dbus] |
2627 | +lifetime: 5m |
2628 | |
2629 | === renamed file 'systemimage/tests/data/config_05.ini' => 'systemimage/tests/data/config.config_05.ini' |
2630 | --- systemimage/tests/data/config_05.ini 2014-02-25 21:46:55 +0000 |
2631 | +++ systemimage/tests/data/config.config_05.ini 2015-01-15 22:43:25 +0000 |
2632 | @@ -11,7 +11,6 @@ |
2633 | |
2634 | [system] |
2635 | timeout: 10s |
2636 | -build_file: /etc/ubuntu-build |
2637 | tempdir: /tmp |
2638 | logfile: /var/log/system-image/client.log |
2639 | loglevel: error |
2640 | @@ -24,8 +23,8 @@ |
2641 | device_signing: /var/lib/phablet/device-signing.tar.xz |
2642 | |
2643 | [updater] |
2644 | -cache_partition: /android/cache |
2645 | -data_partition: /var/lib/phablet/updater |
2646 | +cache_partition: {tmpdir}/android/cache |
2647 | +data_partition: {vardir}/lib/phablet/updater |
2648 | |
2649 | [hooks] |
2650 | device: systemimage.device.SystemProperty |
2651 | |
2652 | === renamed file 'systemimage/tests/data/config_06.ini' => 'systemimage/tests/data/config.config_06.ini' |
2653 | --- systemimage/tests/data/config_06.ini 2014-02-25 21:46:55 +0000 |
2654 | +++ systemimage/tests/data/config.config_06.ini 2015-01-15 22:43:25 +0000 |
2655 | @@ -11,7 +11,6 @@ |
2656 | |
2657 | [system] |
2658 | timeout: 10s |
2659 | -build_file: /etc/ubuntu-build |
2660 | tempdir: /tmp |
2661 | logfile: /var/log/system-image/client.log |
2662 | loglevel: error |
2663 | @@ -24,8 +23,8 @@ |
2664 | device_signing: /var/lib/phablet/device-signing.tar.xz |
2665 | |
2666 | [updater] |
2667 | -cache_partition: /android/cache |
2668 | -data_partition: /var/lib/phablet/updater |
2669 | +cache_partition: {tmpdir}/android/cache |
2670 | +data_partition: {vardir}/lib/phablet/updater |
2671 | |
2672 | [hooks] |
2673 | device: systemimage.device.SystemProperty |
2674 | |
2675 | === renamed file 'systemimage/tests/data/config_07.ini' => 'systemimage/tests/data/config.config_07.ini' |
2676 | --- systemimage/tests/data/config_07.ini 2014-02-25 21:46:55 +0000 |
2677 | +++ systemimage/tests/data/config.config_07.ini 2015-01-15 22:43:25 +0000 |
2678 | @@ -11,7 +11,6 @@ |
2679 | |
2680 | [system] |
2681 | timeout: 10s |
2682 | -build_file: /etc/ubuntu-build |
2683 | tempdir: /tmp |
2684 | logfile: /var/log/system-image/client.log |
2685 | loglevel: error |
2686 | |
2687 | === renamed file 'systemimage/tests/data/config_08.ini' => 'systemimage/tests/data/config.config_08.ini' |
2688 | --- systemimage/tests/data/config_08.ini 2014-02-26 16:11:09 +0000 |
2689 | +++ systemimage/tests/data/config.config_08.ini 2015-01-15 22:43:25 +0000 |
2690 | @@ -11,7 +11,6 @@ |
2691 | |
2692 | [system] |
2693 | timeout: 10s |
2694 | -build_file: /etc/ubuntu-build |
2695 | tempdir: /tmp |
2696 | logfile: /var/log/system-image/client.log |
2697 | loglevel: error |
2698 | |
2699 | === renamed file 'systemimage/tests/data/channel_02.ini' => 'systemimage/tests/data/config.config_09.ini' |
2700 | --- systemimage/tests/data/channel_02.ini 2014-02-26 16:11:09 +0000 |
2701 | +++ systemimage/tests/data/config.config_09.ini 2015-01-15 22:43:25 +0000 |
2702 | @@ -5,8 +5,5 @@ |
2703 | channel: proposed |
2704 | build_number: 833 |
2705 | |
2706 | -[system] |
2707 | -build_file: /etc/path/to/alternative/build-file |
2708 | - |
2709 | [dbus] |
2710 | lifetime: 1h |
2711 | |
2712 | === renamed file 'systemimage/tests/data/config_09.ini' => 'systemimage/tests/data/config.config_10.ini' |
2713 | --- systemimage/tests/data/config_09.ini 2014-08-08 00:58:41 +0000 |
2714 | +++ systemimage/tests/data/config.config_10.ini 2015-01-15 22:43:25 +0000 |
2715 | @@ -15,8 +15,8 @@ |
2716 | device_signing: /var/lib/phablet/device-signing.tar.xz |
2717 | |
2718 | [updater] |
2719 | -cache_partition: /android/cache |
2720 | -data_partition: /var/lib/phablet/updater |
2721 | +cache_partition: {tmpdir}/android/cache |
2722 | +data_partition: {vardir}/lib/phablet/updater |
2723 | |
2724 | [hooks] |
2725 | device: systemimage.device.SystemProperty |
2726 | |
2727 | === removed file 'systemimage/tests/data/config_04.ini' |
2728 | --- systemimage/tests/data/config_04.ini 2013-11-12 19:57:39 +0000 |
2729 | +++ systemimage/tests/data/config_04.ini 1970-01-01 00:00:00 +0000 |
2730 | @@ -1,36 +0,0 @@ |
2731 | -# Configuration file for specifying relatively static information about the |
2732 | -# upgrade resolution process. |
2733 | - |
2734 | -[service] |
2735 | -base: phablet.example.com |
2736 | -# Non-standard ports |
2737 | -http_port: 8080 |
2738 | -https_port: 80443 |
2739 | -channel: stable |
2740 | -build_number: 0 |
2741 | - |
2742 | -[system] |
2743 | -timeout: 30s |
2744 | -build_file: {tmpdir}/ubuntu-build |
2745 | -tempdir: {tmpdir}/tmp |
2746 | -logfile: {vardir}/client.log |
2747 | -loglevel: info |
2748 | -settings_db: {vardir}/settings.db |
2749 | - |
2750 | -[gpg] |
2751 | -archive_master: {vardir}/etc/archive-master.tar.xz |
2752 | -image_master: {vardir}/keyrings/image-master.tar.xz |
2753 | -image_signing: {vardir}/keyrings/image-signing.tar.xz |
2754 | -device_signing: {vardir}/keyrings/device-signing.tar.xz |
2755 | - |
2756 | -[updater] |
2757 | -cache_partition: {vardir}/android/cache |
2758 | -data_partition: {vardir}/ubuntu/cache |
2759 | - |
2760 | -[hooks] |
2761 | -device: systemimage.device.SystemProperty |
2762 | -scorer: systemimage.scores.WeightedScorer |
2763 | -reboot: systemimage.reboot.Reboot |
2764 | - |
2765 | -[dbus] |
2766 | -lifetime: 3s |
2767 | |
2768 | === renamed file 'systemimage/tests/data/channels_06.json' => 'systemimage/tests/data/dbus.channels_01.json' |
2769 | === renamed file 'systemimage/tests/data/index_13.json' => 'systemimage/tests/data/dbus.index_01.json' |
2770 | === renamed file 'systemimage/tests/data/index_18.json' => 'systemimage/tests/data/dbus.index_02.json' |
2771 | === added file 'systemimage/tests/data/dbus.index_03.json' |
2772 | --- systemimage/tests/data/dbus.index_03.json 1970-01-01 00:00:00 +0000 |
2773 | +++ systemimage/tests/data/dbus.index_03.json 2015-01-15 22:43:25 +0000 |
2774 | @@ -0,0 +1,36 @@ |
2775 | +{ |
2776 | + "global": { |
2777 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
2778 | + }, |
2779 | + "images": [ |
2780 | + { |
2781 | + "description": "Full", |
2782 | + "files": [ |
2783 | + { |
2784 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
2785 | + "order": 3, |
2786 | + "path": "/3/4/5.txt", |
2787 | + "signature": "/3/4/5.txt.asc", |
2788 | + "size": 104857600 |
2789 | + }, |
2790 | + { |
2791 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
2792 | + "order": 1, |
2793 | + "path": "/4/5/6.txt", |
2794 | + "signature": "/4/5/6.txt.asc", |
2795 | + "size": 104857600 |
2796 | + }, |
2797 | + { |
2798 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
2799 | + "order": 2, |
2800 | + "path": "/5/6/5.txt", |
2801 | + "signature": "/5/6/5.txt.asc", |
2802 | + "size": 104857600 |
2803 | + } |
2804 | + ], |
2805 | + "type": "full", |
2806 | + "version": 1600, |
2807 | + "bootme": true |
2808 | + } |
2809 | + ] |
2810 | +} |
2811 | |
2812 | === renamed file 'systemimage/tests/data/index_24.json' => 'systemimage/tests/data/dbus.index_04.json' |
2813 | === renamed file 'systemimage/tests/data/index_25.json' => 'systemimage/tests/data/dbus.index_05.json' |
2814 | === added file 'systemimage/tests/data/download.index_01.json' |
2815 | --- systemimage/tests/data/download.index_01.json 1970-01-01 00:00:00 +0000 |
2816 | +++ systemimage/tests/data/download.index_01.json 2015-01-15 22:43:25 +0000 |
2817 | @@ -0,0 +1,6 @@ |
2818 | +{ |
2819 | + "global": { |
2820 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
2821 | + }, |
2822 | + "images": [] |
2823 | +} |
2824 | |
2825 | === added file 'systemimage/tests/data/gpg.channels_01.json' |
2826 | --- systemimage/tests/data/gpg.channels_01.json 1970-01-01 00:00:00 +0000 |
2827 | +++ systemimage/tests/data/gpg.channels_01.json 2015-01-15 22:43:25 +0000 |
2828 | @@ -0,0 +1,23 @@ |
2829 | +{ |
2830 | + "daily": { |
2831 | + "devices": { |
2832 | + "nexus7": { |
2833 | + "index": "/daily/nexus7/index.json", |
2834 | + "keyring": { |
2835 | + "path": "/daily/nexus7/device-keyring.tar.xz", |
2836 | + "signature": "/daily/nexus7/device-keyring.tar.xz.asc" |
2837 | + } |
2838 | + }, |
2839 | + "nexus4":{ |
2840 | + "index": "/daily/nexus4/index.json" |
2841 | + } |
2842 | + } |
2843 | + }, |
2844 | + "stable": { |
2845 | + "devices": { |
2846 | + "nexus7":{ |
2847 | + "index": "/stable/nexus7/index.json" |
2848 | + } |
2849 | + } |
2850 | + } |
2851 | +} |
2852 | |
2853 | === added file 'systemimage/tests/data/helpers.config_01.ini' |
2854 | --- systemimage/tests/data/helpers.config_01.ini 1970-01-01 00:00:00 +0000 |
2855 | +++ systemimage/tests/data/helpers.config_01.ini 2015-01-15 22:43:25 +0000 |
2856 | @@ -0,0 +1,7 @@ |
2857 | +[service] |
2858 | +base: systum-imaje.ubuntu.com |
2859 | +http_port: 88 |
2860 | +https_port: 89 |
2861 | +channel: proposed |
2862 | +build_number: 1833 |
2863 | +version_detail: ubuntu=123,mako=456,custom=789 |
2864 | |
2865 | === added file 'systemimage/tests/data/helpers.config_02.ini' |
2866 | --- systemimage/tests/data/helpers.config_02.ini 1970-01-01 00:00:00 +0000 |
2867 | +++ systemimage/tests/data/helpers.config_02.ini 2015-01-15 22:43:25 +0000 |
2868 | @@ -0,0 +1,6 @@ |
2869 | +[service] |
2870 | +base: systum-imaje.ubuntu.com |
2871 | +http_port: 88 |
2872 | +https_port: 89 |
2873 | +channel: proposed |
2874 | +build_number: 1833 |
2875 | |
2876 | === added file 'systemimage/tests/data/index.channels_01.json' |
2877 | --- systemimage/tests/data/index.channels_01.json 1970-01-01 00:00:00 +0000 |
2878 | +++ systemimage/tests/data/index.channels_01.json 2015-01-15 22:43:25 +0000 |
2879 | @@ -0,0 +1,9 @@ |
2880 | +{ |
2881 | + "stable": { |
2882 | + "devices": { |
2883 | + "nexus7":{ |
2884 | + "index": "/stable/nexus7/index.json" |
2885 | + } |
2886 | + } |
2887 | + } |
2888 | +} |
2889 | |
2890 | === added file 'systemimage/tests/data/index.channels_02.json' |
2891 | --- systemimage/tests/data/index.channels_02.json 1970-01-01 00:00:00 +0000 |
2892 | +++ systemimage/tests/data/index.channels_02.json 2015-01-15 22:43:25 +0000 |
2893 | @@ -0,0 +1,13 @@ |
2894 | +{ |
2895 | + "stable": { |
2896 | + "devices": { |
2897 | + "nexus7":{ |
2898 | + "index": "/stable/nexus7/index.json", |
2899 | + "keyring": { |
2900 | + "path": "stable/nexus7/device.tar.xz", |
2901 | + "signature": "stable/nexus7/device.tar.xz.asc" |
2902 | + } |
2903 | + } |
2904 | + } |
2905 | + } |
2906 | +} |
2907 | |
2908 | === renamed file 'systemimage/tests/data/channels_04.json' => 'systemimage/tests/data/index.channels_03.json' |
2909 | === renamed file 'systemimage/tests/data/channels_05.json' => 'systemimage/tests/data/index.channels_04.json' |
2910 | === added file 'systemimage/tests/data/index.channels_05.json' |
2911 | --- systemimage/tests/data/index.channels_05.json 1970-01-01 00:00:00 +0000 |
2912 | +++ systemimage/tests/data/index.channels_05.json 2015-01-15 22:43:25 +0000 |
2913 | @@ -0,0 +1,9 @@ |
2914 | +{ |
2915 | + "stable": { |
2916 | + "devices": { |
2917 | + "nexus7":{ |
2918 | + "index": "/stable/nexus7/index.json" |
2919 | + } |
2920 | + } |
2921 | + } |
2922 | +} |
2923 | |
2924 | === added file 'systemimage/tests/data/index.index_01.json' |
2925 | --- systemimage/tests/data/index.index_01.json 1970-01-01 00:00:00 +0000 |
2926 | +++ systemimage/tests/data/index.index_01.json 2015-01-15 22:43:25 +0000 |
2927 | @@ -0,0 +1,251 @@ |
2928 | +{ |
2929 | + "global": { |
2930 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
2931 | + }, |
2932 | + "images": [ |
2933 | + { |
2934 | + "bootme": true, |
2935 | + "description": "Full A", |
2936 | + "files": [ |
2937 | + { |
2938 | + "checksum": "abc", |
2939 | + "order": 1, |
2940 | + "path": "/a/b/c.txt", |
2941 | + "signature": "/a/b/c.txt.asc", |
2942 | + "size": 104857600 |
2943 | + |
2944 | + }, |
2945 | + { |
2946 | + "checksum": "bcd", |
2947 | + "order": 1, |
2948 | + "path": "/b/c/d.txt", |
2949 | + "signature": "/b/c/d.txt.asc", |
2950 | + "size": 104857600 |
2951 | + }, |
2952 | + { |
2953 | + "checksum": "cde", |
2954 | + "order": 1, |
2955 | + "path": "/c/d/e.txt", |
2956 | + "signature": "/c/d/e.txt.asc", |
2957 | + "size": 104857600 |
2958 | + } |
2959 | + ], |
2960 | + "type": "full", |
2961 | + "version": 1300 |
2962 | + }, |
2963 | + { |
2964 | + "base": 1300, |
2965 | + "bootme": true, |
2966 | + "description": "Delta A.1", |
2967 | + "files": [ |
2968 | + { |
2969 | + "checksum": "def", |
2970 | + "order": 1, |
2971 | + "path": "/d/e/f.txt", |
2972 | + "signature": "/d/e/f.txt.asc", |
2973 | + "size": 104857600 |
2974 | + }, |
2975 | + { |
2976 | + "checksum": "ef0", |
2977 | + "order": 1, |
2978 | + "path": "/e/f/0.txt", |
2979 | + "signature": "/e/f/0.txt.asc", |
2980 | + "size": 104857600 |
2981 | + }, |
2982 | + { |
2983 | + "checksum": "f01", |
2984 | + "order": 1, |
2985 | + "path": "/f/e/1.txt", |
2986 | + "signature": "/f/e/1.txt.asc", |
2987 | + "size": 104857600 |
2988 | + } |
2989 | + ], |
2990 | + "type": "delta", |
2991 | + "version": 1301 |
2992 | + }, |
2993 | + { |
2994 | + "base": 1301, |
2995 | + "bootme": true, |
2996 | + "description": "Delta A.2", |
2997 | + "files": [ |
2998 | + { |
2999 | + "checksum": "012", |
3000 | + "order": 1, |
3001 | + "path": "/0/1/2.txt", |
3002 | + "signature": "/0/1/2.txt.asc", |
3003 | + "size": 104857600 |
3004 | + }, |
3005 | + { |
3006 | + "checksum": "123", |
3007 | + "order": 1, |
3008 | + "path": "/1/2/3.txt", |
3009 | + "signature": "/1/2/3.txt.asc", |
3010 | + "size": 104857600 |
3011 | + }, |
3012 | + { |
3013 | + "checksum": "234", |
3014 | + "order": 1, |
3015 | + "path": "/2/3/4.txt", |
3016 | + "signature": "/2/3/4.txt.asc", |
3017 | + "size": 104857600 |
3018 | + } |
3019 | + ], |
3020 | + "type": "delta", |
3021 | + "version": 1304 |
3022 | + }, |
3023 | + |
3024 | + { |
3025 | + "description": "Full B", |
3026 | + "description-en": "The full B", |
3027 | + "files": [ |
3028 | + { |
3029 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
3030 | + "order": 1, |
3031 | + "path": "/3/4/5.txt", |
3032 | + "signature": "/3/4/5.txt.asc", |
3033 | + "size": 10000 |
3034 | + }, |
3035 | + { |
3036 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
3037 | + "order": 1, |
3038 | + "path": "/4/5/6.txt", |
3039 | + "signature": "/4/5/6.txt.asc", |
3040 | + "size": 10001 |
3041 | + }, |
3042 | + { |
3043 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
3044 | + "order": 1, |
3045 | + "path": "/5/6/7.txt", |
3046 | + "signature": "/5/6/7.txt.asc", |
3047 | + "size": 10002 |
3048 | + } |
3049 | + ], |
3050 | + "type": "full", |
3051 | + "version": 1200 |
3052 | + }, |
3053 | + { |
3054 | + "base": 1200, |
3055 | + "description": "Delta B.1", |
3056 | + "description-en_US": "This is the delta B.1", |
3057 | + "description-xx": "XX This is the delta B.1", |
3058 | + "description-yy": "YY This is the delta B.1", |
3059 | + "description-yy_ZZ": "YY-ZZ This is the delta B.1", |
3060 | + "files": [ |
3061 | + { |
3062 | + "checksum": "cebe3d9d614ba5c19f633566104315854a11353a333bf96f16b5afa0e90abdc4", |
3063 | + "order": 1, |
3064 | + "path": "/6/7/8.txt", |
3065 | + "signature": "/6/7/8.txt.asc", |
3066 | + "size": 20000 |
3067 | + }, |
3068 | + { |
3069 | + "checksum": "35a9e381b1a27567549b5f8a6f783c167ebf809f1c4d6a9e367240484d8ce281", |
3070 | + "order": 1, |
3071 | + "path": "/7/8/9.txt", |
3072 | + "signature": "/7/8/9.txt.asc", |
3073 | + "size": 20001 |
3074 | + }, |
3075 | + { |
3076 | + "checksum": "6bd6c3f7808391e8b74f5c2d58810809eda5c134aaa7f1b27ddf4b445c421ac5", |
3077 | + "order": 1, |
3078 | + "path": "/8/9/a.txt", |
3079 | + "signature": "/8/9/a.txt.asc", |
3080 | + "size": 20002 |
3081 | + } |
3082 | + ], |
3083 | + "type": "delta", |
3084 | + "version": 1201 |
3085 | + }, |
3086 | + { |
3087 | + "base": 1201, |
3088 | + "description": "Delta B.2", |
3089 | + "description-xx": "Oh delta, my delta", |
3090 | + "description-xx_CC": "This hyar is the delta B.2", |
3091 | + "files": [ |
3092 | + { |
3093 | + "checksum": "8c43d75d5b9f1aa9fc3fabb6b60b6c06553324352399a33febce95a1b588d1d6", |
3094 | + "order": 1, |
3095 | + "path": "/9/a/b.txt", |
3096 | + "signature": "/9/a/b.txt.asc", |
3097 | + "size": 30000 |
3098 | + }, |
3099 | + { |
3100 | + "checksum": "20e796c128096d229ba89bf412a53c3151d170a409c2c8c1dd8e414087b7ffae", |
3101 | + "order": 1, |
3102 | + "path": "/f/e/d.txt", |
3103 | + "signature": "/f/e/d.txt.asc", |
3104 | + "size": 30001 |
3105 | + }, |
3106 | + { |
3107 | + "checksum": "278238e8bafa4709c77aa723e168101acd6ee1fb9fcc1b6eca4762e5c7dad768", |
3108 | + "order": 1, |
3109 | + "path": "/e/d/c.txt", |
3110 | + "signature": "/e/d/c.txt.asc", |
3111 | + "size": 30002 |
3112 | + |
3113 | + } |
3114 | + ], |
3115 | + "type": "delta", |
3116 | + "version": 1304 |
3117 | + }, |
3118 | + |
3119 | + { |
3120 | + "description": "Full C", |
3121 | + "files": [ |
3122 | + { |
3123 | + "checksum": "dcb", |
3124 | + "order": 1, |
3125 | + "path": "/d/c/b.txt", |
3126 | + "signature": "/d/c/b.txt.asc", |
3127 | + "size": 104857600 |
3128 | + }, |
3129 | + { |
3130 | + "checksum": "cba", |
3131 | + "order": 1, |
3132 | + "path": "/c/b/a.txt", |
3133 | + "signature": "/c/b/a.txt.asc", |
3134 | + "size": 104857600 |
3135 | + }, |
3136 | + { |
3137 | + "checksum": "ba9", |
3138 | + "order": 1, |
3139 | + "path": "/b/a/9.txt", |
3140 | + "signature": "/b/a/9.txt.asc", |
3141 | + "size": 104857600 |
3142 | + } |
3143 | + ], |
3144 | + "type": "full", |
3145 | + "version": 1100 |
3146 | + }, |
3147 | + { |
3148 | + "base": 1100, |
3149 | + "description": "Delta C.1", |
3150 | + "files": [ |
3151 | + { |
3152 | + "checksum": "a98", |
3153 | + "order": 1, |
3154 | + "path": "/a/9/8.txt", |
3155 | + "signature": "/a/9/8.txt.asc", |
3156 | + "size": 104857600 |
3157 | + }, |
3158 | + { |
3159 | + "checksum": "987", |
3160 | + "order": 1, |
3161 | + "path": "/9/8/7.txt", |
3162 | + "signature": "/9/8/7.txt.asc", |
3163 | + "size": 104857600 |
3164 | + }, |
3165 | + { |
3166 | + "checksum": "876", |
3167 | + "order": 1, |
3168 | + "path": "/8/7/6.txt", |
3169 | + "signature": "/8/7/6.txt.asc", |
3170 | + "size": 838860800 |
3171 | + |
3172 | + } |
3173 | + ], |
3174 | + "type": "delta", |
3175 | + "version": 1303 |
3176 | + } |
3177 | + ] |
3178 | +} |
3179 | |
3180 | === renamed file 'systemimage/tests/data/index_01.json' => 'systemimage/tests/data/index.index_02.json' |
3181 | === renamed file 'systemimage/tests/data/index_02.json' => 'systemimage/tests/data/index.index_03.json' |
3182 | === added file 'systemimage/tests/data/index.index_04.json' |
3183 | --- systemimage/tests/data/index.index_04.json 1970-01-01 00:00:00 +0000 |
3184 | +++ systemimage/tests/data/index.index_04.json 2015-01-15 22:43:25 +0000 |
3185 | @@ -0,0 +1,244 @@ |
3186 | +{ |
3187 | + "global": { |
3188 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
3189 | + }, |
3190 | + "images": [ |
3191 | + { |
3192 | + "bootme": true, |
3193 | + "description": "Full A", |
3194 | + "files": [ |
3195 | + { |
3196 | + "checksum": "abc", |
3197 | + "order": 1, |
3198 | + "path": "/a/b/c.txt", |
3199 | + "signature": "/a/b/c.txt.asc", |
3200 | + "size": 104857600 |
3201 | + |
3202 | + }, |
3203 | + { |
3204 | + "checksum": "bcd", |
3205 | + "order": 1, |
3206 | + "path": "/b/c/d.txt", |
3207 | + "signature": "/b/c/d.txt.asc", |
3208 | + "size": 104857600 |
3209 | + }, |
3210 | + { |
3211 | + "checksum": "cde", |
3212 | + "order": 1, |
3213 | + "path": "/c/d/e.txt", |
3214 | + "signature": "/c/d/e.txt.asc", |
3215 | + "size": 104857600 |
3216 | + } |
3217 | + ], |
3218 | + "type": "full", |
3219 | + "version": 1300 |
3220 | + }, |
3221 | + { |
3222 | + "base": 1300, |
3223 | + "bootme": true, |
3224 | + "description": "Delta A.1", |
3225 | + "files": [ |
3226 | + { |
3227 | + "checksum": "def", |
3228 | + "order": 1, |
3229 | + "path": "/d/e/f.txt", |
3230 | + "signature": "/d/e/f.txt.asc", |
3231 | + "size": 104857600 |
3232 | + }, |
3233 | + { |
3234 | + "checksum": "ef0", |
3235 | + "order": 1, |
3236 | + "path": "/e/f/0.txt", |
3237 | + "signature": "/e/f/0.txt.asc", |
3238 | + "size": 104857600 |
3239 | + }, |
3240 | + { |
3241 | + "checksum": "f01", |
3242 | + "order": 1, |
3243 | + "path": "/f/e/1.txt", |
3244 | + "signature": "/f/e/1.txt.asc", |
3245 | + "size": 104857600 |
3246 | + } |
3247 | + ], |
3248 | + "type": "delta", |
3249 | + "version": 1301 |
3250 | + }, |
3251 | + { |
3252 | + "base": 1301, |
3253 | + "bootme": true, |
3254 | + "description": "Delta A.2", |
3255 | + "files": [ |
3256 | + { |
3257 | + "checksum": "012", |
3258 | + "order": 1, |
3259 | + "path": "/0/1/2.txt", |
3260 | + "signature": "/0/1/2.txt.asc", |
3261 | + "size": 104857600 |
3262 | + }, |
3263 | + { |
3264 | + "checksum": "123", |
3265 | + "order": 1, |
3266 | + "path": "/1/2/3.txt", |
3267 | + "signature": "/1/2/3.txt.asc", |
3268 | + "size": 104857600 |
3269 | + }, |
3270 | + { |
3271 | + "checksum": "234", |
3272 | + "order": 1, |
3273 | + "path": "/2/3/4.txt", |
3274 | + "signature": "/2/3/4.txt.asc", |
3275 | + "size": 104857600 |
3276 | + } |
3277 | + ], |
3278 | + "type": "delta", |
3279 | + "version": 1304 |
3280 | + }, |
3281 | + |
3282 | + { |
3283 | + "description": "Full B", |
3284 | + "files": [ |
3285 | + { |
3286 | + "checksum": "345", |
3287 | + "order": 1, |
3288 | + "path": "/3/4/5.txt", |
3289 | + "signature": "/3/4/5.txt.asc", |
3290 | + "size": 104857600 |
3291 | + }, |
3292 | + { |
3293 | + "checksum": "456", |
3294 | + "order": 1, |
3295 | + "path": "/4/5/6.txt", |
3296 | + "signature": "/4/5/6.txt.asc", |
3297 | + "size": 104857600 |
3298 | + }, |
3299 | + { |
3300 | + "checksum": "567", |
3301 | + "order": 1, |
3302 | + "path": "/5/6/7.txt", |
3303 | + "signature": "/5/6/7.txt.asc", |
3304 | + "size": 104857600 |
3305 | + } |
3306 | + ], |
3307 | + "type": "full", |
3308 | + "version": 1200 |
3309 | + }, |
3310 | + { |
3311 | + "base": 1200, |
3312 | + "description": "Delta B.1", |
3313 | + "files": [ |
3314 | + { |
3315 | + "checksum": "678", |
3316 | + "order": 1, |
3317 | + "path": "/6/7/8.txt", |
3318 | + "signature": "/6/7/8.txt.asc", |
3319 | + "size": 104857600 |
3320 | + }, |
3321 | + { |
3322 | + "checksum": "789", |
3323 | + "order": 1, |
3324 | + "path": "/7/8/9.txt", |
3325 | + "signature": "/7/8/9.txt.asc", |
3326 | + "size": 104857600 |
3327 | + }, |
3328 | + { |
3329 | + "checksum": "89a", |
3330 | + "order": 1, |
3331 | + "path": "/8/9/a.txt", |
3332 | + "signature": "/8/9/a.txt.asc", |
3333 | + "size": 104857600 |
3334 | + } |
3335 | + ], |
3336 | + "type": "delta", |
3337 | + "version": 1201 |
3338 | + }, |
3339 | + { |
3340 | + "base": 1201, |
3341 | + "description": "Delta B.2", |
3342 | + "files": [ |
3343 | + { |
3344 | + "checksum": "9ab", |
3345 | + "order": 1, |
3346 | + "path": "/9/a/b.txt", |
3347 | + "signature": "/9/a/b.txt.asc", |
3348 | + "size": 104857600 |
3349 | + }, |
3350 | + { |
3351 | + "checksum": "fed", |
3352 | + "order": 1, |
3353 | + "path": "/f/e/d.txt", |
3354 | + "signature": "/f/e/d.txt.asc", |
3355 | + "size": 104857600 |
3356 | + }, |
3357 | + { |
3358 | + "checksum": "edc", |
3359 | + "order": 1, |
3360 | + "path": "/e/d/c.txt", |
3361 | + "signature": "/e/d/c.txt.asc", |
3362 | + "size": 209715200 |
3363 | + |
3364 | + } |
3365 | + ], |
3366 | + "type": "delta", |
3367 | + "version": 1304 |
3368 | + }, |
3369 | + |
3370 | + { |
3371 | + "description": "Full C", |
3372 | + "files": [ |
3373 | + { |
3374 | + "checksum": "dcb", |
3375 | + "order": 1, |
3376 | + "path": "/d/c/b.txt", |
3377 | + "signature": "/d/c/b.txt.asc", |
3378 | + "size": 104857600 |
3379 | + }, |
3380 | + { |
3381 | + "checksum": "cba", |
3382 | + "order": 1, |
3383 | + "path": "/c/b/a.txt", |
3384 | + "signature": "/c/b/a.txt.asc", |
3385 | + "size": 104857600 |
3386 | + }, |
3387 | + { |
3388 | + "checksum": "ba9", |
3389 | + "order": 1, |
3390 | + "path": "/b/a/9.txt", |
3391 | + "signature": "/b/a/9.txt.asc", |
3392 | + "size": 104857600 |
3393 | + } |
3394 | + ], |
3395 | + "type": "full", |
3396 | + "version": 1100 |
3397 | + }, |
3398 | + { |
3399 | + "base": 1100, |
3400 | + "description": "Delta C.1", |
3401 | + "files": [ |
3402 | + { |
3403 | + "checksum": "a98", |
3404 | + "order": 1, |
3405 | + "path": "/a/9/8.txt", |
3406 | + "signature": "/a/9/8.txt.asc", |
3407 | + "size": 104857600 |
3408 | + }, |
3409 | + { |
3410 | + "checksum": "987", |
3411 | + "order": 1, |
3412 | + "path": "/9/8/7.txt", |
3413 | + "signature": "/9/8/7.txt.asc", |
3414 | + "size": 104857600 |
3415 | + }, |
3416 | + { |
3417 | + "checksum": "876", |
3418 | + "order": 1, |
3419 | + "path": "/8/7/6.txt", |
3420 | + "signature": "/8/7/6.txt.asc", |
3421 | + "size": 838860800 |
3422 | + |
3423 | + } |
3424 | + ], |
3425 | + "type": "delta", |
3426 | + "version": 1303 |
3427 | + } |
3428 | + ] |
3429 | +} |
3430 | |
3431 | === renamed file 'systemimage/tests/data/sprint_nexus7_index_01.json' => 'systemimage/tests/data/index.index_05.json' |
3432 | === removed file 'systemimage/tests/data/index_26.json' |
3433 | --- systemimage/tests/data/index_26.json 2014-10-21 20:06:07 +0000 |
3434 | +++ systemimage/tests/data/index_26.json 1970-01-01 00:00:00 +0000 |
3435 | @@ -1,245 +0,0 @@ |
3436 | -{ |
3437 | - "global": { |
3438 | - "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
3439 | - }, |
3440 | - "images": [ |
3441 | - { |
3442 | - "bootme": true, |
3443 | - "description": "Full A", |
3444 | - "files": [ |
3445 | - { |
3446 | - "checksum": "abc", |
3447 | - "order": 1, |
3448 | - "path": "/a/b/c.txt", |
3449 | - "signature": "/a/b/c.txt.asc", |
3450 | - "size": 104857600 |
3451 | - |
3452 | - }, |
3453 | - { |
3454 | - "checksum": "bcd", |
3455 | - "order": 1, |
3456 | - "path": "/b/c/d.txt", |
3457 | - "signature": "/b/c/d.txt.asc", |
3458 | - "size": 104857600 |
3459 | - }, |
3460 | - { |
3461 | - "checksum": "cde", |
3462 | - "order": 1, |
3463 | - "path": "/c/d/e.txt", |
3464 | - "signature": "/c/d/e.txt.asc", |
3465 | - "size": 104857600 |
3466 | - } |
3467 | - ], |
3468 | - "type": "full", |
3469 | - "version": 300 |
3470 | - }, |
3471 | - { |
3472 | - "base": 300, |
3473 | - "bootme": true, |
3474 | - "description": "Delta A.1", |
3475 | - "files": [ |
3476 | - { |
3477 | - "checksum": "def", |
3478 | - "order": 1, |
3479 | - "path": "/d/e/f.txt", |
3480 | - "signature": "/d/e/f.txt.asc", |
3481 | - "size": 104857600 |
3482 | - }, |
3483 | - { |
3484 | - "checksum": "ef0", |
3485 | - "order": 1, |
3486 | - "path": "/e/f/0.txt", |
3487 | - "signature": "/e/f/0.txt.asc", |
3488 | - "size": 104857600 |
3489 | - }, |
3490 | - { |
3491 | - "checksum": "f01", |
3492 | - "order": 1, |
3493 | - "path": "/f/e/1.txt", |
3494 | - "signature": "/f/e/1.txt.asc", |
3495 | - "size": 104857600 |
3496 | - } |
3497 | - ], |
3498 | - "type": "delta", |
3499 | - "version": 301 |
3500 | - }, |
3501 | - { |
3502 | - "base": 301, |
3503 | - "bootme": true, |
3504 | - "description": "Delta A.2", |
3505 | - "files": [ |
3506 | - { |
3507 | - "checksum": "012", |
3508 | - "order": 1, |
3509 | - "path": "/0/1/2.txt", |
3510 | - "signature": "/0/1/2.txt.asc", |
3511 | - "size": 104857600 |
3512 | - }, |
3513 | - { |
3514 | - "checksum": "123", |
3515 | - "order": 1, |
3516 | - "path": "/1/2/3.txt", |
3517 | - "signature": "/1/2/3.txt.asc", |
3518 | - "size": 104857600 |
3519 | - }, |
3520 | - { |
3521 | - "checksum": "234", |
3522 | - "order": 1, |
3523 | - "path": "/2/3/4.txt", |
3524 | - "signature": "/2/3/4.txt.asc", |
3525 | - "size": 104857600 |
3526 | - } |
3527 | - ], |
3528 | - "type": "delta", |
3529 | - "version": 304 |
3530 | - }, |
3531 | - |
3532 | - { |
3533 | - "description": "Full B", |
3534 | - "files": [ |
3535 | - { |
3536 | - "checksum": "345", |
3537 | - "order": 1, |
3538 | - "path": "/3/4/5.txt", |
3539 | - "signature": "/3/4/5.txt.asc", |
3540 | - "size": 104857600 |
3541 | - }, |
3542 | - { |
3543 | - "checksum": "456", |
3544 | - "order": 1, |
3545 | - "path": "/4/5/6.txt", |
3546 | - "signature": "/4/5/6.txt.asc", |
3547 | - "size": 104857600 |
3548 | - }, |
3549 | - { |
3550 | - "checksum": "567", |
3551 | - "order": 1, |
3552 | - "path": "/5/6/7.txt", |
3553 | - "signature": "/5/6/7.txt.asc", |
3554 | - "size": 104857600 |
3555 | - } |
3556 | - ], |
3557 | - "type": "full", |
3558 | - "version": 200 |
3559 | - }, |
3560 | - { |
3561 | - "base": 200, |
3562 | - "description": "Delta B.1", |
3563 | - "files": [ |
3564 | - { |
3565 | - "checksum": "678", |
3566 | - "order": 1, |
3567 | - "path": "/6/7/8.txt", |
3568 | - "signature": "/6/7/8.txt.asc", |
3569 | - "size": 104857600 |
3570 | - }, |
3571 | - { |
3572 | - "checksum": "789", |
3573 | - "order": 1, |
3574 | - "path": "/7/8/9.txt", |
3575 | - "signature": "/7/8/9.txt.asc", |
3576 | - "size": 104857600 |
3577 | - }, |
3578 | - { |
3579 | - "checksum": "89a", |
3580 | - "order": 1, |
3581 | - "path": "/8/9/a.txt", |
3582 | - "signature": "/8/9/a.txt.asc", |
3583 | - "size": 104857600 |
3584 | - } |
3585 | - ], |
3586 | - "type": "delta", |
3587 | - "version": 201 |
3588 | - }, |
3589 | - { |
3590 | - "base": 201, |
3591 | - "description": "Delta B.2", |
3592 | - "files": [ |
3593 | - { |
3594 | - "checksum": "9ab", |
3595 | - "order": 1, |
3596 | - "path": "/9/a/b.txt", |
3597 | - "signature": "/9/a/b.txt.asc", |
3598 | - "size": 104857600 |
3599 | - }, |
3600 | - { |
3601 | - "checksum": "fed", |
3602 | - "order": 1, |
3603 | - "path": "/f/e/d.txt", |
3604 | - "signature": "/f/e/d.txt.asc", |
3605 | - "size": 104857600 |
3606 | - }, |
3607 | - { |
3608 | - "checksum": "edc", |
3609 | - "order": 1, |
3610 | - "path": "/e/d/c.txt", |
3611 | - "signature": "/e/d/c.txt.asc", |
3612 | - "size": 209715200 |
3613 | - |
3614 | - } |
3615 | - ], |
3616 | - "type": "delta", |
3617 | - "version": 304, |
3618 | - "phased-percentage": 0 |
3619 | - }, |
3620 | - |
3621 | - { |
3622 | - "description": "Full C", |
3623 | - "files": [ |
3624 | - { |
3625 | - "checksum": "dcb", |
3626 | - "order": 1, |
3627 | - "path": "/d/c/b.txt", |
3628 | - "signature": "/d/c/b.txt.asc", |
3629 | - "size": 104857600 |
3630 | - }, |
3631 | - { |
3632 | - "checksum": "cba", |
3633 | - "order": 1, |
3634 | - "path": "/c/b/a.txt", |
3635 | - "signature": "/c/b/a.txt.asc", |
3636 | - "size": 104857600 |
3637 | - }, |
3638 | - { |
3639 | - "checksum": "ba9", |
3640 | - "order": 1, |
3641 | - "path": "/b/a/9.txt", |
3642 | - "signature": "/b/a/9.txt.asc", |
3643 | - "size": 104857600 |
3644 | - } |
3645 | - ], |
3646 | - "type": "full", |
3647 | - "version": 100 |
3648 | - }, |
3649 | - { |
3650 | - "base": 100, |
3651 | - "description": "Delta C.1", |
3652 | - "files": [ |
3653 | - { |
3654 | - "checksum": "a98", |
3655 | - "order": 1, |
3656 | - "path": "/a/9/8.txt", |
3657 | - "signature": "/a/9/8.txt.asc", |
3658 | - "size": 104857600 |
3659 | - }, |
3660 | - { |
3661 | - "checksum": "987", |
3662 | - "order": 1, |
3663 | - "path": "/9/8/7.txt", |
3664 | - "signature": "/9/8/7.txt.asc", |
3665 | - "size": 104857600 |
3666 | - }, |
3667 | - { |
3668 | - "checksum": "876", |
3669 | - "order": 1, |
3670 | - "path": "/8/7/6.txt", |
3671 | - "signature": "/8/7/6.txt.asc", |
3672 | - "size": 838860800 |
3673 | - |
3674 | - } |
3675 | - ], |
3676 | - "type": "delta", |
3677 | - "version": 303 |
3678 | - } |
3679 | - ] |
3680 | -} |
3681 | |
3682 | === added file 'systemimage/tests/data/main.channels_01.json' |
3683 | --- systemimage/tests/data/main.channels_01.json 1970-01-01 00:00:00 +0000 |
3684 | +++ systemimage/tests/data/main.channels_01.json 2015-01-15 22:43:25 +0000 |
3685 | @@ -0,0 +1,13 @@ |
3686 | +{ |
3687 | + "stable": { |
3688 | + "devices": { |
3689 | + "nexus7": { |
3690 | + "index": "/stable/nexus7/index.json", |
3691 | + "keyring": { |
3692 | + "path": "/stable/nexus7/device-signing.tar.xz", |
3693 | + "signature": "/stable/nexus7/device-signing.tar.xz.asc" |
3694 | + } |
3695 | + } |
3696 | + } |
3697 | + } |
3698 | +} |
3699 | |
3700 | === renamed file 'systemimage/tests/data/channels_10.json' => 'systemimage/tests/data/main.channels_02.json' |
3701 | === added file 'systemimage/tests/data/main.channels_03.json' |
3702 | --- systemimage/tests/data/main.channels_03.json 1970-01-01 00:00:00 +0000 |
3703 | +++ systemimage/tests/data/main.channels_03.json 2015-01-15 22:43:25 +0000 |
3704 | @@ -0,0 +1,13 @@ |
3705 | +{ |
3706 | + "stable": { |
3707 | + "devices": { |
3708 | + "nexus7": { |
3709 | + "index": "/stable/nexus7/index.json", |
3710 | + "keyring": { |
3711 | + "path": "/stable/nexus7/device-signing.tar.xz", |
3712 | + "signature": "/stable/nexus7/device-signing.tar.xz.asc" |
3713 | + } |
3714 | + } |
3715 | + } |
3716 | + } |
3717 | +} |
3718 | |
3719 | === renamed file 'systemimage/tests/data/config_01.ini' => 'systemimage/tests/data/main.config_01.ini' |
3720 | --- systemimage/tests/data/config_01.ini 2013-11-12 19:57:39 +0000 |
3721 | +++ systemimage/tests/data/main.config_01.ini 2015-01-15 22:43:25 +0000 |
3722 | @@ -5,12 +5,11 @@ |
3723 | base: phablet.example.com |
3724 | http_port: 80 |
3725 | https_port: 443 |
3726 | -channel: stable |
3727 | +channel: special |
3728 | build_number: 0 |
3729 | |
3730 | [system] |
3731 | timeout: 10s |
3732 | -build_file: /etc/ubuntu-build |
3733 | tempdir: /tmp |
3734 | logfile: /var/log/system-image/client.log |
3735 | loglevel: error |
3736 | @@ -23,8 +22,8 @@ |
3737 | device_signing: /var/lib/phablet/device-signing.tar.xz |
3738 | |
3739 | [updater] |
3740 | -cache_partition: /android/cache |
3741 | -data_partition: /var/lib/phablet/updater |
3742 | +cache_partition: {tmpdir}/android/cache |
3743 | +data_partition: {vardir}/lib/phablet/updater |
3744 | |
3745 | [hooks] |
3746 | device: systemimage.device.SystemProperty |
3747 | |
3748 | === renamed file 'systemimage/tests/data/channel_01.ini' => 'systemimage/tests/data/main.config_02.ini' |
3749 | === renamed file 'systemimage/tests/data/channel_05.ini' => 'systemimage/tests/data/main.config_03.ini' |
3750 | === renamed file 'systemimage/tests/data/channel_03.ini' => 'systemimage/tests/data/main.config_04.ini' |
3751 | === added file 'systemimage/tests/data/main.config_05.ini' |
3752 | --- systemimage/tests/data/main.config_05.ini 1970-01-01 00:00:00 +0000 |
3753 | +++ systemimage/tests/data/main.config_05.ini 2015-01-15 22:43:25 +0000 |
3754 | @@ -0,0 +1,7 @@ |
3755 | +[service] |
3756 | +base: localhost |
3757 | +http_port: 8980 |
3758 | +https_port: 8943 |
3759 | +channel: daily |
3760 | +build_number: 300 |
3761 | +channel_target: saucy |
3762 | |
3763 | === renamed file 'systemimage/tests/data/channel_04.ini' => 'systemimage/tests/data/main.config_07.ini' |
3764 | --- systemimage/tests/data/channel_04.ini 2013-09-06 22:09:02 +0000 |
3765 | +++ systemimage/tests/data/main.config_07.ini 2015-01-15 22:43:25 +0000 |
3766 | @@ -3,4 +3,4 @@ |
3767 | http_port: 8980 |
3768 | https_port: 8943 |
3769 | channel: saucy |
3770 | -build_number: 1 |
3771 | +build_number: 33 |
3772 | |
3773 | === renamed file 'systemimage/tests/data/index_14.json' => 'systemimage/tests/data/main.index_01.json' |
3774 | === renamed file 'systemimage/tests/data/index_20.json' => 'systemimage/tests/data/main.index_02.json' |
3775 | === renamed file 'systemimage/tests/data/index_15.json' => 'systemimage/tests/data/main.index_03.json' |
3776 | === added file 'systemimage/tests/data/main.index_04.json' |
3777 | --- systemimage/tests/data/main.index_04.json 1970-01-01 00:00:00 +0000 |
3778 | +++ systemimage/tests/data/main.index_04.json 2015-01-15 22:43:25 +0000 |
3779 | @@ -0,0 +1,36 @@ |
3780 | +{ |
3781 | + "global": { |
3782 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
3783 | + }, |
3784 | + "images": [ |
3785 | + { |
3786 | + "description": "Full", |
3787 | + "files": [ |
3788 | + { |
3789 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
3790 | + "order": 3, |
3791 | + "path": "/3/4/5.txt", |
3792 | + "signature": "/3/4/5.txt.asc", |
3793 | + "size": 104857600 |
3794 | + }, |
3795 | + { |
3796 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
3797 | + "order": 1, |
3798 | + "path": "/4/5/6.txt", |
3799 | + "signature": "/4/5/6.txt.asc", |
3800 | + "size": 104857600 |
3801 | + }, |
3802 | + { |
3803 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
3804 | + "order": 2, |
3805 | + "path": "/5/6/5.txt", |
3806 | + "signature": "/5/6/5.txt.asc", |
3807 | + "size": 104857600 |
3808 | + } |
3809 | + ], |
3810 | + "type": "full", |
3811 | + "version": 1600, |
3812 | + "bootme": true |
3813 | + } |
3814 | + ] |
3815 | +} |
3816 | |
3817 | === added file 'systemimage/tests/data/main.index_05.json' |
3818 | --- systemimage/tests/data/main.index_05.json 1970-01-01 00:00:00 +0000 |
3819 | +++ systemimage/tests/data/main.index_05.json 2015-01-15 22:43:25 +0000 |
3820 | @@ -0,0 +1,36 @@ |
3821 | +{ |
3822 | + "global": { |
3823 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
3824 | + }, |
3825 | + "images": [ |
3826 | + { |
3827 | + "description": "Full", |
3828 | + "files": [ |
3829 | + { |
3830 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
3831 | + "order": 3, |
3832 | + "path": "/3/4/5.txt", |
3833 | + "signature": "/3/4/5.txt.asc", |
3834 | + "size": 104857600 |
3835 | + }, |
3836 | + { |
3837 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
3838 | + "order": 1, |
3839 | + "path": "/4/5/6.txt", |
3840 | + "signature": "/4/5/6.txt.asc", |
3841 | + "size": 104857600 |
3842 | + }, |
3843 | + { |
3844 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
3845 | + "order": 2, |
3846 | + "path": "/5/6/7.txt", |
3847 | + "signature": "/5/6/7.txt.asc", |
3848 | + "size": 104857600 |
3849 | + } |
3850 | + ], |
3851 | + "type": "full", |
3852 | + "version": 1600, |
3853 | + "bootme": true |
3854 | + } |
3855 | + ] |
3856 | +} |
3857 | |
3858 | === added file 'systemimage/tests/data/scores.index_01.json' |
3859 | --- systemimage/tests/data/scores.index_01.json 1970-01-01 00:00:00 +0000 |
3860 | +++ systemimage/tests/data/scores.index_01.json 2015-01-15 22:43:25 +0000 |
3861 | @@ -0,0 +1,245 @@ |
3862 | +{ |
3863 | + "global": { |
3864 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
3865 | + }, |
3866 | + "images": [ |
3867 | + { |
3868 | + "bootme": true, |
3869 | + "description": "Full A", |
3870 | + "files": [ |
3871 | + { |
3872 | + "checksum": "abc", |
3873 | + "order": 1, |
3874 | + "path": "/a/b/c.txt", |
3875 | + "signature": "/a/b/c.txt.asc", |
3876 | + "size": 104857600 |
3877 | + |
3878 | + }, |
3879 | + { |
3880 | + "checksum": "bcd", |
3881 | + "order": 1, |
3882 | + "path": "/b/c/d.txt", |
3883 | + "signature": "/b/c/d.txt.asc", |
3884 | + "size": 104857600 |
3885 | + }, |
3886 | + { |
3887 | + "checksum": "cde", |
3888 | + "order": 1, |
3889 | + "path": "/c/d/e.txt", |
3890 | + "signature": "/c/d/e.txt.asc", |
3891 | + "size": 104857600 |
3892 | + } |
3893 | + ], |
3894 | + "type": "full", |
3895 | + "version": 300 |
3896 | + }, |
3897 | + { |
3898 | + "base": 300, |
3899 | + "bootme": true, |
3900 | + "description": "Delta A.1", |
3901 | + "files": [ |
3902 | + { |
3903 | + "checksum": "def", |
3904 | + "order": 1, |
3905 | + "path": "/d/e/f.txt", |
3906 | + "signature": "/d/e/f.txt.asc", |
3907 | + "size": 104857600 |
3908 | + }, |
3909 | + { |
3910 | + "checksum": "ef0", |
3911 | + "order": 1, |
3912 | + "path": "/e/f/0.txt", |
3913 | + "signature": "/e/f/0.txt.asc", |
3914 | + "size": 104857600 |
3915 | + }, |
3916 | + { |
3917 | + "checksum": "f01", |
3918 | + "order": 1, |
3919 | + "path": "/f/e/1.txt", |
3920 | + "signature": "/f/e/1.txt.asc", |
3921 | + "size": 104857600 |
3922 | + } |
3923 | + ], |
3924 | + "type": "delta", |
3925 | + "version": 301 |
3926 | + }, |
3927 | + { |
3928 | + "base": 301, |
3929 | + "bootme": true, |
3930 | + "description": "Delta A.2", |
3931 | + "files": [ |
3932 | + { |
3933 | + "checksum": "012", |
3934 | + "order": 1, |
3935 | + "path": "/0/1/2.txt", |
3936 | + "signature": "/0/1/2.txt.asc", |
3937 | + "size": 104857600 |
3938 | + }, |
3939 | + { |
3940 | + "checksum": "123", |
3941 | + "order": 1, |
3942 | + "path": "/1/2/3.txt", |
3943 | + "signature": "/1/2/3.txt.asc", |
3944 | + "size": 104857600 |
3945 | + }, |
3946 | + { |
3947 | + "checksum": "234", |
3948 | + "order": 1, |
3949 | + "path": "/2/3/4.txt", |
3950 | + "signature": "/2/3/4.txt.asc", |
3951 | + "size": 104857600 |
3952 | + } |
3953 | + ], |
3954 | + "type": "delta", |
3955 | + "version": 304 |
3956 | + }, |
3957 | + |
3958 | + { |
3959 | + "description": "Full B", |
3960 | + "files": [ |
3961 | + { |
3962 | + "checksum": "345", |
3963 | + "order": 1, |
3964 | + "path": "/3/4/5.txt", |
3965 | + "signature": "/3/4/5.txt.asc", |
3966 | + "size": 104857600 |
3967 | + }, |
3968 | + { |
3969 | + "checksum": "456", |
3970 | + "order": 1, |
3971 | + "path": "/4/5/6.txt", |
3972 | + "signature": "/4/5/6.txt.asc", |
3973 | + "size": 104857600 |
3974 | + }, |
3975 | + { |
3976 | + "checksum": "567", |
3977 | + "order": 1, |
3978 | + "path": "/5/6/7.txt", |
3979 | + "signature": "/5/6/7.txt.asc", |
3980 | + "size": 104857600 |
3981 | + } |
3982 | + ], |
3983 | + "type": "full", |
3984 | + "version": 200 |
3985 | + }, |
3986 | + { |
3987 | + "base": 200, |
3988 | + "description": "Delta B.1", |
3989 | + "files": [ |
3990 | + { |
3991 | + "checksum": "678", |
3992 | + "order": 1, |
3993 | + "path": "/6/7/8.txt", |
3994 | + "signature": "/6/7/8.txt.asc", |
3995 | + "size": 104857600 |
3996 | + }, |
3997 | + { |
3998 | + "checksum": "789", |
3999 | + "order": 1, |
4000 | + "path": "/7/8/9.txt", |
4001 | + "signature": "/7/8/9.txt.asc", |
4002 | + "size": 104857600 |
4003 | + }, |
4004 | + { |
4005 | + "checksum": "89a", |
4006 | + "order": 1, |
4007 | + "path": "/8/9/a.txt", |
4008 | + "signature": "/8/9/a.txt.asc", |
4009 | + "size": 104857600 |
4010 | + } |
4011 | + ], |
4012 | + "type": "delta", |
4013 | + "version": 201 |
4014 | + }, |
4015 | + { |
4016 | + "base": 201, |
4017 | + "description": "Delta B.2", |
4018 | + "files": [ |
4019 | + { |
4020 | + "checksum": "9ab", |
4021 | + "order": 1, |
4022 | + "path": "/9/a/b.txt", |
4023 | + "signature": "/9/a/b.txt.asc", |
4024 | + "size": 104857600 |
4025 | + }, |
4026 | + { |
4027 | + "checksum": "fed", |
4028 | + "order": 1, |
4029 | + "path": "/f/e/d.txt", |
4030 | + "signature": "/f/e/d.txt.asc", |
4031 | + "size": 104857600 |
4032 | + }, |
4033 | + { |
4034 | + "checksum": "edc", |
4035 | + "order": 1, |
4036 | + "path": "/e/d/c.txt", |
4037 | + "signature": "/e/d/c.txt.asc", |
4038 | + "size": 209715200 |
4039 | + |
4040 | + } |
4041 | + ], |
4042 | + "type": "delta", |
4043 | + "version": 304, |
4044 | + "phased-percentage": 0 |
4045 | + }, |
4046 | + |
4047 | + { |
4048 | + "description": "Full C", |
4049 | + "files": [ |
4050 | + { |
4051 | + "checksum": "dcb", |
4052 | + "order": 1, |
4053 | + "path": "/d/c/b.txt", |
4054 | + "signature": "/d/c/b.txt.asc", |
4055 | + "size": 104857600 |
4056 | + }, |
4057 | + { |
4058 | + "checksum": "cba", |
4059 | + "order": 1, |
4060 | + "path": "/c/b/a.txt", |
4061 | + "signature": "/c/b/a.txt.asc", |
4062 | + "size": 104857600 |
4063 | + }, |
4064 | + { |
4065 | + "checksum": "ba9", |
4066 | + "order": 1, |
4067 | + "path": "/b/a/9.txt", |
4068 | + "signature": "/b/a/9.txt.asc", |
4069 | + "size": 104857600 |
4070 | + } |
4071 | + ], |
4072 | + "type": "full", |
4073 | + "version": 100 |
4074 | + }, |
4075 | + { |
4076 | + "base": 100, |
4077 | + "description": "Delta C.1", |
4078 | + "files": [ |
4079 | + { |
4080 | + "checksum": "a98", |
4081 | + "order": 1, |
4082 | + "path": "/a/9/8.txt", |
4083 | + "signature": "/a/9/8.txt.asc", |
4084 | + "size": 104857600 |
4085 | + }, |
4086 | + { |
4087 | + "checksum": "987", |
4088 | + "order": 1, |
4089 | + "path": "/9/8/7.txt", |
4090 | + "signature": "/9/8/7.txt.asc", |
4091 | + "size": 104857600 |
4092 | + }, |
4093 | + { |
4094 | + "checksum": "876", |
4095 | + "order": 1, |
4096 | + "path": "/8/7/6.txt", |
4097 | + "signature": "/8/7/6.txt.asc", |
4098 | + "size": 838860800 |
4099 | + |
4100 | + } |
4101 | + ], |
4102 | + "type": "delta", |
4103 | + "version": 303 |
4104 | + } |
4105 | + ] |
4106 | +} |
4107 | |
4108 | === renamed file 'systemimage/tests/data/index_08.json' => 'systemimage/tests/data/scores.index_02.json' |
4109 | === renamed file 'systemimage/tests/data/index_09.json' => 'systemimage/tests/data/scores.index_03.json' |
4110 | === renamed file 'systemimage/tests/data/index_17.json' => 'systemimage/tests/data/scores.index_04.json' |
4111 | === added file 'systemimage/tests/data/scores.index_05.json' |
4112 | --- systemimage/tests/data/scores.index_05.json 1970-01-01 00:00:00 +0000 |
4113 | +++ systemimage/tests/data/scores.index_05.json 2015-01-15 22:43:25 +0000 |
4114 | @@ -0,0 +1,245 @@ |
4115 | +{ |
4116 | + "global": { |
4117 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
4118 | + }, |
4119 | + "images": [ |
4120 | + { |
4121 | + "bootme": true, |
4122 | + "description": "Full A", |
4123 | + "files": [ |
4124 | + { |
4125 | + "checksum": "abc", |
4126 | + "order": 1, |
4127 | + "path": "/a/b/c.txt", |
4128 | + "signature": "/a/b/c.txt.asc", |
4129 | + "size": 104857600 |
4130 | + |
4131 | + }, |
4132 | + { |
4133 | + "checksum": "bcd", |
4134 | + "order": 1, |
4135 | + "path": "/b/c/d.txt", |
4136 | + "signature": "/b/c/d.txt.asc", |
4137 | + "size": 104857600 |
4138 | + }, |
4139 | + { |
4140 | + "checksum": "cde", |
4141 | + "order": 1, |
4142 | + "path": "/c/d/e.txt", |
4143 | + "signature": "/c/d/e.txt.asc", |
4144 | + "size": 104857600 |
4145 | + } |
4146 | + ], |
4147 | + "type": "full", |
4148 | + "version": 300 |
4149 | + }, |
4150 | + { |
4151 | + "base": 300, |
4152 | + "bootme": true, |
4153 | + "description": "Delta A.1", |
4154 | + "files": [ |
4155 | + { |
4156 | + "checksum": "def", |
4157 | + "order": 1, |
4158 | + "path": "/d/e/f.txt", |
4159 | + "signature": "/d/e/f.txt.asc", |
4160 | + "size": 104857600 |
4161 | + }, |
4162 | + { |
4163 | + "checksum": "ef0", |
4164 | + "order": 1, |
4165 | + "path": "/e/f/0.txt", |
4166 | + "signature": "/e/f/0.txt.asc", |
4167 | + "size": 104857600 |
4168 | + }, |
4169 | + { |
4170 | + "checksum": "f01", |
4171 | + "order": 1, |
4172 | + "path": "/f/e/1.txt", |
4173 | + "signature": "/f/e/1.txt.asc", |
4174 | + "size": 104857600 |
4175 | + } |
4176 | + ], |
4177 | + "type": "delta", |
4178 | + "version": 301 |
4179 | + }, |
4180 | + { |
4181 | + "base": 301, |
4182 | + "bootme": true, |
4183 | + "description": "Delta A.2", |
4184 | + "files": [ |
4185 | + { |
4186 | + "checksum": "012", |
4187 | + "order": 1, |
4188 | + "path": "/0/1/2.txt", |
4189 | + "signature": "/0/1/2.txt.asc", |
4190 | + "size": 104857600 |
4191 | + }, |
4192 | + { |
4193 | + "checksum": "123", |
4194 | + "order": 1, |
4195 | + "path": "/1/2/3.txt", |
4196 | + "signature": "/1/2/3.txt.asc", |
4197 | + "size": 104857600 |
4198 | + }, |
4199 | + { |
4200 | + "checksum": "234", |
4201 | + "order": 1, |
4202 | + "path": "/2/3/4.txt", |
4203 | + "signature": "/2/3/4.txt.asc", |
4204 | + "size": 104857600 |
4205 | + } |
4206 | + ], |
4207 | + "type": "delta", |
4208 | + "version": 304 |
4209 | + }, |
4210 | + |
4211 | + { |
4212 | + "description": "Full B", |
4213 | + "files": [ |
4214 | + { |
4215 | + "checksum": "345", |
4216 | + "order": 1, |
4217 | + "path": "/3/4/5.txt", |
4218 | + "signature": "/3/4/5.txt.asc", |
4219 | + "size": 104857600 |
4220 | + }, |
4221 | + { |
4222 | + "checksum": "456", |
4223 | + "order": 1, |
4224 | + "path": "/4/5/6.txt", |
4225 | + "signature": "/4/5/6.txt.asc", |
4226 | + "size": 104857600 |
4227 | + }, |
4228 | + { |
4229 | + "checksum": "567", |
4230 | + "order": 1, |
4231 | + "path": "/5/6/7.txt", |
4232 | + "signature": "/5/6/7.txt.asc", |
4233 | + "size": 104857600 |
4234 | + } |
4235 | + ], |
4236 | + "type": "full", |
4237 | + "version": 200 |
4238 | + }, |
4239 | + { |
4240 | + "base": 200, |
4241 | + "description": "Delta B.1", |
4242 | + "files": [ |
4243 | + { |
4244 | + "checksum": "678", |
4245 | + "order": 1, |
4246 | + "path": "/6/7/8.txt", |
4247 | + "signature": "/6/7/8.txt.asc", |
4248 | + "size": 104857600 |
4249 | + }, |
4250 | + { |
4251 | + "checksum": "789", |
4252 | + "order": 1, |
4253 | + "path": "/7/8/9.txt", |
4254 | + "signature": "/7/8/9.txt.asc", |
4255 | + "size": 104857600 |
4256 | + }, |
4257 | + { |
4258 | + "checksum": "89a", |
4259 | + "order": 1, |
4260 | + "path": "/8/9/a.txt", |
4261 | + "signature": "/8/9/a.txt.asc", |
4262 | + "size": 104857600 |
4263 | + } |
4264 | + ], |
4265 | + "type": "delta", |
4266 | + "version": 201 |
4267 | + }, |
4268 | + { |
4269 | + "base": 201, |
4270 | + "description": "Delta B.2", |
4271 | + "files": [ |
4272 | + { |
4273 | + "checksum": "9ab", |
4274 | + "order": 1, |
4275 | + "path": "/9/a/b.txt", |
4276 | + "signature": "/9/a/b.txt.asc", |
4277 | + "size": 104857600 |
4278 | + }, |
4279 | + { |
4280 | + "checksum": "fed", |
4281 | + "order": 1, |
4282 | + "path": "/f/e/d.txt", |
4283 | + "signature": "/f/e/d.txt.asc", |
4284 | + "size": 104857600 |
4285 | + }, |
4286 | + { |
4287 | + "checksum": "edc", |
4288 | + "order": 1, |
4289 | + "path": "/e/d/c.txt", |
4290 | + "signature": "/e/d/c.txt.asc", |
4291 | + "size": 209715200 |
4292 | + |
4293 | + } |
4294 | + ], |
4295 | + "type": "delta", |
4296 | + "version": 304, |
4297 | + "phased-percentage": 50 |
4298 | + }, |
4299 | + |
4300 | + { |
4301 | + "description": "Full C", |
4302 | + "files": [ |
4303 | + { |
4304 | + "checksum": "dcb", |
4305 | + "order": 1, |
4306 | + "path": "/d/c/b.txt", |
4307 | + "signature": "/d/c/b.txt.asc", |
4308 | + "size": 104857600 |
4309 | + }, |
4310 | + { |
4311 | + "checksum": "cba", |
4312 | + "order": 1, |
4313 | + "path": "/c/b/a.txt", |
4314 | + "signature": "/c/b/a.txt.asc", |
4315 | + "size": 104857600 |
4316 | + }, |
4317 | + { |
4318 | + "checksum": "ba9", |
4319 | + "order": 1, |
4320 | + "path": "/b/a/9.txt", |
4321 | + "signature": "/b/a/9.txt.asc", |
4322 | + "size": 104857600 |
4323 | + } |
4324 | + ], |
4325 | + "type": "full", |
4326 | + "version": 100 |
4327 | + }, |
4328 | + { |
4329 | + "base": 100, |
4330 | + "description": "Delta C.1", |
4331 | + "files": [ |
4332 | + { |
4333 | + "checksum": "a98", |
4334 | + "order": 1, |
4335 | + "path": "/a/9/8.txt", |
4336 | + "signature": "/a/9/8.txt.asc", |
4337 | + "size": 104857600 |
4338 | + }, |
4339 | + { |
4340 | + "checksum": "987", |
4341 | + "order": 1, |
4342 | + "path": "/9/8/7.txt", |
4343 | + "signature": "/9/8/7.txt.asc", |
4344 | + "size": 104857600 |
4345 | + }, |
4346 | + { |
4347 | + "checksum": "876", |
4348 | + "order": 1, |
4349 | + "path": "/8/7/6.txt", |
4350 | + "signature": "/8/7/6.txt.asc", |
4351 | + "size": 838860800 |
4352 | + |
4353 | + } |
4354 | + ], |
4355 | + "type": "delta", |
4356 | + "version": 303 |
4357 | + } |
4358 | + ] |
4359 | +} |
4360 | |
4361 | === added file 'systemimage/tests/data/state.channel_01.ini' |
4362 | --- systemimage/tests/data/state.channel_01.ini 1970-01-01 00:00:00 +0000 |
4363 | +++ systemimage/tests/data/state.channel_01.ini 2015-01-15 22:43:25 +0000 |
4364 | @@ -0,0 +1,6 @@ |
4365 | +[service] |
4366 | +base: localhost |
4367 | +http_port: 8980 |
4368 | +https_port: 8943 |
4369 | +channel: saucy |
4370 | +build_number: 1 |
4371 | |
4372 | === added file 'systemimage/tests/data/state.channels_01.json' |
4373 | --- systemimage/tests/data/state.channels_01.json 1970-01-01 00:00:00 +0000 |
4374 | +++ systemimage/tests/data/state.channels_01.json 2015-01-15 22:43:25 +0000 |
4375 | @@ -0,0 +1,64 @@ |
4376 | +{ |
4377 | + "daily": { |
4378 | + "alias": "tubular", |
4379 | + "devices": { |
4380 | + "grouper": { |
4381 | + "index": "/daily/grouper/index.json" |
4382 | + }, |
4383 | + "maguro": { |
4384 | + "index": "/daily/maguro/index.json" |
4385 | + }, |
4386 | + "mako": { |
4387 | + "index": "/daily/mako/index.json" |
4388 | + }, |
4389 | + "manta": { |
4390 | + "index": "/daily/manta/index.json", |
4391 | + "keyring": { |
4392 | + "path": "/daily/manta/device-signing.tar.xz", |
4393 | + "signature": "/daily/manta/device-signing.tar.xz.asc" |
4394 | + } |
4395 | + } |
4396 | + } |
4397 | + }, |
4398 | + "saucy": { |
4399 | + "devices": { |
4400 | + "grouper": { |
4401 | + "index": "/saucy/grouper/index.json" |
4402 | + }, |
4403 | + "maguro": { |
4404 | + "index": "/saucy/maguro/index.json" |
4405 | + }, |
4406 | + "mako": { |
4407 | + "index": "/saucy/mako/index.json" |
4408 | + }, |
4409 | + "manta": { |
4410 | + "index": "/saucy/manta/index.json", |
4411 | + "keyring": { |
4412 | + "path": "/saucy/manta/device-signing.tar.xz", |
4413 | + "signature": "/saucy/manta/device-signing.tar.xz.asc" |
4414 | + } |
4415 | + } |
4416 | + } |
4417 | + }, |
4418 | + "tubular": { |
4419 | + "hidden": true, |
4420 | + "devices": { |
4421 | + "grouper": { |
4422 | + "index": "/tubular/grouper/index.json" |
4423 | + }, |
4424 | + "maguro": { |
4425 | + "index": "/tubular/maguro/index.json" |
4426 | + }, |
4427 | + "mako": { |
4428 | + "index": "/tubular/mako/index.json" |
4429 | + }, |
4430 | + "manta": { |
4431 | + "index": "/tubular/manta/index.json", |
4432 | + "keyring": { |
4433 | + "path": "/tubular/manta/device-signing.tar.xz", |
4434 | + "signature": "/tubular/manta/device-signing.tar.xz.asc" |
4435 | + } |
4436 | + } |
4437 | + } |
4438 | + } |
4439 | +} |
4440 | |
4441 | === added file 'systemimage/tests/data/state.channels_02.json' |
4442 | --- systemimage/tests/data/state.channels_02.json 1970-01-01 00:00:00 +0000 |
4443 | +++ systemimage/tests/data/state.channels_02.json 2015-01-15 22:43:25 +0000 |
4444 | @@ -0,0 +1,13 @@ |
4445 | +{ |
4446 | + "stable": { |
4447 | + "devices": { |
4448 | + "nexus7": { |
4449 | + "index": "/stable/nexus7/index.json", |
4450 | + "keyring": { |
4451 | + "path": "/stable/nexus7/device-signing.tar.xz", |
4452 | + "signature": "/stable/nexus7/device-signing.tar.xz.asc" |
4453 | + } |
4454 | + } |
4455 | + } |
4456 | + } |
4457 | +} |
4458 | |
4459 | === renamed file 'systemimage/tests/data/channels_11.json' => 'systemimage/tests/data/state.channels_03.json' |
4460 | === renamed file 'systemimage/tests/data/channels_07.json' => 'systemimage/tests/data/state.channels_04.json' |
4461 | === renamed file 'systemimage/tests/data/channels_08.json' => 'systemimage/tests/data/state.channels_05.json' |
4462 | === renamed file 'systemimage/tests/data/channels_09.json' => 'systemimage/tests/data/state.channels_06.json' |
4463 | === renamed file 'systemimage/tests/data/channels_01.json' => 'systemimage/tests/data/state.channels_07.json' |
4464 | === added file 'systemimage/tests/data/state.index_01.json' |
4465 | --- systemimage/tests/data/state.index_01.json 1970-01-01 00:00:00 +0000 |
4466 | +++ systemimage/tests/data/state.index_01.json 2015-01-15 22:43:25 +0000 |
4467 | @@ -0,0 +1,244 @@ |
4468 | +{ |
4469 | + "global": { |
4470 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
4471 | + }, |
4472 | + "images": [ |
4473 | + { |
4474 | + "bootme": true, |
4475 | + "description": "Full A", |
4476 | + "files": [ |
4477 | + { |
4478 | + "checksum": "abc", |
4479 | + "order": 1, |
4480 | + "path": "/a/b/c.txt", |
4481 | + "signature": "/a/b/c.txt.asc", |
4482 | + "size": 104857600 |
4483 | + |
4484 | + }, |
4485 | + { |
4486 | + "checksum": "bcd", |
4487 | + "order": 1, |
4488 | + "path": "/b/c/d.txt", |
4489 | + "signature": "/b/c/d.txt.asc", |
4490 | + "size": 104857600 |
4491 | + }, |
4492 | + { |
4493 | + "checksum": "cde", |
4494 | + "order": 1, |
4495 | + "path": "/c/d/e.txt", |
4496 | + "signature": "/c/d/e.txt.asc", |
4497 | + "size": 104857600 |
4498 | + } |
4499 | + ], |
4500 | + "type": "full", |
4501 | + "version": 300 |
4502 | + }, |
4503 | + { |
4504 | + "base": 300, |
4505 | + "bootme": true, |
4506 | + "description": "Delta A.1", |
4507 | + "files": [ |
4508 | + { |
4509 | + "checksum": "def", |
4510 | + "order": 1, |
4511 | + "path": "/d/e/f.txt", |
4512 | + "signature": "/d/e/f.txt.asc", |
4513 | + "size": 104857600 |
4514 | + }, |
4515 | + { |
4516 | + "checksum": "ef0", |
4517 | + "order": 1, |
4518 | + "path": "/e/f/0.txt", |
4519 | + "signature": "/e/f/0.txt.asc", |
4520 | + "size": 104857600 |
4521 | + }, |
4522 | + { |
4523 | + "checksum": "f01", |
4524 | + "order": 1, |
4525 | + "path": "/f/e/1.txt", |
4526 | + "signature": "/f/e/1.txt.asc", |
4527 | + "size": 104857600 |
4528 | + } |
4529 | + ], |
4530 | + "type": "delta", |
4531 | + "version": 301 |
4532 | + }, |
4533 | + { |
4534 | + "base": 301, |
4535 | + "bootme": true, |
4536 | + "description": "Delta A.2", |
4537 | + "files": [ |
4538 | + { |
4539 | + "checksum": "012", |
4540 | + "order": 1, |
4541 | + "path": "/0/1/2.txt", |
4542 | + "signature": "/0/1/2.txt.asc", |
4543 | + "size": 104857600 |
4544 | + }, |
4545 | + { |
4546 | + "checksum": "123", |
4547 | + "order": 1, |
4548 | + "path": "/1/2/3.txt", |
4549 | + "signature": "/1/2/3.txt.asc", |
4550 | + "size": 104857600 |
4551 | + }, |
4552 | + { |
4553 | + "checksum": "234", |
4554 | + "order": 1, |
4555 | + "path": "/2/3/4.txt", |
4556 | + "signature": "/2/3/4.txt.asc", |
4557 | + "size": 104857600 |
4558 | + } |
4559 | + ], |
4560 | + "type": "delta", |
4561 | + "version": 304 |
4562 | + }, |
4563 | + |
4564 | + { |
4565 | + "description": "Full B", |
4566 | + "files": [ |
4567 | + { |
4568 | + "checksum": "345", |
4569 | + "order": 1, |
4570 | + "path": "/3/4/5.txt", |
4571 | + "signature": "/3/4/5.txt.asc", |
4572 | + "size": 104857600 |
4573 | + }, |
4574 | + { |
4575 | + "checksum": "456", |
4576 | + "order": 1, |
4577 | + "path": "/4/5/6.txt", |
4578 | + "signature": "/4/5/6.txt.asc", |
4579 | + "size": 104857600 |
4580 | + }, |
4581 | + { |
4582 | + "checksum": "567", |
4583 | + "order": 1, |
4584 | + "path": "/5/6/7.txt", |
4585 | + "signature": "/5/6/7.txt.asc", |
4586 | + "size": 104857600 |
4587 | + } |
4588 | + ], |
4589 | + "type": "full", |
4590 | + "version": 200 |
4591 | + }, |
4592 | + { |
4593 | + "base": 200, |
4594 | + "description": "Delta B.1", |
4595 | + "files": [ |
4596 | + { |
4597 | + "checksum": "678", |
4598 | + "order": 1, |
4599 | + "path": "/6/7/8.txt", |
4600 | + "signature": "/6/7/8.txt.asc", |
4601 | + "size": 104857600 |
4602 | + }, |
4603 | + { |
4604 | + "checksum": "789", |
4605 | + "order": 1, |
4606 | + "path": "/7/8/9.txt", |
4607 | + "signature": "/7/8/9.txt.asc", |
4608 | + "size": 104857600 |
4609 | + }, |
4610 | + { |
4611 | + "checksum": "89a", |
4612 | + "order": 1, |
4613 | + "path": "/8/9/a.txt", |
4614 | + "signature": "/8/9/a.txt.asc", |
4615 | + "size": 104857600 |
4616 | + } |
4617 | + ], |
4618 | + "type": "delta", |
4619 | + "version": 201 |
4620 | + }, |
4621 | + { |
4622 | + "base": 201, |
4623 | + "description": "Delta B.2", |
4624 | + "files": [ |
4625 | + { |
4626 | + "checksum": "9ab", |
4627 | + "order": 1, |
4628 | + "path": "/9/a/b.txt", |
4629 | + "signature": "/9/a/b.txt.asc", |
4630 | + "size": 104857600 |
4631 | + }, |
4632 | + { |
4633 | + "checksum": "fed", |
4634 | + "order": 1, |
4635 | + "path": "/f/e/d.txt", |
4636 | + "signature": "/f/e/d.txt.asc", |
4637 | + "size": 104857600 |
4638 | + }, |
4639 | + { |
4640 | + "checksum": "edc", |
4641 | + "order": 1, |
4642 | + "path": "/e/d/c.txt", |
4643 | + "signature": "/e/d/c.txt.asc", |
4644 | + "size": 209715200 |
4645 | + |
4646 | + } |
4647 | + ], |
4648 | + "type": "delta", |
4649 | + "version": 304 |
4650 | + }, |
4651 | + |
4652 | + { |
4653 | + "description": "Full C", |
4654 | + "files": [ |
4655 | + { |
4656 | + "checksum": "dcb", |
4657 | + "order": 1, |
4658 | + "path": "/d/c/b.txt", |
4659 | + "signature": "/d/c/b.txt.asc", |
4660 | + "size": 104857600 |
4661 | + }, |
4662 | + { |
4663 | + "checksum": "cba", |
4664 | + "order": 1, |
4665 | + "path": "/c/b/a.txt", |
4666 | + "signature": "/c/b/a.txt.asc", |
4667 | + "size": 104857600 |
4668 | + }, |
4669 | + { |
4670 | + "checksum": "ba9", |
4671 | + "order": 1, |
4672 | + "path": "/b/a/9.txt", |
4673 | + "signature": "/b/a/9.txt.asc", |
4674 | + "size": 104857600 |
4675 | + } |
4676 | + ], |
4677 | + "type": "full", |
4678 | + "version": 100 |
4679 | + }, |
4680 | + { |
4681 | + "base": 100, |
4682 | + "description": "Delta C.1", |
4683 | + "files": [ |
4684 | + { |
4685 | + "checksum": "a98", |
4686 | + "order": 1, |
4687 | + "path": "/a/9/8.txt", |
4688 | + "signature": "/a/9/8.txt.asc", |
4689 | + "size": 104857600 |
4690 | + }, |
4691 | + { |
4692 | + "checksum": "987", |
4693 | + "order": 1, |
4694 | + "path": "/9/8/7.txt", |
4695 | + "signature": "/9/8/7.txt.asc", |
4696 | + "size": 104857600 |
4697 | + }, |
4698 | + { |
4699 | + "checksum": "876", |
4700 | + "order": 1, |
4701 | + "path": "/8/7/6.txt", |
4702 | + "signature": "/8/7/6.txt.asc", |
4703 | + "size": 838860800 |
4704 | + |
4705 | + } |
4706 | + ], |
4707 | + "type": "delta", |
4708 | + "version": 303 |
4709 | + } |
4710 | + ] |
4711 | +} |
4712 | |
4713 | === added file 'systemimage/tests/data/state.index_02.json' |
4714 | --- systemimage/tests/data/state.index_02.json 1970-01-01 00:00:00 +0000 |
4715 | +++ systemimage/tests/data/state.index_02.json 2015-01-15 22:43:25 +0000 |
4716 | @@ -0,0 +1,245 @@ |
4717 | +{ |
4718 | + "global": { |
4719 | + "generated_at": "Mon Apr 29 18:45:27 UTC 2013" |
4720 | + }, |
4721 | + "images": [ |
4722 | + { |
4723 | + "bootme": true, |
4724 | + "description": "Full A", |
4725 | + "files": [ |
4726 | + { |
4727 | + "checksum": "abc", |
4728 | + "order": 1, |
4729 | + "path": "/a/b/c.txt", |
4730 | + "signature": "/a/b/c.txt.asc", |
4731 | + "size": 104857600 |
4732 | + |
4733 | + }, |
4734 | + { |
4735 | + "checksum": "bcd", |
4736 | + "order": 1, |
4737 | + "path": "/b/c/d.txt", |
4738 | + "signature": "/b/c/d.txt.asc", |
4739 | + "size": 104857600 |
4740 | + }, |
4741 | + { |
4742 | + "checksum": "cde", |
4743 | + "order": 1, |
4744 | + "path": "/c/d/e.txt", |
4745 | + "signature": "/c/d/e.txt.asc", |
4746 | + "size": 104857600 |
4747 | + } |
4748 | + ], |
4749 | + "type": "full", |
4750 | + "version": 300 |
4751 | + }, |
4752 | + { |
4753 | + "base": 300, |
4754 | + "bootme": true, |
4755 | + "description": "Delta A.1", |
4756 | + "files": [ |
4757 | + { |
4758 | + "checksum": "def", |
4759 | + "order": 1, |
4760 | + "path": "/d/e/f.txt", |
4761 | + "signature": "/d/e/f.txt.asc", |
4762 | + "size": 104857600 |
4763 | + }, |
4764 | + { |
4765 | + "checksum": "ef0", |
4766 | + "order": 1, |
4767 | + "path": "/e/f/0.txt", |
4768 | + "signature": "/e/f/0.txt.asc", |
4769 | + "size": 104857600 |
4770 | + }, |
4771 | + { |
4772 | + "checksum": "f01", |
4773 | + "order": 1, |
4774 | + "path": "/f/e/1.txt", |
4775 | + "signature": "/f/e/1.txt.asc", |
4776 | + "size": 104857600 |
4777 | + } |
4778 | + ], |
4779 | + "type": "delta", |
4780 | + "version": 301 |
4781 | + }, |
4782 | + { |
4783 | + "base": 301, |
4784 | + "bootme": true, |
4785 | + "description": "Delta A.2", |
4786 | + "files": [ |
4787 | + { |
4788 | + "checksum": "012", |
4789 | + "order": 1, |
4790 | + "path": "/0/1/2.txt", |
4791 | + "signature": "/0/1/2.txt.asc", |
4792 | + "size": 104857600 |
4793 | + }, |
4794 | + { |
4795 | + "checksum": "123", |
4796 | + "order": 1, |
4797 | + "path": "/1/2/3.txt", |
4798 | + "signature": "/1/2/3.txt.asc", |
4799 | + "size": 104857600 |
4800 | + }, |
4801 | + { |
4802 | + "checksum": "234", |
4803 | + "order": 1, |
4804 | + "path": "/2/3/4.txt", |
4805 | + "signature": "/2/3/4.txt.asc", |
4806 | + "size": 104857600 |
4807 | + } |
4808 | + ], |
4809 | + "type": "delta", |
4810 | + "version": 304 |
4811 | + }, |
4812 | + |
4813 | + { |
4814 | + "description": "Full B", |
4815 | + "files": [ |
4816 | + { |
4817 | + "checksum": "345", |
4818 | + "order": 1, |
4819 | + "path": "/3/4/5.txt", |
4820 | + "signature": "/3/4/5.txt.asc", |
4821 | + "size": 104857600 |
4822 | + }, |
4823 | + { |
4824 | + "checksum": "456", |
4825 | + "order": 1, |
4826 | + "path": "/4/5/6.txt", |
4827 | + "signature": "/4/5/6.txt.asc", |
4828 | + "size": 104857600 |
4829 | + }, |
4830 | + { |
4831 | + "checksum": "567", |
4832 | + "order": 1, |
4833 | + "path": "/5/6/7.txt", |
4834 | + "signature": "/5/6/7.txt.asc", |
4835 | + "size": 104857600 |
4836 | + } |
4837 | + ], |
4838 | + "type": "full", |
4839 | + "version": 200 |
4840 | + }, |
4841 | + { |
4842 | + "base": 200, |
4843 | + "description": "Delta B.1", |
4844 | + "files": [ |
4845 | + { |
4846 | + "checksum": "678", |
4847 | + "order": 1, |
4848 | + "path": "/6/7/8.txt", |
4849 | + "signature": "/6/7/8.txt.asc", |
4850 | + "size": 104857600 |
4851 | + }, |
4852 | + { |
4853 | + "checksum": "789", |
4854 | + "order": 1, |
4855 | + "path": "/7/8/9.txt", |
4856 | + "signature": "/7/8/9.txt.asc", |
4857 | + "size": 104857600 |
4858 | + }, |
4859 | + { |
4860 | + "checksum": "89a", |
4861 | + "order": 1, |
4862 | + "path": "/8/9/a.txt", |
4863 | + "signature": "/8/9/a.txt.asc", |
4864 | + "size": 104857600 |
4865 | + } |
4866 | + ], |
4867 | + "type": "delta", |
4868 | + "version": 201 |
4869 | + }, |
4870 | + { |
4871 | + "base": 201, |
4872 | + "description": "Delta B.2", |
4873 | + "files": [ |
4874 | + { |
4875 | + "checksum": "9ab", |
4876 | + "order": 1, |
4877 | + "path": "/9/a/b.txt", |
4878 | + "signature": "/9/a/b.txt.asc", |
4879 | + "size": 104857600 |
4880 | + }, |
4881 | + { |
4882 | + "checksum": "fed", |
4883 | + "order": 1, |
4884 | + "path": "/f/e/d.txt", |
4885 | + "signature": "/f/e/d.txt.asc", |
4886 | + "size": 104857600 |
4887 | + }, |
4888 | + { |
4889 | + "checksum": "edc", |
4890 | + "order": 1, |
4891 | + "path": "/e/d/c.txt", |
4892 | + "signature": "/e/d/c.txt.asc", |
4893 | + "size": 209715200 |
4894 | + |
4895 | + } |
4896 | + ], |
4897 | + "type": "delta", |
4898 | + "version": 304, |
4899 | + "phased-percentage": 0 |
4900 | + }, |
4901 | + |
4902 | + { |
4903 | + "description": "Full C", |
4904 | + "files": [ |
4905 | + { |
4906 | + "checksum": "dcb", |
4907 | + "order": 1, |
4908 | + "path": "/d/c/b.txt", |
4909 | + "signature": "/d/c/b.txt.asc", |
4910 | + "size": 104857600 |
4911 | + }, |
4912 | + { |
4913 | + "checksum": "cba", |
4914 | + "order": 1, |
4915 | + "path": "/c/b/a.txt", |
4916 | + "signature": "/c/b/a.txt.asc", |
4917 | + "size": 104857600 |
4918 | + }, |
4919 | + { |
4920 | + "checksum": "ba9", |
4921 | + "order": 1, |
4922 | + "path": "/b/a/9.txt", |
4923 | + "signature": "/b/a/9.txt.asc", |
4924 | + "size": 104857600 |
4925 | + } |
4926 | + ], |
4927 | + "type": "full", |
4928 | + "version": 100 |
4929 | + }, |
4930 | + { |
4931 | + "base": 100, |
4932 | + "description": "Delta C.1", |
4933 | + "files": [ |
4934 | + { |
4935 | + "checksum": "a98", |
4936 | + "order": 1, |
4937 | + "path": "/a/9/8.txt", |
4938 | + "signature": "/a/9/8.txt.asc", |
4939 | + "size": 104857600 |
4940 | + }, |
4941 | + { |
4942 | + "checksum": "987", |
4943 | + "order": 1, |
4944 | + "path": "/9/8/7.txt", |
4945 | + "signature": "/9/8/7.txt.asc", |
4946 | + "size": 104857600 |
4947 | + }, |
4948 | + { |
4949 | + "checksum": "876", |
4950 | + "order": 1, |
4951 | + "path": "/8/7/6.txt", |
4952 | + "signature": "/8/7/6.txt.asc", |
4953 | + "size": 838860800 |
4954 | + |
4955 | + } |
4956 | + ], |
4957 | + "type": "delta", |
4958 | + "version": 303 |
4959 | + } |
4960 | + ] |
4961 | +} |
4962 | |
4963 | === added file 'systemimage/tests/data/state.index_03.json' |
4964 | --- systemimage/tests/data/state.index_03.json 1970-01-01 00:00:00 +0000 |
4965 | +++ systemimage/tests/data/state.index_03.json 2015-01-15 22:43:25 +0000 |
4966 | @@ -0,0 +1,36 @@ |
4967 | +{ |
4968 | + "global": { |
4969 | + "generated_at": "Thu Aug 01 08:01:00 UTC 2013" |
4970 | + }, |
4971 | + "images": [ |
4972 | + { |
4973 | + "description": "Full", |
4974 | + "files": [ |
4975 | + { |
4976 | + "checksum": "da70dfa4d9f95ac979f921e8e623358236313f334afcd06cddf8a5621cf6a1e9", |
4977 | + "order": 3, |
4978 | + "path": "/3/4/5.txt", |
4979 | + "signature": "/3/4/5.txt.asc", |
4980 | + "size": 104857600 |
4981 | + }, |
4982 | + { |
4983 | + "checksum": "b3a8e0e1f9ab1bfe3a36f231f676f78bb30a519d2b21e6c530c0eee8ebb4a5d0", |
4984 | + "order": 1, |
4985 | + "path": "/4/5/6.txt", |
4986 | + "signature": "/4/5/6.txt.asc", |
4987 | + "size": 104857600 |
4988 | + }, |
4989 | + { |
4990 | + "checksum": "97a6d21df7c51e8289ac1a8c026aaac143e15aa1957f54f42e30d8f8a85c3a55", |
4991 | + "order": 2, |
4992 | + "path": "/5/6/7.txt", |
4993 | + "signature": "/5/6/7.txt.asc", |
4994 | + "size": 104857600 |
4995 | + } |
4996 | + ], |
4997 | + "type": "full", |
4998 | + "version": 1600, |
4999 | + "bootme": true |
5000 | + } |
The diff has been truncated for viewing.