diff options
author | Adam Michalski <a.michalski2@partner.samsung.com> | 2024-03-15 12:12:47 +0100 |
---|---|---|
committer | Adam Michalski <a.michalski2@partner.samsung.com> | 2024-03-15 17:01:29 +0100 |
commit | 6e21e8ad63ab938f797154e06262877ad0236cd5 (patch) | |
tree | 4d826c8d17d7b2083add4967ac354d41d37ee6c1 | |
parent | 433b4a749b81c98f4ac2a5bb0505a0c7d09db7bf (diff) | |
download | deviced-accepted/tizen_unified.tar.gz deviced-accepted/tizen_unified.tar.bz2 deviced-accepted/tizen_unified.zip |
Add plugins to deviced ISU configurationaccepted/tizen/unified/x/20240326.073714accepted/tizen/unified/20240321.160008accepted/tizen_unified_xaccepted/tizen_unified
Additionally it adds rndis.service to ISU configuration.
Change-Id: Iba93315f929bf68b96df2e51d8918f26e3ffd827
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | isu/CMakeLists.txt | 14 | ||||
-rw-r--r-- | isu/deviced.service | 5 | ||||
-rw-r--r-- | isu/etc-deviced.mount | 1 | ||||
-rw-r--r-- | isu/isu.cfg | 6 | ||||
-rw-r--r-- | isu/rndis.service | 13 | ||||
-rw-r--r-- | isu/usr-lib-deviced.mount | 11 | ||||
-rw-r--r-- | packaging/deviced.spec | 24 |
8 files changed, 71 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e5dd9a0..3b3ae7c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,6 +226,7 @@ ADD_DEFINITIONS("-DLIBPATH=\"${LIB_INSTALL_DIR}\"") ADD_DEFINITIONS("-DENABLE_DEVICED_DLOG") ADD_DEFINITIONS("-DENABLE_LIBDEVICED_DLOG") ADD_DEFINITIONS("-DENABLE_PM_LOG") +ADD_DEFINITIONS("-DDD_PLUGIN_PATH=\"${DD_PLUGIN_PATH}\"") IF(BATTERY_MODULE STREQUAL on) ADD_DEFINITIONS("-DBATTERY_MODULE") @@ -251,6 +252,8 @@ SET(deviced_LDFLAGS ${REQUIRED_PKGS_LDFLAGS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${REQUIRED_PKGS_LDFLAGS} "-lrt -ldl -lm" deviced-common-private) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) +INSTALL(DIRECTORY DESTINATION ${MAKE_INSTALL_PREFIX}${DD_PLUGIN_PATH}) + IF(POWER_MODULE STREQUAL on) ADD_EXECUTABLE(deviced-shutdown src/power-shutdown/shutdown.c src/shared/common.c) SET(deviced-shutdown_LDFLAGS ${REQUIRED_PKGS_LDFLAGS}) diff --git a/isu/CMakeLists.txt b/isu/CMakeLists.txt index 7d4d5564..21004a59 100644 --- a/isu/CMakeLists.txt +++ b/isu/CMakeLists.txt @@ -1,6 +1,20 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ISU C) +IF("${ISU_ARCH_BIT}" STREQUAL "32") + OPTION(USE_32BIT "Use 32bit architecture" ON) +ELSEIF("${ISU_ARCH_BIT}" STREQUAL "64") + OPTION(USE_64BIT "Use 64bit architecture" ON) +ENDIF() + INSTALL(FILES isu.cfg DESTINATION /etc/isu/deviced/ PERMISSIONS OWNER_WRITE OWNER_READ) INSTALL(FILES deviced.service DESTINATION /etc/isu/deviced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) INSTALL(FILES etc-deviced.mount DESTINATION /etc/isu/deviced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) + +IF(USE_32BIT) + INSTALL(FILES usr-lib-deviced.mount DESTINATION /etc/isu/deviced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) +ELSEIF(USE_64BIT) + INSTALL(FILES usr-lib-deviced.mount DESTINATION /etc/isu/deviced/system-services/ RENAME usr-lib64-deviced.mount PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) +ENDIF() + +INSTALL(FILES rndis.service DESTINATION /etc/isu/deviced/system-services/ PERMISSIONS OWNER_WRITE OWNER_READ WORLD_READ) diff --git a/isu/deviced.service b/isu/deviced.service index 2f474729..851eafc2 100644 --- a/isu/deviced.service +++ b/isu/deviced.service @@ -1,7 +1,8 @@ [Unit] Description=System device daemon -After=etc-deviced.mount -BindsTo=etc-deviced.mount +After=##PLUGIN_MOUNT## +BindsTo=##PLUGIN_MOUNT## +DefaultDependencies=no # Caution: never uncomment below "Wants=" and "After=" entries. # Just information, deviced internally wait for /run/.wm_ready diff --git a/isu/etc-deviced.mount b/isu/etc-deviced.mount index 4450ccaf..687b666c 100644 --- a/isu/etc-deviced.mount +++ b/isu/etc-deviced.mount @@ -6,4 +6,3 @@ ConditionPathIsMountPoint=!/etc/deviced What=#ISU_RUN_PATH#/deviced/rootfs/etc/deviced Where=/etc/deviced Options=defaults,relatime,bind,ro - diff --git a/isu/isu.cfg b/isu/isu.cfg index c99f3692..e5ee072e 100644 --- a/isu/isu.cfg +++ b/isu/isu.cfg @@ -1,9 +1,11 @@ [isu] name=#NAME# version=#VERSION# -system_service=deviced.service etc-deviced.mount +system_service=deviced.service ##PLUGIN_MOUNT## etc-deviced.mount rndis.service [files] /usr/bin/deviced /etc/deviced/ -/usr/lib*/libdeviced-common-private.so +/usr/bin/rndis.sh +##LIBDIR##/deviced +##LIBDIR##/libdeviced-common-private.so
\ No newline at end of file diff --git a/isu/rndis.service b/isu/rndis.service new file mode 100644 index 00000000..2470a4cd --- /dev/null +++ b/isu/rndis.service @@ -0,0 +1,13 @@ +[Unit] +Description=rndis service + +[Service] +Type=oneshot +User=network_fw +Group=network_fw +SmackProcessLabel=System +ExecStart=#ISU_RUN_PATH#/deviced/rootfs/usr/bin/rndis.sh start +ExecStop=#ISU_RUN_PATH#/deviced/rootfs/usr/bin/rndis.sh stop +Capabilities=cap_net_admin=i +SecureBits=keep-caps +RemainAfterExit=yes diff --git a/isu/usr-lib-deviced.mount b/isu/usr-lib-deviced.mount new file mode 100644 index 00000000..6ac95d37 --- /dev/null +++ b/isu/usr-lib-deviced.mount @@ -0,0 +1,11 @@ +[Unit] +Before=local-fs.target +After=etc-deviced.mount +BindsTo=etc-deviced.mount +ConditionPathIsMountPoint=!##PLUGIN_LIB_DIR## +DefaultDependencies=no + +[Mount] +What=#ISU_RUN_PATH#/deviced/rootfs##PLUGIN_LIB_DIR## +Where=##PLUGIN_LIB_DIR## +Options=defaults,relatime,bind,ro diff --git a/packaging/deviced.spec b/packaging/deviced.spec index ad6f41ec..022887c5 100644 --- a/packaging/deviced.spec +++ b/packaging/deviced.spec @@ -13,6 +13,8 @@ Source0: %{name}-%{version}.tar.gz Source1: deviced.manifest Source2: libdeviced.manifest +%define plugindir %{_libdir}/deviced + BuildRequires: cmake BuildRequires: gettext-devel BuildRequires: pkgconfig(mount) @@ -115,7 +117,13 @@ Requires: %{name} = %{version}-%{release} %description plugin-profile-tv Plugin libraries for TV devices -%isu_package +%package isu +Summary: ISU package for deviced +Group: System/Management +Requires: %{name} = %{version}-%{release} + +%description isu +Configuration files to generate the ISU (Individual Service Upgrade) package %prep %setup -q @@ -138,6 +146,7 @@ Plugin libraries for TV devices -DARCH=%{ARCH} \ -DARCH_BIT=%{ARCH_BIT} \ -DDPMS=%{DPMS} \ + -DDD_PLUGIN_PATH=%{plugindir} \ -DBATTERY_MODULE=%{battery_module} \ -DDISPLAY_MODULE=on \ -DEXTCON_MODULE=on \ @@ -165,6 +174,15 @@ cp %{SOURCE2} . make %{?jobs:-j%jobs} +LIB_DIR=%{_libdir} +sed -ie s,"##LIBDIR##,$LIB_DIR,g" isu/isu.cfg +DD_PLUGIN_PATH=%{plugindir} +DD_PLUGIN_MOUNT_NAME=$(systemd-escape $DD_PLUGIN_PATH).mount +DD_PLUGIN_MOUNT_NAME=$(cut -c2- <<< $DD_PLUGIN_MOUNT_NAME) > /dev/null +sed -ie s,"##PLUGIN_MOUNT##,$DD_PLUGIN_MOUNT_NAME,g" isu/isu.cfg +sed -ie s,"##PLUGIN_MOUNT##,$DD_PLUGIN_MOUNT_NAME,g" isu/deviced.service +sed -ie s,"##PLUGIN_LIB_DIR##,$DD_PLUGIN_PATH,g" isu/usr-lib-deviced.mount + %install rm -rf %{buildroot} %make_install @@ -241,6 +259,7 @@ mv %{_libdir}/tv-display.so %{_libdir}/deviced/display.so %{_unitdir}/multi-user.target.wants/deviced.service %{_unitdir}/deviced.service %{_datadir}/dbus-1/system-services/org.tizen.system.deviced.service +%dir %{plugindir} %if %{?sdb_prestart} == on %{_unitdir}/sdb-prestart.service %{_unitdir}/basic.target.wants/sdb-prestart.service @@ -348,3 +367,6 @@ mv %{_libdir}/tv-display.so %{_libdir}/deviced/display.so %{_libdir}/tv-display.so %{_unitdir}/rndis.service %{_bindir}/rndis.sh + +%files isu +/etc/isu/deviced/* |