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