5 Source0: file://%{name}-%{version}.tar.gz
6 Summary: Tizen device encryption and secure erase manager
7 Group: Security/Service
12 BuildRequires: gettext-tools
13 BuildRequires: pkgconfig(klay)
14 BuildRequires: pkgconfig(vconf)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(cynara-client)
18 BuildRequires: pkgconfig(openssl3)
19 BuildRequires: pkgconfig(libsmack)
20 BuildRequires: pkgconfig(blkid)
21 BuildRequires: pkgconfig(capi-system-device)
22 BuildRequires: pkgconfig(libsystemd)
23 BuildRequires: pkgconfig(ext2fs)
24 BuildRequires: pkgconfig(com_err)
25 BuildRequires: pkgconfig(gio-2.0)
28 %global key_storage_plugin_dir %{_libdir}/ode-key-storage-plugin/
29 %global softreset_dir /usr/system/RestoreDir/softreset/
30 %define upgrade_script_dir /usr/share/upgrade/scripts/
31 %global socket_path %{TZ_SYS_RUN}/.ode.sock
32 %global dbus_system_services_dir %{_datadir}/dbus-1/system-services/
33 %global dbus_conf_dir %{_sysconfdir}/dbus-1/system.d/
34 %global dbus_name org.tizen.%{name}
37 The ode package provides a daemon which is responsible for encrypting/decryption storages and secure erasing.
40 %manifest ode.manifest
41 %defattr(644,root,root,755)
42 %attr(755,root,root) %{_bindir}/oded
43 %{_unitdir}/ode.service
44 %{_unitdir}/ode.socket
45 %{dbus_system_services_dir}/%{dbus_name}.service
46 %{dbus_conf_dir}/%{dbus_name}.conf
47 %attr(700,root,root) %{TZ_SYS_SBIN}/ode-admin-cli
48 %attr(700,root,root) %{softreset_dir}/ode_softreset.sh
49 %attr(750,root,system_share) %{TZ_SYS_SBIN}/ode-fota
51 %dir %{key_storage_plugin_dir}
52 %attr(755,root,root) %{upgrade_script_dir}/500.ode_upgrade.sh
58 %{!?build_type:%define build_type "RELEASE"}
60 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
61 CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
62 CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
65 %cmake . -DVERSION=%{version} \
66 -DCMAKE_BUILD_TYPE=%{build_type} \
67 -DRUN_DIR=%{TZ_SYS_RUN} \
68 -DBIN_DIR=%{TZ_SYS_BIN} \
69 -DSBIN_DIR=%{TZ_SYS_SBIN} \
70 -DSYSTEMD_UNIT_DIR=%{_unitdir} \
71 -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
72 -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
73 -DSOFTRESET_DIR="%{softreset_dir}" \
74 -DKEY_STORAGE_PLUGIN_DIR="%{key_storage_plugin_dir}" \
75 -DUPGRADE_SCRIPT_DIR="%{upgrade_script_dir}" \
76 -DSOCKET_PATH="%{socket_path}" \
77 -DBUS_SYSTEM_SERVICES_DIR="%{dbus_system_services_dir}" \
78 -DBUS_CONF_DIR="%{dbus_conf_dir}" \
79 -DBUS_NAME="%{dbus_name}"
92 systemctl stop ode.service
96 systemctl enable ode.socket
99 systemctl start ode.socket
100 elif [ $1 = 2 ]; then
102 systemctl daemon-reload
103 systemctl restart ode.socket
109 systemctl disable ode.socket
110 systemctl stop ode.socket
111 systemctl stop ode.service
114 ## ODE Client Package ########################################################
116 Summary: Library for Tizen device encryption and secure erase
117 Group: Security/Libraries
118 BuildRequires: pkgconfig(libtzplatform-config)
119 Requires: %{name} = %{version}-%{release}
120 Requires(post): /sbin/ldconfig
121 Requires(postun): /sbin/ldconfig
123 %description -n libode
124 The libode package contains the libraries needed to encrypt/decrypt storages and secure erasing.
126 %post -n libode -p /sbin/ldconfig
128 %postun -n libode -p /sbin/ldconfig
131 %manifest ode.manifest
132 %defattr(644,root,root,755)
133 %attr(755,root,root) %{_libdir}/libode.so.%{version}
134 %{_libdir}/libode.so.0
136 ## Devel Package ##############################################################
137 %package -n libode-devel
138 Summary: Libraries and header files for device encryption client development
139 Group: Development/Libraries
140 Requires: libode = %{version}-%{release}
142 %description -n libode-devel
143 The libode-devel package includes the libraries and header files necessary for
144 developing device encryption client program.
146 %files -n libode-devel
147 %manifest ode.manifest
148 %defattr(644,root,root,755)
151 %{_libdir}/pkgconfig/ode.pc
153 ## Plugin Devel Package ##############################################################
155 Summary: Header files for key storage plugin development
156 Group: Development/Libraries
158 %description ksp-devel
159 The ode-ksp-devel package includes header files necessary for key storage
163 %manifest ode.manifest
164 %defattr(644,root,root,755)
165 %{_includedir}/ode-key-storage-plugin
166 %{_libdir}/pkgconfig/ode-key-storage-plugin.pc
168 ## Unittest Package ###########################################################
170 Summary: Unit tests to verify components of device encryption
171 Group: Security/Testing
172 Requires: libode = %{version}-%{release}
174 %description unit-tests
175 The libode-devel package includes the libraries and header files necessary for
176 developing device encryption client program.
179 %manifest ode.manifest
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_bindir}/ode-engine-unit-tests
183 ## Dummy key storage plugin Package ###########################################################
185 Summary: Dummy key storage plugin for FOTA binary upgrade testing
186 Group: Security/Testing
188 %description dummy-ksp
189 The ode-dummy-ksp package includes the dummy key storage plugin that can be used
190 for testing the binary upgrade process (FOTA). The plugin will be used by ode to
191 store the master encryption key in a file to use during FOTA process.
194 %manifest ode.manifest
195 %attr(755,root,root) %{key_storage_plugin_dir}/*