Add ISU package 41/309941/1 accepted/tizen/7.0/unified/20240425.011905
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 18 Jul 2023 09:56:13 +0000 (11:56 +0200)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Thu, 18 Apr 2024 08:26:09 +0000 (08:26 +0000)
This commit adds Individual Service Upgrade (ISU) feature to sensord
package. When installed it will allow to upgrade this service using ISU
mechanism, without the need to perform full OS Upgrade.

This commits add necessary configuration to create upgrade packages of
needed format.  ISU framework itself is maintained and installed
separately.

Change-Id: Iac0b284f42277e12aa2e0f4a90dcada4cbde1327
(cherry picked from commit c9d2dab94c4c6187571b65b9b0443ad48afc95e3)

CMakeLists.txt
isu/CMakeLists.txt [new file with mode: 0644]
isu/isu.cfg [new file with mode: 0644]
isu/system-services/sensord.service [new file with mode: 0644]
packaging/sensord.spec

index 2b33e5db710edeb02cb9f9675e9204f10a961873..106caf3c47ba60a32063b720daefd468077f9cff 100644 (file)
@@ -24,6 +24,7 @@ ADD_SUBDIRECTORY(src/client-dummy)
 ADD_SUBDIRECTORY(src/sensorctl)
 ADD_SUBDIRECTORY(src/physical-sensor)
 ADD_SUBDIRECTORY(src/fusion-sensor)
+ADD_SUBDIRECTORY(isu)
 
 INSTALL(
        DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
diff --git a/isu/CMakeLists.txt b/isu/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9aadbc7
--- /dev/null
@@ -0,0 +1,5 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ISU C)
+
+INSTALL(FILES isu.cfg DESTINATION /etc/isu/sensord/ PERMISSIONS OWNER_WRITE OWNER_READ)
+INSTALL(FILES system-services/sensord.service DESTINATION /etc/isu/sensord/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ)
diff --git a/isu/isu.cfg b/isu/isu.cfg
new file mode 100644 (file)
index 0000000..bdf0321
--- /dev/null
@@ -0,0 +1,8 @@
+[isu]
+name=#NAME#
+version=#VERSION#
+system_service=sensord.service
+
+[files]
+/usr/bin/sensord
+
diff --git a/isu/system-services/sensord.service b/isu/system-services/sensord.service
new file mode 100644 (file)
index 0000000..2b3b347
--- /dev/null
@@ -0,0 +1,21 @@
+[Unit]
+Description=Sensor Daemon
+Requires=sensord.socket
+
+[Service]
+User=sensor
+Group=input
+Type=notify
+NotifyAccess=all
+SmackProcessLabel=System
+EnvironmentFile=/etc/isu/service-common.inc
+ExecStart=/bin/isu-sandbox $ISU_SANDBOX_INVOCATION \
+                                       --bind #ISU_RUN_PATH#/sensord/rootfs/usr/bin/sensord /usr/bin/sensord \
+                                       /usr/bin/sensord
+MemoryLimit=20M
+Nice=-5
+AmbientCapabilities=CAP_SETFCAP CAP_SETUID CAP_SETGID
+SecureBits=keep-caps
+
+[Install]
+WantedBy=multi-user.target
index 04c25e160f16f424a996e6790f6a95480d30aa0d..87c5c3c8a781067b80b36e827e1b943d7f4413f4 100644 (file)
@@ -63,6 +63,8 @@ Group:      System/Testing
 %description -n sensor-test
 Sensor functional testing
 
+%isu_package
+
 %prep
 %setup -q