From: SangYoun Kwak Date: Wed, 19 Mar 2025 07:29:41 +0000 (+0900) Subject: hal-backend-service: Change service name for public profile X-Git-Tag: accepted/tizen/unified/20250322.012724~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=960c64949ae2f536c4b95d50ca6eaf7e8fa06b97;p=platform%2Fhal%2Fapi%2Fcommon.git hal-backend-service: Change service name for public profile In public, there would be a service: hal-backend-service To accomplish this, service is renamed from hal-backend-service-device to hal-backend-service. Accordingly, the generator script and building scripts are modified to check the prefix of service name to be "hal-backend-service", since the checking prefix was "hal-backend-service-" which does not allow the service name to be "hal-backend-service". Change-Id: Iaa8a5707cee3a164d7b5e5c139a7d5d356999dad Signed-off-by: SangYoun Kwak --- diff --git a/hal-backend-service/CMakeLists.txt b/hal-backend-service/CMakeLists.txt index dfeeb64..cbd19c0 100644 --- a/hal-backend-service/CMakeLists.txt +++ b/hal-backend-service/CMakeLists.txt @@ -35,6 +35,6 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${gtest_LDFLAGS} ${gtest_pkgs_LDFLAGS} -ld INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin/) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION lib/systemd/system - FILES_MATCHING PATTERN "hal-backend-service-*.service") + FILES_MATCHING PATTERN "hal-backend-service*.service") INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION lib/systemd/system - FILES_MATCHING PATTERN "hal-backend-service-*.socket") + FILES_MATCHING PATTERN "hal-backend-service*.socket") diff --git a/hal-backend-service/config/hal-backend-service-config.json b/hal-backend-service/config/hal-backend-service-config.json index ee4bdf2..afeda94 100644 --- a/hal-backend-service/config/hal-backend-service-config.json +++ b/hal-backend-service/config/hal-backend-service-config.json @@ -3,7 +3,7 @@ { "type": "systemd", "property": { - "name": "hal-backend-service-device" + "name": "hal-backend-service" }, "thread": [ { "hal_module_name": [ "device_display" ] }, diff --git a/hal-backend-service/config_types.py b/hal-backend-service/config_types.py index d93f99e..76e084e 100644 --- a/hal-backend-service/config_types.py +++ b/hal-backend-service/config_types.py @@ -95,7 +95,7 @@ class HalBackendServiceSystemdPropertyConfig(JsonConfigEntity): if type(name_obj) != str: raise InvalidJsonStructException("Invalid json struct: systemd name should be a string") - service_name_prefix = "hal-backend-service-" + service_name_prefix = "hal-backend-service" if not name_obj.startswith(service_name_prefix): raise InvalidJsonValueException(f"Invalid json value: systemd name should start with {service_name_prefix}") diff --git a/packaging/hal-api-common.spec b/packaging/hal-api-common.spec index ba9fc60..1c5fdd5 100644 --- a/packaging/hal-api-common.spec +++ b/packaging/hal-api-common.spec @@ -139,12 +139,12 @@ install -D -m 0755 %{SOURCE9} %{buildroot}%{_datadir}/upgrade/scripts/500.%{name %if %{enable_hal_backend_service} -for HAL_BACKEND_SERVICE_SERVICE in $(ls hal-backend-service/hal-backend-service-*.service); do +for HAL_BACKEND_SERVICE_SERVICE in $(ls hal-backend-service/hal-backend-service*.service); do HAL_BACKEND_SERVICE_SERVICE=$(basename ${HAL_BACKEND_SERVICE_SERVICE}) %install_service basic.target.wants ${HAL_BACKEND_SERVICE_SERVICE} done -for HAL_BACKEND_SERVICE_SOCKET in $(ls hal-backend-service/hal-backend-service-*.socket); do +for HAL_BACKEND_SERVICE_SOCKET in $(ls hal-backend-service/hal-backend-service*.socket); do HAL_BACKEND_SERVICE_SOCKET=$(basename ${HAL_BACKEND_SERVICE_SOCKET}) %install_service sockets.target.wants ${HAL_BACKEND_SERVICE_SOCKET} done @@ -181,10 +181,10 @@ rm -f %{_unitdir}/sysinit.target.wants/hal-compatibility-checker.service %{_datadir}/upgrade/scripts/500.%{name}.sh %if %{enable_hal_backend_service} %{_bindir}/hal-backend-service -%{_unitdir}/sockets.target.wants/hal-backend-service-*.socket -%{_unitdir}/basic.target.wants/hal-backend-service-*.service -%{_unitdir}/hal-backend-service-*.socket -%{_unitdir}/hal-backend-service-*.service +%{_unitdir}/sockets.target.wants/hal-backend-service*.socket +%{_unitdir}/basic.target.wants/hal-backend-service*.service +%{_unitdir}/hal-backend-service*.socket +%{_unitdir}/hal-backend-service*.service %endif %files -n %{devel_name}