From ae8847aeab1a32c300a31d303b6af863131b1c15 Mon Sep 17 00:00:00 2001 From: Sangjung Woo Date: Mon, 5 Feb 2024 17:53:32 +0900 Subject: [PATCH] [Build/Pkg] Rename spec and manifest files This patch renames spec and manifest files to mlops-agent.spec and mlops-agent.manifest. It also update the package name with the'mlops-agent'. However, the name of D-Bus service is not changed since this channel is also used as Service API. Signed-off-by: Sangjung Woo --- daemon/include/meson.build | 4 +- ...l-agent-interface.h => mlops-agent-interface.h} | 8 +-- daemon/meson.build | 10 ++-- ...l-agent-interface.c => mlops-agent-interface.c} | 2 +- daemon/{ml-agent.pc.in => mlops-agent.pc.in} | 8 +-- dbus/meson.build | 8 +-- ...-learning-agent.conf.in => mlops-agent.conf.in} | 0 ...ing-agent.service.in => mlops-agent.service.in} | 4 +- dbus/org.tizen.machinelearning.service.service.in | 4 +- ...earning-agent.manifest => mlops-agent.manifest} | 0 ...achine-learning-agent.spec => mlops-agent.spec} | 69 +++++++++++----------- tests/daemon/meson.build | 2 +- ...nittest_ml_agent.cc => unittest_mlops_agent.cc} | 2 +- tests/meson.build | 6 +- .../org.tizen.machinelearning.service.service.in | 2 +- 15 files changed, 66 insertions(+), 63 deletions(-) rename daemon/include/{ml-agent-interface.h => mlops-agent-interface.h} (98%) rename daemon/{ml-agent-interface.c => mlops-agent-interface.c} (99%) rename daemon/{ml-agent.pc.in => mlops-agent.pc.in} (62%) rename dbus/{machine-learning-agent.conf.in => mlops-agent.conf.in} (100%) rename dbus/{machine-learning-agent.service.in => mlops-agent.service.in} (58%) rename packaging/{machine-learning-agent.manifest => mlops-agent.manifest} (100%) rename packaging/{machine-learning-agent.spec => mlops-agent.spec} (84%) rename tests/daemon/{unittest_ml_agent.cc => unittest_mlops_agent.cc} (99%) diff --git a/daemon/include/meson.build b/daemon/include/meson.build index 8f4738b..5b34eb6 100755 --- a/daemon/include/meson.build +++ b/daemon/include/meson.build @@ -1,5 +1,5 @@ -ml_agent_headers = files('ml-agent-interface.h') +ml_agent_headers = files('mlops-agent-interface.h') install_headers(ml_agent_headers, - subdir: 'ml-agent' + subdir: 'ml' ) diff --git a/daemon/include/ml-agent-interface.h b/daemon/include/mlops-agent-interface.h similarity index 98% rename from daemon/include/ml-agent-interface.h rename to daemon/include/mlops-agent-interface.h index 035b003..a33a0ee 100755 --- a/daemon/include/ml-agent-interface.h +++ b/daemon/include/mlops-agent-interface.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /** - * @file ml-agent-interface.h + * @file mlops-agent-interface.h * @date 5 April 2023 * @brief A set of exported ml-agent interfaces for managing pipelines, models, and other service. * @see https://github.com/nnstreamer/deviceMLOps.MLAgent @@ -8,8 +8,8 @@ * @bug No known bugs except for NYI items */ -#ifndef __ML_AGENT_INTERFACE_H__ -#define __ML_AGENT_INTERFACE_H__ +#ifndef __MLOPS_AGENT_INTERFACE_H__ +#define __MLOPS_AGENT_INTERFACE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -190,4 +190,4 @@ gint ml_agent_resource_get (const gchar *name, gchar **res_info, GError **err); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* __ML_AGENT_INTERFACE_H__ */ +#endif /* __MLOPS_AGENT_INTERFACE_H__ */ diff --git a/daemon/meson.build b/daemon/meson.build index 3b6db6a..632beb4 100644 --- a/daemon/meson.build +++ b/daemon/meson.build @@ -1,6 +1,6 @@ # Machine Learning Agent ml_agent_incs = include_directories('.', 'include') -ml_agent_lib_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c', +ml_agent_lib_srcs = files('modules.c', 'gdbus-util.c', 'mlops-agent-interface.c', 'pipeline-dbus-impl.cc', 'model-dbus-impl.cc', 'resource-dbus-impl.cc', 'service-db.cc') if (get_option('enable-tizen')) @@ -31,7 +31,7 @@ ml_agent_db_path_arg = '-DDB_PATH="' + serviceDBPath + '"' serviceDBKeyPrefix = get_option('service-db-key-prefix') ml_agent_db_key_prefix_arg = '-DDB_KEY_PREFIX="' + serviceDBKeyPrefix + '"' -ml_agent_shared_lib = shared_library ('ml-agent', +ml_agent_shared_lib = shared_library ('mlops-agent', ml_agent_lib_srcs, dependencies: ml_agent_deps, include_directories: ml_agent_incs, @@ -41,7 +41,7 @@ ml_agent_shared_lib = shared_library ('ml-agent', version: ml_agent_version, ) -ml_agent_static_lib = static_library('ml-agent', +ml_agent_static_lib = static_library('mlops-agent', ml_agent_lib_srcs, dependencies: ml_agent_deps, include_directories: ml_agent_incs, @@ -63,7 +63,7 @@ ml_agent_dep = declare_dependency( ) ml_agent_main_file = files('main.c') -ml_agent_executable = executable('machine-learning-agent', +ml_agent_executable = executable('mlops-agent', ml_agent_main_file, dependencies: ml_agent_dep, install: true, @@ -72,7 +72,7 @@ ml_agent_executable = executable('machine-learning-agent', pie: true ) -configure_file(input: 'ml-agent.pc.in', output: 'ml-agent.pc', +configure_file(input: 'mlops-agent.pc.in', output: 'mlops-agent.pc', install_dir: join_paths(ml_agent_install_libdir, 'pkgconfig'), configuration: ml_agent_conf ) diff --git a/daemon/ml-agent-interface.c b/daemon/mlops-agent-interface.c similarity index 99% rename from daemon/ml-agent-interface.c rename to daemon/mlops-agent-interface.c index 6507961..07d8134 100755 --- a/daemon/ml-agent-interface.c +++ b/daemon/mlops-agent-interface.c @@ -11,7 +11,7 @@ #include #include -#include "include/ml-agent-interface.h" +#include "include/mlops-agent-interface.h" #include "dbus-interface.h" #include "model-dbus.h" #include "pipeline-dbus.h" diff --git a/daemon/ml-agent.pc.in b/daemon/mlops-agent.pc.in similarity index 62% rename from daemon/ml-agent.pc.in rename to daemon/mlops-agent.pc.in index 07901cd..46f3356 100755 --- a/daemon/ml-agent.pc.in +++ b/daemon/mlops-agent.pc.in @@ -3,8 +3,8 @@ exec_prefix=@EXEC_PREFIX@ libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDE_INSTALL_DIR@ -Name: ml-agent -Description: Development headers and libraries for interfaces provided by Machine Learning Agent +Name: mlops-agent +Description: Development headers and libraries for interfaces provided by MLOps Agent Version: @VERSION@ -Libs: -L${libdir} -lml-agent -Cflags: -I${includedir}/ml-agent +Libs: -L${libdir} -lmlops-agent +Cflags: -I${includedir}/mlops-agent diff --git a/dbus/meson.build b/dbus/meson.build index a250578..0e5276d 100644 --- a/dbus/meson.build +++ b/dbus/meson.build @@ -32,8 +32,8 @@ gdbus_gen_header_dep = declare_dependency( sources: [gdbus_gen_pipeline_src, gdbus_gen_model_src, gdbus_gen_resource_src]) # DBus Policy configuration -configure_file(input: 'machine-learning-agent.conf.in', - output: 'machine-learning-agent.conf', +configure_file(input: 'mlops-agent.conf.in', + output: 'mlops-agent.conf', install_dir: dbus_policy_dir, configuration: ml_agent_conf ) @@ -46,8 +46,8 @@ configure_file(input: 'org.tizen.machinelearning.service.service.in', ) # Systemd Service file -configure_file(input: 'machine-learning-agent.service.in', - output: 'machine-learning-agent.service', +configure_file(input: 'mlops-agent.service.in', + output: 'mlops-agent.service', install_dir: systemd_service_dir, configuration: ml_agent_conf ) diff --git a/dbus/machine-learning-agent.conf.in b/dbus/mlops-agent.conf.in similarity index 100% rename from dbus/machine-learning-agent.conf.in rename to dbus/mlops-agent.conf.in diff --git a/dbus/machine-learning-agent.service.in b/dbus/mlops-agent.service.in similarity index 58% rename from dbus/machine-learning-agent.service.in rename to dbus/mlops-agent.service.in index d315d4c..5ff84c3 100644 --- a/dbus/machine-learning-agent.service.in +++ b/dbus/mlops-agent.service.in @@ -1,10 +1,10 @@ [Unit] -Description=Machine Learning Agent Daemon +Description=MLOps Agent Daemon [Service] Type=dbus BusName=org.tizen.machinelearning.service SmackProcessLabel=System -ExecStart=@EXEC_PREFIX@/machine-learning-agent +ExecStart=@EXEC_PREFIX@/mlops-agent User=service_fw Group=service_fw diff --git a/dbus/org.tizen.machinelearning.service.service.in b/dbus/org.tizen.machinelearning.service.service.in index a3c7004..f34842b 100644 --- a/dbus/org.tizen.machinelearning.service.service.in +++ b/dbus/org.tizen.machinelearning.service.service.in @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.tizen.machinelearning.service -Exec=@EXEC_PREFIX@/machine-learning-agent -SystemdService=machine-learning-agent.service +Exec=@EXEC_PREFIX@/mlops-agent +SystemdService=mlops-agent.service diff --git a/packaging/machine-learning-agent.manifest b/packaging/mlops-agent.manifest similarity index 100% rename from packaging/machine-learning-agent.manifest rename to packaging/mlops-agent.manifest diff --git a/packaging/machine-learning-agent.spec b/packaging/mlops-agent.spec similarity index 84% rename from packaging/machine-learning-agent.spec rename to packaging/mlops-agent.spec index 8d8a0bc..c4c3667 100644 --- a/packaging/machine-learning-agent.spec +++ b/packaging/mlops-agent.spec @@ -13,7 +13,7 @@ %define builddir build %define source_root %{_builddir}/%{?buildsubdir} %define test_script %{source_root}/packaging/run_unittests.sh -%define test_base_dir %{_bindir}/ml-agent-test +%define test_base_dir %{_bindir}/ml-test # Note that debug packages generate an additional build and storage cost. # If you do not need debug packages, run '$ gbs build ... --define "_skip_debug_rpm 1"'. @@ -43,21 +43,21 @@ ########################################################################### # Package / sub-package definitions -Name: machine-learning-agent -Summary: AI service agent for ML(Machine Learning) API and NNStreamer +Name: mlops-agent +Summary: AI service agent for MLOps and ML(Machine Learning) API # Synchronize the version information for ML-Agent. -# 1. Tizen : ./packaging/machine-learning-agent.spec +# 1. Tizen : ./packaging/mlops-agent.spec # 2. Meson : ./meson.build Version: 1.8.5 Release: 0 Group: Machine Learning/ML Framework Packager: Sangjung Woo License: Apache-2.0 -Source0: machine-learning-agent-%{version}.tar -Source1001: machine-learning-agent.manifest +Source0: mlops-agent-%{version}.tar +Source1001: mlops-agent.manifest ## Define runtime requirements ## -Requires: libmachine-learning-agent = %{version}-%{release} +Requires: libmlops-agent = %{version}-%{release} Requires: dbus-1 ## Define build requirements ## @@ -90,17 +90,17 @@ BuildRequires: lcov %description AI service agent for ML(Machine Learning) API and NNStreamer. -%package -n libmachine-learning-agent +%package -n libmlops-agent Summary: Library that exports interfaces provided by Machine Learning Agent Group: Machine Learning/ML Framework = %{version}-%{release} -%description -n libmachine-learning-agent +%description -n libmlops-agent Shared library to export interfaces provided by the Machine Learning Agent. -%package -n libmachine-learning-agent-devel +%package -n libmlops-agent-devel Summary: Development headers and static library for interfaces provided by Machine Learning Agent Group: Machine Learning/ML Framework -Requires: libmachine-learning-agent = %{version}-%{release} -%description -n libmachine-learning-agent-devel +Requires: libmlops-agent = %{version}-%{release} +%description -n libmlops-agent-devel Development headers and static library for interfaces provided by Machine Learning Agent. %package test @@ -116,7 +116,7 @@ require testing with the ML Agent service. %package unittests Summary: Unittests for Machine Learning Agent Group: Machine Learning/ML Framework -Requires: machine-learning-agent = %{version}-%{release} +Requires: mlops-agent-test = %{version}-%{release} %description unittests Unittests for Machine Learning Agent. %endif @@ -194,7 +194,7 @@ meson install -C %{builddir} --destdir=%{buildroot} TZ='Asia/Seoul'; export TZ # Get commit info -VCS=`cat ${RPM_SOURCE_DIR}/machine-learning-agent.spec | grep "^VCS:" | sed "s|VCS:\\W*\\(.*\\)|\\1|"` +VCS=`cat ${RPM_SOURCE_DIR}/mlops-agent.spec | grep "^VCS:" | sed "s|VCS:\\W*\\(.*\\)|\\1|"` # Create human readable coverage report web page. # Create null gcda files if gcov didn't create it because there is completely no unit test for them. @@ -234,39 +234,39 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests %postun -p /sbin/ldconfig %files -%manifest machine-learning-agent.manifest +%manifest mlops-agent.manifest %license LICENSE -%attr(0755,root,root) %{_bindir}/machine-learning-agent -%attr(0644,root,root) %{_unitdir}/machine-learning-agent.service -%attr(0644,root,root) %config %{_sysconfdir}/dbus-1/system.d/machine-learning-agent.conf +%attr(0755,root,root) %{_bindir}/mlops-agent +%attr(0644,root,root) %{_unitdir}/mlops-agent.service +%attr(0644,root,root) %config %{_sysconfdir}/dbus-1/system.d/mlops-agent.conf %attr(0644,root,root) %{_datadir}/dbus-1/system-services/org.tizen.machinelearning.service.service -%files -n libmachine-learning-agent -%manifest machine-learning-agent.manifest +%files -n libmlops-agent +%manifest mlops-agent.manifest %license LICENSE -%{_libdir}/libml-agent.so.* +%{_libdir}/libmlops-agent.so.* -%files -n libmachine-learning-agent-devel -%manifest machine-learning-agent.manifest -%{_libdir}/libml-agent.so -%{_libdir}/libml-agent.a -%{_includedir}/ml-agent/ml-agent-interface.h -%{_libdir}/pkgconfig/ml-agent.pc +%files -n libmlops-agent-devel +%manifest mlops-agent.manifest +%{_libdir}/libmlops-agent.so +%{_libdir}/libmlops-agent.a +%{_includedir}/ml/mlops-agent-interface.h +%{_libdir}/pkgconfig/mlops-agent.pc %files test -%manifest machine-learning-agent.manifest +%manifest mlops-agent.manifest %license LICENSE -%attr(0755,root,root) %{test_base_dir}/machine-learning-agent-test +%attr(0755,root,root) %{test_base_dir}/mlops-agent-test %attr(0755,root,root) %{test_base_dir}/services/org.tizen.machinelearning.service.service -%{_libdir}/libml-agent-test.* +%{_libdir}/libmlops-agent-test.* %if 0%{?unit_test} %if 0%{?release_test} %files unittests -%manifest machine-learning-agent.manifest +%manifest mlops-agent.manifest %{test_base_dir}/unittests -%{_libdir}/libml-agent-test.a -%{_libdir}/libml-agent-test.so* +%{_libdir}/libmlops-agent-test.a +%{_libdir}/libmlops-agent-test.so* %if 0%{?gcov:1} %{_bindir}/tizen-unittests/%{name}/run-unittest.sh %endif # gcov @@ -284,5 +284,8 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests %endif # unit_test %changelog +* Thu Feb 08 2024 Sangjung Woo +- Rename the package prefix to mlops-agent + * Mon Dec 11 2023 Sangjung Woo - Started ML-Agent packaging for 1.8.5 (Initial version sync to ML API) diff --git a/tests/daemon/meson.build b/tests/daemon/meson.build index 25a8724..8a83630 100644 --- a/tests/daemon/meson.build +++ b/tests/daemon/meson.build @@ -4,7 +4,7 @@ testenv.set('MLAGENT_SOURCE_ROOT_PATH', meson.source_root()) testenv.set('MLAGENT_BUILD_ROOT_PATH', meson.build_root()) unittest_ml_agent = executable('unittest_ml_agent', - 'unittest_ml_agent.cc', + 'unittest_mlops_agent.cc', dependencies: [gtest_dep, ml_agent_test_dep], install: get_option('install-test'), install_dir: unittest_install_dir diff --git a/tests/daemon/unittest_ml_agent.cc b/tests/daemon/unittest_mlops_agent.cc similarity index 99% rename from tests/daemon/unittest_ml_agent.cc rename to tests/daemon/unittest_mlops_agent.cc index 1d79e6b..f2734e9 100644 --- a/tests/daemon/unittest_ml_agent.cc +++ b/tests/daemon/unittest_mlops_agent.cc @@ -11,7 +11,7 @@ #include #include "log.h" -#include "ml-agent-interface.h" +#include "mlops-agent-interface.h" /** * @brief Test base class for ML-Agent. diff --git a/tests/meson.build b/tests/meson.build index 7cc34b6..16af858 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,9 +1,9 @@ # Install path for unittest -test_base_dir = join_paths(ml_agent_install_bindir, 'ml-agent-test') +test_base_dir = join_paths(ml_agent_install_bindir, 'ml-test') unittest_install_dir = join_paths(test_base_dir, 'unittests') ml_agent_lib_objs = ml_agent_lib.extract_objects(ml_agent_lib_srcs) -ml_agent_test_both_lib = both_libraries('ml-agent-test', +ml_agent_test_both_lib = both_libraries('mlops-agent-test', dependencies: ml_agent_deps, include_directories: ml_agent_incs, install: true, @@ -26,7 +26,7 @@ ml_agent_test_dep = declare_dependency( ) ml_agent_main_objs = ml_agent_executable.extract_objects(ml_agent_main_file) -executable('machine-learning-agent-test', +executable('mlops-agent-test', dependencies: ml_agent_test_dep, install: true, install_dir: test_base_dir, diff --git a/tests/services/org.tizen.machinelearning.service.service.in b/tests/services/org.tizen.machinelearning.service.service.in index e02d334..493811c 100644 --- a/tests/services/org.tizen.machinelearning.service.service.in +++ b/tests/services/org.tizen.machinelearning.service.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.tizen.machinelearning.service -Exec=@build_dir@/machine-learning-agent-test --session --path=. +Exec=@build_dir@/mlops-agent-test --session --path=. -- 2.7.4