Merge lp:~aacid/system-image-client/doc into lp:system-image-client

Proposed by Albert Astals Cid
Status: Merged
Approved by: Ted Gould
Approved revision: 72
Merged at revision: 78
Proposed branch: lp:~aacid/system-image-client/doc
Merge into: lp:system-image-client
Prerequisite: lp:~aacid/system-image-client/mandatory_update_fix
Diff against target: 191 lines (+167/-0)
4 files modified
documentation/creating_images (+21/-0)
documentation/creating_index_file (+90/-0)
documentation/running_client (+31/-0)
documentation/target_set_up (+25/-0)
To merge this branch: bzr merge lp:~aacid/system-image-client/doc
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
jenkins (community) continuous-integration Approve
Review via email: mp+116310@code.launchpad.net

This proposal supersedes a proposal from 2012-07-23.

Commit message

Fix updating to non final mandatory versions

E.g. you are in version 1, version 2 is mandatory and version 3 recommended, you should get an update to version 2

Description of the change

Some documentation, i'm open to any kind of comment on how to improve

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'documentation'
2=== added file 'documentation/creating_images'
3--- documentation/creating_images 1970-01-01 00:00:00 +0000
4+++ documentation/creating_images 2012-07-23 15:35:22 +0000
5@@ -0,0 +1,21 @@
6+
7+This file explains how to create images for consumption of system-image-client
8+
9+Creating images for system-image-client is fairly easy:
10+ * First you have to dump the contents of the filesystem you want to use for your image with dd. Make
11+ sure the filesystem is not mounted so that you capture it in a consistent state
12+ * Second you have to compress it with xz
13+ * Third
14+ * If you want to create a a raw image, you are done
15+ * If you want to create a signed image, run it through gpg -s
16+ with a signing key whose public key will be in the target system
17+ * If you want to create an encrypted+signed image, run it through gpg -s -e
18+ with a signing key whose public key will be in the target system
19+ with a encryption key whose private key will be in the target system (and has no passphrase)
20+
21+Once you have finished those steps you will have you an image that system-image-client can use.
22+
23+** Notes **
24+ * If the filesystem you are copying has UUID (like ext2/3/4) make sure each of the images has a different UUID
25+ otherwise you will end up confusing the system because the target system will end up with two different
26+ partitions that have the same UUID
27\ No newline at end of file
28
29=== added file 'documentation/creating_index_file'
30--- documentation/creating_index_file 1970-01-01 00:00:00 +0000
31+++ documentation/creating_index_file 2012-07-23 15:35:22 +0000
32@@ -0,0 +1,90 @@
33+
34+This file explains the syntax of the index file used by the system-image-client.
35+
36+* The file will be a plain text file encoded in UTF-8
37+* Lines are delimited by \n
38+*The first line will be the version of the specification. This allows future changes in the spec
39+1.0
40+
41+* After that there will be an empty line and the list of images available, each image will be of the format
42+name: string
43+filename: string
44+model: string
45+version: integer
46+type: string
47+size: integer
48+hash_type: string
49+hash: string
50+security: string
51+changelog_security: string
52+
53+ The name field is a potentially user visible text that describes the name of the update e.g. "Precise Pangolin update for Canonical Phone X3 and X5"
54+ The filename field contains the filename of the image that contains the update. The file will be in the same folder the index file is
55+ The model field is non user visible text that defines the internal model that this image should be applied to, e.g. "GT-I9100" instead of "Samsung Galaxy SII".
56+ This string will be matched against the internal configuration of the device to decide if this image is appliable or not to the device.
57+ There can be multiple model: lines if a given image applies to more than one model e.g. the image applies for phones X3 and X5
58+ The version field is a non user visible number that starts at 1 and increases with each new version for that model. Given two images for the same model, the one with higher version number is the one that shall be installed
59+ The type field defines which kind of update is there in this image, valid values for this field are
60+ "mandatory" Mandatory update
61+ "recommended" Recommended update (not mandatory but the user will get a notification that there is a new update available that he might want to install)
62+ "nonrecommended" Non Recommended update (not mandatory, not notified to the user, only discoverable if the user actively goes to see if there are new updates)
63+ The size field contains the size in bytes of the image
64+ The hash_type field defines how the contents of the hash field were calculated. Valid values are
65+ "none"
66+ "md5"
67+ "sha1"
68+ The hash field contains the result of hashing the file specified by the filename field using the hash_type algorithm. The result is in hexadecimal format with the alphabetic letters in lowercase. The field may be missing if hash_type is 0
69+ The security field defines if the image file is raw, signed or encrypted+signedValid values are:
70+ "raw"
71+ "signed"
72+ "encryptedsigned"
73+ The changelog_security field defines if the changelog file is raw, signed or encrypted+signedValid values are:
74+ "raw"
75+ "signed"
76+ "encryptedsigned"
77+
78+ The fields must be in that order.
79+ Each image will have an empty line separating it to the next one. The last image has no empty line after it.
80+
81+
82+** Schema of the specification **
83+CAPITAL words are substituted by their definition
84+FILE represents the contents of the file
85+strings between '' represent real textual representation
86+The + qualifier means that there can be one or more appearances of the element. The appearances are put in the next line, not in the same one
87+
88+FILE:
89+VERSION
90+IMAGESLIST
91+
92+VERSION:
93+''1.0''
94+
95+IMAGESLIST:
96+IMAGE+
97+
98+IMAGE:
99+emptyspace
100+''name:'' string
101+''filename:'' string
102+MODELS
103+''version:'' integer
104+''type:'' [''mandatory''|''recommended''|''nonrecommended'']
105+''size:'' integer
106+''hash_type:'' [''none''|''md5''|''sha1'']
107+HASH?
108+security: [''raw''|''signed''|''encryptedsigned'']
109+changelog_security: [''raw''|''signed''|''encryptedsigned'']
110+
111+MODELS:
112+MODEL+
113+
114+MODEL:
115+''model:'' string
116+
117+HASH:
118+''hash:'' string
119+
120+
121+** Appearance in the server **
122+The file has to be named "index" and has to be compressed with xz and then signed with gpg
123\ No newline at end of file
124
125=== added file 'documentation/running_client'
126--- documentation/running_client 1970-01-01 00:00:00 +0000
127+++ documentation/running_client 2012-07-23 15:35:22 +0000
128@@ -0,0 +1,31 @@
129+
130+This assumes you have your system correctly set up, if not, read the target_set_up file
131+
132+The system-image-client binary has different ways of working:
133+ * Update to newest mandatoryversion for the current model
134+ * Update to a given version for the current model
135+ * Update from a given file in disk
136+ * List the available images for the current model
137+
138+** Update to newest mandatory version for the current model **
139+This is the default way of working of the system-image-client, what it does
140+is download the index file, look in it the highest mandatory image version for the
141+current model and update to it if it is bigger than the current one.
142+
143+
144+** Update to a given version for the current model **
145+This is activated by the --version command line switch.
146+The system-image-client will download the index file, look for the given version
147+in it and install it if found.
148+
149+
150+** Update from a given file in disk **
151+This is activated by the --image command line switch.
152+The system-image-client will skip the index file and will install
153+the image given in the path.
154+
155+
156+** List the available images for the current model **
157+This is activated by the --list-versions command line switch.
158+The system-image-client will download the index file and broadcast both by
159+dbus and on the command line the different images available for the current model
160\ No newline at end of file
161
162=== added file 'documentation/target_set_up'
163--- documentation/target_set_up 1970-01-01 00:00:00 +0000
164+++ documentation/target_set_up 2012-07-23 15:35:22 +0000
165@@ -0,0 +1,25 @@
166+This document explains how to set up a target system for system-image-client usage from scratch.
167+
168+The first thing you have to do is creating the configuration file.
169+This file resides in /etc/system-image-client.conf and is composed of four parameters:
170+ * indexRootLocation: where the index of images is located
171+ * model: the model the current machine
172+ * currentImageVersion: the current version of the image running in this machine
173+ * systemPartitions the system partitions that are to be used for writting images separated by :
174+
175+Example:
176+indexRootLocation=http://192.168.0.193/
177+model=cp001
178+currentImageVersion=1
179+systemPartitions=/dev/sda1:/dev/sda3
180+
181+After creating the configuration file you need to setup the keyring and trustdb for gpg, there you have to store
182+all the keys used for signing the index and images. The files are located at /etc/system-image-client-keyring.gpg
183+and /etc/system-image-client-trustdb.gpg respectively
184+
185+Example on how to create the files:
186+sudo gpg --primary-keyring /etc/system-image-client-keyring.gpg --no-default-keyring --import /path/to/my/public/key/file
187+sudo bash -c 'echo "LONGKEYID:6:" | gpg --primary-keyring /etc/system-image-client-keyring.gpg --no-default-keyring --trustdb-name /etc/system-image-client-trustdb.gpg --import-ownertrust -'
188+where LONGKEYID is something like 7623CDE5F6F95EAF2A8CCA9E1C5EE43DEF34A467
189+
190+With this you are ready to run the system-image-client, read the running_client file for more information
191\ No newline at end of file

Subscribers

People subscribed via source and target branches