summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* dbus: do not silently ignore invalid parametersHEADdevRobert Griebl6 days7-28/+122
| | | | | | | | | | | | | Requesting to stop an application with an unknown id would just result in the appman-controller exiting with code '0', instead of complaining. This patch fixes all those cases, where an invalid id parameter or even a missing installer sub-system would silently be accepted on a DBus call. Change-Id: I1ffc8cec970a79c23fde82c7523b2a69519a5583 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Better systemd integration: send ready/stopping notificationsRobert Griebl2025-07-307-9/+51
| | | | | | | | | | Systemd services of type "notify" are expected to send a READY=1 message when they have started up and STOPPING=1 when they are shutting down. Change-Id: I71afd37e6a863398a8249258c88dd3c222089c0b Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Fix (AM_TAGGED_)WAYLAND_DEBUG for goodRobert Griebl2025-07-241-20/+34
| | | | | | Change-Id: Ic4fba21cf58a95d15ebd986a4b97374da594fa28 Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Add identifiers to both the Runtime and Container objectsRobert Griebl2025-07-244-1/+46
| | | | | | | | | | | This makes it possible to detect the current runtime environment for an app at runtime. Also added the missing documentation for hasDebugWrapper Change-Id: If6646d4e5985c12e42cc8a9e769fa5b8d8745322 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Wayland: fix regression on WAYLAND_DEBUG not working at all anymoreRobert Griebl2025-07-211-3/+4
| | | | | | | | | Commit b932b2618a0912ffc92c6c3f9fc09e3116d37833 accidentally disabled all WAYLAND_DEBUG output, because we unset the env var too early. Change-Id: I71c191ef002a449cf032700228ae2519236927f3 Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Wayland: Make it possible to tag WAYLAND_DEBUG output with app idsRobert Griebl2025-07-173-26/+57
| | | | | | | | | | | | | | | This improves on 14986b7c2f700d15303c5ee425f98943b36f3d73, which was only tagging the server side in a nested compositor setup. With this patch you get the actual app-id instead of a generic 'QtAM' tag. You can explicitly enable it via: WAYLAND_DEBUG=1 # or =server AM_TAGGED_WAYLAND_DEBUG=1 Change-Id: I0da26b19819899eca16e605b54ea56529899fc15 Pick-to: 6.10 6.9 6.8 Reviewed-by: Bernd Weimer <[email protected]>
* Make the hardcoded shutdown timer configurableRobert Griebl2025-07-164-2/+10
| | | | | | | | | Replaced the hard-coded 5s shutdown timer with a user-configurable timeout via am-config.yaml. Change-Id: I357b95a3040a5d1632eca8c8c6ab60f5124789f2 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Do not crash on slow systems during shutdownRobert Griebl2025-07-162-5/+8
| | | | | | | | | | | | | | | | | | Squish will spin a local event loop in aboutToQuit(), which can lead to recursive call of aboutToQuit(), which then crashes in the Watchdog code. We try to mitigate this in two ways: 1) the Watchdog will only react to this signal once 2) the "hang detector" timer in the shutdown machinery will now directly call ::exit to avoid any recursion in Qt code Making the hardcoded timer configurable will be done in a separate commit, as this cannot be cleanly backported. Change-Id: Icd16d302510ed73ddc321fa9d877f315f927f854 Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* QNX8: disable the custom crash handlerRobert Griebl2025-07-151-0/+2
| | | | | | | | | | QNX8 has discontinued the bt_ functionality for backtraces. As long as libbacktrace is not supporting QNX8 directly though, we are disabling backtrace generation. Change-Id: I14cd55b6ddfcb47a3a56c24c8d758b3f3e33f204 Pick-to: 6.10 6.9 6.8 Reviewed-by: Bernd Weimer <[email protected]>
* Write the installation-report into its own folderDominik Holland2025-07-113-7/+40
| | | | | Change-Id: Ie31346041346cae368c9ce29977ed321e64d7cdc Reviewed-by: Robert Griebl <[email protected]>
* Move the temporary dir used for installations into the apps dirRobert Griebl2025-07-112-3/+4
| | | | | | | | When using extended security attributes, some may not survive the cross-filesystem move from /tmp to the final location. Change-Id: I2bacf844b56b6fa4f5bbc86b96a19bb5129ad09d Reviewed-by: Dominik Holland <[email protected]>
* Move info.yaml and appIcon during installation instead of copying itDominik Holland2025-07-111-2/+2
| | | | | | | This will preserve the extended attributes set on the files. Change-Id: I623f8b8494040cd6a9e18220b606bf340558006b Reviewed-by: Robert Griebl <[email protected]>
* packager: Add a new pre-package-command optionDominik Holland2025-07-115-5/+38
| | | | | | | | | | | | | | The pre-package-command can preprocess each file, before they are packaged. This is needed in order to write IMA file signature and make sure permission and ownership are correct. The CMake integration also got a new FAKEROOT option to run the packager with fakeroot, as some of those modifications need root priviledges. Change-Id: I883893a839a9c44163d604f1c614b8013c840b8c Reviewed-by: Robert Griebl <[email protected]>
* Add an option to package up and install extended file attributesRobert Griebl2025-07-1117-7/+2274
| | | | | | | | | | | | Just run the packager with the additonal option --include-extended-attributes As for libarchive: we have to switch from the plain "ustar" to the "restricted-pax" (aka "bsdtar") format, which is actually just "ustar" plus xattr support. Change-Id: I07f77abb491cbd515689c986c59253b4d0244555 Reviewed-by: Dominik Holland <[email protected]>
* Sudo: enforce singleton instantiation and cleanupRobert Griebl2025-07-119-25/+37
| | | | | | | | | | | | | We already have the fallback (non-root) implementation for Sudo, so it does make sense to always have a SudoClient instance available, which simplifies the code using it. This also made it possible to get rid of the magic removeRecursiveHelper function and call into SudoClient explicitly where needed. Change-Id: I48ad48edb35e5ddca2c8b171649d5d785e1b3f14 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* bubblewrap: Add support for cgroupsDominik Holland2025-07-112-3/+30
| | | | | Change-Id: I82110abd1fb459eacadec1e584a43fca8fee211b Reviewed-by: Robert Griebl <[email protected]>
* bubblewrap: Add support to parse environment filesDominik Holland2025-07-112-0/+50
| | | | | | | | Instead of specifying all needed environment variables directly in the yaml file, we now also support reading an environment file instead. Change-Id: I1d4564bb1625d0a31232ca78f004ebffca6237a8 Reviewed-by: Robert Griebl <[email protected]>
* Watchdog: fix thread handle for the main thread not being setRobert Griebl2025-07-071-0/+2
| | | | | | | | | | This piece of code should have been moved in the last refactoring, but it got lost instead. This resulted in the main thread crashing instead of being terminated cleanly by the watchdog. Change-Id: Ieae95fc8c341763aefb0d54cb77bac96c2fe1b2e Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Fix QUnifiedTimer private API change problemsZoltan Gera2025-06-305-5/+13
| | | | | | | | | Fix build after qtbase:a318e331f1387eb3c9d13be96c28619453a35571. Task-number: QTBUG-137919 Fixes: QTBUG-138107 Change-Id: Ib26423750eeedf0e4da288da9f5d28e6eca923a5 Reviewed-by: Robert Griebl <[email protected]>
* Fix cmake target detection for libwayland-serverRobert Griebl2025-06-121-3/+3
| | | | | | | | | | | | In case Wayland::Server has already been found as a target, the additional qt_find_package will throw an error due to target promotion. Also adding the lib to link twice doesn't do anything. Change-Id: Idaf1173033892cfb0d30519c0926724597b0f844 Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Use std::unique_ptr for openssl RAII trackingRobert Griebl2025-06-121-9/+9
| | | | | Change-Id: Idc15661153fe0f53f44f8bb0e5738753dedd4f18 Reviewed-by: Dominik Holland <[email protected]>
* bwrap: move the DBus and Wayland socket parsing to ContainerHelpersRobert Griebl2025-06-065-38/+74
| | | | | | | | | We had to bump the plugin iid for the stop() change, so now's the perfect time to extend the Helpers API. Change-Id: I3070bbb12c721027594d629311f67890c6924696 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Make WAYLAND_DEBUG=1 possible for nested compositor setupsRobert Griebl2025-06-063-1/+152
| | | | | | | | | | | | | | | Running a nested compositor and logging with WAYLAND_DEBUG=1 just creates a mess, as both the server and client side output is intermixed without any tagging. This patch will detect this situation and prefix all server side logs with <QtAM> to make them distinguishable. You can use https://github.com/rgriebl/wlanalyze to analyze these log files. Change-Id: I9e2a2883c71a91d1ac0b98b14b677de37fcfad06 Pick-to: 6.10 6.9 6.8 Reviewed-by: Bernd Weimer <[email protected]>
* macOS cleanup: handle all sysctl calls the same way consistentlyRobert Griebl2025-06-064-41/+31
| | | | | | Change-Id: I0bd8ca5145cd82e912e0e2971ea304bd0bc4b521 Pick-to: 6.10 Reviewed-by: Bernd Weimer <[email protected]>
* Make watchdog kills use a distinct Unix signal and ExitStatusRobert Griebl2025-06-0624-114/+230
| | | | | | | | | | | | | By raising an otherwise unused system signal (*), the System UI can now distinguish between crashes, forced kills from the sys-ui and also kills by the watchdog. (*) SIGSTKFLT on Linux x86 and ARM and SIGEMT on Linux MIPS, BSD and QNX. Change-Id: I5cdb9084c1f822c36d24cbb0905479e18a3f1b69 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* doc: Add missing documentation for ContainerHelperFunctionsRobert Griebl2025-06-062-1/+64
| | | | | | Change-Id: Ie6b870cc6cd530679cb8672506a510917aa53dac Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Use the incubator to load in-process QML applicationsRobert Griebl2025-06-052-61/+167
| | | | | | | | | | | | This helps with Qt's event loop being blocked when huge in-process applications are first loaded. (The incubator API has no way to be notified on completion, so we have to "poll" the status) Change-Id: I2272ab68830670df087b848c01c288d380b2189c Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Remove the long obsolete SoftwareContainers exampleRobert Griebl2025-06-051-2/+2
| | | | | | Change-Id: I4ec8eba083503f4318cc896f8e3f571f6234a2a3 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* CMake: Add PURL and CPE info to 3rd party attribution filesAlexandru Croitor2025-06-045-0/+18
| | | | | | | | | | | [ChangeLog][Third-Party Code] Added PURL and CPE information to the attribution files of 3rd party sources. Pick-to: 6.5 6.8 6.9 6.10 Fixes: QTBUG-137389 Task-number: QTBUG-129602 Change-Id: I9e98e649b482b7fd41c997730f48304f2b13b76d Reviewed-by: Joerg Bornemann <[email protected]>
* Fix regression in WindowItem.objectFollowsItemSizeRobert Griebl2025-06-042-5/+6
| | | | | | | | | | | | | | Introduced in commit 4e00df28c253f3a92cd4d17a464418261f54c602 This optimization strategy is still valid, but we didn't account for WindowItems that did not start life with a valid "window" property. The solution is to keep the "m_completed" flag in the WindowItem itself, and not in the volatile "m_impl" object. Change-Id: I20bcbecafc33260a95c116ba5074ed3dd1a7d052 Fixes: QTBUG-137056 Pick-to: 6.10 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Add configure option for bubblewrap containerSamuli Piippo2025-06-033-1/+9
| | | | | | | | | | Bubblewrap container has runtime dependency for bwrap, adding separate config for the feature lets us disable it if bwrap is not available. Task-number: QTBUG-136961 Pick-to: 6.10 6.9 6.8 Change-Id: I03c3ce4e351699bbeb6d08a002b36d774c1fa9b5 Reviewed-by: Robert Griebl <[email protected]>
* CMake: Do not exclude toolsMichal Klocek2025-05-231-12/+0
| | | | | | | | | | | | | | | | | | | | We need tools to run test on native windows arm. Till now the exclude prevented tools being cross-compiled, unlike desktop build which by calling qtam_internal_add_build_config which in turn called qt_internal_add_resource made required dependency to override exclusion. Note all test pass on test vm if appman-qmltestrunner is copied from build vm. Also there are no sbom issues on that particular build vm with this change. Amends e8a425e632229bb2c41a18e0be4e28f56d517ab8. Task-number: QTBUG-99702 Task-number: COIN-1211 Change-Id: I5a1fad1382d8764d69d8c72b895ef36f494569be Reviewed-by: Alexey Edelev <[email protected]>
* Mark security critical files according to QUIP 23Zoltan Gera2025-05-1529-1/+29
| | | | | | | Fixes: QTBUG-135747 Pick-to: 6.9 6.8 Change-Id: I3254d2607b6c80d3fec003263a91f0cee4dd69c6 Reviewed-by: Robert Griebl <[email protected]>
* Log the time spent in the qapp constructor via StartupTimerRobert Griebl2025-05-071-0/+2
| | | | | | | | This was already done for the system-ui, but not for the apps. Change-Id: Ida182a799007baacd5019d289e4d2bcbef16db4b Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Fix potential problems with GNOME platform theme loadingRobert Griebl2025-05-072-9/+9
| | | | | | | | | | | | | | When running the AM on the desktop, the apps "inherit" the current desktop setting (KDE, GNOME, etc.) and they will initialize the corresponding platform theme. This is unnecessary and it will also lead to problems, if that theme cannot initialize itself correctly: The GNOME theme for example sends out a sync dbus call that can never be replied to, because AM apps run on a separate session DBus. Change-Id: I73589b2c20aab4bdecdf561f5b3c0256d8a186ae Fixes: QTBUG-136234 Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Use QElapsedTimer::start instead of restartVolker Hilsheimer2025-04-182-2/+2
| | | | | | | | restart() becomes [[nodiscard]] in qtbase. Pick-to: 6.9 6.8 6.5 Change-Id: I133919d8fac4dcc908fa9416886d04e86a0879de Reviewed-by: Giuseppe D'Angelo <[email protected]>
* Update license checkLucie Gérard2025-03-2110-10/+10
| | | | | | | | | | | | | | The module is now: - checked against quip18 [1] rules (licenseRule.json) - reuse compliant (REUSE.toml) - ready for source SBOM check [1] https://contribute.qt-project.org/quips/18 Task-number: QTBUG-131434 Pick-to: 6.8 6.9 Change-Id: If6acf1a8d7ea20d9419f1a4a782b4ab2ae1b0c40 Reviewed-by: Joerg Bornemann <[email protected]>
* Fix race condition on IntentServerRequest address re-useRobert Griebl2025-03-171-12/+12
| | | | | | | | | | | The intent timeout lambdas have been capturing the IntentServerRequest by (pointer) value, but this address can be re-used by a later request and then the new request got timeout-cancelled when the timeout lambda finally triggerd. Change-Id: I9cdcb3d0283e39509c35a2313cbe347e8b5d75f4 Pick-to: 6.9 6.9.0 6.8 6.5 5.15 Reviewed-by: Dominik Holland <[email protected]>
* Convert warning to info messages on startupRobert Griebl2025-03-032-6/+6
| | | | | | | | | | These messages are not really warnings and might get users into thinking the AM isn't working correctly. Change-Id: Ic93a9ab37bda59ab8bff9fe2b43bb4095e6dcdfe Fixes: QTBUG-134214 Pick-to: 6.9 6.9.0 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Watchdog: do not kill, if a debugger is attachedRobert Griebl2025-03-014-3/+59
| | | | | | Change-Id: I2116d1c94a6e142998df9d7e21f6718c699daeee Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Tests: stabilize tst_applicationmanagerRobert Griebl2025-02-281-0/+1
| | | | | | Change-Id: I272342df895be33983af459497f195c920e3022d Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* appman-controller: ignore read hup events on ssh connectionsRobert Griebl2025-02-264-95/+16
| | | | | | | | | | | | | | | | Reacting to STDIN closing was meant as a feature to easily stop applications started via the controller with Ctrl+C, even when done inside a SSH session. This does however not work correctly for non-interactive SSH sessions, where STDIN might be closed outside the user's realm of control. Instead of re-inventing the wheel (badly) inside the controller, the user should use ssh's '-t' option, if forwarding Ctrl+C over SSH is needed. Change-Id: If52e9bc5cf9af2e73bb8408e4d322032aa643bc3 Pick-to: 6.9 6.8 6.5 Reviewed-by: Dominik Holland <[email protected]>
* Consistent debug outputRobert Griebl2025-02-241-3/+4
| | | | | | Change-Id: I91ca88ccb6863d883bbc0b7a04ea3b633365c434 Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* doc: Update QML property types to use QML value typesDavid Boddie2025-02-202-2/+2
| | | | | | | | Fixes warnings from QDoc about invalid QML types. Change-Id: I5c99ee07e4d38ab1b743ff03902346fd3926fdc2 Pick-to: 6.9 Reviewed-by: Robert Griebl <[email protected]>
* appman-controller: print which signal made the controller quitRobert Griebl2025-02-171-3/+4
| | | | | | Change-Id: I386992bb1e1273f354c2890031a5d695d4f2f22b Pick-to: 6.9 Reviewed-by: Dominik Holland <[email protected]>
* Consistent, easy to read debug output on application startRobert Griebl2025-02-172-8/+14
| | | | | | Pick-to: 6.9 Change-Id: Ib008c548c0d6dc04123ae62ab509ba23879fde0c Reviewed-by: Dominik Holland <[email protected]>
* Fix ProcessContainer::setControlGroup not working with cgroups v2Robert Griebl2025-02-173-6/+37
| | | | | | | | | | | cgroups v1 are mostly obsolete by now. Moving processes into v2 cgroups is quite similar to v1, but the whole controller mapping is not needed anymore. Support for v1 will be removed in a future AppMan release. Change-Id: I53e46823bba04b736b7607c23a5a79706bd178ca Pick-to: 6.8 6.9 Reviewed-by: Dominik Holland <[email protected]>
* Convert bwrap configuration from an unordered into an ordered mapRobert Griebl2025-02-121-32/+45
| | | | | | | | | | | | | This is necessary, because some bwrap command line options are position dependent in relation to other options. Old, unordered configurations are still accepted, but a warning is printed that a conversion is needed. Change-Id: Id24a1836c7568422767c0f9ed54e65101abd0b64 Pick-to: 6.9 6.8 Fixes: QTBUG-133605 Reviewed-by: Dominik Holland <[email protected]>
* Minimize Wayland window size changes on app startupRobert Griebl2025-02-102-1/+14
| | | | | | | | | Make sure to only ever send out one Wayland configure request to the client on startup to avoid re-allocating buffers. Change-Id: Id5d46ae4bfa056d458242e913abe046de86e925a Pick-to: 6.9 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Adapt to QtWaylandCompositor behavior changes in 6.9+Robert Griebl2025-02-099-82/+114
| | | | | | | | | | | | Hidden windows are now behaving as in Qt 5.8 back in the day, as well as in any other toolkit or Qt's own other platform plugins: the Wayland surface stays alive, but a null buffer is attached to it. Closing or destroying windows still kills the Wayland surface though. Change-Id: I816a319ace7027af4886a3009794729eb1776092 Pick-to: 6.9 Reviewed-by: Dominik Holland <[email protected]>