4 The widgets are described by the W3C's technical recommendations
5 [Packaged Web Apps (Widgets)][widgets] and [XML Digital Signatures for Widgets][widgets-digsig]
7 In summary, **widgets are ZIP files that can be signed and
8 whose content is described by the file <config.xml>**.
10 Tools for managing widgets
11 --------------------------
13 This project includes tools for managing widgets.
16 - ***wgtpkg-info***: command line tool to display
17 informations about a widget file.
19 - ***wgtpkg-installer***: command line tool to
20 install a widget file.
22 - ***wgtpkg-pack***: command line tool to create
23 a widget file from a widget directory.
25 - ***wgtpkg-sign***: command line tool to add a signature
26 to a widget directory.
28 For all these commands, a tiny help is available with
29 options **-h** or **--help**.
31 There is no tool for unpacking a widget. For doing such operation,
32 you can use the command **unzip**.
34 To list the files of a widget:
40 To extract a widget in some directory:
43 $ unzip WIDGET -d DIRECTORY
46 *Note that DIRECTORY will be created if needed*.
48 Getting data about a widget file
49 ---------------------------------
51 The command **wgtpkg-info** opens a widget file, reads its **config.xml**
52 file and displays its content in a human readable way.
54 Signing and packing widget
55 --------------------------
59 To sign a widget, you need a private key and its certificate.
61 The tool **wgtpkg-sign** creates or replace a signature file in
62 the directory of the widget BEFORE its packaging.
64 There are two types of signature files: author and distributor.
66 Example 1: add an author signature
69 $ wgtpkg-sign -a -k me.key.pem -c me.cert.pem DIRECTORY
72 Example 2: add a distributor signature
75 $ wgtpkg-sign -k authority.key.pem -c authority.cert.pem DIRECTORY
80 This operation can be done using the command **zip** but
81 we provide the tool **wgtpkg-pack** that may add checking.
85 $ wgtpkg-pack DIRECTORY -o file.wgt
90 ### The steps for writing a widget
92 1. make your application
94 2. create its configuration file **config.xml**
102 Organization of directory of applications
103 -----------------------------------------
105 ### directory where are stored applications
107 Applications can be installed in different places: the system itself, extension device.
108 On a phone application are typically installed on the sd card.
112 - /usr/applications: system wide applications
113 - /opt/applications: removable applications
115 From here those paths are referenced as: "APPDIR".
117 The main path for applications is: APPDIR/PKGID/VER.
121 - APPDIR is as defined above
122 - PKGID is a directory whose name is the package identifier
123 - VER is the version of the package MAJOR.MINOR
125 This organization has the advantage to allow several versions to leave together.
126 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
128 ### Identity of installed files
130 All files are installed as user "afm" and group "afm".
131 All files have rw(x) for user and r-(x) for group and others.
133 This allows every user to read every file.
135 ### labeling the directories of applications
137 The data of a user are in its directory and are labelled by the security-manager
138 using the labels of the application.
140 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
141 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
142 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
143 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
146 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
147 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
148 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
149 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
150 [openssl]: https://www.openssl.org "OpenSSL"
151 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
152 [json-c]: https://github.com/json-c/json-c "JSON-c"
153 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
154 [libzip]: http://www.nih.at/libzip "libzip"
155 [cmake]: https://cmake.org "CMake"
156 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
157 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
158 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
159 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"