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 ### The steps for writing a widget
81 1. make your application
82 1. create its configuration file **config.xml**
88 ## Organization of directory of applications
90 ### directory where are stored applications
92 Applications can be installed in different places:
94 - the system itself, extension device.
96 On a phone application are typically installed on the sd card.
100 - /usr/applications: system wide applications
101 - /opt/applications: removable applications
103 From here those paths are referenced as: "APPDIR".
105 The main path for applications is: APPDIR/PKGID/VER.
109 - APPDIR is as defined above
110 - PKGID is a directory whose name is the package identifier
111 - VER is the version of the package MAJOR.MINOR
113 This organization has the advantage to allow several versions
115 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
117 ### Identity of installed files
119 All files are installed as user "afm" and group "afm".
120 All files have rw(x) for user and r-(x) for group and others.
122 This allows every user to read every file.
124 ### labeling the directories of applications
126 The data of a user are in its directory and are labelled by the security-manager using the application labels.
128 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
129 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
130 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
131 [meta-intel]: https://github.com/01org/meta-intel-iot-security "A collection of layers providing security technologies"
132 [widgets]: http://www.w3.org/TR/widgets "Packaged Web Apps"
133 [widgets-digsig]: http://www.w3.org/TR/widgets-digsig "XML Digital Signatures for Widgets"
134 [libxml2]: http://xmlsoft.org/html/index.html "libxml2"
135 [openssl]: https://www.openssl.org "OpenSSL"
136 [xmlsec]: https://www.aleksey.com/xmlsec "XMLSec"
137 [json-c]: https://github.com/json-c/json-c "JSON-c"
138 [d-bus]: http://www.freedesktop.org/wiki/Software/dbus "D-Bus"
139 [libzip]: http://www.nih.at/libzip "libzip"
140 [cmake]: https://cmake.org "CMake"
141 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
142 [app-manifest]: http://www.w3.org/TR/appmanifest "Web App Manifest"
143 [tizen-security]: https://wiki.tizen.org/wiki/Security "Tizen security home page"
144 [tizen-secu-3]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview "Tizen 3 security overview"