Add ISU package 95/300695/3
authorAdam Michalski <a.michalski2@partner.samsung.com>
Tue, 31 Oct 2023 09:36:29 +0000 (10:36 +0100)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Wed, 8 Nov 2023 14:16:49 +0000 (15:16 +0100)
Change-Id: Ibe9c1e87d8af96c49a75cc3ab1196940578f17f6

CMakeLists.txt
isu/CMakeLists.txt [new file with mode: 0644]
isu/etc-resourced.mount [new file with mode: 0644]
isu/isu.cfg [new file with mode: 0644]
isu/resourced.service [new file with mode: 0644]
packaging/resourced.spec

index 7eb6d8d..448a83f 100644 (file)
@@ -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 (file)
index 0000000..6aab07c
--- /dev/null
@@ -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 (file)
index 0000000..d1b06c0
--- /dev/null
@@ -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 (file)
index 0000000..0cbb509
--- /dev/null
@@ -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 (file)
index 0000000..95445d5
--- /dev/null
@@ -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
index bc25e47..e9ca747 100644 (file)
@@ -101,6 +101,8 @@ Summary:    watchdog module for resourced
 %description   watchdog-handler
 %endif
 
+%isu_package
+
 %prep
 %setup -q