1 # Tools for managing widgets
3 This project includes tools for managing widgets.
6 - ***wgtpkg-info***: command line tool to display
7 informations about a widget file.
9 - ***wgtpkg-installer***: command line tool to
10 install a widget file.
12 - ***wgtpkg-pack***: command line tool to create
13 a widget file from a widget directory.
15 - ***wgtpkg-sign***: command line tool to add a signature
16 to a widget directory.
18 For all these commands, a tiny help is available with
19 options **-h** or **--help**.
21 There is no tool for unpacking a widget.
22 For doing such operation, you can use the command **unzip**.
24 To list the files of a widget:
30 To extract a widget in some directory:
33 unzip WIDGET -d DIRECTORY
36 *Note: that DIRECTORY will be created if needed*.
38 ## Getting data about a widget file
40 The command **wgtpkg-info** opens a widget file, reads its **config.xml**
41 file and displays its content in a human readable way.
43 ## Signing and packing widget
47 To sign a widget, you need a private key and its certificate.
49 The tool **wgtpkg-sign** creates or replace a signature file in
50 the directory of the widget BEFORE its packaging.
52 There are two types of signature files: author and distributor.
54 Example 1: add an author signature
57 wgtpkg-sign -a -k me.key.pem -c me.cert.pem DIRECTORY
60 Example 2: add a distributor signature
63 wgtpkg-sign -k authority.key.pem -c authority.cert.pem DIRECTORY
68 This operation can be done using the command **zip** but
69 we provide the tool **wgtpkg-pack** that may add checking.
74 wgtpkg-pack DIRECTORY -o file.wgt
79 ### App directory organization
81 There are few directories that are by default used in the binder. At the root
82 directory of the widget folder, here are the directories that could be used:
84 - *lib* : default directory where lies external libraries needed for
85 the binding. Binding could be stored here too or in another directory of your
87 - *htdocs* : root HTTP directory if binding has web UI.
89 ### The steps for writing a widget
91 1. make your application
92 1. create its configuration file **config.xml**
98 ## Organization of directory of applications
100 ### directory where are stored applications
102 Applications can be installed in different places:
104 - the system itself, extension device.
106 On a phone application are typically installed on the sd card.
110 - /usr/applications: system wide applications
111 - /opt/applications: removable applications
113 From here those paths are referenced as: "APPDIR".
115 The main path for applications is: APPDIR/PKGID/VER.
119 - APPDIR is as defined above
120 - PKGID is a directory whose name is the package identifier
121 - VER is the version of the package MAJOR.MINOR
123 This organization has the advantage to allow several versions
125 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
127 ### Identity of installed files
129 All files are installed as user "afm" and group "afm".
130 All files have rw(x) for user and r-(x) for group and others.
132 This allows every user to read every file.
134 ### labeling the directories of applications
136 The data of a user are in its directory and are labelled by the security-manager using the application labels.
138 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
139 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
140 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
141 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
142 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
143 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
144 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
145 [openssl]: https://www.openssl.org "OpenSSL"
146 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
147 [json-c]: https://github.com/json-c/json-c "JSON-c"
148 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
149 [libzip]: http://www.nih.at/libzip "libzip"
150 [cmake]: https://cmake.org "CMake"
151 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
152 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
153 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
154 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"