platform/core/system/activationd.git
2 years agoAdd a PoC implementation of ActiveState subscriptions 23/276723/1 tizen_6.5
Mateusz Majewski [Wed, 22 Jun 2022 13:03:25 +0000 (15:03 +0200)]
Add a PoC implementation of ActiveState subscriptions

Change-Id: I3773f135594b844e6640b8801a3b80dc994903b9
(cherry picked from commit 18bd36c8e013548f4bbd782504f253d3dbca185e)

2 years agoAdd extern C for compatibility with C++ in header 92/276392/1
Hyotaek Shim [Thu, 16 Jun 2022 01:15:40 +0000 (10:15 +0900)]
Add extern C for compatibility with C++ in header

Change-Id: I643553a04ce1375435c81a797e84620c835ca564
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit 539d13a39b8fa6ad8100f248c28dcc8e85f7c971)

3 years agoAdd actd_register_unit_status_callback API declaration 32/276332/1
Hyotaek Shim [Wed, 15 Jun 2022 01:22:29 +0000 (10:22 +0900)]
Add actd_register_unit_status_callback API declaration

Change-Id: I506a90d78ffe2c4309338b1d8453debdd3dc1501
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit d06a864b85e20e622df02013ac42b141eac895d9)

3 years agoSimplify packaging 74/260974/1 accepted/tizen_6.5_unified accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/6.5/unified/20211028.113918 accepted/tizen/7.0/unified/20221110.061131 accepted/tizen/7.0/unified/hotfix/20221116.105646 accepted/tizen/unified/20210708.131339 submit/tizen/20210708.011109 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release tizen_7.0_m2_release
Karol Lewandowski [Wed, 7 Jul 2021 21:09:19 +0000 (23:09 +0200)]
Simplify packaging

The modularity of activationd does not seem to be used in real life.

Change-Id: I680d8dff90862ddd3687058d99595dc5fa9326c6

4 years agoChange dbus function name 38/255538/1 accepted/tizen/unified/20210321.225754 submit/tizen/20210319.090004
taemin.yeom [Fri, 19 Mar 2021 06:09:09 +0000 (15:09 +0900)]
Change dbus function name

Change-Id: I53f194b59e99c1ab14b5752167fe90f708700169
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
4 years agoApply libsyscommon gdbus api improvement on error handling 87/254587/5 accepted/tizen/unified/20210310.145048 submit/tizen/20210309.090957
Hyotaek Shim [Fri, 5 Mar 2021 02:50:05 +0000 (11:50 +0900)]
Apply libsyscommon gdbus api improvement on error handling

Change-Id: Ic707f600baf31b77c70fea15c52b63602febad14
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoAdd Requires=local-fs.target dependency to actd.service 09/245409/1 accepted/tizen/unified/20201105.124401 submit/tizen/20201104.065459
INSUN PYO [Thu, 8 Oct 2020 08:05:56 +0000 (17:05 +0900)]
Add Requires=local-fs.target dependency to actd.service

In emergency mode, local-fs.target always fails.
So, you have to check if local-fs.target is successful.

Change-Id: Ic6bc2ecbc2dabc6591a5e056130c85c665c3d0d9

4 years agoActd: add After=buxton2.socket dependency to actd.service 64/243764/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.115330 accepted/tizen/6.0/unified/hotfix/20201103.003208 accepted/tizen/unified/20200911.043142 submit/tizen/20200910.050828 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_6.0.m2_release
INSUN PYO [Thu, 10 Sep 2020 01:30:13 +0000 (10:30 +0900)]
Actd: add After=buxton2.socket dependency to actd.service

Vconf activation does not work before buxton daemon is ready.

Change-Id: Ia2327f38abc2a8aa91a175381a6d1b3c81f52cc4

4 years agoAppend copyright to LICENSE.MIT 59/236859/1
Yunmi Ha [Tue, 23 Jun 2020 01:55:53 +0000 (10:55 +0900)]
Append copyright to LICENSE.MIT

Change-Id: I13e193b48d74e34e3fd1672fa4885102c5bc2a14
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agoRelicense libactd to MIT 39/236839/1
Karol Lewandowski [Mon, 22 Jun 2020 13:37:32 +0000 (15:37 +0200)]
Relicense libactd to MIT

Library has seen contributions from Samsung Electronics only so there
is no issue to relicense the code.

Change-Id: I80276d4a10c188935f98b6d3e50c9684d738436e

5 years agolibactd: add g_variant_unref code for replying msg 17/230317/1
Yunmi Ha [Thu, 9 Apr 2020 08:26:14 +0000 (17:26 +0900)]
libactd: add g_variant_unref code for replying msg

Change-Id: I97afe72ad3be3c00d3c00df05554a78340d1622f
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agoRemove compile warning for GCC-9 18/221118/1 accepted/tizen/unified/20200106.141614 submit/tizen/20200103.083647
Yunmi Ha [Fri, 27 Dec 2019 07:14:46 +0000 (16:14 +0900)]
Remove compile warning for GCC-9

- format-truncation
- stringop-overflow

Change-Id: I0e63d016e1642fff39c732110a32d9f69be7ff99
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agoSwitch from libsystemd to glib 60/214360/4 accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.022213 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090057 accepted/tizen/5.5/unified/wearable/hotfix/20201027.112750 accepted/tizen/unified/20191009.231758 submit/tizen/20191009.095955 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 tizen_5.5.m2_release
Maciej Slodczyk [Mon, 2 Sep 2019 08:58:46 +0000 (10:58 +0200)]
Switch from libsystemd to glib

Change-Id: Ibe5d385ff53996126f0eb39443ae0a57dc7061c2
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agoUse more of the available information in some error cases 05/214605/1
Michal Bloch [Tue, 24 Sep 2019 12:01:38 +0000 (14:01 +0200)]
Use more of the available information in some error cases

Change-Id: I0806e577936f1ca2e1156521b6f1029986f88394
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
5 years agoFix svace issue 72/213972/1 accepted/tizen/unified/20190918.102147 submit/tizen/20190917.062742
Yunmi Ha [Tue, 17 Sep 2019 05:31:29 +0000 (14:31 +0900)]
Fix svace issue

 - Add logic for checking return value

Change-Id: I96fc6357e2aa451d6ea09c45557d4827c7b2230b
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agosvace fix 40/213940/1 submit/tizen/20190917.020352
sanghyeok.oh [Tue, 17 Sep 2019 01:29:42 +0000 (10:29 +0900)]
svace fix

Change-Id: Ice65d826b4331e3bbb2ef02a10652a7223a317e5
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoFix dbus policy 37/212937/5 accepted/tizen/unified/20190906.111903 submit/tizen/20190906.005604
Hyotaek Shim [Wed, 28 Aug 2019 08:43:58 +0000 (17:43 +0900)]
Fix dbus policy

This patch places the check rule into the default context.
<check send_destination="org.tizen.activationd" send_type="method_call"
privilege="http://tizen.org/privilege/internal/sysadmin"/>

This might make processes with System::Privileged, System, User bypass the <check> rule,
but with this cynara rule we apply default DENY rule for http://tizen.org/privilege/internal/sysadmin.
So, applications only with the privilege can be allowed by the <check> rule.

https://review.tizen.org/gerrit/#/c/platform/core/security/security-manager/+/212942

cyad --set-policy --bucket=MANIFESTS_GLOBAL --client="$client" --user="*"
--privilege="http://tizen.org/privilege/internal/sysadmin" --type=DENY

Change-Id: Ie1d05cc24c368e22cbc2f2d5015db11cefbccdd0
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agofix compilation warnings, add -Werror 49/212849/4
Maciej Slodczyk [Tue, 27 Aug 2019 08:50:51 +0000 (10:50 +0200)]
fix compilation warnings, add -Werror

Change-Id: I4dca3549fc20713f7996469bc99341e845c9dc3f
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agoAdjust to libsyscommon API change 55/212755/1 accepted/tizen/unified/20190827.110626 submit/tizen/20190826.120923 submit/tizen/20190827.024510
Karol Lewandowski [Mon, 26 Aug 2019 11:35:44 +0000 (13:35 +0200)]
Adjust to libsyscommon API change

Change-Id: I2c7b340fc100080ee915087c7dc962ede57a12a0

5 years agoRelease 0.2 44/212544/1 accepted/tizen/unified/20190823.001442 submit/tizen/20190822.153849
Karol Lewandowski [Thu, 22 Aug 2019 15:00:17 +0000 (17:00 +0200)]
Release 0.2

This release brings abitility to re-transmit received dbus signals
to specified destinations.

Change-Id: Icdbea97c4c1cd2a2021442b45219bf209ae88ac7

5 years agosignal forward: pass broadcast signal parameters 59/212359/3
Maciej Slodczyk [Tue, 20 Aug 2019 15:09:50 +0000 (17:09 +0200)]
signal forward: pass broadcast signal parameters

Change-Id: I608faeeac606f113130449825f8e2348c07f6900
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agosignal forward: check for event reason after the event is processed 58/212358/3
Maciej Slodczyk [Tue, 20 Aug 2019 06:44:36 +0000 (08:44 +0200)]
signal forward: check for event reason after the event is processed

Change-Id: I239f56ec3f4f90617da00215c214888c6b603217
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agoactivation_dm: Support signal re-emmision 48/212048/6
Karol Lewandowski [Tue, 13 Aug 2019 17:39:31 +0000 (19:39 +0200)]
activation_dm: Support signal re-emmision

This commit introduces ability for signal re-emmision.  Basic
procedure is as follows:

 - dbus_listener receives signals from system bus - signals to be forwarded
   need to be listed here

 - activationd_dm received "ForwardDBusSignal" `action` which needs to be
   specified, while `destination` specifies target dbus name to which
   signal has to be delivered

 - forward_signal acton is added which re-transmits the signal to specified
   destination

This commit does not yet support passing original signal parameters.

Change-Id: I72346c2dbb326f78252f6f0bdc24acceebbc4ae0

5 years agodbus_listener: Acquire signal parameters on event retrieval 34/212134/2
Karol Lewandowski [Wed, 14 Aug 2019 16:08:58 +0000 (18:08 +0200)]
dbus_listener: Acquire signal parameters on event retrieval

Do not use parameters used when configuring match but the params
that actually caused the callback to be called.  This is important
because eg. one can specify path_namespace in match, but it's not
parameter that will be in message - it's "match parameter" only(!)

Change-Id: I4d3d922887accf9402282ae0210d682f170bbdb8

5 years agoFix svace issues 52/212252/3 accepted/tizen/unified/20190821.064629 submit/tizen/20190821.011758
Yunmi Ha [Mon, 19 Aug 2019 09:20:40 +0000 (18:20 +0900)]
Fix svace issues

Change-Id: I15a9c64c01f34c58e1506eb15786fce544b24663
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agoSwitch to libsyscommon in unit_start action 56/211056/3 accepted/tizen/unified/20190819.081610 submit/tizen/20190819.035335
Paweł Szewczyk [Mon, 29 Jul 2019 11:46:23 +0000 (13:46 +0200)]
Switch to libsyscommon in unit_start action

Change-Id: If5809e26cc1d508a8892c03057b7ad8a2f15bc93
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agoSwitch to libsyscommon in unit control API 53/211053/3
Paweł Szewczyk [Fri, 26 Jul 2019 14:38:21 +0000 (16:38 +0200)]
Switch to libsyscommon in unit control API

Change-Id: I9e73046906fd9733f4c42fdba39d6a42cb652a60
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agoFix dbus policy to prevent policy checker errors 73/211973/1 accepted/tizen/unified/20190813.082406 submit/tizen/20190813.044217
Hyotaek Shim [Tue, 13 Aug 2019 04:41:55 +0000 (13:41 +0900)]
Fix dbus policy to prevent policy checker errors

Change-Id: Ibcf3f73dbd1e939176965990eaf518209981ba41
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoAdd dependency to activationd-plugin 87/211787/1 submit/tizen/20190813.023537 submit/tizen/20190813.041902
Hyotaek Shim [Fri, 9 Aug 2019 05:57:01 +0000 (14:57 +0900)]
Add dependency to activationd-plugin

Change-Id: I3fa9305eb59f59ffaac5f2c87667dee5e3fb518c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoFix lower/uppercase for dbus interfaces 60/211760/2
Hyotaek Shim [Fri, 9 Aug 2019 02:43:14 +0000 (11:43 +0900)]
Fix lower/uppercase for dbus interfaces

Reference:
Well-known name: org.freedesktop.systemd1
Path: /org/freedesktop/systemd1
Interface: org.freedesktop.systemd1.Manager
Member: StartUnit

Change-Id: I3c76f42cd1ce78a9ef98c78460a4aad63a408172
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoTemporarily allow method call for development 57/211757/2
Hyotaek Shim [Fri, 9 Aug 2019 02:34:22 +0000 (11:34 +0900)]
Temporarily allow method call for development

Change-Id: I1321b65f85eb4054e47883d97acfb7656fd74334
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoSwitch to libsyscommon API in dbus listener 80/210780/4
Paweł Szewczyk [Tue, 23 Jul 2019 15:38:02 +0000 (17:38 +0200)]
Switch to libsyscommon API in dbus listener

Change-Id: I3bb2f8a94b771d6e485a9ce726ddada639ceb452
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agoMerge "unit tests: new api function return values no longer break tests" into tizen accepted/tizen/unified/20190808.113635 submit/tizen/20190808.042854
Hyotaek Shim [Thu, 8 Aug 2019 00:56:26 +0000 (00:56 +0000)]
Merge "unit tests: new api function return values no longer break tests" into tizen

5 years agoMerge "unit_control: add separate return value when timeout occurs" into tizen
Hyotaek Shim [Thu, 8 Aug 2019 00:56:20 +0000 (00:56 +0000)]
Merge "unit_control: add separate return value when timeout occurs" into tizen

5 years agoMerge changes I81ae2cb9,I09b94c71 into tizen
Maciej Slodczyk [Wed, 7 Aug 2019 15:52:59 +0000 (15:52 +0000)]
Merge changes I81ae2cb9,I09b94c71 into tizen

* changes:
  Drop example configuration
  unit_control_dm: drop unneeded assert

5 years agounit tests: new api function return values no longer break tests 49/211649/1
Maciej Slodczyk [Wed, 7 Aug 2019 13:19:05 +0000 (15:19 +0200)]
unit tests: new api function return values no longer break tests

Change-Id: I5eeb421fd6e4c51ce250bdb331e1f8ff65882430
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agounit_control: add separate return value when timeout occurs 48/211648/1
Maciej Slodczyk [Wed, 7 Aug 2019 13:11:41 +0000 (15:11 +0200)]
unit_control: add separate return value when timeout occurs

Change-Id: I663691dfb3ece5197efdcb0ed9fc4909dd4a0c0a
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agoDrop example configuration 47/211647/1
Karol Lewandowski [Wed, 7 Aug 2019 09:42:14 +0000 (11:42 +0200)]
Drop example configuration

This will be maintained in separate repostiory - activationd-plugin.

Change-Id: I81ae2cb9afadee5217811d9135d23a4a0b57b553

5 years agounit_control_dm: drop unneeded assert 46/211646/1
Karol Lewandowski [Wed, 7 Aug 2019 12:05:05 +0000 (14:05 +0200)]
unit_control_dm: drop unneeded assert

Config can be null when no configuration file was provided.

Change-Id: I09b94c71c307db73f0d186b294151bd12e639229

5 years agoAdd -fPIC compilation option 82/211582/1
Hyotaek Shim [Wed, 7 Aug 2019 02:40:05 +0000 (11:40 +0900)]
Add -fPIC compilation option

Change-Id: Iec84755bcf262b7e5095e111f28523004c7feba5
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agounit_control: Ensure API always returns valid error code 61/211561/1 accepted/tizen/unified/20190807.111823 submit/tizen/20190807.020938
Karol Lewandowski [Tue, 6 Aug 2019 10:18:57 +0000 (12:18 +0200)]
unit_control: Ensure API always returns valid error code

Additionally, introduce explicit return code for asynchronous
requests - UNIT_CONTROL_REQUEST_SENT, which does only mean
that request was posted, not completed.

Change-Id: Ia5a8f7141ede8d196c8af5e3c0ec65d2058f9f73

5 years agolibactd: pkgconfig: Ensure library clients use directory prefix 43/211543/1
Karol Lewandowski [Tue, 6 Aug 2019 09:00:03 +0000 (11:00 +0200)]
libactd: pkgconfig: Ensure library clients use directory prefix

ie. recommended use is

  #include <actd/unit_control.h>

Change-Id: I475f531566eb4b8cabd9f79037de13b2992b7a23

5 years agounit_control: Improve timeout handling 42/211542/1
Karol Lewandowski [Tue, 6 Aug 2019 08:47:38 +0000 (10:47 +0200)]
unit_control: Improve timeout handling

 - explicitly specify timeout unit in function signatures
   (ie. timeout_ms, instead of just timeout)

 - add UnitControlTimeout enum with default and max timeout
   constants

Change-Id: I637ad82251739a245fdbaaa936999263c919591f

5 years agounit_control: Do not pollute global namespace with unqualifed enums 41/211541/1
Karol Lewandowski [Tue, 6 Aug 2019 08:45:45 +0000 (10:45 +0200)]
unit_control: Do not pollute global namespace with unqualifed enums

Change-Id: I0262d581a21836eef671f63c23cafa462e69c7bb

5 years agounit_control: don't quit on errors 72/211472/1
Adrian Szyndela [Mon, 5 Aug 2019 12:17:52 +0000 (14:17 +0200)]
unit_control: don't quit on errors

This makes unit_control not return errors to systemd's source_dispatch.
That is, errors are sent back to clients as replies through D-Bus,
but the unit_control module itself does not report errors
to the dispatch, because the dispatch would disable the unit_control.
Such behaviour would make subsequent clients reaching their timeouts
instead of getting meaningful responses, such as "Access denied",
or "This is not supported, stupid!".

Change-Id: I1f624c3d7bb0ed31a0310371946c341fd3ad7feb

5 years agoRemove glib dependency from include/unit_control.h 69/211269/1 accepted/tizen/unified/20190801.113337 submit/tizen/20190801.020645
Hyotaek Shim [Thu, 1 Aug 2019 02:05:55 +0000 (11:05 +0900)]
Remove glib dependency from include/unit_control.h

Change-Id: I1289fbc4a2bc019b2f34d17f5dedfef292561c45
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agopackaging: Ensure needed packages are installed for unit-control functionality 60/211260/1 submit/tizen/20190801.013233
Karol Lewandowski [Wed, 31 Jul 2019 13:20:59 +0000 (15:20 +0200)]
packaging: Ensure needed packages are installed for unit-control functionality

Change-Id: Ie5ef7fc8b9e908a7920c15db540a26589112074b

5 years agoMove libactd development files to separate package libactd-devel 59/211259/1
Karol Lewandowski [Wed, 31 Jul 2019 13:20:21 +0000 (15:20 +0200)]
Move libactd development files to separate package libactd-devel

Additionally, libactd pkgconfig package is provided.

Change-Id: I9a36f3b0d2ae2e0bacb1b3f60460f481d5d412b7

5 years agoRemove unneeded dependency on cmocka 68/210168/1
Paweł Szewczyk [Tue, 16 Jul 2019 08:59:24 +0000 (10:59 +0200)]
Remove unneeded dependency on cmocka

Change-Id: I7551d2d36795a41672691f639ddd5a4fca8eee79
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agotests: Install test services for user session 13/209413/1
Paweł Szewczyk [Fri, 5 Jul 2019 14:50:10 +0000 (16:50 +0200)]
tests: Install test services for user session

Change-Id: Iac8535667bd4eba8b87ed6275cd25917ccf200bc
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agounit tests: check real unit state after issuing a method call 00/209400/1
Maciej Slodczyk [Fri, 5 Jul 2019 10:02:30 +0000 (12:02 +0200)]
unit tests: check real unit state after issuing a method call

Change-Id: I532e2de9b2e91f05bfcdca6ab40408980ac98540
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
5 years agoRelease 0.1.1 31/208731/1 accepted/tizen/unified/20190701.111808 submit/tizen/20190627.154817
Paweł Szewczyk [Thu, 27 Jun 2019 15:39:31 +0000 (17:39 +0200)]
Release 0.1.1

Changelog:
 - introduced libactd library
 - using asynchronous calls where possible
 - added automatic tests
 - minor fixes in existing modules

Change-Id: I5a37574e6abe1aeb0eea08fa94499883123d43d5
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agounit_control: Do not query systemd for non-wildcards 01/208601/1
Paweł Szewczyk [Wed, 26 Jun 2019 08:55:51 +0000 (10:55 +0200)]
unit_control: Do not query systemd for non-wildcards

Unit names with wildcards can match multiple units, but non-wildcard
names are always matched directly and do not need querying systemd.
Avoiding this should reduce delay and fixes restarting inactive units
(which systemctl does, and so should we)

Change-Id: I2609fc619a84875e77039ae80995ed249edcf85d
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agolibactd: Change handler signature in unit_control 61/208461/1 accepted/tizen/unified/20190627.014800 submit/tizen/20190626.083411
Paweł Szewczyk [Mon, 24 Jun 2019 13:40:25 +0000 (15:40 +0200)]
libactd: Change handler signature in unit_control

The reply message is read inside the library and only a status is passed
to registered handler in async calls.

Change-Id: I71d2452d94d00d21b8a79c51102fc6f90a7801b6
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agolibactd: Add timeout parameter to unit-control 23/208323/1
Paweł Szewczyk [Wed, 19 Jun 2019 14:52:46 +0000 (16:52 +0200)]
libactd: Add timeout parameter to unit-control

Change-Id: I1a36439684424d9393a1a2eaf2ab529cf2f33391
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agounit_control: Extend unit lookup for all loaded units 51/208051/1
Paweł Szewczyk [Mon, 17 Jun 2019 14:29:53 +0000 (16:29 +0200)]
unit_control: Extend unit lookup for all loaded units

Change-Id: Ida251e3807ee9c844e4c8a0bd6e7d1cc5641f333
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agounit_control: Reply with an error if no unit was matched 50/208050/1
Paweł Szewczyk [Mon, 17 Jun 2019 14:07:04 +0000 (16:07 +0200)]
unit_control: Reply with an error if no unit was matched

Change-Id: I0a78a7d7830d88d26e0eff8d0b01401f85842af3
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agotests: Add missing tests for API calls 49/208049/1
Paweł Szewczyk [Mon, 17 Jun 2019 15:06:07 +0000 (17:06 +0200)]
tests: Add missing tests for API calls

Change-Id: Ib3f8dd2e9305e1b4384668447dad555b79590d7e
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agolibactd: Call systemd directly if on session bus 48/208048/1
Paweł Szewczyk [Mon, 17 Jun 2019 15:06:00 +0000 (17:06 +0200)]
libactd: Call systemd directly if on session bus

Change-Id: I6508537d0289d0d4723a8f52317d48887b1150ce
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
5 years agolibactd: Use glib instead of libsyscommon 47/208047/1
Paweł Szewczyk [Mon, 17 Jun 2019 09:59:47 +0000 (11:59 +0200)]
libactd: Use glib instead of libsyscommon

Libsyscommon does not provide neccessary control over dbus calls, e.g.
makes it hard to select a bus to connect to.

Change-Id: I79bab3bcc7d26bd4f68a6ab5ca58225081259581
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoApply ASLR for actd binary build, -pie 54/207754/1 accepted/tizen/unified/20190612.111703 submit/tizen/20190612.045457
Hyotaek Shim [Wed, 12 Jun 2019 04:54:20 +0000 (13:54 +0900)]
Apply ASLR for actd binary build, -pie

Change-Id: Ibca6f48af0025a7ae3a8a885ee2a677075e9fcd9
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoFix dbus policy rule 68/207668/1 accepted/tizen/unified/20190611.050217 submit/tizen/20190611.023606
Hyotaek Shim [Tue, 11 Jun 2019 02:32:29 +0000 (11:32 +0900)]
Fix dbus policy rule

Change-Id: I240bfd5d6ff4ae19b3851abce748d2407eb06201
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agounit control: Fix 'start' action with wildcard error reporting 46/207546/3 accepted/tizen/unified/20190610.110243 submit/tizen/20190610.021921 submit/tizen/20190611.020020
Maciej Slodczyk [Thu, 6 Jun 2019 17:10:33 +0000 (19:10 +0200)]
unit control: Fix 'start' action with wildcard error reporting

Change-Id: Id18af6a7f8fc0fc36fba66559401ab5125a3099d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agounit control: add dbus api acceptance tests 47/205847/3
Maciej Slodczyk [Thu, 9 May 2019 17:05:03 +0000 (19:05 +0200)]
unit control: add dbus api acceptance tests

Change-Id: I5a8375b71eb682d288addb22067329e1713b30f6
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agounit control: fix async dbus method calls results reporting 27/206427/6
Maciej Slodczyk [Fri, 17 May 2019 15:31:19 +0000 (17:31 +0200)]
unit control: fix async dbus method calls results reporting

Change-Id: I09326b17bf1eb05a933f0e13b46600f61a715199
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoaction_executor: Add callback for action finish 78/206578/5
Paweł Szewczyk [Mon, 20 May 2019 10:36:29 +0000 (12:36 +0200)]
action_executor: Add callback for action finish

Some decision makers could need to be aware of the action result.
Instead of requiring database, they can now register an optional
callback to be called on action execution.

Note, that asynchronous actions need to call this explicitly at the
completion (unit_start being an example)

Change-Id: I9321d5ec02dc271c26971c1d5b3474a20e8a1dad
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agounit control: reply with error when a call is whitelist-blocked 28/206428/5
Maciej Slodczyk [Fri, 17 May 2019 15:56:13 +0000 (17:56 +0200)]
unit control: reply with error when a call is whitelist-blocked

Change-Id: I6063f72064da8016ac3077e131141869de3a2ded
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoInstall libraries to system-specified libdir 18/207518/1
Karol Lewandowski [Wed, 5 Jun 2019 14:19:52 +0000 (16:19 +0200)]
Install libraries to system-specified libdir

libdir is either lib/ or lib64/ depending on platform.

This commit fixes build on 64-bit architectures.

Change-Id: Ic8855e02157bb1b7d026979721ab1dc919dddf29

6 years agounit_tests: call proper callback function 43/205943/4 submit/tizen/20190531.084218
Maciej Slodczyk [Fri, 10 May 2019 11:23:54 +0000 (13:23 +0200)]
unit_tests: call proper callback function

Change-Id: I992a8768378798e1b71b2f285b8dbad48f8af908
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoMerge "unit_start: Optionally wait for job finish" into tizen
Maciej Slodczyk [Mon, 27 May 2019 09:13:27 +0000 (09:13 +0000)]
Merge "unit_start: Optionally wait for job finish" into tizen

6 years agoMerge "unit_start: Make unit actions asynchronous" into tizen
Maciej Slodczyk [Mon, 27 May 2019 09:13:18 +0000 (09:13 +0000)]
Merge "unit_start: Make unit actions asynchronous" into tizen

6 years agoMerge "Fix project name in source file headers" into tizen
Paweł Szewczyk [Tue, 21 May 2019 10:39:31 +0000 (10:39 +0000)]
Merge "Fix project name in source file headers" into tizen

6 years agounit_start: Optionally wait for job finish 26/205926/2
Paweł Szewczyk [Fri, 10 May 2019 09:57:47 +0000 (11:57 +0200)]
unit_start: Optionally wait for job finish

This makes an action asynchronously wait for JobRemoved signal, meaning
start/stop action was finished.

Change-Id: I9195b5e3d0eec6421919a7bb3d49dd1399a8694f
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agounit_start: Make unit actions asynchronous 80/205480/3
Paweł Szewczyk [Mon, 6 May 2019 13:20:32 +0000 (15:20 +0200)]
unit_start: Make unit actions asynchronous

The response from systemd can be delayed resulting in blocking of the
event processor. We can prevent this by making actions on units
asynchronous.

Change-Id: I175420639820da9ae0a2b0bf4e2a817a68a5fa76
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoMerge "unit_control: Fix order of cleaning up" into tizen
Maciej Slodczyk [Fri, 10 May 2019 12:43:52 +0000 (12:43 +0000)]
Merge "unit_control: Fix order of cleaning up" into tizen

6 years agounit_control: Fix order of cleaning up 25/205925/1
Paweł Szewczyk [Fri, 10 May 2019 10:16:34 +0000 (12:16 +0200)]
unit_control: Fix order of cleaning up

Change-Id: If24846d85d15b5d8cb6846376ce09f7c8ca71f2a
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoFix project name in source file headers 46/205846/1
Maciej Slodczyk [Thu, 9 May 2019 10:51:16 +0000 (12:51 +0200)]
Fix project name in source file headers

Change-Id: Ic4d606ae05d4a9b8db97fa389bf3e316edac0ce2
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoAdd .gitignore 38/205538/1
Hyotaek Shim [Tue, 7 May 2019 08:37:47 +0000 (17:37 +0900)]
Add .gitignore

Change-Id: I01c438c9a56f39ed61c4d5017e65541d30906d58
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoFix boot dependency and basic.target.wants/actd.service 37/205537/2
Hyotaek Shim [Tue, 7 May 2019 08:32:54 +0000 (17:32 +0900)]
Fix boot dependency and basic.target.wants/actd.service

Change-Id: I4bb4cbb151934559575ea5bf680c01b8de3c300a
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoFix compilation warnings 37/205237/2
Paweł Szewczyk [Tue, 30 Apr 2019 13:21:57 +0000 (15:21 +0200)]
Fix compilation warnings

Change-Id: Ifea93c0560c87383c57cbbf272930697b4ee4bb1
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agounit control: add unit instances and wildcards support 21/204821/10
Maciej Slodczyk [Fri, 26 Apr 2019 13:23:45 +0000 (15:23 +0200)]
unit control: add unit instances and wildcards support

Change-Id: Iac25e794764d79d6560ab1af39d99b71f50ffc58
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agounit_control: add documentation 31/204031/10
Paweł Szewczyk [Thu, 18 Apr 2019 15:21:48 +0000 (17:21 +0200)]
unit_control: add documentation

Change-Id: I49ea3fa46cc579af72119cdcb483bf4838e04c27
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoAdd unit tests for external API 29/203629/12
Paweł Szewczyk [Tue, 16 Apr 2019 09:40:17 +0000 (11:40 +0200)]
Add unit tests for external API

Change-Id: Ib8cf43b78886de2b30bb7601d80b9c755fdee75c
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoIntroduce libactd library 40/203540/11
Paweł Szewczyk [Mon, 15 Apr 2019 15:19:33 +0000 (17:19 +0200)]
Introduce libactd library

This library exports API for interacting with other modules.

Change-Id: I84ef2eda8bdcb2b3c7f85b199c84017411328a23
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agounit_control: add unit instance matching 13/204013/5
Maciej Slodczyk [Mon, 29 Apr 2019 14:34:21 +0000 (16:34 +0200)]
unit_control: add unit instance matching

All rules in format <name>@.<suffix> are treated as template rules.
They match with all instances of this template, i.e. with name in
format: <name>@<instance>.<suffix>

Change-Id: I614d33254e66223c20a0dd8aeb6e922bbceaae26
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoAdd basic unit control dbus api 12/203412/5
Maciej Slodczyk [Thu, 11 Apr 2019 15:13:28 +0000 (17:13 +0200)]
Add basic unit control dbus api

Change-Id: Ie6280423f312a0ca58e2464fce437cfab85355d9
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoRelease 0.1.0 34/203434/2 submit/tizen/20190412.120121
Paweł Szewczyk [Fri, 12 Apr 2019 11:51:48 +0000 (13:51 +0200)]
Release 0.1.0

First functional release of activationd. New features:
 - event processing core and module framework
 - vconf lister
 - dbus-signal listener
 - unit activation decision maker
 - systemd unit related actions (stop, start etc.)

Change-Id: I53419b4f2c8aa49e89f56b2026a8987c26b3ae6b
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoAdd documentation for existing functionalities 83/201483/20
Paweł Szewczyk [Thu, 14 Mar 2019 16:39:24 +0000 (17:39 +0100)]
Add documentation for existing functionalities

Change-Id: I8fe6d5e177dafb03b7c87abed8e22e7ed0259323
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoChange *epc* to *actd* in file names and paths 23/203323/1
Maciej Slodczyk [Thu, 11 Apr 2019 13:36:57 +0000 (15:36 +0200)]
Change *epc* to *actd* in file names and paths

Change-Id: I22d308704f640d4f93e5b01f70b058e7d74e441b
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoacceptance tests: add dbus activation tests 86/202586/4
Maciej Slodczyk [Mon, 1 Apr 2019 07:50:20 +0000 (09:50 +0200)]
acceptance tests: add dbus activation tests

Change-Id: I334199b6e8f18c4e64b85c8fcc1c03d02ac21f8d
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoRemove configuration for services 53/202353/8
Paweł Szewczyk [Wed, 27 Mar 2019 11:01:04 +0000 (12:01 +0100)]
Remove configuration for services

The services configuration is currently not used by any module. This
should not be a part of core, but rather of configuration of a module
that uses this.

Change-Id: I021f8bcc46cbedda72c006c9ae2adfd28953d7dd
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agodbus: add dbus signal event decision maker 76/202376/5
Maciej Slodczyk [Wed, 27 Mar 2019 15:45:58 +0000 (16:45 +0100)]
dbus: add dbus signal event decision maker

Change-Id: I95c457972bf46ba720d5015647cf868755d164a0
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoAdd dbus signal listener 96/201896/25
Maciej Slodczyk [Wed, 20 Mar 2019 15:01:11 +0000 (16:01 +0100)]
Add dbus signal listener

Change-Id: I72e9c1b2c022bce0969c1f37b9c993ed4232755b
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agocommon: make pattern matching value-aware 75/202375/4
Maciej Slodczyk [Wed, 27 Mar 2019 15:39:22 +0000 (16:39 +0100)]
common: make pattern matching value-aware

Change-Id: I94008ccf06c548e8b4390c5990c944ec835c3ea6
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agocommon: Add basic pattern matching for epc objects 81/202281/5
Paweł Szewczyk [Mon, 25 Mar 2019 17:43:09 +0000 (18:43 +0100)]
common: Add basic pattern matching for epc objects

Patterns are in json format and in this initial version support only
direct matching of values. All defined fields in pattern rule must have an equal
counterpart in matching object. Sub-rules are treated recursively
against coutnerpart sub-objects.

Change-Id: Ia6df01efe69981c00ab99c12b5c4457317d48290
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoFix copyright notices in all files. 80/202280/3
Maciej Slodczyk [Tue, 26 Mar 2019 16:21:50 +0000 (17:21 +0100)]
Fix copyright notices in all files.

Change-Id: I62d73b4ec4372be60736a34d7d6b0fb011a7cfac
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoExtend activationd acceptance tests 01/201801/18
Maciej Slodczyk [Tue, 19 Mar 2019 13:36:40 +0000 (14:36 +0100)]
Extend activationd acceptance tests

Change-Id: Ie6b3728062ace4a99c489ae73ab6632756d9af8b
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agovconf: add debug message about type mismatch 96/201996/16
Maciej Slodczyk [Thu, 21 Mar 2019 11:12:08 +0000 (12:12 +0100)]
vconf: add debug message about type mismatch

Change-Id: Ied0cd7e0e0a00ac2b933c6065f85cac7398f7429
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 years agoRework packaging 97/201797/14
Paweł Szewczyk [Fri, 15 Mar 2019 12:40:03 +0000 (13:40 +0100)]
Rework packaging

Change-Id: I2992ba6a8e928c9763eaeb1c55dd614fb12848d9
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 years agoUse private systemd bus only as an option 49/201049/17
Paweł Szewczyk [Thu, 7 Mar 2019 16:22:33 +0000 (17:22 +0100)]
Use private systemd bus only as an option

Change-Id: I9ae077417a6a03e949f53a6add08f607e3dac95a
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>