summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leakHEADmasterSamuli Piippo2020-04-271-1/+1
| | | | | | Fixes: QTBUG-83270 Change-Id: Iec28f7cbcfa0eccfdf25d96d80942e594a5c159f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Add README with a link to the latest documentationGatis Paeglis2017-08-251-0/+1
| | | | | Change-Id: I1ec7ce35bdda6419e425959b1452ec6b78a9c5dc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add CONSTANT to bootedRevision, bootedMetadata and otaEnabled propertiesErik Larsson2017-02-081-3/+3
| | | | | | | | | | The above three properties are set on the QtOtaClient and can not be changes unless the application is restarted. By adding CONSTANT the QML-engine will not warn about "depends on non-NOTIFYable properties" when using these properties in bindings. Change-Id: I1fcabc27ca2a1de33ba97238bfd8bdea285aa478 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Do not use PCH on qotaclientasync.cppErik Larsson2017-02-031-1/+3
| | | | | | | | | | | | | | | | | | | | qotaclientasync.cpp includes ostree.h which includes headers from glib2. These headers also defines signals which generated compile errors due to Qt:s signals definition. One solution on this problem is to include the ostree headers before including Qt-header files. But when using pre-compiled headers qmake will automatically generate PCH for the modules dependencies, in this case QtCore. The PCH are included using the -include argument in gcc which includes the PCH just as doing a #include on the first line in the source file. This means that when using PCH we will include QtCore, which will include qobjectdefs.h, before ostree.h By adding qotaclientasync.cpp to NO_PCH_SOURCES instead of the "normal" SOURCES we tell qmake to not use PCH for that specific file. Change-Id: Ideb1c6aaa98905d7f516761087b7a67bb1e3f402 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Keep qml and cpp docs in the same fileGatis Paeglis2017-01-103-525/+512
| | | | | | | | | | | Having qml docs in its own file is troublesome to maintain and easy to get out of sync with the c++ counterpart. And make the documentation release ready. Change-Id: Ifc59b9a2a09a72663302975c017f6c0bef4f1062 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* update device integration README fileGatis Paeglis2017-01-051-8/+3
| | | | | | | | The 'bootdir' now ends with '/'. Update code snippets to reflect that. Change-Id: Ia0d0ca50bc55472573dc4593c76911a8b9b91b38 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* doc: improve several sectionsGatis Paeglis2017-01-055-69/+69
| | | | | Change-Id: Idfccb574f67b7bdef45bbd88fed62fe865d1fdfb Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Remove the remaining traces of System V supportGatis Paeglis2017-01-055-115/+12
| | | | | | | | | | | | | | | | Support for System V was dropped a while back for the following reasons: - b2qt images have switched to systemd by default, therefore System V code path is untested and can't be officially supported. - supporting anyting else than systemd is not a high priority (if somebody really wants to use some other init system, that can be done with little extra effort). Change-Id: I33295d85ff72af232bf431989b5244f15b62747a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Expose default revision and metadataGatis Paeglis2017-01-057-27/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default system is the system that is scheduled to be booted into during the next system startup. With the previous 3 metadata versions it was possible to rotate to a state where we can't access and present to the user what currently is scheduled for the next system boot: Booted : b Remote : b Rollback: a call ::rollback() => [ a -> b ] Booted : b Remote : b Rollback : b Now if we want to present a message box to a user when the system shutdown has been initiated, we don't know what the system will boot into. This of course could be worked around by saving a state in user application, but the better solution is to expose default revision. With this API, the previous example after the rollback will contain: Booted : b Remote : b Rollback : b Default : a Change-Id: Id123ed8ef76f0284a02899daf22aef0716c78e4e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use QString as return type in metadata accessorsGatis Paeglis2016-12-216-42/+39
| | | | | | | .. as this results in a better API at the QML side. Change-Id: I28e4e2b0f5dea278f5185699234400c67a376359 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove impractical API from QOtaClientGatis Paeglis2016-12-218-199/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | These convenience methods do not provide any real convenience after all. This API is not practical and extenting it would be pain (each new json property would require a new accessor method for each *Metadata version). The reduced subset of API is still sufficient to be used in property bindings: Label { text: extractVersion(OtaClient.remoteMetadata, "version") } Label { text: extractVersion(OtaClient.remoteMetadata, "description") } Where extractVersion() parses JSON metadata. If the metadata file is huge (parsing takes long time), API users can subscribe to onRemoteMetadataChanage: onRemoteMetadataChanged: { // parse the whole metadata file only once and set // appropriate properties. } Change-Id: If095e8c17712fa7b06bd577364ec10ae6ca6d52e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Rename info -> metadataGatis Paeglis2016-12-219-159/+159
| | | | | | | | | | Using "metadata" in this context fits better. The meaning behind "info" can be confusing and ambiguous. The 1.0 release is around the corner, rename now, before APIs are set in stone. Change-Id: Ia346b4037ae24cca378e522ffd55c68ac535bff7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Document an undocumented parameterGatis Paeglis2016-12-211-2/+3
| | | | | Change-Id: Iac4fed2dc7f0422424cfe06561239b60546198b1 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Make QOtaClient a singleton typeGatis Paeglis2016-12-214-13/+25
| | | | | | | | | Having a several instances of this type does not make sense. This also is more consistent with the QML API where OtaClient is a singleton type. Change-Id: I11b704691f6e08730eb898520eeaa383e8549275 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Be const-correct from outside-in, not inside-outGatis Paeglis2016-12-162-13/+13
| | | | | | | https://isocpp.org/wiki/faq/const-correctness#logical-vs-physical-state Change-Id: Ibf514c432fa330bee755cf3b0dcc002863821ec5 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add support for multi-process usecaseGatis Paeglis2016-12-169-189/+324
| | | | | Change-Id: I16d308e9c86d580d9eccc37cd75034fc03f0c168 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Imorove API for checking if config is setGatis Paeglis2016-12-166-34/+19
| | | | | Change-Id: Ie9d9880e92bf125b06745d222f105bacd8a445a6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Simplify metadata retrieval for revisionGatis Paeglis2016-12-164-115/+19
| | | | | | | | | | | Don't special case reading a metadata for the booted sysroot. We can use revision to extract this data from the repo, as we already do for remote and rollback metadata. Also get rid of unnecessary indirection and enum. Change-Id: Ic6ad4f0c6b5ca9ddda34bee50674e7f37af8f99a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Remove process locking and refactor singal handlingGatis Paeglis2016-12-167-138/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) refactor signal handling for tracking default revision in its own signal. This allows to remove an unnecessary indirection and helps to improve revision-change-handling when the deployment list has changed. 2) remove multi-process locking.. .. as it was based on incorrect assumptions on how concurrency is handled by OSTree. OSTree has API to lock the sysroot, but not the repository itself. As we can not lock the repo and writes to the repo are atomic, reading from the repo in general is safe. Except when the data has been read, there is no guarantee that the data won't disapear under us (because some other process has done repo pruning). Concurrent writing to the repo is handled by OSTree. When we deploy new sysroot version via "ostree deploy", it locks the sysroot with the sysroot locking API, so we don't need to do any additinal locking. Change-Id: Ide593f9bfbe93827093a6693eeb10cc3b315e000 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* API to verify whats inside the update packageGatis Paeglis2016-12-168-134/+186
| | | | | | | | | | Now it is possible to update the local repository metadata without deploying the update package. This is useful for displaying the update's metadata to the users, before doing that actual deployment. Change-Id: I902e9505391f0fa58e71c8c6ce2ddde6fe367c59 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Doc: Fix QHP (offline docs) table of contentsTopi Reinio2016-12-131-3/+15
| | | | | | | | | | Project name was incorrect, leading to invalid entries in the TOC of the generated offline documentation. Also, add TOC subsections for C++ and QML type documentation. Change-Id: Ibcb9b596d0708f422d9d6e638668f9801ace27e4 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Doc: Fix QHP project naming and index titleTopi Reinio2016-12-011-5/+5
| | | | | Change-Id: I1b461271c09efa22664115ecf30ddfeabf6f2ac6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Doc: Use 'qtota' namespace for the landing page html fileTopi Reinio2016-11-301-1/+1
| | | | | | | | | | | | This has two positive side-effects: the online sidebar will be displayed correctly, and qdoc will also generate a table of contents out of subsection titles. Online documentation will still need index.html to exist, but the publishing mechanism will handle this. Change-Id: Id82878087b2c627c7a950b9c4212f3d1431fdfea Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* doc: link to corresponding client side APIsGatis Paeglis2016-11-291-10/+14
| | | | | | | .. and other minor rewording. Change-Id: I90368f79270bfbf6b2cf5edca6816c3e19ddcaea Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use consistent timestamp in u-boot headerGatis Paeglis2016-11-292-2/+5
| | | | | Change-Id: I65fb1c9ecefca621f074d838d5f0ada3fdcb4bba Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add support for self-contained update packagesGatis Paeglis2016-11-2911-15/+306
| | | | | | Task-number: QTBUG-54500 Change-Id: Ia735e85c0c92cbbebd0098b9021ff7d04b3e246b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Always create the kargs fileGatis Paeglis2016-11-171-1/+2
| | | | | | | | This file was not created when --kernel-args is not used. The Qt OTA API expects to find this file. Change-Id: I01c425a7ae342fac0741012d57ca5d4c8da9464f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add link to source code of the moduleGatis Paeglis2016-11-111-7/+8
| | | | | Change-Id: I7d59469fad277c1a05a53fe9c9852f5de0660895 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Doc: Add Part 3 of the blog post seriesGatis Paeglis2016-11-111-3/+5
| | | | | Change-Id: I7189e3dc1cc004a34a3c3d81a4c63ddff2ce5a00 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Don't log all message types by defaultGatis Paeglis2016-11-071-1/+1
| | | | | Change-Id: I8abcf15d54a89746aa56ba464aabf79101bb6f9b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* demo: don't explicitly call updateConfigViewGatis Paeglis2016-11-071-7/+8
| | | | | | | .. when it will be handled in onRepositoryConfigChanged. Change-Id: Id8b0ed384a9e6632d53324ffb2bfdfb95bb8c2c7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* check if paths exist in repo configurationsGatis Paeglis2016-11-072-3/+26
| | | | | | | | | | ostree command line happily accepts paths that do not exist when setting tls-client-* and tls-ca-path. Due to this, requests to HTTP server (ostree pull ..) never return/timeout. Change-Id: I63bd4307cd5636f407742ccfd3342cb23a0704da Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add QOtaClient::repositoryConfigsEqualGatis Paeglis2016-11-046-9/+79
| | | | | | | | .. and add an option in the demo for toggling between basic/secure repository configs. Change-Id: I4583c421f8ac28628681c5b8dfd432e2f8693ad5 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add the missing QT_{BEGIN,END}_NAMESPACE macrosGatis Paeglis2016-11-045-2/+18
| | | | | Change-Id: Ic3d8cb21d253ac574709e862225c246b539d059d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* demo: List all top-level fields of system metadataGatis Paeglis2016-11-041-23/+42
| | | | | Change-Id: I42f9b6786138be29a0fdb5d77877218033062efc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* fixup: build_ostree.sh: use the same SHA as yocto recipeGatis Paeglis2016-11-021-76/+0
| | | | | Change-Id: I42f959480db20eaf9547c67693439ada23f44e47 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* build_ostree.sh: use the same SHA as yocto recipeGatis Paeglis2016-11-021-2/+2
| | | | | Change-Id: If0d6e33da0171c6ccb100e063766ade7b1d11c1a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* remove the fragile kernel version extractorGatis Paeglis2016-11-021-13/+20
| | | | | | | .. and replace it with a command line arg. Change-Id: Ida823f4649cfc50fc6680a55a395a95786344334 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* demo: improve UX on smaller screensGatis Paeglis2016-11-021-77/+88
| | | | | Change-Id: I77ea4316d5f64f3e0b7a50ac8ac812dce5af838e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Use the pre-defined QQmlExtensionInterface_iidGatis Paeglis2016-11-021-1/+1
| | | | | Change-Id: I77a3740a45cbead34d80ba097dcd43819fd3ab84 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Rename QOTAClient -> QOtaClientGatis Paeglis2016-11-028-233/+233
| | | | | | | .. Qt class naming convention. Change-Id: I5ce00450f724e56ed7d0b7402c2aab1e12677335 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Rename QtOTAUpdate -> QtOtaUpdateGatis Paeglis2016-11-029-14/+14
| | | | | | | To be consistent with other Qt libs/modules. Change-Id: Ia9334c96c4b0bafca9a5c3b0615cf8c325e55243 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Introduce QOtaRepositoryConfig classGatis Paeglis2016-11-0111-67/+772
| | | | | | | | for configuring access to remote ostree repositories. Change-Id: Ic44e9457daf2c7e2975ab81823a59357791a6fab Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Make QOTAClientAsync::ostree thread-safeGatis Paeglis2016-10-252-19/+11
| | | | | Change-Id: I14a195b57e4e997eb881d7eb70a72ef89c328cb6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* lib: Don't ignore the error arg from ostree_* APIGatis Paeglis2016-10-192-17/+53
| | | | | Change-Id: Idf0180205cca2a4c2c161289fed5ac94f3e72c3d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* lib: refactor resolving rollback indexGatis Paeglis2016-10-192-28/+11
| | | | | Change-Id: I4c8df1a2df518964a56228442badb1bd0e2eabe1 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* debug: use easier to read date formatGatis Paeglis2016-10-191-3/+3
| | | | | Change-Id: I02049ede2e996bfa331a55efc6988f0b269e6e5a Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* example: adapt to use the renamed APIGatis Paeglis2016-10-191-11/+11
| | | | | Change-Id: I83f12bcdd18f13b025a8c4dd2898d8a368316e9e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* API rename: ::server* -> ::remote*Gatis Paeglis2016-10-196-107/+107
| | | | | | | | | | These methods do not retrieve data about the server itself. Instead they present us with data of a remote rootfs snapshot that the server is hosting. Change-Id: If3102476121b204760880119231c1c95aacd729f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* API rename: ::client* -> ::booted*Gatis Paeglis2016-10-196-51/+51
| | | | | | | | The API documentation already reflected the real meaning. Change-Id: Ic2f042bb7c7368349adaf49e45e21c3c92c3866e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>