From: Adam Michalski Date: Tue, 31 Oct 2023 09:36:29 +0000 (+0100) Subject: Add ISU package X-Git-Tag: accepted/tizen/unified/20240104.012423~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1026f91e4e9e47fdf3c471c579496a6491bcabbf;p=platform%2Fcore%2Fsystem%2Fresourced.git Add ISU package Change-Id: Ibe9c1e87d8af96c49a75cc3ab1196940578f17f6 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eb6d8d..448a83f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,3 +99,5 @@ IF(DEFINED RD_TESTS_PATH) ENABLE_TESTING() ADD_SUBDIRECTORY(tests) ENDIF(DEFINED RD_TESTS_PATH) + +ADD_SUBDIRECTORY(isu) diff --git a/isu/CMakeLists.txt b/isu/CMakeLists.txt new file mode 100644 index 0000000..6aab07c --- /dev/null +++ b/isu/CMakeLists.txt @@ -0,0 +1,6 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(ISU C) + +INSTALL(FILES isu.cfg DESTINATION /etc/isu/resourced/ PERMISSIONS OWNER_WRITE OWNER_READ) +INSTALL(FILES resourced.service DESTINATION /etc/isu/resourced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) +INSTALL(FILES etc-resourced.mount DESTINATION /etc/isu/resourced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) diff --git a/isu/etc-resourced.mount b/isu/etc-resourced.mount new file mode 100644 index 0000000..d1b06c0 --- /dev/null +++ b/isu/etc-resourced.mount @@ -0,0 +1,9 @@ +[Unit] +Before=local-fs.target +ConditionPathIsMountPoint=!/etc/resourced + +[Mount] +What=#ISU_RUN_PATH#/resourced/rootfs/etc/resourced +Where=/etc/resourced +Options=defaults,relatime,bind,ro + diff --git a/isu/isu.cfg b/isu/isu.cfg new file mode 100644 index 0000000..0cbb509 --- /dev/null +++ b/isu/isu.cfg @@ -0,0 +1,8 @@ +[isu] +name=#NAME# +version=#VERSION# +system_service=resourced.service etc-resourced.mount + +[files] +/usr/bin/resourced +/etc/resourced diff --git a/isu/resourced.service b/isu/resourced.service new file mode 100644 index 0000000..95445d5 --- /dev/null +++ b/isu/resourced.service @@ -0,0 +1,23 @@ +[Unit] +Description=Resource management daemon +# resourced monitors AUL (lauchpad) d-bus signals to learn about existence +# and the state of applications. Consequently, it has to start before +# launchpad to have knowledge of all applications. The Before= line below +# refers to user-sessions, because tlm, and consequently user@.service +# starts after user-sessions are allowed. +After=etc-resourced.mount +Before=systemd-user-sessions.service +BindsTo=etc-resourced.mount +DefaultDependencies=no +Requires=resourced.socket + +[Service] +Type=simple +SmackProcessLabel=System +ExecStart=#ISU_RUN_PATH#/resourced/rootfs/usr/bin/resourced +MemoryLimit=50M +Restart=on-failure +RestartSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/packaging/resourced.spec b/packaging/resourced.spec index bc25e47..e9ca747 100644 --- a/packaging/resourced.spec +++ b/packaging/resourced.spec @@ -101,6 +101,8 @@ Summary: watchdog module for resourced %description watchdog-handler %endif +%isu_package + %prep %setup -q